/* ================= 全局基础设置 ================= */
:root {
    --gold: #d4af37;      /* 王者金 */
    --dark: #121212;      /* 深邃黑 */
    --gray: #2c2c2c;      /* 高级灰 */
    --text: #e0e0e0;      /* 文本白 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Heiti SC", sans-serif; /* 优先中文字体 */
}

body {
    background-color: var(--dark);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 确保占满全屏高度 */
    line-height: 1.6;
}

/* ================= 导航栏 ================= */
header {
    background: linear-gradient(to right, #000, var(--gray));
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold);
    position: sticky; /* 吸顶效果 */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 2px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    position: relative;
}

nav a:hover, nav a.active {
    color: var(--gold);
}

/* 导航栏下划线动画 */
nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* ================= 主体内容 ================= */
main {
    flex: 1; /* 撑开高度，把footer顶到底部 */
    padding: 40px 10%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    color: var(--gold);
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ================= 底部栏 (固定底部) ================= */
footer {
    background-color: #000;
    color: #666;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

/* ================= 动画工具 ================= */
.fade-in { animation: fadeIn 1.2s ease-in-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= 视听页专用：音乐播放器 ================= */
.player-container {
    display: flex;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.player-left {
    width: 40%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #222;
    border-right: 1px solid #333;
}

.music-cover {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--gold);
    margin-bottom: 30px;
    animation: spin 10s linear infinite; /* 唱片旋转 */
    object-fit: cover;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* 歌词区域 */
.player-right {
    width: 60%;
    padding: 30px;
    background: linear-gradient(180deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
    position: relative;
    height: 450px;
    overflow: hidden; /* 隐藏超出部分 */
}

/* 歌词遮罩：上下渐隐效果 */
.lyrics-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, #1a1a1a 0%, transparent 15%, transparent 85%, #1a1a1a 100%);
    z-index: 2;
    pointer-events: none;
}

.lyrics-content {
    text-align: center;
    color: #888;
    line-height: 2.8;
    font-size: 1rem;
    position: relative;
    top: 250px; /* 初始位置：留出前奏空白 */
    
    /* 核心动画：180s是歌曲时长，linear是匀速 */
    animation: lyricMove 180s linear infinite; 
}

/* 鼠标放上去暂停歌词滚动 */
.lyrics-content:hover {
    animation-play-state: paused;
}

.lyrics-content p {
    transition: all 0.3s;
}

/* 歌词高亮模拟 */
.lyrics-content p:hover {
    color: var(--gold);
    transform: scale(1.2);
    text-shadow: 0 0 10px var(--gold);
}

@keyframes lyricMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); } /* 向上滚动 */
}

/* ================= 视听页专用：B站视频容器 (16:9) ================= */
.video-box {
    border: 2px solid var(--gold);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    margin-bottom: 30px;
    background: #000;
    
    /* 核心代码：维持 16:9 宽高比，防止视频有黑边 */
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 的黄金比例 */
    height: 0;
}

.video-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .player-container { flex-direction: column; }
    .player-left, .player-right { width: 100%; }
    nav ul { flex-direction: column; gap: 15px; }
}