/* 全局样式 */
:root {
    --primary-color: #ff69b4;
    --secondary-color: #87ceeb;
    --accent-color: #98fb98;
    --text-color: #333;
}

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

body {
    font-family: 'Bubblegum Sans', cursive;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    min-height: 100vh;
    overflow-x: hidden;
}

/* 音乐控制 */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.music-btn:hover {
    transform: scale(1.1);
}

/* 主容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* 标题样式 */
.title {
    font-size: 3.5rem;
    color: var(--primary-color);
    text-shadow: 3px 3px 0 #fff;
    margin: 30px 0;
    animation: bounce 2s infinite;
}

/* 蛋糕样式 */
.cake-container {
    margin: 50px auto;
    width: 200px;
    height: 200px;
    position: relative;
}

.cake {
    position: relative;
    width: 100%;
    height: 100%;
}

.plate {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 10px;
    background: #fff;
    border-radius: 50%;
}

.layer {
    position: absolute;
    width: 100%;
    height: 40px;
    border-radius: 10px;
}

.layer-bottom {
    bottom: 10px;
    background: #ff9999;
    width: 120%;
    left: -10%;
}

.layer-middle {
    bottom: 50px;
    background: #ff80bf;
    width: 110%;
    left: -5%;
}

.layer-top {
    bottom: 90px;
    background: #ff99cc;
}

.icing {
    position: absolute;
    top: 70px;
    width: 100%;
    height: 30px;
    background: white;
    border-radius: 50%;
}

.candle {
    position: absolute;
    bottom: 130px;
    left: 50%;
    width: 10px;
    height: 30px;
    background: #ffd700;
    transform: translateX(-50%);
}

.flame {
    position: absolute;
    top: -20px;
    left: 50%;
    width: 15px;
    height: 25px;
    background: #ff6b6b;
    border-radius: 50% 50% 20% 20%;
    transform: translateX(-50%);
    animation: flicker 1s infinite;
}

/* 祝福语样式 */
.wish {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 30px 0;
    font-family: 'Ma Shan Zheng', cursive;
    animation: fadeIn 2s;
}

/* 装饰元素样式 */
.decorations {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.balloon {
    position: absolute;
    font-size: 3rem;
    animation: float 6s infinite;
}

.balloon-1 { left: 10%; animation-delay: 0s; }
.balloon-2 { left: 50%; animation-delay: 2s; }
.balloon-3 { left: 80%; animation-delay: 4s; }

.star {
    position: absolute;
    font-size: 2rem;
    animation: twinkle 1.5s infinite;
}

.star-1 { top: 20%; left: 20%; animation-delay: 0s; }
.star-2 { top: 40%; left: 70%; animation-delay: 0.5s; }
.star-3 { top: 60%; left: 40%; animation-delay: 1s; }

.animal {
    position: absolute;
    font-size: 3rem;
}

.bunny {
    bottom: 20px;
    left: 20px;
    animation: hop 2s infinite;
}

.bear {
    bottom: 20px;
    right: 20px;
    animation: wobble 3s infinite;
}

/* 动画关键帧 */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

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

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

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

@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes flicker {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(0.9); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .wish {
        font-size: 1.2rem;
    }
    
    .cake-container {
        width: 150px;
        height: 150px;
    }
    
    .balloon, .star {
        font-size: 2rem;
    }
    
    .animal {
        font-size: 2.5rem;
    }
}

/* 金币掉落动画样式 */
.coin {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff700 70%, #ffd700 100%, #b8860b 100%);
    box-shadow: 0 2px 8px rgba(184,134,11,0.5);
    border: 2px solid #fff8b0;
    z-index: 1000;
    animation: coin-fall 1.5s linear forwards, coin-spin 1.5s linear;
}
@keyframes coin-fall {
    0% { top: -50px; opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100vh; opacity: 0; }
}
@keyframes coin-spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(720deg); }
} 