/* ===== Vibrant Modern Glass Variables ===== */
:root {
    --p-1: #ff0080;
    /* Hot Pink */
    --p-2: #7928ca;
    /* Purple */
    --p-3: #4facfe;
    /* Blue */
    --p-4: #00f2fe;
    /* Cyan */
    --p-5: #f9d423;
    /* Gold */
    --bg-main: #050508;
    --card-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Outfit', 'Noto Sans Lao', sans-serif;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Dynamic Background Blobs ===== */
.bg-glow {
    position: fixed;
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.4;
    pointer-events: none;
    animation: move 20s infinite alternate;
}

#particles,
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

@keyframes move {
    from {
        transform: translate(-10%, -10%) scale(1);
    }

    to {
        transform: translate(20%, 20%) scale(1.2);
    }
}

.blob-1 {
    top: -20%;
    right: -10%;
    background: radial-gradient(circle, var(--p-1), transparent 70%);
}

.blob-2 {
    bottom: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--p-2), transparent 70%);
}

.blob-3 {
    top: 40%;
    left: 20%;
    width: 40vw;
    height: 40vw;
    opacity: 0.2;
    background: radial-gradient(circle, var(--p-3), transparent 70%);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    position: relative;
    z-index: 10;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    margin-bottom: 5rem;
}

.title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
}

.title-year {
    display: block;
    font-size: 1.2em;
    background: linear-gradient(to right, var(--p-1), var(--p-3), var(--p-4));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 5s linear infinite;
    background-size: 200% auto;
}

@keyframes rainbow {
    to {
        background-position: 200% center;
    }
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    font-weight: 300;
}

/* ===== Countdown Section ===== */
.countdown-wrapper {
    background: var(--card-glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-glass);
    padding: 4rem 2rem;
    border-radius: 3rem;
    margin-bottom: 5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.countdown-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(225deg, transparent, rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 6vw, 5rem);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.countdown-unit {
    color: var(--p-4);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
}

/* ===== Wishes Grid ===== */
.wishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.wish-item {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    padding: 2.5rem 1.5rem;
    border-radius: 2rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.wish-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--grad);
    opacity: 0.5;
}

.wish-item:nth-child(1) {
    --grad: linear-gradient(90deg, #ff0080, #7928ca);
}

.wish-item:nth-child(2) {
    --grad: linear-gradient(90deg, #f9d423, #ff4e50);
}

.wish-item:nth-child(3) {
    --grad: linear-gradient(90deg, #38ef7d, #11998e);
}

.wish-item:nth-child(4) {
    --grad: linear-gradient(90deg, #4facfe, #00f2fe);
}

.wish-item:hover {
    transform: translateY(-15px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
}

.wish-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 0 15px currentColor);
}

.wish-label {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* ===== Action Button ===== */
.actions {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 3.5rem;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s;
    border: none;
    background: linear-gradient(90deg, var(--p-1), var(--p-2));
    color: #fff;
    box-shadow: 0 10px 40px rgba(255, 0, 128, 0.3);
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(255, 0, 128, 0.5);
    filter: brightness(1.1);
}

/* ===== Celebration Area ===== */
.celebration {
    display: none;
    margin-bottom: 5rem;
}

.celebration.active {
    display: block;
    animation: celebrateIn 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes celebrateIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.celebration-text {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

/* ===== Footer ===== */
.footer {
    padding: 5rem 0 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .countdown-wrapper {
        padding: 3rem 1rem;
    }

    .countdown {
        gap: 1rem;
    }

    .wishes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .wish-item {
        padding: 1.5rem 1rem;
    }
}

/* ===== Final Countdown Mode (Metallic Chrome) ===== */
.final-countdown {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(15rem, 60vw, 45rem);
    font-weight: 900;
    font-family: var(--font-heading);
    background: linear-gradient(180deg, #ffffff 0%, #a1a1a1 45%, #e1e1e1 50%, #818181 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 60px rgba(255, 255, 255, 0.4));
    z-index: 100;
    line-height: 1;
    text-align: center;
    pointer-events: none;
    transition: all 0.3s ease;
}

.mode-final-countdown .hero-content {
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s ease;
}

#flash-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.flash-active {
    animation: flashEffect 1s ease-out forwards;
}

@keyframes flashEffect {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.celebration.active .celebration-text {
    animation: grandTextPop 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes grandTextPop {
    0% {
        transform: scale(0.5) rotate(-5deg);
        opacity: 0;
        filter: blur(20px);
    }

    50% {
        transform: scale(1.1) rotate(2deg);
        filter: blur(0);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ===== Music Control ===== */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.music-control:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1) rotate(5deg);
}

.music-control:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .music-control {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}