/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* 基础变量定义 */
:root {
    --bg-dark: #000;
    --text-dark: #f0f0f0;
    --card-dark: rgba(30, 30, 30, 0.85);
    --border-dark: #00a1d6;
    --shadow-dark: rgba(0, 161, 214, 0.2);
    
    --bg-light: #ffffff;
    --text-light: #333;
    --card-light: rgba(245, 245, 245, 0.95);
    --border-light: #0078b4;
    --shadow-light: rgba(0, 120, 180, 0.15);
    
    --primary-color: #00a1d6;
    --secondary-color: #7289da;
    --accent-color: #ff6b6b;
}

/* 暗色模式（默认） */
body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    padding-top: 100px;
    padding-bottom: 150px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* 亮色模式 */
body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-light);
}

/* 模式切换按钮 */
.mode-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    gap: 10px;
    background: var(--card-dark);
    padding: 8px;
    border-radius: 50px;
    border: 1px solid var(--border-dark);
}

body.light-mode .mode-switcher {
    background: var(--card-light);
    border-color: var(--border-light);
}

.mode-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 0 10px var(--primary-color);
}

.mode-btn:hover {
    transform: scale(1.1);
}

.music-btn.playing {
    background: linear-gradient(135deg, var(--accent-color), #feca57);
    color: white;
}

/* 公告栏 */
.announcement {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: linear-gradient(135deg, rgba(0, 161, 214, 0.15), rgba(114, 137, 218, 0.15));
    backdrop-filter: blur(10px);
    z-index: 9998;
    border-bottom: 2px solid var(--primary-color);
}

body.light-mode .announcement {
    background: linear-gradient(135deg, rgba(0, 120, 180, 0.1), rgba(114, 137, 218, 0.1));
    border-bottom-color: var(--border-light);
}

.announcement-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.announcement-icon {
    font-size: 28px;
    color: var(--primary-color);
}

.announcement-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.announcement-text span {
    color: var(--primary-color);
    font-weight: 500;
}

.announcement-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: var(--card-dark);
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

body.light-mode .announcement-close {
    background: var(--card-light);
    color: var(--text-light);
    border-color: var(--border-light);
}

.announcement-close:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 轮播图 */
.carousel-section {
    width: 100%;
    height: 500px;
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-dark);
    box-shadow: 0 0 20px var(--shadow-dark);
}

body.light-mode .carousel-section {
    border-color: var(--border-light);
    box-shadow: 0 0 20px var(--shadow-light);
}

.carousel {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: none;
}

.carousel-item.active {
    display: block;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: rgba(0,0,0,0.7);
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

body.light-mode .carousel-btn {
    background: rgba(255,255,255,0.7);
    border-color: var(--border-light);
    color: var(--border-light);
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: 1px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light-mode .indicator {
    background: rgba(0,0,0,0.3);
    border-color: var(--border-light);
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* 图片卡片区 */
.section-title {
    font-size: 32px;
    text-align: center;
    margin: 40px 0 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 小院春晚标题 - 强制居中 */
.spring-title {
    background: linear-gradient(135deg, var(--accent-color), #feca57);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.center-title {
    text-align: center !important;
    margin: 60px 0 30px !important;
    font-size: 36px !important;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.spring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.photo-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.photos-grid .photo-card {
    height: 180px;
}

.spring-grid .photo-card {
    height: 267px;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow-dark);
    border-color: var(--primary-color);
}

body.light-mode .photo-card:hover {
    box-shadow: 0 8px 15px var(--shadow-light);
    border-color: var(--border-light);
}

.photo-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
}

body.light-mode .photo-card.active {
    border-color: var(--border-light);
    box-shadow: 0 0 20px var(--border-light);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.photo-card:hover img {
    filter: brightness(1.05);
}

/* 视频播放区 - 确保默认封面图显示 */
.video-section {
    margin: 40px 0;
}

.video-container {
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-dark);
    box-shadow: 0 0 20px var(--shadow-dark);
}

body.light-mode .video-container {
    border-color: var(--border-light);
    box-shadow: 0 0 20px var(--shadow-light);
}

.video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.5s ease;
    display: block !important;
    opacity: 1 !important;
}

#videoIframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#videoIframe.active {
    opacity: 1;
}

/* 音乐播放器 */
.audio-player-section {
    margin: 40px 0;
}

.audio-player {
    background: var(--card-dark);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-dark);
    box-shadow: 0 0 20px var(--shadow-dark);
}

body.light-mode .audio-player {
    background: var(--card-light);
    border-color: var(--border-light);
    box-shadow: 0 0 20px var(--shadow-light);
}

.audio-playlist {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.audio-track {
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.audio-track:hover {
    background: rgba(0, 161, 214, 0.1);
    transform: translateX(5px);
}

.audio-track.active {
    background: rgba(0, 161, 214, 0.15);
    border-left-color: var(--primary-color);
}

body.light-mode .audio-track:hover {
    background: rgba(0, 120, 180, 0.1);
}

body.light-mode .audio-track.active {
    background: rgba(0, 120, 180, 0.15);
    border-left-color: var(--border-light);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.audio-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light-mode .audio-btn {
    border-color: var(--border-light);
    color: var(--border-light);
}

.audio-btn:hover {
    background: var(--primary-color);
    color: white;
}

body.light-mode .audio-btn:hover {
    background: var(--border-light);
}

.play-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.progress-container {
    flex: 1;
    min-width: 200px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

body.light-mode .progress-bar {
    background: rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.1s linear;
}

.progress-handle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--primary-color);
    transition: left 0.1s linear;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 80px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

body.light-mode .volume-slider {
    background: rgba(0,0,0,0.1);
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    width: 80%;
}

/* 页脚 */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.95), var(--bg-dark));
    padding: 20px 0;
    border-top: 2px solid var(--primary-color);
    z-index: 999;
}

body.light-mode footer {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), var(--bg-light));
    border-top-color: var(--border-light);
}

.footer-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-desc {
    font-size: 14px;
    color: #999;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status {
    font-size: 14px;
    color: #999;
}

.status span {
    color: var(--primary-color);
}

.author-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(90deg, #ff0000, #ff9900, #33cc33, #3399ff, #9933ff, #ff33cc, #ff0000);
    background-size: 600% 100%;
    color: white;
    font-weight: bold;
    cursor: pointer;
    animation: rainbow 3s linear infinite;
    transition: all 0.3s ease;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.author-btn:hover {
    transform: scale(1.05);
    animation: rainbow 1.5s linear infinite;
}

.back-to-top {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: var(--card-dark);
    color: var(--primary-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light-mode .back-to-top {
    background: var(--card-light);
    border-color: var(--border-light);
    color: var(--border-light);
}

.back-to-top:hover {
    background: var(--primary-color);
    color: white;
}

body.light-mode .back-to-top:hover {
    background: var(--border-light);
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.light-mode .modal {
    background: rgba(255,255,255,0.8);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-dark);
    border-radius: 20px;
    padding: 40px;
    border: 2px solid var(--primary-color);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0, 161, 214, 0.3);
}

body.light-mode .modal-content {
    background: var(--bg-light);
    border-color: var(--border-light);
    box-shadow: 0 0 30px rgba(0, 120, 180, 0.3);
}

.modal-content p {
    font-size: 20px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ff0000, #ff9900, #33cc33, #3399ff, #9933ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.modal-close {
    padding: 8px 25px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .carousel-section {
        height: 300px;
    }
    
    .video-container {
        height: 300px;
    }
    
    .footer-wrap {
        flex-direction: column;
        text-align: center;
    }
    
    .center-title {
        font-size: 28px !important;
    }
}

@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .spring-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-section {
        height: 200px;
    }
    
    .video-container {
        height: 200px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .center-title {
        font-size: 24px !important;
    }
}