/* ==========================================================================
   Red Seal Ace - Modern PocketPrep & Apple/Tesla Inspired Design System
   ========================================================================== */

:root {
    /* Brand & Theme Colors */
    --primary: #0f172a;               /* Deep PocketPrep Slate/Navy */
    --primary-light: #1e293b;
    --primary-accent: #2563eb;        /* Vibrant Royal Blue */
    --accent-gold: #f59e0b;           /* PocketPrep Gold */
    --accent-cyan: #06b6d4;

    /* Semantic States (PocketPrep Inspired) */
    --correct-color: #10b981;         /* Emerald Green */
    --correct-bg: #f0fdf4;
    --correct-border: #86efac;
    --correct-glow: rgba(16, 185, 129, 0.2);

    --wrong-color: #ef4444;           /* Rose Red */
    --wrong-bg: #fef2f2;
    --wrong-border: #fca5a5;
    --wrong-glow: rgba(239, 68, 68, 0.2);

    /* Neutral Colors & Surfaces */
    --bg-page: #f4f7fb;               /* Ultra-clean Slate Tint */
    --card-bg: #ffffff;
    --card-bg-glass: rgba(255, 255, 255, 0.88);
    --border-color: #e2e8f0;
    --border-light: #edf2f7;

    /* Text Colors */
    --text-primary: #0f172a;          /* Rich Slate 900 */
    --text-secondary: #475569;        /* Slate 600 */
    --text-muted: #94a3b8;            /* Slate 400 */

    /* Elevation & Shadows */
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 20px -4px rgba(15, 23, 42, 0.06), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
    --shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.8);
    --shadow-btn: 0 6px 18px -3px rgba(15, 23, 42, 0.25);

    /* Radii */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Base & Reset
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    background-image: 
        radial-gradient(at 10% 10%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 15%, rgba(245, 158, 11, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 95%, rgba(16, 185, 129, 0.04) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   App Container & Challenge Header (3-Line Mobile Optimized Layout)
   -------------------------------------------------------------------------- */
.app-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

/* Eye-Catching Dark Crimson Iridescent Header Banner */
.challenge-header {
    margin-bottom: 20px;
    padding: 22px 20px;
    background: linear-gradient(140deg, #09090b 0%, #1c0512 25%, #450a1b 60%, #7f1d1d 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 32px -6px rgba(127, 29, 29, 0.45), 0 4px 12px rgba(9, 9, 11, 0.25);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.challenge-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.challenge-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.challenge-pretitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 2px;
}

/* Highlighted "Are you ready" Framed Badge with Normal Case */
.ready-highlight {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
    background: rgba(244, 63, 94, 0.22);
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid rgba(254, 205, 211, 0.3);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
    text-transform: none;
}

.ready-sub {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fecdd3;
    letter-spacing: 0.02em;
    text-transform: none;
}

.challenge-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 3px 0 6px 0;
}

/* --------------------------------------------------------------------------
   Glitch, Subliminal Flash & VHS Interference CTA Container
   -------------------------------------------------------------------------- */
.challenge-cta-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

/* Primary Glowing Call-to-Action with Lightning Pulse */
.challenge-cta.cta-primary {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.16rem;
    font-weight: 900;
    color: #fde047; /* Radiant Gold */
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    width: 100%;
    text-align: center;
    text-shadow: 
        0 0 8px rgba(253, 224, 71, 0.7),
        0 0 20px rgba(245, 158, 11, 0.5),
        0 0 32px rgba(239, 68, 68, 0.3);
    animation: ctaPrimaryGlitch 3.4s ease-in-out infinite;
    transform-origin: center;
    display: inline-block;
}

/* Subliminal Secret Glitch Text ("THINK YOU CAN PASS?") */
.challenge-cta.cta-glitch {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.22rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 
        -3px 0 #00ffff, 
        3px 0 #ff0055, 
        0 0 16px rgba(255, 255, 255, 0.95);
    opacity: 0;
    pointer-events: none;
    animation: ctaSecretGlitch 3.4s steps(1, end) infinite;
    transform-origin: center;
}

/* VHS CRT Scanline Static Overlay */
.vhs-scanlines {
    position: absolute;
    inset: -6px -12px;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.45) 0px,
        rgba(0, 0, 0, 0.45) 1px,
        rgba(255, 255, 255, 0.08) 1px,
        rgba(255, 255, 255, 0.08) 2px,
        transparent 2px,
        transparent 4px
    );
    opacity: 0;
    pointer-events: none;
    border-radius: 8px;
    animation: vhsStaticInterference 3.4s steps(1, end) infinite;
}

/* 1. Keyframes for Main Text: Steady -> Micro-pulse -> Disappear in Glitch -> Big Punch Return */
@keyframes ctaPrimaryGlitch {
    0%, 87.5%, 100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 
            0 0 8px rgba(253, 224, 71, 0.7),
            0 0 20px rgba(245, 158, 11, 0.5),
            0 0 32px rgba(239, 68, 68, 0.3);
        filter: brightness(1);
    }
    88.5% {
        opacity: 1;
        transform: scale(1.025);
        text-shadow: 
            0 0 12px rgba(253, 224, 71, 0.9),
            0 0 24px rgba(245, 158, 11, 0.7),
            0 0 38px rgba(239, 68, 68, 0.45);
        filter: brightness(1.15);
    }
    89.8% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
    90.4% {
        opacity: 0;
        transform: skewX(-10deg) scale(0.95);
        filter: blur(1.5px);
    }
    91.7% {
        opacity: 0;
        transform: skewX(10deg) scale(0.95);
    }
    92.0% {
        opacity: 1;
        transform: scale(1.09);
        text-shadow: 
            0 0 20px rgba(253, 224, 71, 1),
            0 0 40px rgba(245, 158, 11, 0.95),
            0 0 60px rgba(239, 68, 68, 0.75),
            0 0 85px rgba(245, 158, 11, 0.5);
        filter: brightness(1.4);
    }
    93.6% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 
            0 0 8px rgba(253, 224, 71, 0.7),
            0 0 20px rgba(245, 158, 11, 0.5),
            0 0 32px rgba(239, 68, 68, 0.3);
        filter: brightness(1);
    }
}

/* 2. Keyframes for Subliminal Secret Glitch Text: Flash for ~0.08s */
@keyframes ctaSecretGlitch {
    0%, 90.3%, 100% {
        opacity: 0;
        transform: scale(0.92);
    }
    90.5% {
        opacity: 1;
        transform: skewX(-8deg) scale(1.05);
        text-shadow: -4px 0 #00ffff, 4px 0 #ff0055, 0 0 20px rgba(255, 255, 255, 1);
    }
    91.1% {
        opacity: 1;
        transform: skewX(6deg) scale(1.03);
        text-shadow: 4px 0 #00ffff, -4px 0 #ff0055, 0 0 15px rgba(255, 0, 85, 0.9);
    }
    91.7% {
        opacity: 0;
        transform: scale(1);
    }
}

/* 3. Keyframes for VHS Static Interference */
@keyframes vhsStaticInterference {
    0%, 90.3%, 100% {
        opacity: 0;
    }
    90.5% {
        opacity: 0.85;
        background-color: rgba(255, 255, 255, 0.08);
        transform: translateY(-2px);
    }
    91.1% {
        opacity: 0.7;
        background-color: rgba(225, 29, 72, 0.12);
        transform: translateY(2px);
    }
    91.7% {
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   Main Quiz Card (PocketPrep & Tesla Minimalist Style)
   -------------------------------------------------------------------------- */
.card {
    background: var(--card-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 32px 28px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-smooth);
}

/* --------------------------------------------------------------------------
   Dual Progress Bars (Top of Card)
   -------------------------------------------------------------------------- */
.dual-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 28px 0;
    background: transparent;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Top Bar: 5-Question Block Progress (Blue -> Cyan) */
.progress-fill.questions-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    border-radius: 0 4px 4px 0;
    transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Bottom Bar: XP / Score / Readiness (Dynamic Red -> Yellow -> Green) */
.progress-fill.xp-fill {
    height: 100%;
    width: 0%;
    background: #ef4444;
    border-radius: 0 4px 4px 0;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease;
}

.threshold-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 10;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    font-weight: 600;
}
.progress-labels.top-labels {
    margin-bottom: 2px;
}
.progress-labels.bottom-labels {
    margin-top: 2px;
}
.progress-labels-hidden {
    display: none !important;
}

/* Skill Badges */
.skill-row {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    background: rgba(0, 0, 0, 0.03); 
    padding: 12px 16px; 
    border-radius: 8px; 
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
}
.skill-name {
    font-weight: 600; 
    color: var(--text-primary); 
    font-size: 14px;
}
.skill-badge {
    font-weight: 700; 
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid transparent;
}
.badge-novice {
    color: #94A3B8;
    border-color: #94A3B8;
    background: rgba(148, 163, 184, 0.1);
}
.badge-apprentice {
    color: #10B981;
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}
.badge-journeyman {
    color: #0284C7;
    border-color: #0284C7;
    background: rgba(2, 132, 199, 0.1);
}
.badge-master {
    color: #8B5CF6;
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.1);
}
.badge-ace {
    color: #F59E0B;
    border-color: #F59E0B;
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Centered Question Text */
#question-text {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin-bottom: 26px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Option Buttons Grid (Refined Top-Anchor Keycap & Structured Divider)
   -------------------------------------------------------------------------- */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 24px;
}

.option-btn {
    position: relative;
    display: flex;
    align-items: flex-start; /* Locks keycap to the top row consistently */
    gap: 16px;
    width: 100%;
    padding: 14px 18px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Distinct Keycap Letter Badge with Vertical Separator */
.opt-letter {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    font-size: 1.02rem;
    font-weight: 800;
    background: #f1f5f9;
    color: var(--text-secondary);
    border-radius: 9px;
    transition: all var(--transition-fast);
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
}

/* Subtle Vertical Divider between Keycap column and Text column */
.opt-letter::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 1px;
    background: #e2e8f0;
    transition: background var(--transition-fast);
}

/* Option Content Typography with Typographic Balance & Baseline Alignment */
.opt-text {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.45;
    color: #1e293b;
    letter-spacing: -0.01em;
    flex: 1;
    text-wrap: pretty; /* Prevents dangling single words like 'it' */
    padding-top: 6px;  /* Aligns first line baseline perfectly with 38px keycap */
    transition: color var(--transition-fast);
}

.option-btn:hover:not(:disabled) {
    border-color: #94a3b8;
    background-color: #f8fafc;
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-md);
}

.option-btn:hover:not(:disabled) .opt-text {
    color: #0f172a;
}

.option-btn:hover:not(:disabled) .opt-letter {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: var(--text-primary);
}

.option-btn:hover:not(:disabled) .opt-letter::after {
    background: #cbd5e1;
}

.option-btn:active:not(:disabled) {
    transform: scale(0.99);
}

/* Correct Answer State (PocketPrep Green) */
.option-btn.correct {
    border-color: var(--correct-color) !important;
    background: linear-gradient(135deg, #ffffff 0%, var(--correct-bg) 100%) !important;
    box-shadow: 0 0 0 3px var(--correct-glow), var(--shadow-sm) !important;
    animation: correctPulse 0.35s ease-out;
}

.option-btn.correct .opt-text {
    color: #065f46 !important;
    font-weight: 600;
}

.option-btn.correct .opt-letter {
    background: var(--correct-color) !important;
    color: #ffffff !important;
    border-color: var(--correct-color) !important;
}

.option-btn.correct .opt-letter::after {
    background: var(--correct-border) !important;
}

.option-btn.correct::after {
    content: '✓';
    margin-left: auto;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--correct-color);
    padding-left: 8px;
    padding-top: 5px;
    align-self: flex-start;
    font-family: 'Outfit', sans-serif;
}

/* Wrong Answer State (PocketPrep Red) */
.option-btn.wrong {
    border-color: var(--wrong-color) !important;
    background: linear-gradient(135deg, #ffffff 0%, var(--wrong-bg) 100%) !important;
    box-shadow: 0 0 0 3px var(--wrong-glow), var(--shadow-sm) !important;
    animation: shakeSoft 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    cursor: not-allowed;
}

.option-btn.wrong .opt-text {
    color: #991b1b !important;
    font-weight: 600;
}

.option-btn.wrong .opt-letter {
    background: var(--wrong-color) !important;
    color: #ffffff !important;
    border-color: var(--wrong-color) !important;
}

.option-btn.wrong .opt-letter::after {
    background: var(--wrong-border) !important;
}

.option-btn.wrong::after {
    content: '✕';
    margin-left: auto;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--wrong-color);
    padding-left: 8px;
    padding-top: 5px;
    align-self: flex-start;
    font-family: 'Outfit', sans-serif;
}

.option-btn:disabled {
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Explanation Box (PocketPrep Callout)
   -------------------------------------------------------------------------- */
.explanation {
    margin-top: 20px;
    margin-bottom: 24px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.explanation h3 {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.explanation h3::before {
    content: '💡';
    font-size: 0.95rem;
}

.explanation p {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text-primary);
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Controls & Action Button (Tesla/PocketPrep Style Button)
   -------------------------------------------------------------------------- */
.controls {
    display: flex;
    justify-content: flex-end;
}

.primary-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.35);
}

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

.primary-btn::after {
    content: '➔';
    font-size: 1.05rem;
    transition: transform var(--transition-fast);
}

.primary-btn:hover::after {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Utility Classes & Keyframes
   -------------------------------------------------------------------------- */
.hidden {
    display: none !important;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.015);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shakeSoft {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* --------------------------------------------------------------------------
   Post-Question 5 Overlay (Glassmorphic Trigger)
   -------------------------------------------------------------------------- */
.quiz-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 50;
    border-radius: var(--radius-xl);
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay-glass-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.overlay-badge {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 18px;
    border-radius: var(--radius-full);
}

.overlay-glass-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.overlay-glass-card p {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.pulse-action {
    animation: ctaPrimaryPulse 2.5s infinite;
}

@keyframes ctaPrimaryPulse {
    0%, 100% { transform: scale(1); box-shadow: var(--shadow-btn); }
    50% { transform: scale(1.02); box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4); }
}

/* --------------------------------------------------------------------------
   Assessment & Results Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(226, 232, 240, 0.8);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px 28px;
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.close-modal-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-modal-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* Radial / Circular Score Gauge */
.modal-header-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.score-circle-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
}

.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.circle-progress {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.5s ease;
}

.score-number-display {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.score-percent {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.score-sub-badge {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 6px;
}

/* Performance Tier Badge Variants */
.tier-solid {
    background: #dcfce7;
    color: #15803d;
}
.tier-boundary {
    background: #fef3c7;
    color: #b45309;
}
.tier-needs-improvement {
    background: #fee2e2;
    color: #b91c1c;
}

.modal-body-content {
    text-align: center;
}

.modal-body-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.assessment-feedback-text {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Pacing Breakdown Component */
.pacing-breakdown-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: left;
}

.pacing-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pacing-item-row .q-num {
    font-weight: 700;
    color: var(--text-primary);
}

.pacing-item-row .q-time {
    font-family: 'Outfit', monospace;
    font-weight: 600;
}

.pacing-item-row .q-score {
    font-weight: 700;
}
.q-score.positive {
    color: #16a34a;
}
.q-score.zero {
    color: #dc2626;
}

/* Soft-Gate Card */
.soft-gate-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    text-align: center;
}

.soft-gate-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.soft-gate-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 6px;
}

.soft-gate-card p {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.soft-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.soft-gate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.soft-gate-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.text-link-btn {
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.text-link-btn:hover {
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Responsive Mobile Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    body {
        padding: 14px 10px;
    }

    .challenge-header {
        padding: 18px 14px;
        margin-bottom: 16px;
    }

    .ready-highlight {
        font-size: 0.95rem;
        padding: 2px 8px;
    }

    .ready-sub {
        font-size: 0.88rem;
    }

    .challenge-title {
        font-size: 1.32rem;
        margin: 2px 0 5px 0;
    }

    .challenge-cta.cta-primary {
        font-size: 1.02rem;
        letter-spacing: 0.04em;
    }

    .challenge-cta.cta-glitch {
        font-size: 1.05rem;
        letter-spacing: 0.08em;
    }

    .card {
        padding: 22px 16px;
        border-radius: var(--radius-lg);
    }

    .dual-progress-container {
        margin: -22px -16px 18px -16px;
    }

    #question-text {
        font-size: 1.1rem;
        margin-bottom: 18px;
        text-align: center;
    }

    .options-grid {
        gap: 12px;
    }

    .option-btn {
        padding: 12px 14px;
        gap: 14px;
    }

    .opt-letter {
        min-width: 36px;
        height: 36px;
        font-size: 0.94rem;
        border-radius: 8px;
        margin-top: 1px;
    }

    .opt-letter::after {
        right: -8px;
        height: 22px;
    }

    .opt-text {
        font-size: 0.96rem;
        line-height: 1.4;
        padding-top: 6px;
    }
}

/* --------------------------------------------------------------------------
   Auth Modal & Toast Notification
   -------------------------------------------------------------------------- */
.auth-modal-card {
    max-width: 400px;
    padding: 32px 24px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.auth-social-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
}

.google-btn {
    background: #ffffff;
    color: #3c4043;
}
.google-btn:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

.apple-btn {
    background: #000000;
    color: #ffffff;
    border: none;
}
.apple-btn:hover {
    background: #1a1a1a;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}
.auth-divider span {
    padding: 0 12px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-form .input-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.auth-submit-btn {
    margin-top: 8px;
    width: 100%;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.hidden {
    display: none;
}
.hidden { display: none !important; }
