:root {
    --bg-color: #03040b;
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-green: #00ff66;
    --glass-bg: rgba(10, 15, 30, 0.3);
    --glass-border: rgba(0, 243, 255, 0.15);
    --text-primary: #ffffff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background & Stars */
.space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #0a0a2a 0%, var(--bg-color) 100%);
    z-index: -1;
    overflow: hidden;
}

#stars, #stars2, #stars3 {
    position: absolute;
    top: 0;
    left: 0;
}

#stars::after, #stars2::after, #stars3::after {
    content: " ";
    position: absolute;
    top: 2000px;
    left: 0;
    background: transparent;
    box-shadow: inherit;
    width: inherit;
    height: inherit;
}

@keyframes animStar {
    from { transform: translateY(0px); }
    to { transform: translateY(-2000px); }
}

/* Main Container */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: clamp(0.5rem, 2vh, 2rem);
    perspective: 1000px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: clamp(2rem, 5vh, 4rem) clamp(1rem, 4vw, 3rem);
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(0, 243, 255, 0.05);
    animation: floating 8s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Decorative Lines */
.glow-line {
    position: absolute;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    opacity: 0.7;
    box-shadow: 0 0 10px var(--neon-blue);
}

.glow-line.top { top: 0; }
.glow-line.bottom { bottom: 0; }

/* Typography */
.title-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: clamp(1rem, 3vh, 2rem);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.title-text .highlight {
    color: var(--neon-blue);
    text-shadow: 
        0 0 5px var(--neon-blue),
        0 0 20px var(--neon-blue),
        0 0 40px var(--neon-blue);
}

/* GIF Container */
.media-container {
    margin: clamp(1rem, 3vh, 2rem) auto 0;
    max-width: 350px;
    position: relative;
    transition: transform 0.3s ease;
    text-align: center;
}

.media-container:hover {
    transform: scale(1.05) translateZ(20px);
}

.border-gradient {
    position: relative;
    border-radius: 20px;
    padding: 6px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple), var(--neon-blue));
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.4);
    display: inline-block;
}

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

.cake-gif {
    max-height: clamp(150px, 25vh, 260px);
    width: auto;
    margin: 0 auto;
    border-radius: 14px;
    display: block;
    background: #000;
}

/* Countdown Timer */
.timer-wrapper {
    margin-top: clamp(0.5rem, 2vh, 1.5rem);
}

.countdown-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    text-shadow: 
        0 0 10px var(--neon-green),
        0 0 20px rgba(0, 255, 102, 0.5);
}

.countdown-layout.finished {
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333, 0 0 20px rgba(255, 51, 51, 0.5);
    animation: blinkFinished 1s step-start infinite;
}

.countdown-layout.finished .prefix {
    color: #ff3333;
    text-shadow: 0 0 15px #ff3333;
}

@keyframes blinkFinished {
    50% { opacity: 0.2; }
}

.prefix {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    margin-right: 1rem;
    color: var(--neon-blue);
    text-shadow: 0 0 15px var(--neon-blue);
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4rem;
}

.time-val {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.colon {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    margin: 0 0.2rem;
    padding-bottom: 1.5rem; 
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0.2; }
}

.time-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 0.5rem;
    text-shadow: none;
}


/* Celebration Message */
.celebration-container {
    margin: 2rem 0;
    animation: fadeInScale 1s ease-out forwards;
}

.celebration-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green), 0 0 30px rgba(0, 255, 102, 0.6);
    margin-bottom: 1rem;
    font-weight: 900;
}

.celebration-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
}

.hidden {
    display: none !important;
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Cursor Trail */
.cursor-trail {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 
        0 0 5px #fff,
        0 0 10px var(--neon-blue),
        0 0 20px var(--neon-blue);
    transform: translate(-50%, -50%);
    animation: fadeShrink 0.5s ease-out forwards;
}

@keyframes fadeShrink {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1);
    }
}

/* Mobile responsiveness adjustments */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .glass-panel {
        padding: 2.5rem 1rem 2rem;
        border-radius: 20px;
    }
    
    .title-text {
        font-size: clamp(0.9rem, 6.5vw, 1.8rem);
        white-space: normal;
    }

    .celebration-title {
        font-size: clamp(1.5rem, 8vw, 2.2rem);
    }

    .countdown-layout {
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    
    .prefix {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
        text-align: center;
        font-size: 2rem;
    }
    
    .time-block {
        min-width: 3.2rem;
    }

    .time-val {
        font-size: 2.2rem;
    }

    .colon {
        font-size: 2rem;
        margin: 0 0.1rem;
        padding-bottom: 1.2rem;
    }

    .time-label {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .media-container {
        margin: 1.5rem auto 0;
        max-width: 280px;
    }
}
