:root {
    --bg-dark: #050511;
    --primary-glow: #00f2ff;
    --secondary-glow: #bd00ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --font-outfit: 'Outfit', sans-serif;
    --font-space: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-dark);
    /* Animated Deep Space Gradient */
    background: linear-gradient(125deg, #02020a 0%, #0b0b29 40%, #1a0b2e 70%, #02020a 100%);
    background-size: 300% 300%;
    animation: gradient-shift 20s ease infinite;

    color: var(--text-primary);
    font-family: var(--font-outfit);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Layout Utilities */
.app-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Parallax Stars */
.star-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    /* Double height for scrolling */
    animation: star-scroll linear infinite;
}

.stars-1 {
    background-image: radial-gradient(1px 1px at 50% 50%, white, transparent);
    background-size: 100px 100px;
    opacity: 0.3;
    animation-duration: 50s;
}

.stars-2 {
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, white, transparent),
        radial-gradient(1.5px 1.5px at 80% 70%, white, transparent);
    background-size: 300px 300px;
    opacity: 0.4;
    animation-duration: 80s;
}

.stars-3 {
    background-image:
        radial-gradient(2px 2px at 10% 80%, white, transparent),
        radial-gradient(2px 2px at 90% 10%, white, transparent);
    background-size: 500px 500px;
    opacity: 0.5;
    animation-duration: 120s;
}

@keyframes star-scroll {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-50%);
    }
}

/* Shooting Star */
.shooting-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 1);
    animation: shoot 5s linear infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
    right: 1px;
}

@keyframes shoot {
    0% {
        transform: rotate(-45deg) translateX(0);
        opacity: 1;
    }

    10% {
        transform: rotate(-45deg) translateX(-500px);
        /* Move quickly */
        opacity: 0;
    }

    100% {
        transform: rotate(-45deg) translateX(-500px);
        opacity: 0;
    }
}

/* Delay for second shooting star */
.shooting-star:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.content-layer {
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.content-layer.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: scale(0.9) blur(10px);
}

.content-layer.visible {
    opacity: 1;
    transform: scale(1) blur(0px);
}

/* Typography & Components */
.header-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: white;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.strikethrough-dim {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.timer-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.time-unit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0.5rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    min-width: 100px;
    transition: transform 0.3s ease;
}

.time-unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 255, 0.2);
}

.time-value {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-space);
    background: linear-gradient(to right, var(--primary-glow), var(--secondary-glow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.time-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 0.5rem;
    font-family: var(--font-outfit);
}

.waiting-text {
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-align: center;
}

/* Celebration */
.celebration-container {
    text-align: center;
    z-index: 10;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.celebration-container.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
    position: absolute;
}

.celebration-container.visible {
    opacity: 1;
    transform: scale(1);
}

.year-huge {
    font-size: 12vw;
    font-weight: 900;
    font-family: var(--font-space);
    line-height: 1;
    color: white;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 30px var(--primary-glow),
        0 0 60px var(--secondary-glow);
    animation: float 6s ease-in-out infinite;
}

.year-message {
    font-size: 2rem;
    color: white;
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.celebration-container.visible .year-message {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 768px) {
    .header-title {
        font-size: 1.5rem;
    }

    .year-huge {
        font-size: 20vw;
    }

    .year-message {
        font-size: 1.2rem;
    }

    .time-unit-card {
        min-width: 70px;
        padding: 1rem;
    }

    .time-value {
        font-size: 2rem;
    }
}