/* ======================================
   REAXIO RUN DEMO COMPONENT
   Mobile-first · mount anywhere
   ====================================== */

.rdx-demo {
    --rdx-radius: 16px;
    background: var(--bg-card, rgba(15, 15, 30, 0.7));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: var(--radius-xl, 28px);
    padding: 20px 16px 24px;
    position: relative;
    overflow: hidden;
    max-width: 420px;
    margin: 0 auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.rdx-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 50%, #d946ef 100%);
}

.rdx-demo--compact {
    padding: 16px 12px 20px;
    border-radius: 20px;
}

.rdx-hidden {
    display: none !important;
}

/* Progress */
.rdx-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}

.rdx-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00d4ff, #d946ef);
    border-radius: 2px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header */
.rdx-header {
    margin-bottom: 20px;
}

.rdx-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.rdx-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.rdx-round {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: #f0f0f5;
}

.rdx-streak {
    font-size: 0.8rem;
    font-weight: 600;
    color: #d946ef;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(217, 70, 239, 0.12);
}

.rdx-streak--hidden {
    display: none;
}

.rdx-question {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #f0f0f5;
    margin-top: 12px;
    margin-bottom: 4px;
}

.rdx-question.rdx-hidden {
    display: none;
}

@media (min-width: 480px) {
    .rdx-question {
        font-size: 1.15rem;
    }
}

/* Matchup — vertical stack for one-thumb mobile */
.rdx-matchup {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.rdx-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 88px;
    padding: 16px 12px;
    border-radius: var(--rdx-radius);
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    width: 100%;
}

.rdx-option:active {
    transform: scale(0.97);
}

.rdx-option--champion:hover,
.rdx-option--champion:focus-visible {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 8px 28px rgba(0, 212, 255, 0.15);
}

.rdx-option--challenger:hover,
.rdx-option--challenger:focus-visible {
    border-color: rgba(217, 70, 239, 0.45);
    box-shadow: 0 8px 28px rgba(217, 70, 239, 0.15);
}

.rdx-crown {
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 0.9rem;
}

.rdx-option-emoji {
    font-size: 2rem;
    line-height: 1;
}

.rdx-option-name {
    font-size: clamp(0.78rem, 3.2vw, 0.95rem);
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
    padding: 0 4px;
}

.rdx-vs {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 0.72rem;
    font-weight: 800;
    color: #6b7280;
    text-align: center;
    padding: 2px 0;
}

/* Feedback */
.rdx-stage--feedback {
    animation: rdxFadeIn 0.35s ease-out;
    cursor: pointer;
}

.rdx-feedback-card {
    text-align: center;
}

.rdx-feedback-personal {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    color: #f0f0f5;
    margin-bottom: 16px;
}

.rdx-feedback-stats {
    margin-bottom: 14px;
}

.rdx-feedback-early {
    font-size: 0.88rem;
    color: #00d4ff;
    font-weight: 500;
    padding: 12px 8px;
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.08);
}

.rdx-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rdx-bar-label {
    width: 72px;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: #9ca3af;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rdx-bar-track {
    flex: 1;
    height: 28px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 9999px;
    overflow: hidden;
}

.rdx-bar-fill {
    height: 100%;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    min-width: 36px;
    transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.72rem;
    font-weight: 700;
}

.rdx-bar-fill--cyan {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.55));
}

.rdx-bar-fill--magenta {
    background: linear-gradient(90deg, rgba(217, 70, 239, 0.2), rgba(217, 70, 239, 0.55));
}

.rdx-feedback-outcome {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.rdx-feedback-hint {
    font-size: 0.72rem;
    color: #6b7280;
}

/* Summary */
.rdx-stage--summary {
    animation: rdxFadeIn 0.4s ease-out;
}

.rdx-summary-card {
    text-align: center;
}

.rdx-summary-crown {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.rdx-summary-label {
    font-size: 0.78rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.rdx-summary-champion h3 {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rdx-summary-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 4px;
}

.rdx-summary-defeated {
    margin: 16px 0;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.rdx-summary-defeated p {
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.rdx-summary-defeated ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rdx-summary-defeated li {
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rdx-summary-stat {
    font-size: 0.85rem;
    color: #d946ef;
    font-weight: 600;
    margin-bottom: 16px;
}

.rdx-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Buttons */
.rdx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.rdx-btn--share {
    background: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 50%, #d946ef 100%);
    color: #fff;
}

.rdx-btn--share:active {
    transform: scale(0.98);
}

.rdx-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
}

/* Round 6 hook */
.rdx-stage--hook {
    animation: rdxSlideUp 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.rdx-hook-layout {
    position: relative;
}

.rdx-hook-summary-dim {
    opacity: 0.35;
    filter: blur(1px);
    margin-bottom: 16px;
    pointer-events: none;
}

.rdx-summary-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.rdx-summary-mini span {
    font-size: 1.4rem;
}

.rdx-hook-teaser {
    padding: 16px 12px;
    border-radius: var(--rdx-radius);
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2);
    text-align: center;
}

.rdx-hook-round {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 0.92rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 14px;
    line-height: 1.4;
}

.rdx-hook-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}

.rdx-hook-champion,
.rdx-hook-challenger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 120px;
}

.rdx-hook-champion span:first-child,
.rdx-hook-challenger span:first-child {
    font-size: 2rem;
}

.rdx-hook-champion small,
.rdx-hook-challenger small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
}

.rdx-hook-challenger--dim {
    opacity: 0.45;
    filter: grayscale(0.4);
    transform: scale(0.92);
}

.rdx-store-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 12px;
}

.rdx-store-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
    min-width: 0;
}

.rdx-store-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

/* Animations */
@keyframes rdxFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rdxSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Wider screens — side-by-side options */
@media (min-width: 480px) {
    .rdx-demo {
        padding: 28px 24px 32px;
    }

    .rdx-matchup {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .rdx-vs {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .rdx-option {
        min-height: 120px;
    }

    .rdx-summary-actions {
        flex-direction: row;
    }

    .rdx-btn {
        width: auto;
        flex: 1;
    }
}

/* Modal wrapper overrides */
.rdx-demo-mount--modal {
    padding-top: 4px;
}

.rdx-demo-mount--modal .rdx-demo {
    max-width: 100%;
    border: none;
    background: transparent;
    padding: 0;
}

.rdx-demo-mount--modal .rdx-demo::before {
    display: none;
}

.rdx-demo-mount--modal .rdx-progress {
    width: calc(100% - 52px);
    margin-top: 8px;
    margin-right: 0;
}
