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

body {
    min-height: 100vh;
    background: radial-gradient(circle, #1a1a40, #000);
    font-family: 'Segoe UI', sans-serif;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    overscroll-behavior: none;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* ===== HEADER ===== */
h1 {
    pointer-events: none;
    text-align: center;
    margin-top: 100px;
    font-size: 48px;
    touch-action: manipulation;
    text-shadow:
        0 0 10px #ff69b4,
        0 0 20px #ff69b4,
        0 0 40px #ffd700;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #ff69b4; }
    to   { text-shadow: 0 0 30px #ffd700; }
}

/* ===== CAKE ===== */
.cake {
    width: 260px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-self: center;
    align-items: center;
    margin-bottom: 50px;
}

/* Layers */
.layer {
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.layer3 {
    width: 140px;
    height: 50px;
    background: linear-gradient(45deg, #fbc2eb, #a6c1ee);
}

.layer2 {
    width: 200px;
    height: 60px;
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
    margin-top: -10px;
}

.layer1 {
    width: 260px;
    height: 70px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    margin-top: -10px;
}

/* ===== CANDLE ===== */
.candle {
    width: 12px;
    height: 50px;
    background: repeating-linear-gradient(
        45deg,
        red,
        red 5px,
        white 5px,
        white 10px
    );
    margin: 0 auto;
    border-radius: 5px;
}

.flame {
    width: 42px;
    height: 60px;
    background: radial-gradient(
        circle at 50% 70%,
        #fff 0%,
        #ffe066 30%,
        #ff9f1c 55%,
        #ff6b00 75%,
        transparent 85%
    );
    border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
    animation: flameFlicker 0.18s infinite;
    filter: drop-shadow(0 0 8px rgba(255, 200, 0, 0.8));
}


@keyframes flameFlicker {
    0% {
        transform: translateX(0) scaleY(1);
    }
    25% {
        transform: translateX(-1px) scaleY(1.05);
    }
    50% {
        transform: translateX(1px) scaleY(0.95);
    }
    75% {
        transform: translateX(-1px) scaleY(1.08);
    }
    100% {
        transform: translateX(0) scaleY(1);
    }
}

/* ===== SPARKLE ===== */
#sparkles {
    pointer-events: none;
    z-index: 0;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkle 2s infinite;
}


@keyframes sparkle {
    0%   { opacity: 0; transform: translateY(0); }
    50%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-80px); }
}

/* ===== FIREWORKS ===== */
.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: explode 1.2s ease-out forwards;
}

@keyframes explode {
    to {
        transform: translate(var(--x), var(--y));
        opacity: 0;
    }
}