/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Ma Shan Zheng', 'ZCOOL QingKe HuangYou', cursive, sans-serif;
    background: linear-gradient(135deg, #0c1b33 0%, #1a3a5f 50%, #0c1b33 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 圣诞灯串 */
.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(90deg, 
        #ff0000, #ff9900, #ffff00, #00ff00, 
        #0099ff, #6600ff, #ff00ff, #ff0000);
    background-size: 800% 100%;
    animation: lights 10s linear infinite;
    z-index: 1;
    opacity: 0.7;
}

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

/* 主容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* 标题样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    position: relative;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.title {
    font-size: 2.8rem;
    color: #ffd700;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff4500,
        0 0 30px #ff0000;
    animation: glow 2s ease-in-out infinite alternate;
    margin: 0;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #ff0000, 0 0 20px #ff4500; }
    to { text-shadow: 0 0 15px #ff0000, 0 0 25px #ff4500, 0 0 35px #ff0000; }
}

.star-left, .star-right {
    font-size: 2.5rem;
    color: #ffd700;
    animation: spin 4s linear infinite;
}

.star-right {
    animation-delay: 1s;
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.subtitle {
    font-size: 1.4rem;
    color: #87ceeb;
    opacity: 0.9;
}

/* 圣诞树 */
.christmas-tree {
    text-align: center;
    font-size: 1.8rem;
    line-height: 1.2;
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 20, 40, 0.5);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.tree-top {
    color: #ffd700;
    font-size: 3rem;
    animation: twinkle 1.5s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tree-layer {
    margin: 5px 0;
}

.tree-trunk {
    color: #8b4513;
    font-size: 2rem;
    margin-top: 10px;
}

.tree-base {
    color: #d2691e;
    font-size: 1.5rem;
}

/* 祝福卡片 */
.wish-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.wish-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: pulse 8s infinite linear;
}

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

.wish-text {
    font-size: 1.8rem;
    line-height: 1.6;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 20px;
    position: relative;
    z-index: 2;
}

.decoration {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.heart-icon {
    color: #ff4757;
    font-size: 1.5rem;
    animation: heartbeat 1.2s infinite;
}

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

.ornament {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

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

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

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

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.music-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.wish-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.snow-btn {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

/* 音乐播放器 */
.music-player {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
}

.music-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

#music-status {
    font-size: 1.1rem;
    color: #87ceeb;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.volume-control i {
    color: #ffd700;
    font-size: 1.2rem;
}

#volume-slider {
    flex-grow: 1;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #4CAF50, #FFC107, #F44336);
    border-radius: 4px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid #ffd700;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.signature {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #b0c4de;
}

.author {
    margin-top: 15px;
    font-size: 1.3rem;
}

.author-name {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.date {
    margin-top: 10px;
    color: #87ceeb;
    font-size: 1.1rem;
}

/* 雪花系统 */
.snowflake {
    position: fixed;
    top: -10px;
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    user-select: none;
    pointer-events: none;
    z-index: 1;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 27, 51, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    text-align: center;
}

.snowball {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #87ceeb 100%);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: bounce 1s infinite alternate, rotate 3s linear infinite;
    box-shadow: 
        0 0 20px rgba(135, 206, 235, 0.8),
        inset 0 -5px 10px rgba(0, 0, 0, 0.2);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .wish-text {
        font-size: 1.4rem;
        min-height: 120px;
        padding: 15px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .christmas-tree {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.6rem;
    }
    
    .wish-text {
        font-size: 1.2rem;
    }
    
    .author {
        font-size: 1.1rem;
    }
}
