body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: white;
    overflow: hidden;
    position: relative;
}

.container {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

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

h2 {
    font-size: 2em;
    margin: 30px 0;
    color: #fff;
}

/* 祝福语轮播样式 */
.message-slider {
    font-size: 1.2em;
    margin: 30px 0;
    min-height: 1.5em;
    color: #fff;
}

/* 音乐控制按钮样式 */
.music-control {
    margin-top: 20px;
}

#music-btn {
    background: linear-gradient(to right, #4facfe, #00f2fe);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#music-btn:hover {
    transform: scale(1.05);
}

/* 气球装饰元素 */
.balloon {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
}

#balloon1 {
    width: 60px;
    height: 70px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #d63031);
    left: 10%;
    top: 20%;
    animation: float 8s infinite ease-in-out;
}

#balloon2 {
    width: 50px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #00b894, #00665c);
    right: 15%;
    top: 30%;
    animation: float 6s infinite ease-in-out 1s;
}

#balloon3 {
    width: 70px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #fdcb6e, #e17055);
    left: 20%;
    bottom: 20%;
    animation: float 10s infinite ease-in-out 0.5s;
}

/* 礼物盒装饰元素 */
.gift {
    position: absolute;
    z-index: 1;
}

#gift1 {
    width: 50px;
    height: 50px;
    background: linear-gradient(to bottom, #a29bfe, #6c5ce7);
    left: 15%;
    bottom: 15%;
    animation: rotate 15s infinite linear;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

#gift2 {
    width: 40px;
    height: 40px;
    background: linear-gradient(to bottom, #fd79a8, #e84393);
    right: 20%;
    top: 25%;
    animation: rotate 12s infinite linear reverse;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

/* 学生相关元素 */
.book {
    position: absolute;
    width: 40px;
    height: 50px;
    background: linear-gradient(to bottom, #ffeaa7, #fdcb6e);
    z-index: 1;
    border-radius: 3px;
}

.book::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 10px;
    background: #e17055;
    top: 0;
    border-radius: 3px 3px 0 0;
}

#book1 {
    left: 25%;
    top: 15%;
    animation: float 12s infinite ease-in-out 2s;
}

.pencil {
    position: absolute;
    width: 3px;
    height: 40px;
    background: linear-gradient(to bottom, #636e72, #2d3436);
    z-index: 1;
    border-radius: 2px;
}

.pencil::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #e17055;
    top: -4px;
    left: -2.5px;
    border-radius: 50%;
}

#pencil1 {
    right: 25%;
    bottom: 25%;
    animation: float 10s infinite ease-in-out 3s;
}

.calculator {
    position: absolute;
    width: 50px;
    height: 60px;
    background: linear-gradient(to bottom, #dddedf, #b2bec3);
    z-index: 1;
    border-radius: 5px;
}

.calculator::before {
    content: "";
    position: absolute;
    width: 30px;
    height: 15px;
    background: #636e72;
    top: 10px;
    left: 10px;
    border-radius: 2px;
}

#calculator1 {
    left: 30%;
    bottom: 30%;
    animation: float 14s infinite ease-in-out 4s;
}

/* 漂浮动画 */
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-40px) translateX(-10px); }
    75% { transform: translateY(-20px) translateX(5px); }
}

/* 旋转动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 飘落的心形 */
.heart {
    position: absolute;
    font-size: 24px;
    color: #fd79a8;
    animation: fall linear forwards;
    z-index: 0;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 闪烁的星星 */
.star {
    position: absolute;
    font-size: 20px;
    color: #f1c40f;
    animation: twinkle 1s infinite alternate;
    z-index: 0;
}

@keyframes twinkle {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    #balloon1, #balloon2, #balloon3 {
        width: 30px;
        height: 40px;
    }
    
    #gift1, #gift2 {
        width: 25px;
        height: 25px;
    }
    
    #book1 {
        width: 20px;
        height: 25px;
    }
    
    .pencil {
        height: 20px;
    }
    
    #pencil1 {
        width: 2px;
    }
    
    #calculator1 {
        width: 25px;
        height: 30px;
    }
}