* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #7e22ce 50%, #e94999 75%, #f97316 100%);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.2) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* =====================
   LOADING SCREEN
===================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ffa8a8 100%);
    background-size: 200% 200%;
    animation: loading-gradient 3s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

@keyframes loading-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.cake-loader {
    width: 100px;
    height: 120px;
    position: relative;
    margin: 0 auto 30px;
    animation: bounce 1s infinite;
}

.cake-loader .layer {
    width: 80px;
    height: 20px;
    background: linear-gradient(to right, #ff9a9e, #fad0c4);
    border-radius: 10px;
    position: absolute;
    left: 10px;
    animation: layerPulse 1s infinite;
}

.cake-loader .layer:nth-child(1) {
    bottom: 60px;
    width: 60px;
    left: 20px;
}

.cake-loader .layer:nth-child(2) {
    bottom: 35px;
    animation-delay: 0.2s;
}

.cake-loader .layer:nth-child(3) {
    bottom: 10px;
    width: 90px;
    left: 5px;
    animation-delay: 0.4s;
}

.candle-loader {
    width: 6px;
    height: 30px;
    background: #ff6b6b;
    position: absolute;
    top: 15px;
    left: 47px;
    border-radius: 3px;
}

.candle-loader::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -2px;
    width: 10px;
    height: 10px;
    background: #ffd93d;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd93d, 0 0 20px #ff6b6b;
    animation: flicker 0.3s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes layerPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.9); }
}

.loading-text {
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.loading-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 3px;
    animation: loading 3s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* =====================
   MAIN BIRTHDAY PAGE
===================== */
.birthday-container {
    position: relative;
    min-height: 100vh;
    padding: 40px 20px;
    opacity: 0;
    transition: opacity 1s ease;
}

.birthday-container.visible {
    opacity: 1;
}

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f;
    top: -10px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Balloons */
.balloons {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.balloon {
    position: absolute;
    width: 60px;
    height: 75px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: float 6s ease-in-out infinite;
}

.balloon::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 2px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%);
}

.balloon-1 {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    left: 10%;
    animation-delay: 0s;
}

.balloon-2 {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    left: 30%;
    animation-delay: 1s;
}

.balloon-3 {
    background: linear-gradient(135deg, #ffd93d, #f6c744);
    right: 30%;
    animation-delay: 2s;
}

.balloon-4 {
    background: linear-gradient(135deg, #a8e6cf, #7fb3d5);
    right: 15%;
    animation-delay: 1.5s;
}

.balloon-5 {
    background: linear-gradient(135deg, #fbb8e4, #f38fb5);
    left: 50%;
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(5deg);
    }
    66% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

/* Content */
.content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
}

/* Birthday Message */
.birthday-message {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease;
}

.animated-title {
    font-size: 72px;
    font-weight: bold;
    color: white;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.animated-title .letter {
    display: inline-block;
    animation: bounceIn 0.6s ease backwards;
}

.animated-title .letter:nth-child(1) { animation-delay: 0.1s; }
.animated-title .letter:nth-child(2) { animation-delay: 0.15s; }
.animated-title .letter:nth-child(3) { animation-delay: 0.2s; }
.animated-title .letter:nth-child(4) { animation-delay: 0.25s; }
.animated-title .letter:nth-child(5) { animation-delay: 0.3s; }
.animated-title .letter:nth-child(6) { animation-delay: 0.35s; }
.animated-title .letter:nth-child(7) { animation-delay: 0.4s; }
.animated-title .letter:nth-child(8) { animation-delay: 0.45s; }
.animated-title .letter:nth-child(9) { animation-delay: 0.5s; }
.animated-title .letter:nth-child(10) { animation-delay: 0.55s; }
.animated-title .letter:nth-child(11) { animation-delay: 0.6s; }
.animated-title .letter:nth-child(12) { animation-delay: 0.65s; }
.animated-title .letter:nth-child(13) { animation-delay: 0.7s; }
.animated-title .letter:nth-child(14) { animation-delay: 0.75s; }

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.name-title {
    font-size: 64px;
    color: #ffd93d;
    text-shadow: 
        0 0 20px rgba(255, 217, 61, 0.5),
        0 0 40px rgba(255, 217, 61, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    animation: glow 2s ease-in-out infinite;
    font-weight: 700;
    letter-spacing: 2px;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 217, 61, 0.5), 0 0 30px rgba(255, 217, 61, 0.3);
    }
    50% {
        text-shadow: 0 0 30px rgba(255, 217, 61, 0.8), 0 0 40px rgba(255, 217, 61, 0.5);
    }
}

.birthday-date {
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
    opacity: 0.9;
}

.age-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #f093fb, #ffd93d);
    background-size: 200% 200%;
    animation: fadeInUp 1s ease 0.5s backwards, badge-gradient 3s ease infinite;
    padding: 15px 40px;
    border-radius: 50px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 217, 61, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

@keyframes badge-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.age-number {
    font-size: 48px;
    font-weight: bold;
    color: white;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.age-text {
    font-size: 18px;
    color: white;
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   CAKE SECTION
===================== */
.cake-container {
    position: relative;
    width: 400px;
    height: 500px;
    margin: 0 auto 60px;
}

/* Falling Cake Pieces */
.cake-pieces {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.cake-piece {
    position: absolute;
    width: 50px;
    height: 35px;
    border-radius: 12px;
    top: -150px;
    animation: fall-and-assemble 2.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(255, 255, 255, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    transition: filter 0.1s ease;
    will-change: transform, opacity;
}

@keyframes fall-and-assemble {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.5);
        opacity: 0;
        filter: brightness(1.5) blur(2px);
    }
    10% {
        opacity: 1;
        filter: brightness(1.3) blur(0px);
    }
    30% {
        transform: translateY(150px) rotate(var(--rotation, 360deg)) scale(1);
        filter: brightness(1.1);
    }
    50% {
        transform: translateY(280px) rotate(calc(var(--rotation, 360deg) * 1.5)) scale(1.05);
    }
    65% {
        transform: translateY(380px) rotate(calc(var(--rotation, 360deg) * 2)) scale(1);
        opacity: 1;
        filter: brightness(1);
    }
    80% {
        transform: translateY(var(--final-y)) translateX(var(--final-x)) rotate(calc(var(--rotation, 360deg) * 2.2)) scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: translateY(var(--final-y)) translateX(var(--final-x)) rotate(calc(var(--rotation, 360deg) * 2.5)) scale(0.6);
        opacity: 0;
        filter: brightness(0.8) blur(1px);
    }
}

/* Assembled Cake */
.assembled-cake {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.4));
}

.assembled-cake.visible {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    animation: cake-appear 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cake-appear {
    0% {
        transform: translateX(-50%) scale(0) rotate(-5deg);
        opacity: 0;
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0)) brightness(0.5);
    }
    60% {
        transform: translateX(-50%) scale(1.1) rotate(2deg);
        filter: drop-shadow(0 25px 60px rgba(0, 0, 0, 0.5)) brightness(1.2);
    }
    80% {
        transform: translateX(-50%) scale(0.95) rotate(-1deg);
    }
    100% {
        transform: translateX(-50%) scale(1) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.4)) brightness(1);
    }
}

/* Beautiful Cake Bottom Layer */
.cake-bottom {
    width: 280px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c86dd7 50%, #8b5cf6 100%);
    border-radius: 15px;
    position: relative;
    box-shadow: 
        0 15px 40px rgba(139, 92, 246, 0.4),
        inset 0 -5px 15px rgba(0, 0, 0, 0.2),
        inset 0 5px 15px rgba(255, 255, 255, 0.3);
    overflow: hidden;
    animation: cake-layer-pulse 3s ease-in-out infinite;
    animation-delay: 0.4s;
}

.cake-frosting-bottom {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to right, #ffd700, #ffed4e, #ffd700);
    border-radius: 15px 15px 0 0;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.5);
}

.cake-base {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 10px;
    background: linear-gradient(to right, #6b46c1, #9333ea);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.decoration-flowers {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
}

.decoration-flowers .flower {
    font-size: 24px;
    animation: flower-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.decoration-flowers .flower:nth-child(2n) {
    animation-delay: 0.5s;
}

@keyframes flower-pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Beautiful Cake Middle Layer */
.cake-middle {
    width: 250px;
    height: 70px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ec4899 100%);
    border-radius: 12px;
    position: relative;
    margin: -8px auto 0;
    box-shadow: 
        0 10px 30px rgba(236, 72, 153, 0.4),
        inset 0 -5px 12px rgba(0, 0, 0, 0.2),
        inset 0 5px 12px rgba(255, 255, 255, 0.3);
    animation: cake-layer-pulse 3s ease-in-out infinite;
    animation-delay: 0.2s;
}

.cake-frosting-middle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(to right, #34d399, #10b981, #34d399);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.5);
}

.cake-layers {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-line {
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.decoration-swirls {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 25px;
}

.decoration-swirls .swirl {
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, #fff 0%, #ffc0cb 100%);
    border-radius: 50%;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    animation: swirl-rotate 3s linear infinite;
}

.decoration-swirls .swirl:nth-child(2) {
    animation-delay: 1s;
}

.decoration-swirls .swirl:nth-child(3) {
    animation-delay: 2s;
}

@keyframes swirl-rotate {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.15);
    }
}

/* Beautiful Cake Top Layer */
.cake-top {
    width: 220px;
    height: 60px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #c084fc 100%);
    border-radius: 10px;
    position: relative;
    margin: -8px auto 0;
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.4),
        inset 0 -4px 10px rgba(0, 0, 0, 0.2),
        inset 0 4px 10px rgba(255, 255, 255, 0.3);
    animation: cake-layer-pulse 3s ease-in-out infinite;
    animation-delay: 0s;
}

@keyframes cake-layer-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.08);
    }
}

.cake-frosting-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to right, #f87171, #ef4444, #f87171);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 2px 6px rgba(248, 113, 113, 0.5);
}

.decoration-dots {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
}

.decoration-dots .dot {
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #ffd700 0%, #ff69b4 100%);
    border-radius: 50%;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 215, 0, 0.6);
    animation: dot-glow 1.5s ease-in-out infinite;
}

.decoration-dots .dot:nth-child(1) { animation-delay: 0s; }
.decoration-dots .dot:nth-child(2) { animation-delay: 0.3s; }
.decoration-dots .dot:nth-child(3) { animation-delay: 0.6s; }
.decoration-dots .dot:nth-child(4) { animation-delay: 0.9s; }
.decoration-dots .dot:nth-child(5) { animation-delay: 1.2s; }

@keyframes dot-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 215, 0, 0.6);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 215, 0, 0.9);
    }
}

/* Candles — inside .assembled-cake so they move with the cake on any screen */
.candles-container {
    position: absolute;
    left: 50%;
    /* Desktop / large screens: net ~5cm vs base px (raised 1cm vs −4cm); mobile overrides below */
    top: calc(52px - 5cm);
    transform: translateX(-50%) scale(0);
    display: flex;
    gap: 30px;
    opacity: 0;
    transition: all 0.8s ease;
    z-index: 15;
    pointer-events: none;
}

.candles-container.visible {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.candle {
    position: relative;
    cursor: pointer;
    transition: all 0.4s ease;
}

.candle:hover {
    transform: scale(1.15) translateY(-8px);
}

/* Number Shape */
.number-shape {
    font-size: 130px;
    font-weight: 900;
    font-family: 'Arial Black', Arial, sans-serif;
    background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 30%, #ee5a6f 60%, #d63447 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 12px 35px rgba(255, 107, 107, 0.7))
            drop-shadow(0 0 25px rgba(238, 90, 111, 0.6))
            drop-shadow(0 0 40px rgba(214, 52, 71, 0.5));
    animation: number-glow 2s ease-in-out infinite;
    position: relative;
    line-height: 1;
    display: block;
    text-shadow: 
        3px 3px 0px rgba(214, 52, 71, 0.5),
        6px 6px 10px rgba(0, 0, 0, 0.4);
}

.number-shape::before {
    content: attr(data-number);
    position: absolute;
    top: 2px;
    left: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 2;
}

@keyframes number-glow {
    0%, 100% {
        filter: drop-shadow(0 10px 30px rgba(255, 107, 107, 0.7))
                drop-shadow(0 0 20px rgba(238, 90, 111, 0.6))
                drop-shadow(0 0 35px rgba(214, 52, 71, 0.5))
                brightness(1);
    }
    50% {
        filter: drop-shadow(0 12px 38px rgba(255, 107, 107, 0.9))
                drop-shadow(0 0 28px rgba(238, 90, 111, 0.8))
                drop-shadow(0 0 45px rgba(214, 52, 71, 0.7))
                brightness(1.12);
    }
}

.flame {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 45px;
    background: radial-gradient(ellipse at center bottom, #ffd93d 0%, #ffed4e 30%, #ff6b35 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 
        0 0 40px #ffd93d, 
        0 0 60px #ff6b35, 
        0 0 80px rgba(255, 107, 53, 0.7),
        0 0 25px rgba(255, 217, 61, 1),
        0 5px 20px rgba(255, 107, 53, 0.5);
    animation: flame-dance 0.6s ease-in-out infinite alternate;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 20;
}

.candle-2 .flame {
    left: 50%;
}

.candle-0 .flame {
    left: 50%;
}

.flame-inner {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 26px;
    background: radial-gradient(ellipse at center, #fff 0%, #ffed4e 65%, transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.95);
}

@keyframes flame-dance {
    0% {
        transform: translateX(-50%) scale(1) translateY(0) rotate(-2deg);
        box-shadow: 
            0 0 40px #ffd93d, 
            0 0 60px #ff6b35, 
            0 0 80px rgba(255, 107, 53, 0.7),
            0 0 25px rgba(255, 217, 61, 1),
            0 5px 20px rgba(255, 107, 53, 0.5);
    }
    100% {
        transform: translateX(-50%) scale(1.12) translateY(-5px) rotate(2deg);
        box-shadow: 
            0 0 45px #ffd93d, 
            0 0 70px #ff6b35, 
            0 0 90px rgba(255, 107, 53, 0.8),
            0 0 30px rgba(255, 217, 61, 1),
            0 8px 25px rgba(255, 107, 53, 0.6);
    }
}

.candle.blown-out .flame {
    opacity: 0;
    transform: translateX(-50%) scale(0);
}


/* =====================
   MUSIC CONTROL
===================== */
.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.music-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse-music 2s ease-in-out infinite;
}

.music-btn:hover {
    transform: scale(1.1);
}

@keyframes pulse-music {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 5px 30px rgba(102, 126, 234, 0.6);
    }
}

.music-icon {
    font-size: 28px;
}

.music-btn.paused {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

/* =====================
   RESPONSIVE DESIGN
===================== */
@media (max-width: 768px) {
    .animated-title {
        font-size: 48px;
    }

    .name-title {
        font-size: 42px;
    }

    .birthday-date {
        font-size: 18px;
    }

    .cake-container {
        width: 300px;
        height: 400px;
    }

    .cake-bottom {
        width: 200px;
        height: 50px;
    }

    .cake-middle {
        width: 170px;
        height: 40px;
    }

    .cake-top {
        width: 140px;
        height: 30px;
    }

    .candles-container {
        gap: 28px;
        top: calc(78px - 4cm);
    }

    .number-shape {
        font-size: 130px;
    }

    .flame {
        width: 20px;
        height: 36px;
        top: -42px;
    }

    .flame-inner {
        width: 12px;
        height: 20px;
        top: 8px;
    }
}

@media (max-width: 480px) {
    .candles-container {
        gap: 15px;
        top: calc(82px - 4cm);
    }

    .number-shape {
        font-size: 55px !important;
    }

    .flame {
        width: 18px;
        height: 32px;
        top: -38px;
    }

    .flame-inner {
        width: 11px;
        height: 18px;
        top: 7px;
    }

    .balloon {
        width: 40px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .animated-title {
        font-size: 36px;
    }

    .name-title {
        font-size: 32px;
    }

    .age-number {
        font-size: 36px;
    }

    .loading-text {
        font-size: 18px;
    }

    .loading-bar {
        width: 200px;
    }
}
