/* ========================================
   Kids Gift Vault v2.0 - Enhanced Experiences
   Mobile-first interactive gift reveal
   ======================================== */

/* CSS Variables */
:root {
    /* Christmas Colors */
    --christmas-red: #C41E3A;
    --christmas-red-dark: #8B0000;
    --christmas-green: #228B22;
    --christmas-green-dark: #006400;
    --christmas-gold: #FFD700;
    --christmas-gold-dark: #B8860B;
    --snow-white: #FFFAFA;
    --warm-cream: #FFF8DC;

    /* Sean's Colors */
    --sean-blue: #4169E1;
    --sean-blue-dark: #2E4A9E;
    --sean-silver: #C0C0C0;

    /* Paloma's Colors */
    --paloma-pink: #FF69B4;
    --paloma-pink-dark: #DB7093;
    --paloma-gold: #FFD700;

    /* Together Colors */
    --together-purple: #8A2BE2;
    --portal-blue: #00BFFF;
    --portal-purple: #9400D3;

    /* Backgrounds */
    --bg-dark: #1a1a2e;
    --bg-warm: #2d1f1f;
    --bg-vault: #1a1512;

    /* Spacing */
    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--snow-white);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ========================================
   Screens
   ======================================== */

.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    padding-top: calc(2rem + var(--safe-top));
    padding-bottom: calc(2rem + var(--safe-bottom));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Theme Backgrounds */
.sean-theme {
    background: linear-gradient(180deg, #1a2a4a 0%, #0d1a30 100%);
}

.paloma-theme {
    background: linear-gradient(180deg, #2d1a2d 0%, #1a0d1a 100%);
}

.together-theme {
    background: linear-gradient(180deg, #1a1a3a 0%, #0d0d2a 100%);
}

.finale-theme {
    background: linear-gradient(180deg, #1a2e1a 0%, #0d1a0d 100%);
}

/* ========================================
   Sound Toggle
   ======================================== */

.sound-toggle {
    position: fixed;
    top: calc(1rem + var(--safe-top));
    right: 1rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.sound-toggle:active {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Snowfall
   ======================================== */

.snowfall {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: white;
    opacity: 0.8;
    animation: snowfall var(--fall-time, 10s) linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

@keyframes snowfall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ========================================
   Screen 0: Welcome
   ======================================== */

#screen-welcome {
    background: radial-gradient(ellipse at center, #1a2e3a 0%, #0d1a1a 100%);
}

/* Family Photo on Welcome Screen */
.family-photo-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--christmas-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4),
                0 0 40px rgba(255, 215, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.5rem;
    animation: photoGlow 3s ease-in-out infinite;
}

.family-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@keyframes photoGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.3); }
}

.welcome-title {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 700;
    color: var(--christmas-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--snow-white);
    opacity: 0.9;
    margin-bottom: 2rem;
}

.tap-prompt {
    background: var(--christmas-red);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tap-prompt:active {
    transform: scale(0.95);
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   Screen 1: Vault
   ======================================== */

#screen-vault {
    background: linear-gradient(180deg, var(--bg-vault) 0%, #0d0a08 100%);
}

.vault-header h1 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 600;
    color: var(--christmas-gold);
    text-align: center;
    margin-bottom: 2rem;
}

.gift-doors {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 300px;
}

.gift-door {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 3px solid;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.gift-door:active {
    transform: scale(0.97);
}

.sean-door {
    border-color: var(--sean-blue);
    box-shadow: 0 4px 20px rgba(65, 105, 225, 0.3);
}

.paloma-door {
    border-color: var(--paloma-pink);
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.3);
}

.together-door {
    border-color: var(--christmas-gold);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.door-bow {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
}

.door-bow::before {
    content: '';
}

.sean-bow::before { content: ''; }
.paloma-bow::before { content: ''; }
.together-bow::before { content: ''; }

.door-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.door-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--snow-white);
}

/* ========================================
   Challenge Screens Common
   ======================================== */

.back-btn {
    position: absolute;
    top: calc(1rem + var(--safe-top));
    left: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
}

.challenge-title {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 700;
    color: var(--christmas-gold);
    text-align: center;
    margin-bottom: 0.5rem;
}

.challenge-instruction {
    font-size: 1rem;
    color: var(--snow-white);
    opacity: 0.9;
    text-align: center;
    margin-bottom: 1.5rem;
}

.unlock-btn {
    background: linear-gradient(135deg, var(--christmas-gold) 0%, var(--christmas-gold-dark) 100%);
    color: #1a1a1a;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    animation: glow 1.5s ease-in-out infinite;
    margin-top: 1.5rem;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 4px 40px rgba(255, 215, 0, 0.8); }
}

.hidden {
    display: none !important;
}

/* ========================================
   Screen 2: Sean Challenge - Stadium
   ======================================== */

.stadium {
    position: relative;
    width: 300px;
    height: 200px;
    background: linear-gradient(180deg, #1a3a1a 0%, #0d2a0d 100%);
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.stadium-lights {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    display: flex;
    justify-content: space-around;
    padding: 5px 10px;
}

.stadium-lights .light {
    width: 8px;
    height: 8px;
    background: var(--christmas-gold);
    border-radius: 50%;
    animation: stadiumLight 0.5s ease-in-out infinite alternate;
}

.stadium-lights .l1 { animation-delay: 0s; }
.stadium-lights .l2 { animation-delay: 0.1s; }
.stadium-lights .l3 { animation-delay: 0.2s; }
.stadium-lights .l4 { animation-delay: 0.3s; }

@keyframes stadiumLight {
    0% { opacity: 0.5; box-shadow: 0 0 5px var(--christmas-gold); }
    100% { opacity: 1; box-shadow: 0 0 15px var(--christmas-gold); }
}

.goal-frame {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 60px;
    border: 4px solid white;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    background: rgba(255, 255, 255, 0.05);
}

.goal-net {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(255,255,255,0.1) 10px, rgba(255,255,255,0.1) 12px),
        repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(255,255,255,0.1) 10px, rgba(255,255,255,0.1) 12px);
}

.goal-zones {
    position: absolute;
    inset: 0;
    display: flex;
}

.goal-zones .zone {
    flex: 1;
    border-right: 1px dashed rgba(255, 255, 255, 0.2);
}

.goal-zones .zone:last-child {
    border-right: none;
}

.goalkeeper {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    transition: left 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.goalkeeper.dive-left {
    left: 15%;
    animation: diveLeft 0.4s ease-out;
}

.goalkeeper.dive-right {
    left: 85%;
    animation: diveRight 0.4s ease-out;
}

@keyframes diveLeft {
    0% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-80%) rotate(-30deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

@keyframes diveRight {
    0% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-20%) rotate(30deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

.goal-text, .save-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 900;
    text-shadow: 0 0 20px currentColor;
    animation: textPop 0.5s ease-out;
    z-index: 10;
}

.goal-text {
    color: var(--christmas-gold);
}

.save-text {
    color: var(--christmas-red);
}

@keyframes textPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pitch {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, #2d5a27 0%, #1a4a1a 100%);
}

.pitch-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.penalty-spot {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.ball {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: all 0.4s ease;
}

.ball.kick-left {
    animation: kickBallLeft 0.5s ease-out;
}

.ball.kick-center {
    animation: kickBallCenter 0.5s ease-out;
}

.ball.kick-right {
    animation: kickBallRight 0.5s ease-out;
}

@keyframes kickBallLeft {
    0% { transform: translateX(-50%) scale(1); }
    30% { transform: translateX(-50%) translateY(-80px) translateX(-60px) scale(0.7); }
    100% { transform: translateX(-50%) scale(1); }
}

@keyframes kickBallCenter {
    0% { transform: translateX(-50%) scale(1); }
    30% { transform: translateX(-50%) translateY(-100px) scale(0.6); }
    100% { transform: translateX(-50%) scale(1); }
}

@keyframes kickBallRight {
    0% { transform: translateX(-50%) scale(1); }
    30% { transform: translateX(-50%) translateY(-80px) translateX(60px) scale(0.7); }
    100% { transform: translateX(-50%) scale(1); }
}

.aim-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.aim-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--sean-blue);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.aim-btn:active {
    background: var(--sean-blue);
    transform: scale(0.95);
}

.aim-btn.selected {
    background: var(--sean-blue);
    box-shadow: 0 0 20px rgba(65, 105, 225, 0.5);
}

.aim-arrow {
    font-size: 1.5rem;
}

.aim-label {
    font-size: 0.75rem;
    font-weight: 700;
}

.scoreboard {
    margin-top: 1rem;
    text-align: center;
}

.score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.score-display .goals {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--christmas-gold);
}

.score-display .score-divider {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
}

.score-display .target {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.score-display .score-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.5rem;
}

.attempts {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

/* ========================================
   Screen 4: Paloma Challenge - Enhanced Stage
   ======================================== */

.stage-enhanced {
    position: relative;
    width: 300px;
    height: 280px;
    background: linear-gradient(180deg, #3a1a3a 0%, #1a0a1a 100%);
    border-radius: 15px 15px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--paloma-pink);
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.3);
}

.stage-enhanced .curtain {
    position: absolute;
    top: 0;
    width: 25px;
    height: 100%;
    background: linear-gradient(90deg, #8B0000, #660000);
}

.stage-enhanced .curtain.left { left: 0; }
.stage-enhanced .curtain.right { right: 0; }

.stage-enhanced .spotlight {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-top: 200px solid rgba(255, 255, 255, 0.1);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.stage-enhanced.active .spotlight {
    opacity: 1;
    border-top-color: rgba(255, 215, 0, 0.2);
}

.sound-waves {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stage-enhanced.active .sound-waves {
    opacity: 1;
}

.wave {
    width: 4px;
    height: 20px;
    background: var(--paloma-pink);
    border-radius: 2px;
    animation: waveAnimation 0.5s ease-in-out infinite;
}

.wave.w1 { animation-delay: 0s; height: 15px; }
.wave.w2 { animation-delay: 0.1s; height: 25px; }
.wave.w3 { animation-delay: 0.2s; height: 20px; }

@keyframes waveAnimation {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.star-progress {
    position: absolute;
    top: 20px;
    display: flex;
    gap: 8px;
    font-size: 1.25rem;
}

.star {
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.star.lit {
    color: var(--christmas-gold);
    text-shadow: 0 0 10px var(--christmas-gold);
    animation: starPop 0.3s ease-out;
}

@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.lyrics-display {
    position: absolute;
    top: 60px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--christmas-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: lyricsFloat 0.5s ease-out;
    min-height: 2rem;
}

@keyframes lyricsFloat {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.microphone-enhanced {
    font-size: 4.5rem;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease;
}

.microphone-enhanced:active {
    transform: scale(1.15) rotate(-5deg);
}

.mic-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.microphone-enhanced:active .mic-glow {
    opacity: 1;
}

.sparkle-container {
    position: absolute;
    inset: -50px;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 1rem;
    animation: sparkleFloat 1s ease-out forwards;
}

@keyframes sparkleFloat {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.5) rotate(180deg) translateY(-50px); opacity: 0; }
}

.notes-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.music-note {
    position: absolute;
    font-size: 1.5rem;
    animation: floatNote 1.5s ease-out forwards;
}

@keyframes floatNote {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-150px) scale(1.5) rotate(20deg); }
}

.tap-counter {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--paloma-pink);
    margin-top: 1.5rem;
}

/* ========================================
   Screen 6: Together Challenge - Portal
   ======================================== */

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.step.active {
    background: var(--christmas-gold);
    color: #1a1a1a;
    font-weight: 700;
}

.step.complete {
    background: var(--christmas-green);
    color: white;
}

.step-arrow {
    color: rgba(255, 255, 255, 0.3);
}

.portal-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.magic-orb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.magic-orb.sean-orb {
    background: radial-gradient(circle at 30% 30%, var(--sean-blue), var(--sean-blue-dark));
    border-color: var(--sean-blue);
}

.magic-orb.paloma-orb {
    background: radial-gradient(circle at 30% 30%, var(--paloma-pink), var(--paloma-pink-dark));
    border-color: var(--paloma-pink);
}

.magic-orb:active,
.magic-orb.pressed {
    transform: scale(0.95);
}

.magic-orb.active {
    animation: orbPulse 0.5s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 5px 40px rgba(255, 255, 255, 0.5); }
}

.orb-initial {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.energy-stream {
    position: absolute;
    width: 100px;
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sean-stream {
    right: -100px;
    background: linear-gradient(90deg, var(--sean-blue), transparent);
}

.paloma-stream {
    left: -100px;
    background: linear-gradient(-90deg, var(--paloma-pink), transparent);
}

.magic-orb.active .energy-stream {
    opacity: 1;
    animation: energyFlow 0.5s ease-in-out infinite;
}

@keyframes energyFlow {
    0%, 100% { transform: translateY(-50%) scaleX(0.5); opacity: 0.5; }
    50% { transform: translateY(-50%) scaleX(1); opacity: 1; }
}

.magic-portal {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid;
    animation: portalSpin 3s linear infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-color: var(--portal-blue);
    opacity: 0.3;
}

.ring-2 {
    width: 80%;
    height: 80%;
    border-color: var(--portal-purple);
    animation-direction: reverse;
    animation-duration: 2s;
    opacity: 0.5;
}

.ring-3 {
    width: 60%;
    height: 60%;
    border-color: var(--christmas-gold);
    animation-duration: 1.5s;
    opacity: 0.7;
}

@keyframes portalSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.portal-center {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--portal-blue) 0%, var(--portal-purple) 50%, transparent 70%);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.portal-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: var(--christmas-gold);
    transition: height 0.1s linear;
}

.magic-portal.charging .ring-1,
.magic-portal.charging .ring-2,
.magic-portal.charging .ring-3 {
    animation-duration: 0.5s;
}

.magic-portal.open {
    animation: portalOpen 0.5s ease-out forwards;
}

@keyframes portalOpen {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.sackboy {
    font-size: 3rem;
    position: absolute;
    animation: sackboyBounce 0.5s ease-out;
}

@keyframes sackboyBounce {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.magic-power-bar {
    width: 200px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin: 1rem 0;
}

.power-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--portal-blue), var(--portal-purple), var(--christmas-gold));
    border-radius: 5px;
    transition: width 0.1s linear;
}

.portal-instruction {
    font-size: 1rem;
    color: var(--snow-white);
    text-align: center;
    min-height: 1.5rem;
}

.portal-instruction.success {
    color: var(--christmas-gold);
    font-weight: 700;
}

/* ========================================
   Reveal Screens Common
   ======================================== */

.reveal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 350px;
}

.reveal-title {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 800;
    color: var(--christmas-gold);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    margin-bottom: 0.5rem;
    animation: revealPop 0.6s ease-out;
}

@keyframes revealPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.reveal-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--paloma-pink);
    margin-bottom: 0.5rem;
}

.reveal-subtitle {
    font-size: 1.1rem;
    color: var(--snow-white);
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--christmas-gold);
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

.reveal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 280px;
    margin-top: 1.5rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--christmas-gold) 0%, var(--christmas-gold-dark) 100%);
    color: #1a1a1a;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--snow-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 50px;
    cursor: pointer;
}

/* ========================================
   Screen 8: Finale
   ======================================== */

.finale-content {
    text-align: center;
}

.finale-title {
    font-size: clamp(2rem, 10vw, 3.5rem);
    font-weight: 800;
    color: var(--christmas-gold);
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    margin-bottom: 0.5rem;
}

.finale-names {
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 600;
    color: var(--snow-white);
    margin-bottom: 1.5rem;
}

.finale-message {
    font-size: 1.1rem;
    color: var(--snow-white);
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.finale-hearts {
    font-size: 2rem;
    margin-bottom: 2rem;
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.vault-return-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--snow-white);
    border: 2px solid var(--christmas-gold);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
}

/* ========================================
   Confetti
   ======================================== */

.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall var(--fall-time, 3s) linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Landscape
   ======================================== */

@media (orientation: landscape) and (max-height: 500px) {
    .screen {
        padding: 1rem;
    }

    .stadium {
        width: 250px;
        height: 160px;
    }

    .stage-enhanced {
        width: 250px;
        height: 220px;
    }

    .gift-doors {
        flex-direction: row;
        max-width: 100%;
        gap: 1rem;
    }

    .gift-door {
        padding: 1rem;
    }

    .door-icon {
        font-size: 2rem;
    }
}
