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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #ffa500 75%, #ff6b6b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
    position: relative;
}

.music-toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.music-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.music-toggle-btn.muted {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
}

.music-toggle-btn.muted #musicIcon {
    opacity: 0.6;
}

.main-title {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    animation: pulse 2s infinite;
    line-height: 1.2;
}

.name-display {
    font-size: 3rem;
    font-weight: 400;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: nameGlow 3s ease-in-out infinite alternate;
}

@keyframes nameGlow {
    0% { 
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        transform: scale(1);
    }
    100% { 
        text-shadow: 2px 2px 20px rgba(255, 215, 0, 0.8);
        transform: scale(1.05);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    font-size: 1.2rem;
    color: #fff;
    opacity: 0.9;
    font-weight: 300;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.cake-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.birthday-cake {
    position: relative;
    width: 200px;
    height: 250px;
    animation: cakeFloat 3s ease-in-out infinite;
}

@keyframes cakeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cake-layer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cake-bottom {
    bottom: 0;
    width: 180px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border: 3px solid #654321;
}

.cake-middle {
    bottom: 80px;
    width: 140px;
    height: 70px;
    background: linear-gradient(135deg, #FFB6C1, #FFC0CB);
    border: 3px solid #FF69B4;
}

.cake-top {
    bottom: 150px;
    width: 100px;
    height: 60px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 3px solid #FF8C00;
}

.candles {
    position: absolute;
    bottom: 210px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.candle {
    width: 15px;
    height: 40px;
    background: linear-gradient(135deg, #FF69B4, #FFB6C1);
    border: 2px solid #FF1493;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.candle:hover {
    transform: scale(1.1);
}

.flame {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 25px;
    background: radial-gradient(circle, #FFD700, #FFA500, #FF6347);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 20px #FFA500;
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1) rotate(-2deg); }
    100% { transform: translateX(-50%) scale(1.1) rotate(2deg); }
}

.flame.extinguished {
    animation: none;
    background: #333;
    height: 5px;
    box-shadow: none;
}

.message-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.typewriter-message {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #fff;
    text-align: center;
    min-height: 60px;
    line-height: 1.6;
}

.balloons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.balloon {
    position: absolute;
    font-size: 2rem;
    animation: float 8s infinite ease-in-out;
    opacity: 0.8;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
    z-index: 2;
    position: relative;
}

.birthday-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    border: none;
    border-radius: 15px;
    padding: 15px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.birthday-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.birthday-btn:hover::before {
    width: 300px;
    height: 300px;
}

.birthday-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.birthday-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-icon {
    font-size: 2rem;
}

.btn-text {
    font-size: 0.9rem;
}

.confetti-btn { background: linear-gradient(135deg, #ff6b6b, #ff8e8e); }
.cake-btn { background: linear-gradient(135deg, #8B4513, #A0522D); }
.balloon-btn { background: linear-gradient(135deg, #ff1744, #ff6b6b); }
.gift-btn { background: linear-gradient(135deg, #4CAF50, #8BC34A); }
.fireworks-btn { background: linear-gradient(135deg, #2196F3, #03A9F4); }
.party-btn { background: linear-gradient(135deg, #9C27B0, #BA68C8); }
.wish-btn { background: linear-gradient(135deg, #FFD700, #FFA500); }
.dance-btn { background: linear-gradient(135deg, #E91E63, #F06292); }
.celebrate-btn { background: linear-gradient(135deg, #FF5722, #FF9800); }

.special-message {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.special-message.show {
    opacity: 1;
    transform: scale(1);
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: particleFall 3s linear forwards;
}

@keyframes particleFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-particle {
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4CAF50, #2196F3, #FFD700);
    animation: confettiFall 4s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.music-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.music-prompt.show {
    opacity: 1;
    visibility: visible;
}

.prompt-content {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e, #f093fb);
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
    max-width: 500px;
    animation: promptBounce 2s ease-in-out infinite;
}

@keyframes promptBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.prompt-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: iconSpin 3s linear infinite;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.prompt-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); }
    100% { text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.5); }
}

.prompt-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.prompt-play-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    padding: 20px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.1); box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4); }
}

.prompt-play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.prompt-play-btn:active {
    transform: scale(1.05);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dancing {
    animation: dance 1s ease-in-out infinite;
}

@keyframes dance {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.1); }
    50% { transform: rotate(-3deg) scale(1.05); }
    75% { transform: rotate(3deg) scale(1.08); }
}

.color-change {
    animation: colorChange 2s ease-in-out infinite;
}

@keyframes colorChange {
    0% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg); }
    100% { filter: hue-rotate(360deg); }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
    
    .buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .typewriter-message {
        font-size: 1.4rem;
    }
    
    .prompt-content {
        margin: 20px;
        padding: 30px;
    }
    
    .prompt-title {
        font-size: 2rem;
    }
    
    .prompt-icon {
        font-size: 3rem;
    }
    
    .prompt-play-btn {
        font-size: 1.1rem;
        padding: 15px 30px;
    }
    
    .name-display {
        font-size: 2.5rem;
    }
    
    .birthday-cake {
        width: 150px;
        height: 200px;
    }
    
    .cake-bottom {
        width: 140px;
        height: 60px;
    }
    
    .cake-middle {
        width: 110px;
        height: 55px;
        bottom: 60px;
    }
    
    .cake-top {
        width: 80px;
        height: 45px;
        bottom: 115px;
    }
    
    .candles {
        bottom: 160px;
        gap: 15px;
    }
}
