/* ========================================
   NEW YEAR 2025 SPECTACULAR - CSS
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #ffd700;
    --gold-light: #ffe766;
    --gold-dark: #cc9900;
    --midnight-blue: #0a0a1a;
    --deep-purple: #1a0a2e;
    --electric-blue: #00d4ff;
    --hot-pink: #ff1493;
    --neon-green: #39ff14;
    --white: #ffffff;
    --silver: #c0c0c0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    background: var(--midnight-blue);
    color: var(--white);
}

/* ========================================
   START OVERLAY
   ======================================== */

#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#start-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#start-content {
    text-align: center;
}

#start-button {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--midnight-blue);
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    border: none;
    padding: 20px 70px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

#start-button:hover {
    transform: scale(1.08);
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.8);
}

/* ========================================
   BACKGROUND LAYERS
   ======================================== */

#background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000000;
}

#gradient-overlay {
    display: none;
}

#stars-container {
    display: none;
}

/* ========================================
   THREE.JS & EFFECTS CANVAS
   ======================================== */

#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#effects-canvas {
    display: none;
}

/* ========================================
   JON HAMM - FULL SPACE BACKGROUND
   ======================================== */

#hamm-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
    mix-blend-mode: screen;
}

#hamm-container.active {
    opacity: 0.4;
}

#hamm-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.4) contrast(1.15) brightness(0.55);
}

#hamm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 15, 0.5) 60%, rgba(0, 0, 5, 0.9) 100%);
    pointer-events: none;
}

/* ========================================
   DEV MODE INDICATOR
   ======================================== */

#dev-mode-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 20, 147, 0.9);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    z-index: 200;
    display: none;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

#dev-mode-indicator.visible {
    display: block;
}

#dev-mode-indicator kbd {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 3px;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 20, 147, 0.5); }
    50% { box-shadow: 0 0 50px rgba(255, 20, 147, 0.8); }
}

/* ========================================
   COUNTDOWN SECTION
   ======================================== */

#countdown-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 95vw;
    max-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#countdown-section.visible {
    opacity: 1;
}


/* ========================================
   COUNTDOWN TIMER
   ======================================== */

#countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(5px, 2vw, 20px);
    flex-wrap: nowrap;
    width: 100%;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 clamp(2px, 1vw, 10px);
    flex-shrink: 1;
}

.time-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 10vw, 10rem);
    font-weight: 400;
    color: var(--white);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    line-height: 1;
}

.time-value.changed {
    animation: numberChange 0.5s ease;
}

@keyframes numberChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--gold); }
    100% { transform: scale(1); }
}

.time-label {
    font-size: clamp(0.5rem, 1.2vw, 0.9rem);
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
    text-transform: uppercase;
}

.time-separator {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 8vw, 8rem);
    color: rgba(255, 255, 255, 0.4);
    animation: separatorBlink 1s ease-in-out infinite;
    flex-shrink: 0;
    line-height: 1;
}

@keyframes separatorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========================================
   FINAL COUNTDOWN (Last 10 seconds)
   ======================================== */

#final-countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    display: none;
    pointer-events: none;
}

#final-countdown.active {
    display: block;
}

#final-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(15rem, 50vw, 40rem);
    font-weight: 400;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        var(--gold) 50%,
        var(--hot-pink) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: finalNumberPulse 1s ease-in-out;
    filter: drop-shadow(0 0 100px rgba(255, 215, 0, 0.8));
}

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


/* ========================================
   CELEBRATION SECTION
   ======================================== */

#celebration-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    display: none;
    pointer-events: none;
    width: 95vw;
    max-height: 90vh;
}

#celebration-section.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#happy-new-year {
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.celebration-line {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(50px) rotateX(-90deg);
    line-height: 1;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.line-1 {
    font-size: clamp(2.5rem, 10vw, 9rem);
    color: var(--white);
    text-shadow: 
        0 0 50px rgba(255, 255, 255, 0.8),
        0 0 100px rgba(255, 215, 0, 0.5);
    animation: lineReveal 0.8s ease-out 0.2s forwards;
    letter-spacing: 0.2em;
}

.line-2 {
    font-size: clamp(3.5rem, 15vw, 14rem);
    background: linear-gradient(
        90deg,
        var(--gold) 0%,
        var(--hot-pink) 50%,
        var(--electric-blue) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lineReveal 0.8s ease-out 0.6s forwards;
    filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.8));
    letter-spacing: 0.08em;
}

.line-3 {
    font-size: clamp(4.5rem, 22vw, 20rem);
    background: linear-gradient(
        180deg,
        var(--gold-light) 0%,
        var(--gold) 50%,
        var(--gold-dark) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lineReveal 0.8s ease-out 1s forwards, 
               yearCelebrate 2s ease-in-out 2s infinite;
    filter: drop-shadow(0 0 80px rgba(255, 215, 0, 0.9));
    letter-spacing: 0.05em;
}

@keyframes lineReveal {
    0% {
        opacity: 0;
        transform: translateY(100px) rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

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

#celebration-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--white);
    margin-top: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
    letter-spacing: 0.2em;
}

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

/* ========================================
   YOUTUBE PLAYER
   ======================================== */

#youtube-container {
    position: fixed;
    bottom: -300px;
    right: -400px;
    width: 400px;
    height: 300px;
    opacity: 0.01;
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   SCREEN FLASH EFFECT
   ======================================== */

#screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
}

#screen-flash.flash {
    animation: screenFlash 1.5s ease-out;
}

@keyframes screenFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}


/* ========================================
   ADDITIONAL EFFECTS
   ======================================== */

.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 55;
}

/* Screen shake effect */
.screen-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-52%, -48%); }
    20%, 40%, 60%, 80% { transform: translate(-48%, -52%); }
}

/* Glow pulse animation for buttons and interactive elements */
.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); 
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8),
                    0 0 60px rgba(255, 20, 147, 0.5); 
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    #countdown-timer {
        gap: 5px;
    }
    
    .time-separator {
        font-size: clamp(1.5rem, 6vw, 4rem);
    }
    
    .time-block {
        padding: 0 2px;
    }
    
    #dev-mode-indicator {
        font-size: 10px;
        padding: 8px 15px;
    }
    
    .line-1 {
        font-size: clamp(1.5rem, 10vw, 6rem);
    }
    
    .line-2 {
        font-size: clamp(2rem, 14vw, 9rem);
    }
    
    .line-3 {
        font-size: clamp(2.5rem, 18vw, 12rem);
    }
}

@media (max-width: 480px) {
    #countdown-timer {
        gap: 2px;
    }
    
    .time-separator {
        display: none;
    }
    
    .time-value {
        font-size: clamp(2rem, 15vw, 4rem);
    }
    
    .time-label {
        font-size: 0.5rem;
    }
}

/* ========================================
   LOADING STATE
   ======================================== */

body.loading::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--midnight-blue);
    z-index: 10000;
    animation: fadeOut 1s ease-out 0.5s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; pointer-events: none; }
}

