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

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #d32f2f 0%, #f57c00 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

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

/* 顶部装饰 */
.header-decoration {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    height: 120px;
    position: relative;
}

.lantern {
    width: 60px;
    height: 100px;
    position: relative;
}

.left-lantern {
    transform: rotate(-5deg);
}

.right-lantern {
    transform: rotate(5deg);
}

.lantern-top {
    width: 40px;
    height: 10px;
    background: #ffd700;
    border-radius: 5px;
    margin: 0 auto;
    position: relative;
    top: 0;
}

.lantern-top::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 15px;
    background: #ffd700;
    top: -15px;
    left: 15px;
    border-radius: 3px;
}

.lantern-body {
    width: 60px;
    height: 70px;
    background: linear-gradient(to bottom, #ff0000, #d50000);
    border-radius: 30px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lantern-body::after {
    content: '福';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 24px;
    font-weight: bold;
}

.lantern-bottom {
    width: 40px;
    height: 20px;
    background: #ffd700;
    border-radius: 0 0 10px 10px;
    margin: 0 auto;
    position: relative;
    top: -5px;
}

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

.chinese-title {
    font-size: 3rem;
    color: #ffd700;
    text-shadow: 3px 3px 0 #d32f2f, 6px 6px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 5px;
    margin-bottom: 10px;
    font-weight: bold;
}

.nickname-title {
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 2px 2px 0 #d32f2f;
    letter-spacing: 2px;
}

/* 卡片通用样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    overflow: hidden;
    border: 3px solid #ffd700;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(to right, #d32f2f, #f57c00);
    padding: 15px 20px;
    color: white;
}

.card-header h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 20px;
}

/* 音频播放器 */
.audio-player {
    text-align: center;
}

.audio-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.audio-btn {
    background: linear-gradient(to bottom, #ffd700, #ffab00);
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    color: #d32f2f;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.audio-btn:hover {
    background: linear-gradient(to bottom, #ffab00, #ff8f00);
    transform: scale(1.05);
}

.audio-note {
    font-style: italic;
    color: #666;
    margin-top: 10px;
}

/* 图片容器 */
.image-container {
    text-align: center;
    padding: 10px;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid #ffd700;
    max-height: 500px;
    object-fit: contain;
}

/* 书信样式 */
.letter-paper {
    background: #fff9e6;
    border: 1px solid #ffd700;
    padding: 25px;
    border-radius: 10px;
    position: relative;
    min-height: 300px;
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.2);
}

.letter-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(211, 47, 47, 0.1), transparent);
}

.letter-header {
    margin-bottom: 25px;
    border-bottom: 2px dashed #ffd700;
    padding-bottom: 15px;
}

.letter-date {
    text-align: right;
    color: #d32f2f;
    font-weight: bold;
    margin-bottom: 10px;
}

.letter-greeting {
    font-size: 1.3rem;
    color: #d32f2f;
    font-weight: bold;
}

.letter-content {
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-align: justify;
    color: #5a3a00;
}

.letter-footer {
    text-align: right;
    margin-top: 40px;
}

.letter-closing {
    font-size: 1.2rem;
    color: #d32f2f;
    margin-bottom: 5px;
}

.letter-blessing {
    font-size: 1.3rem;
    color: #f57c00;
    font-weight: bold;
    margin-bottom: 10px;
}

.letter-signature {
    font-size: 1.2rem;
    color: #d32f2f;
    font-weight: bold;
}

/* 底部装饰 */
.main-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: white;
    position: relative;
}

.firecrackers {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.firecracker {
    width: 20px;
    height: 60px;
    background: linear-gradient(to bottom, #d32f2f, #ff8a00);
    border-radius: 10px;
    position: relative;
    animation: firecracker-bounce 2s infinite alternate;
}

.firecracker:nth-child(2) {
    animation-delay: 0.5s;
}

.firecracker:nth-child(3) {
    animation-delay: 1s;
}

@keyframes firecracker-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

.footer-text {
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.9;
}

.admin-link {
    display: inline-block;
    margin-top: 15px;
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    border: 2px solid #ffd700;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background: #ffd700;
    color: #d32f2f;
}

/* 新年特效 */
.new-year-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.gold-coin, .red-packet {
    position: absolute;
    opacity: 0.7;
    animation: float 15s infinite linear;
}

.gold-coin {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #ffab00);
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd700;
}

.red-packet {
    width: 40px;
    height: 50px;
    background: linear-gradient(to bottom, #d32f2f, #b71c1c);
    border-radius: 5px;
    transform: rotate(45deg);
}

.red-packet::before {
    content: '福';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    color: #ffd700;
    font-weight: bold;
    font-size: 18px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .chinese-title {
        font-size: 2.2rem;
    }
    
    .nickname-title {
        font-size: 1.4rem;
    }
    
    .card-header h3 {
        font-size: 1.3rem;
    }
    
    .audio-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .audio-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .letter-paper {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .chinese-title {
        font-size: 1.8rem;
    }
    
    .nickname-title {
        font-size: 1.2rem;
    }
    
    .lantern {
        transform: scale(0.8);
    }
}