/* ==========================================================================
   NA-SA'S ULTRA QUIZ 3000 (VAPORWAVE & RGB GAMER EDITION)
   Active Features:
   - Feature 3: Wheel of Unsolicited Lifelines
   - Feature 4: Live Wall Street Cognitive Stock Ticker
   - Feature 5: Vaporwave / Hyper-RGB Gamer Underglow
   - Feature 7: Quizzy the Overzealous Paperclip Mascot
   - Feature 9: Dramatic Quantum Answer Decryption
   - Feature 12: Aggressive Combo Streak Multipliers
   - Feature 15: The "Escape Hatch to Sanity" Panic Button
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Bungee&family=Inter:wght@400;600;800&family=Press+Start+2P&display=swap');

:root {
    --neon-pink: #ff007f;
    --neon-cyan: #00f0ff;
    --neon-green: #39ff14;
    --neon-yellow: #ffe600;
    --neon-purple: #b026ff;
    --neon-orange: #ff5500;
    --bg-dark: #0a0a1a;
    --bg-card: rgba(18, 18, 38, 0.90);
    --border-glow: rgba(0, 240, 255, 0.4);
}

/* ==========================================================================
   FEATURE 5: VAPORWAVE / HYPER-RGB GAMER UNDERGLOW
   ========================================================================== */
body.ultra-body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(255, 0, 127, 0.25) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(0, 240, 255, 0.25) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(176, 38, 255, 0.18) 0%, transparent 55%),
        linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 240Hz RGB Rainbow Animation */
@keyframes rainbowCycle {
    0% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes rainbowText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Screen Tremor during Decryption (Feature 9) */
body.shake-subtle {
    animation: shakeSubtleAnim 0.3s cubic-bezier(.36,.07,.19,.97) both;
}

body.shake-extreme {
    animation: shakeExtremeAnim 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeSubtleAnim {
    20%, 80% { transform: translate3d(-3px, 1px, 0); }
    40%, 60% { transform: translate3d(3px, -2px, 0); }
}

@keyframes shakeExtremeAnim {
    10%, 90% { transform: translate3d(-5px, 2px, 0) rotate(-1deg); }
    20%, 80% { transform: translate3d(7px, -4px, 0) rotate(1.5deg); }
    30%, 50%, 70% { transform: translate3d(-9px, 5px, 0) rotate(-2deg); }
    40%, 60% { transform: translate3d(9px, -6px, 0) rotate(2deg); }
}

/* Mouse Sparkle Trail (Feature 5) */
.sparkle-trail {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 10009;
    animation: sparkleFade 0.6s linear forwards;
}

@keyframes sparkleFade {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.1); opacity: 0; }
}

/* ==========================================================================
   FEATURE 4: LIVE WALL STREET COGNITIVE STOCK TICKER
   ========================================================================== */
.ultra-ticker-wrap {
    width: 100%;
    background: linear-gradient(90deg, #ff007f, #b026ff, #00f0ff, #ffe600, #ff007f);
    background-size: 300% 100%;
    animation: gradientFlow 6s ease infinite;
    color: #000;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    overflow: hidden;
    white-space: nowrap;
    padding: 7px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 10001;
}

.ultra-ticker {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: tickerAnim 32s linear infinite;
    font-family: 'Orbitron', monospace;
}

@keyframes tickerAnim {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   HEADER & FEATURE 15: ESCAPE HATCH TO SANITY
   ========================================================================== */
.ultra-header {
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ultra-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    text-align: center;
}

.ultra-title {
    font-family: 'Bungee', cursive, 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, #ff007f, #ffe600, #00f0ff, #39ff14, #ff007f);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowText 4s linear infinite;
    text-shadow: 0 0 20px rgba(255, 0, 127, 0.5);
}

.ultra-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-top: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

.ultra-openbtn {
    font-size: 26px;
    cursor: pointer;
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 4px 14px;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.ultra-openbtn:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: scale(1.08);
}

/* Feature 15: The "Escape Hatch to Sanity" Panic Button */
.btn-escape-sanity {
    background: linear-gradient(135deg, #ff0055, #990000);
    color: #fff !important;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    padding: 9px 16px;
    border-radius: 30px;
    border: 2px solid #ff99bb;
    box-shadow: 0 0 18px rgba(255, 0, 85, 0.8);
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: pulseSanity 1.8s infinite alternate;
}

.btn-escape-sanity:hover {
    background: #ff0055;
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(255, 0, 85, 1);
    color: #fff !important;
}

@keyframes pulseSanity {
    0% { box-shadow: 0 0 10px rgba(255, 0, 85, 0.5); transform: scale(0.98); }
    100% { box-shadow: 0 0 25px rgba(255, 0, 85, 0.95); transform: scale(1.04); }
}

/* Sidenav */
.ultra-sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 10005;
    top: 0;
    left: 0;
    background-color: rgba(12, 12, 30, 0.98);
    backdrop-filter: blur(15px);
    border-right: 3px solid var(--neon-pink);
    box-shadow: 10px 0 30px rgba(255, 0, 127, 0.4);
    overflow-x: hidden;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding-top: 60px;
}

.ultra-sidenav a {
    padding: 14px 20px 14px 28px;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: #d1d5db;
    display: block;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.ultra-sidenav a:hover {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    border-left-color: var(--neon-cyan);
    padding-left: 36px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.ultra-sidenav a.sidenav-panic-link {
    color: #ff0055 !important;
    font-weight: 900;
    border-left-color: #ff0055 !important;
}

.ultra-sidenav .closebtn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 38px;
    color: var(--neon-pink);
    border-left: none !important;
}

/* ==========================================================================
   FEATURE 3: WHEEL OF UNSOLICITED LIFELINES (GACHA BANNER & MODAL)
   ========================================================================== */
.wheel-action-banner {
    margin: 18px 0;
}

.btn-spin-trigger {
    background: linear-gradient(135deg, #ffe600, #ff007f, #00f0ff);
    background-size: 200% 200%;
    animation: gradientFlow 4s ease infinite;
    color: #000;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 0.95rem;
    padding: 14px 24px;
    border-radius: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.6);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-spin-trigger:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 35px rgba(0, 240, 255, 0.9);
}

.wheel-icon {
    font-size: 1.5rem;
}

.wheel-badge {
    background: #000;
    color: var(--neon-green);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

#wheelCanvas {
    max-width: 320px;
    max-height: 320px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
}

.wheel-pointer {
    width: 0; 
    height: 0; 
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid var(--neon-pink);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 0 6px var(--neon-pink));
}

.wheel-result-box {
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed var(--neon-green);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 14px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--neon-green);
}

/* ==========================================================================
   QUIZ CONTROLS & QUESTION CARDS
   ========================================================================== */
.ultra-controls-row {
    background: rgba(18, 18, 42, 0.85);
    border: 2px solid rgba(0, 240, 255, 0.35);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.ultra-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 6px;
}

.ultra-select {
    background: #0f0f26;
    color: #ffffff;
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.ultra-select:focus {
    background: #141436;
    color: #fff;
    border-color: var(--neon-pink);
    box-shadow: 0 0 18px rgba(255, 0, 127, 0.5);
    outline: none;
}

.ultra-select option {
    background: #0d0d24;
    color: #ffffff;
}

.ultra-card {
    background: var(--bg-card);
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 240, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.ultra-card:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 0, 127, 0.35);
}

.ultra-card-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    color: #9ca3af;
}

.badge-qnum {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #000;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 12px;
}

.question-text-ultra {
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.5;
    color: #ffffff;
    padding: 20px 20px 10px 20px;
}

.ultra-card-actions {
    padding: 10px 20px 20px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.btn-reveal-ultra {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #000;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.88rem;
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.btn-reveal-ultra:hover {
    transform: scale(1.06);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.8);
}

/* ==========================================================================
   FEATURE 9: DRAMATIC QUANTUM ANSWER DECRYPTION SEQUENCE
   ========================================================================== */
.decryption-box {
    background: rgba(12, 12, 35, 0.95);
    border: 2px solid var(--neon-pink);
    border-radius: 12px;
    padding: 16px;
    margin: 10px 0;
    text-align: center;
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.5);
    animation: pulseDecryption 1s infinite alternate;
}

@keyframes pulseDecryption {
    0% { border-color: var(--neon-pink); box-shadow: 0 0 15px rgba(255, 0, 127, 0.4); }
    100% { border-color: var(--neon-cyan); box-shadow: 0 0 25px rgba(0, 240, 255, 0.7); }
}

.decryption-status-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--neon-yellow);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.decryption-progress-wrap {
    width: 100%;
    height: 18px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--neon-cyan);
    margin: 8px 0;
}

.decryption-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff007f, #ffe600, #00f0ff);
    background-size: 200% 100%;
    animation: gradientFlow 1.5s linear infinite;
    transition: width 0.35s ease;
}

.decryption-radar-subtext {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: 'Orbitron', monospace;
}

.answer-card-ultra {
    background: rgba(10, 10, 28, 0.95);
    border-top: 2px dashed rgba(0, 240, 255, 0.4);
    padding: 20px;
    animation: revealSlideDown 0.35s ease-out;
}

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

.answer-badge-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: var(--neon-green);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.answer-text-ultra {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffe600;
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.4);
    margin-bottom: 16px;
}

.answer-buttons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.btn-correct-ultra {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid #34d399;
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-correct-ultra:hover, .btn-correct-ultra.selected {
    background: #10b981;
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(52, 211, 153, 0.9);
}

.btn-incorrect-ultra {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: 2px solid #f87171;
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-incorrect-ultra:hover, .btn-incorrect-ultra.selected {
    background: #ef4444;
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(248, 113, 113, 0.9);
}

.btn-learnmore-ultra {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: 2px solid #a78bfa;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learnmore-ultra-box {
    background: rgba(25, 25, 60, 0.9);
    border: 2px solid var(--neon-purple);
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e5e7eb;
}

/* ==========================================================================
   FEATURE 12: AGGRESSIVE COMBO STREAK MULTIPLIERS (FIGHTING GAME STYLE)
   ========================================================================== */
.ultra-score-dock {
    position: sticky;
    bottom: 20px;
    z-index: 999;
    background: rgba(14, 14, 35, 0.96);
    backdrop-filter: blur(16px);
    border: 2px solid var(--neon-cyan);
    border-radius: 20px;
    padding: 14px 24px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.score-display-ultra {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-label-ultra {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #9ca3af;
    letter-spacing: 1.5px;
}

.score-number-ultra {
    font-family: 'Bungee', cursive, monospace;
    font-size: 2.2rem;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.8);
    line-height: 1;
}

.combo-streak-container {
    display: flex;
    align-items: center;
}

.combo-streak-banner {
    font-family: 'Bungee', cursive, 'Orbitron', sans-serif;
    font-size: 1.1rem;
    padding: 8px 18px;
    border-radius: 14px;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.05);
    color: #6b7280;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.combo-streak-banner.active-1 {
    background: linear-gradient(135deg, #00f0ff, #3b82f6);
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: scale(1.05);
}

.combo-streak-banner.active-2 {
    background: linear-gradient(135deg, #ffe600, #f59e0b);
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 20px #ffe600;
    transform: scale(1.08);
}

.combo-streak-banner.active-3 {
    background: linear-gradient(135deg, #ff007f, #ef4444);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 25px #ff007f;
    transform: scale(1.12);
    animation: flamePulse 0.8s infinite alternate;
}

.combo-streak-banner.active-godlike {
    background: linear-gradient(135deg, #b026ff, #ff007f, #ffe600);
    background-size: 200% 200%;
    animation: gradientFlow 1.5s ease infinite, flamePulse 0.5s infinite alternate;
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 35px #b026ff, 0 0 50px #ff007f;
    transform: scale(1.18);
}

@keyframes flamePulse {
    0% { transform: scale(1.08); }
    100% { transform: scale(1.15); }
}

/* ==========================================================================
   FEATURE 7: QUIZZY THE OVERZEALOUS PAPERCLIP MASCOT
   ========================================================================== */
.quizzy-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10002;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

.quizzy-bubble {
    background: #ffffff;
    color: #0a0a1a;
    border: 3px solid var(--neon-cyan);
    border-radius: 16px;
    border-bottom-right-radius: 2px;
    padding: 12px 16px;
    max-width: 260px;
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.5);
    position: relative;
    pointer-events: auto;
    cursor: pointer;
    animation: bounceBubble 3s ease-in-out infinite;
}

@keyframes bounceBubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.quizzy-avatar-btn {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border: 3px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 20px var(--neon-pink);
    animation: pulseQuizzy 2s infinite alternate;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quizzy-avatar-btn:hover {
    transform: scale(1.15) rotate(10deg);
}

@keyframes pulseQuizzy {
    0% { box-shadow: 0 0 12px var(--neon-pink); }
    100% { box-shadow: 0 0 28px var(--neon-cyan); }
}

/* Modal Overlay */
.ultra-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 15, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ultra-modal-overlay.open {
    display: flex;
}

.ultra-modal {
    background: #111128;
    border: 3px solid var(--neon-pink);
    box-shadow: 0 0 35px rgba(255, 0, 127, 0.6);
    border-radius: 20px;
    max-width: 550px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ultra-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.ultra-modal-close:hover {
    color: var(--neon-pink);
}

.ultra-modal-title {
    font-family: 'Bungee', 'Orbitron', cursive;
    font-size: 1.4rem;
    color: var(--neon-yellow);
    margin-bottom: 8px;
}

#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10008;
}

@media (max-width: 768px) {
    .ultra-title { font-size: 1.3rem; }
    .ultra-header { padding: 10px 12px; }
    .btn-escape-sanity { font-size: 0.72rem; padding: 6px 10px; }
    .score-number-ultra { font-size: 1.7rem; }
    .combo-streak-banner { font-size: 0.85rem; padding: 6px 12px; }
    .ultra-score-dock { bottom: 10px; padding: 10px 16px; }
    .quizzy-widget { bottom: 80px; right: 15px; }
    .quizzy-bubble { max-width: 200px; font-size: 0.78rem; }
}
