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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    text-align: center;
    padding: 20px;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

.birthday-card {
    position: relative;
    width: 400px;
    height: 300px;
    margin: 0 auto 40px;
    perspective: 1000px;
}

.card-front, .card-inside {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.6s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.card-front {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transform: rotateY(0deg);
    cursor: pointer;
}

.card-inside {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    transform: rotateY(180deg);
}

.card-front h2, .card-inside h2 {
    color: #333;
    margin-bottom: 20px;
}

.card-inside p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.birthday-card.flipped .card-front {
    transform: rotateY(180deg);
}

.birthday-card.flipped .card-inside {
    transform: rotateY(0deg);
}

.decorations {
    position: relative;
    margin-top: 20px;
}

.balloon {
    position: absolute;
    width: 50px;
    height: 70px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    animation: float 3s ease-in-out infinite;
}

.balloon:nth-child(1) {
    background-color: #ff6b6b;
    left: -60px;
    animation-delay: 0s;
}

.balloon:nth-child(2) {
    background-color: #4ecdc4;
    left: 0;
    animation-delay: 1s;
}

.balloon:nth-child(3) {
    background-color: #45b7d1;
    left: 60px;
    animation-delay: 2s;
}

.balloon::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background-color: #333;
}

.cake {
    margin-top: 20px;
    position: relative;
}

.cake-top {
    width: 80px;
    height: 20px;
    background-color: #f8b195;
    border-radius: 5px 5px 0 0;
    margin: 0 auto;
}

.cake-body {
    width: 100px;
    height: 30px;
    background-color: #f67280;
    border-radius: 0 0 5px 5px;
    margin: 0 auto;
}

.candle {
    width: 6px;
    height: 30px;
    background-color: #f8b195;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.candle::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: #ff9a9e;
    border-radius: 50%;
    box-shadow: 0 0 10px 5px rgba(255, 154, 158, 0.5);
    animation: flicker 1.5s ease-in-out infinite;
}

#play-music {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#play-music:hover {
    background-color: #ee5a52;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

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

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    border-radius: 50%;
    animation: confetti-fall 3s ease-in-out forwards;
}

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

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

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .birthday-card {
        width: 300px;
        height: 250px;
    }
    
    .card-front, .card-inside {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .birthday-card {
        width: 250px;
        height: 200px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .card-front h2, .card-inside h2 {
        font-size: 1.2rem;
    }
    
    .card-inside p {
        font-size: 0.9rem;
    }
}