/* --- 1. CSS 变量（秦腔戏台配色：朱红、描金、宣纸、墨色） --- */
:root {
    --bg-body: #F3EADB;
    --bg-surface: #FBF5E9;
    --bg-hover: #F0E2CB;
    --bg-input: #F6EEDF;
    --text-primary: #2B1A14;
    --text-secondary: #6F584A;
    --text-light: #A38F7C;
    --border-color: #DCC9A8;
    --accent-color: #A61B29;
    --accent-dark: #7C111C;
    --accent-light: #C4484F;
    --accent-bg: #F6E3DF;
    --secondary-color: #C9A227;
    --accent-gold: #C9A227;
    --header-height: 56px;
    --shadow-soft: 0 1px 3px rgba(74, 44, 26, 0.08);
    --shadow-card: 0 2px 10px rgba(74, 44, 26, 0.10);
    --shadow-hover: 0 8px 22px rgba(124, 17, 28, 0.18);
    --radius: 8px;
    --radius-lg: 12px;
}

/* --- 2. 重置与基础 --- */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    font-family: 'Noto Serif SC', 'Segoe UI', 'Source Han Serif SC', 'Songti SC', 'SimSun', 'STSong', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 10% 6%, rgba(166, 27, 41, 0.05), transparent 34%),
        radial-gradient(circle at 90% 94%, rgba(201, 162, 39, 0.07), transparent 38%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }
ul { list-style: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #EFE4D2; }
::-webkit-scrollbar-thumb { background: #C9AE85; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

img { vertical-align: middle; }

/* --- 3. 头部导航 --- */
/* 第一层：主导航 */
.header-primary {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: linear-gradient(180deg, #FBF5E9 0%, #F7EEDC 100%);
    border-bottom: 2px solid var(--accent-color);
    box-shadow: inset 0 -4px 0 rgba(201, 162, 39, 0.35);
    z-index: 100;
    transition: box-shadow 0.3s ease;
}
.header-primary.header-scrolled {
    box-shadow: inset 0 -4px 0 rgba(201, 162, 39, 0.35), 0 4px 14px rgba(124, 17, 28, 0.16);
}

.header-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
}
.header-left { display: flex; align-items: center; gap: 6px; }

.menu-btn {
    padding: 8px;
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-btn:hover { background-color: var(--bg-hover); }
.menu-btn.mobile-only { display: none; }

.logo { display: flex; align-items: center; }
.logo img { width: auto; height: 28px; }

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex: 1;
    margin: 0 20px;
    width: 100%;
}
.header-center .nav-link {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}
.header-center .nav-link:hover {
    color: var(--accent-color);
    background-color: var(--accent-bg);
}
.header-center .nav-link.active {
    color: #F7E3B0;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    box-shadow: 0 2px 0 rgba(201, 162, 39, 0.9);
}

.header-right { display: flex; align-items: center; gap: 4px; }

.icon-btn {
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}
.icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}
.icon-btn span { margin-left: 5px; font-size: 14px; }



/* 占位层：避免 header 遮挡内容（JS 动态设置高度） */
.header-spacer { width: 100%; }

/* 移动端抽屉：分组标题 */
.drawer-group-title {
    font-size: 12px;
    color: var(--text-light);
    padding: 16px 16px 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 4. 主体布局 --- */
.layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 14px;
}

/* --- 4.5 Banner 区域（参考图片布局） --- */
.banner-section {
    margin-bottom: 28px;
    animation: qtFadeIn 0.4s ease-out;
}
.banner-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}
.banner-main {
    position: relative;
    height: 220px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 60%, #B8373F 100%);
    border: 1px solid rgba(201, 162, 39, 0.55);
    box-shadow: inset 0 0 0 4px rgba(247, 227, 176, 0.18);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 32px;
}
.banner-main:hover { transform: translateY(-2px); }
.banner-main::before {
    content: '';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    pointer-events: none;
}
.banner-main::after {
    content: '';
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}
.banner-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.banner-title {
    font-size: 30px;
    font-weight: 700;
    font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif;
    color: #F9E7B8;
    letter-spacing: 2px;
    line-height: 1.3;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.banner-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}
.banner-side-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 24px;
}
.banner-side-item:hover { transform: translateY(-2px); }
.banner-side-item.orange { background: linear-gradient(135deg, #9C6B12 0%, var(--secondary-color) 100%); }
.banner-side-item.purple { background: linear-gradient(135deg, #1E4F57 0%, #2F7A84 100%); }
.banner-side-item .bs-label {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.banner-side-item .bs-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.banner-side-item::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

/* --- 5. 热门歌曲卡片（参考图片 TOP 标签 + 播放量徽章） --- */
.featured-row {
    margin-bottom: 32px;
}
.featured-row .section-title {
    font-size: 20px;
    font-weight: 700;
    font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif;
    letter-spacing: 1.5px;
    color: var(--accent-dark);
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.featured-header .section-title {
    font-size: 20px;
    font-weight: 700;
    font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif;
    letter-spacing: 1.5px;
    color: var(--accent-dark);
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.featured-more {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.featured-more:hover { color: var(--accent-color); }

.featured-scroll {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.featured-item {
    text-decoration: none;
    color: inherit;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.18);
    transition: all 0.25s ease;
}
.featured-item:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.4), var(--shadow-hover);
    border-color: var(--accent-color);
}
/* TOP 排名标签（左上角，仅前3名显示） */
.featured-item .f-top-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #FF4D4F, #FF7875);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 14px;
    letter-spacing: 0.5px;
}
.featured-item:nth-child(2) .f-top-badge { background: linear-gradient(135deg, #FA8C16, #FFC069); }
.featured-item:nth-child(3) .f-top-badge { background: linear-gradient(135deg, #FAAD14, #FFE58F); color: #7D4E00; }

.featured-item .f-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 4px;
    padding: 10px 12px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.featured-item .f-sub {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 0 12px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes qtFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 6. 栏目标题 --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-title {
    font-size: 24px;
    font-weight: bold;
    font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif;
    letter-spacing: 1.5px;
    color: var(--accent-dark);
}
.section-title .section-icon { width: 22px; height: 22px; vertical-align: middle; margin-right: 1px; }
.music-card-title .section-icon { width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; }

/* --- 8. 通用按钮 --- */
.btn {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-primary { background: linear-gradient(135deg, var(--accent-color), var(--accent-dark)); color: #F9E7B8; border: 1px solid rgba(201, 162, 39, 0.6); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-dark), #5E0B14); transform: scale(1.03); }
.btn-secondary { background-color: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: var(--bg-hover); color: var(--accent-color); border-color: var(--accent-color); }

/* --- 9. 分页 --- */
.pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: inline-block;
}
.pagination a { color: var(--text-secondary); text-decoration: none; }
.pagination a:hover { color: var(--accent-color); border-color: var(--accent-color); background: var(--accent-bg); }
.pagination span.current { background: linear-gradient(135deg, var(--accent-color), var(--accent-dark)); color: #F9E7B8; border-color: var(--accent-color); }
.pagination span.disabled { color: var(--text-light); }

/* --- 秦腔大卡片列表 --- */
.music-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.music-big-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.18), var(--shadow-card);
    overflow: hidden;
}
.music-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.08), transparent);
}
.music-card-title {
    font-size: 16px;
    font-weight: 700;
    font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif;
    letter-spacing: 1.5px;
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
}
.music-card-range {
    font-size: 12px;
    color: var(--text-light);
}
.music-play-all-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: #F9E7B8;
    border: 1px solid rgba(201, 162, 39, 0.55);
    border-radius: 4px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 17, 28, 0.28);
}
.music-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.music-list-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
}
.music-list-2col > li:only-child {
    grid-column: 1 / -1;
}
@media (max-width: 767px) {
    .music-list-2col { grid-template-columns: 1fr; }
}
.music-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    overflow: hidden;
    transition: background .15s;
}
.music-item:hover {
    background: var(--bg-hover);
}
.music-rank {
    width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #C9B08A;
    flex-shrink: 0;
}
.music-rank.top {
    color: var(--accent-color);
}
.music-info {
    flex: 1;
    min-width: 0;
}
.music-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.music-duration {
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.music-add-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 6px;
    text-decoration: none;
    box-sizing: border-box;
}
.rank-item .music-add-btn {
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.music-add-btn:hover {
    color: #F9E7B8;
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* --- 10. 移动端抽屉菜单 --- */
.mobile-drawer { position: fixed; inset: 0; z-index: 999; pointer-events: none; }
.mobile-drawer .mobile-drawer-mask {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.25s;
}
.mobile-drawer .mobile-drawer-panel {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: var(--bg-surface);
    padding: 20px 12px;
    transform: translateX(-100%);
    transition: transform 0.25s;
    overflow-y: auto;
}
.mobile-drawer .mobile-drawer-panel a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 4px;
}
.mobile-drawer .mobile-drawer-panel a:hover { background: var(--bg-hover); }
.mobile-drawer.open { pointer-events: auto; }
.mobile-drawer.open .mobile-drawer-mask { opacity: 1; }
.mobile-drawer.open .mobile-drawer-panel { transform: translateX(0); }

.empty-hint { grid-column: 1/-1; text-align: center; padding: 40px; color: var(--text-light); font-size: 14px; }

/* --- 12. 秦腔库 list.php：筛选栏 --- */
.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; background: var(--bg-surface); padding: 16px; border-radius: 12px; border: 1px solid var(--border-color); }
.filter-bar form { display: flex; gap: 8px; align-items: center; width: 100%; }
.filter-bar input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 14px; width: 100%; background: var(--bg-input); }

/* --- 13. 播放页 play.php --- */
.playback-container { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }

.player-card { background: linear-gradient(135deg,#3A1A16 0%,#24100D 100%); border-radius: var(--radius-lg); border: 1px solid rgba(201,162,39,0.45); box-shadow: inset 0 0 0 4px rgba(201,162,39,0.12); padding: 40px 30px; text-align: center; color: #F9E7B8; margin-bottom: 20px; position: relative; overflow: hidden; }
.player-card::before { content:""; position:absolute; top:-100px; left:-100px; width:300px; height:300px; border-radius:50%; background:rgba(255,255,255,0.05); pointer-events:none; }
.player-card::after  { content:""; position:absolute; bottom:-80px; right:-80px; width:250px; height:250px; border-radius:50%; background:rgba(255,255,255,0.03); pointer-events:none; }
.player-title { font-size: 22px; font-weight: 700; font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif; letter-spacing: 2px; margin-bottom: 6px; color: #F9E7B8; position: relative; z-index: 1; }
.player-meta { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 20px; position: relative; z-index: 1; }
.player-audio { width: 100%; position: relative; z-index: 1; }

.play-actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.play-actions a, .play-actions button { padding: 8px 16px; border-radius: 6px; font-size: 13px; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-primary); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.play-actions a:hover, .play-actions button:hover { border-color: var(--accent-color); color: var(--accent-color); }
.play-actions .btn-fav.active { background:#ffebee; color:#d32f2f; border-color:#ffcdd2; }
.play-actions .btn-fav.active::before   { content:"❤️"; margin-right:2px; }
.play-actions .btn-fav:not(.active)::before { content:"🤍"; margin-right:2px; }

.nav-row { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding: 16px; background: var(--bg-surface); border-radius: 12px; border: 1px solid var(--border-color); }
.nav-row a { display: flex; align-items: center; gap: 10px; color: var(--text-primary); text-decoration: none; flex: 1; min-width: 0; }
.nav-row a.disabled { color: var(--text-light); cursor: not-allowed; pointer-events: none; }
.nav-row .nav-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.nav-row .nav-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-row .nav-next { text-align: right; }

.play-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; flex-wrap: wrap; }
.play-stats span { display: inline-flex; align-items: center; gap: 4px; }

/* 相似推荐 */
.related-title { margin-bottom: 15px; font-size: 18px; font-weight: 700; }
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; color: inherit; transition: background 0.2s; }
.related-item:hover { background: var(--bg-hover); }
.related-thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #eee; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.related-info h4 { font-size: 14px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-info p { font-size: 12px; color: var(--text-secondary); }

/* --- 15. 收藏页 fav.php --- */
.fav-hero { background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 70%, #B8373F 100%); border: 1px solid rgba(201,162,39,0.55); box-shadow: inset 0 0 0 4px rgba(247,227,176,0.14); border-radius: var(--radius-lg); padding: 30px; margin-bottom: 24px; color: #F9E7B8; display: flex; align-items: center; gap: 20px; position: relative; overflow: hidden; }
.fav-hero::before { content:""; position:absolute; top:-80px; right:-80px; width:240px; height:240px; border-radius:50%; background:rgba(255,255,255,0.1); }
.fav-hero-emoji { font-size: 48px; z-index: 1; }
.fav-hero h1 { font-size: 26px; font-weight: 700; font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif; letter-spacing: 2px; margin-bottom: 6px; z-index: 1; }
.fav-hero p { font-size: 13px; opacity: 0.9; z-index: 1; }

.fav-list { display: flex; flex-direction: column; gap: 0; background: var(--bg-surface); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; }
.fav-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border-color); transition: background 0.2s; text-decoration: none; color: inherit; }
.fav-item:last-child { border-bottom: none; }
.fav-item:hover { background: var(--bg-hover); }
.fav-num { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.fav-item .fav-title { flex: 1; min-width: 0; }
.fav-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.fav-item p { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item .fav-actions { display: flex; gap: 8px; flex-shrink: 0; }
.fav-item .fav-actions a { padding: 6px 12px; border-radius: 6px; font-size: 12px; border: 1px solid var(--border-color); color: var(--text-secondary); text-decoration: none; transition: all 0.2s; cursor: pointer; background: var(--bg-surface); }
.fav-item .fav-actions a:hover { border-color: var(--accent-color); color: var(--accent-color); }
.fav-item .fav-actions a.del:hover { border-color:#ff4d4d; color:#ff4d4d; }

.empty-fav { text-align: center; padding: 60px 20px; background: var(--bg-surface); border-radius: 12px; border: 1px dashed var(--border-color); }
.empty-fav .big-emoji { font-size: 48px; margin-bottom: 16px; }
.empty-fav h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-primary); }
.empty-fav p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

/* 收藏夹卡片网格 */
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.fav-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 16px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; transition: all 0.25s ease; cursor: pointer; }
.fav-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--accent-color); }
.fav-card-icon { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,var(--accent-color),var(--accent-dark)); border: 1px solid rgba(201,162,39,0.6); color: #F9E7B8; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.fav-card-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-card-actions { flex-shrink: 0; }
.fav-card-del { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; line-height: 1; transition: all 0.2s; }
.fav-card-del:hover { border-color: #ff4d4d; color: #ff4d4d; }
@media (max-width: 600px) { .fav-grid { grid-template-columns: 1fr; } }

/* --- 16. 页脚 footer.php --- */
.footer { background: linear-gradient(180deg, #2C1714 0%, #1F0E0C 100%); border-top: 2px solid var(--accent-gold); padding: 32px 0; margin-top: 10px; }
.footer-copyright { text-align: center; font-size: 13px; color: rgba(246, 231, 200, 0.6); line-height: 1.8; }
.footer-copyright a { color: rgba(246, 231, 200, 0.68); text-decoration: none; }
.footer-copyright a:hover { color: var(--accent-gold); }
.footer-filing { margin-top: 4px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* --- 16. 秦腔排行榜 --- */
.rank-section { margin-top: 40px; }
.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.rank-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.18), var(--shadow-card);
    overflow: hidden;
    transition: box-shadow .25s, border-color .25s;
}
.rank-card:hover { box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.4), var(--shadow-hover); border-color: var(--accent-color); }

/* 卡片头部颜色 */
.rank-card-header {
    padding: 18px 20px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rank-card-header h3 { margin: 0; font-size: 19px; font-weight: 700; font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'Noto Serif SC', serif; letter-spacing: 2px; }
.rank-update { font-size: 12px; opacity: .85; }
.rank-more {
    font-size: 12px;
    color: #fff;
    text-decoration: none;
    opacity: .88;
    transition: opacity .2s;
}
.rank-more:hover { opacity: 1; }

.rank-orange .rank-card-header {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-color));
}
.rank-blue .rank-card-header {
    background: linear-gradient(135deg, #1E4F57, #2F7A84);
}
.rank-green .rank-card-header {
    background: linear-gradient(135deg, #2F6B4F, #4E8F6C);
}

/* 排行列表 */
.rank-card-body { padding: 8px 4px; }
.rank-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    gap: 12px;
    border-radius: 8px;
    transition: background .15s;
}
.rank-item:hover { background: var(--bg-hover); }

/* 序号 */
.rank-num {
    width: 24px;
    font-size: 18px;
    font-weight: 700;
    color: #C9B08A;
    text-align: center;
    flex-shrink: 0;
}
.rank-item:nth-child(1) .rank-num { color: var(--accent-color); font-size: 22px; }
.rank-item:nth-child(2) .rank-num { color: #B8862B; font-size: 20px; }
.rank-item:nth-child(3) .rank-num { color: var(--accent-gold); font-size: 19px; }

/* 歌名/分类 */
.rank-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rank-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
    .rank-grid { grid-template-columns: 1fr; gap: 16px; }
    .rank-card-header { padding: 14px 16px; }
}

/* --- 18. 底部固定播放器 bar --- */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 96px;
    background: linear-gradient(180deg, #331914 0%, #1F0E0C 100%);
    border-top: 2px solid var(--accent-gold);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    transition: transform .25s;
    display: flex;
    flex-direction: column;
}
.player-bar.hide { transform: translateY(100%); }

/* 顶部进度条行（独立横跨全宽） */
.pb-progress {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 24px 0;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
}
.pb-time { font-size: 11px; color: rgba(246, 231, 200, 0.65); min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.pb-progress-bar {
    flex: 1; height: 4px; background: rgba(246, 231, 200, 0.18); border-radius: 2px;
    cursor: pointer; position: relative;
}
.pb-progress-fill {
    height: 100%; background: var(--accent-gold); border-radius: 2px;
    width: 0%; transition: width .1s linear;
}

/* 底部内容行：左信息 + 中控制 + 右音量 */
.pb-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 32px;
    box-sizing: border-box;
}

/* 左侧 */
.pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.pb-info { min-width: 0; max-width: 160px; flex: 1; }
.pb-title {
    font-size: 14px; font-weight: 600; color: #F6E7C8;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-sub {
    font-size: 12px; color: rgba(246, 231, 200, 0.6);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 中间：控制按钮 */
.pb-center {
    display: flex; justify-content: flex-end; align-items: center; min-width: 0; flex-shrink: 0;
}
.pb-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pb-btn {
    border: none; background: none; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, transform .15s;
    padding: 0;
}
.pb-btn img { width: 18px; height: 18px; display: block; pointer-events: none; }
.pb-btn.pb-prev img, .pb-btn.pb-next img { width: 20px; height: 20px; }
.pb-btn:hover { background: rgba(246, 231, 200, 0.14); }
.pb-btn.pb-play {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.55);
}
.pb-btn.pb-play:hover { background: linear-gradient(135deg, #B72433, var(--accent-dark)); }
.pb-btn.pb-play img { width: 20px; height: 20px; }
/* 图标为白色，深色播放器上保持原色 */
.pb-btn:not(.pb-play) img { filter: none; }

/* 右侧 */
.pb-right { display: flex; align-items: center; flex-shrink: 0; }
.pb-volume { display: flex; align-items: center; gap: 4px; }
.pb-vol-sign { font-size: 18px; font-weight: 700; color: rgba(246, 231, 200, 0.7); width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; transition: background 0.2s; }
.pb-vol-sign:hover { background: rgba(246, 231, 200, 0.14); color: #F6E7C8; }
.pb-vol-bar {
    width: 80px; height: 4px; background: rgba(246, 231, 200, 0.18); border-radius: 2px;
    position: relative; cursor: pointer;
}
.pb-vol-fill { height: 100%; background: var(--accent-gold); border-radius: 2px; width: 70%; }

/* 播放列表抽屉 */
.pb-list-panel {
    position: fixed;
    bottom: 72px;
    right: 24px;
    width: 360px;
    max-height: 420px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid var(--accent-gold);
    z-index: 10000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.pb-list-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.10), transparent);
    font-size: 14px; font-weight: 700; color: var(--accent-dark);
    display: flex; align-items: center; gap: 8px;
}
.pb-list-clear {
    margin-left: auto; border: none; background: none;
    color: var(--text-secondary); font-size: 12px; cursor: pointer;
}
.pb-list-clear:hover { color: var(--accent-color); }
.pb-list-close {
    border: none; background: none; font-size: 18px;
    cursor: pointer; color: var(--text-light); line-height: 1;
}
.pb-list-close:hover { color: var(--accent-color); }
.pb-list-body { overflow-y: auto; flex: 1; }
.pb-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; cursor: pointer;
    font-size: 13px; color: var(--text-primary);
    transition: background .15s;
    border-left: 3px solid transparent;
}
.pb-list-item:hover { background: var(--bg-hover); }
.pb-list-item.active { background: var(--accent-bg); border-left-color: var(--accent-color); color: var(--accent-color); }
.pb-list-item .pb-li-num { width: 22px; text-align: center; color: var(--text-light); }
.pb-list-item .pb-li-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-list-item .pb-li-del {
    border: none; background: none; color: var(--text-light);
    cursor: pointer; font-size: 14px; padding: 0 4px;
}
.pb-list-item .pb-li-del:hover { color: var(--accent-color); }

/* body 给播放器留底 */
body.player-open { padding-bottom: 84px; }

/* --- 19. 歌曲列表表格（play.php 主视图） --- */
.song-list-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.song-list-table {
    width: 100%; border-collapse: collapse; background: var(--bg-surface);
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.18), var(--shadow-card);
}
.song-list-table thead th {
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.12), rgba(201, 162, 39, 0.04));
    padding: 12px 16px;
    font-size: 13px; font-weight: 700; color: var(--accent-dark);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.song-list-table tbody td {
    padding: 10px 16px;
    font-size: 14px; color: var(--text-primary);
    border-bottom: 1px solid var(--bg-hover);
    vertical-align: middle;
}
.song-list-table tbody tr { cursor: pointer; transition: background .15s; }
.song-list-table tbody tr:hover { background: var(--bg-hover); }
.song-list-table tbody tr.playing { background: var(--accent-bg); }
.song-list-table tbody tr.playing td:first-child { color: var(--accent-color); }

.music-item.playing { background: var(--accent-bg); }
.music-item.playing .music-rank { color: var(--accent-color); }

.song-col-num { width: 50px; text-align: center; font-weight: 600; color: var(--text-light); }
.song-col-song { color: var(--text-primary); }
.song-col-singer { color: var(--text-secondary); }
.song-col-duration { width: 80px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.song-col-actions { width: 90px; }

.song-title-cell { vertical-align: middle; font-weight: 500; }

.song-action-btn {
    display: inline-block; margin: 0 4px; color: var(--text-light);
    text-decoration: none; font-size: 14px; transition: color .15s;
    border: none; background: none; cursor: pointer;
}
.song-action-btn:hover { color: var(--accent-color); }

/* 响应式 */
@media (max-width: 768px) {
    .player-bar { height: 80px; }
    .pb-progress { padding: 6px 12px 0; }
    .pb-inner { padding: 0 12px; gap: 12px; }
    .pb-info { max-width: 120px; }
    .pb-volume { display: none; }
    .pb-controls { gap: 4px; }
    .pb-btn { width: 28px; height: 28px; }
    .pb-btn img { width: 15px; height: 15px; }
    .pb-btn.pb-prev img, .pb-btn.pb-next img { width: 17px; height: 17px; }
    .pb-btn.pb-play { width: 32px; height: 32px; }
    .pb-btn.pb-play img { width: 17px; height: 17px; }
    .pb-list-panel { right: 8px; left: 8px; width: auto; bottom: 80px; }
    body.player-open { padding-bottom: 80px; }

    .song-col-duration { display: none; }
    .song-list-table thead th, .song-list-table tbody td { padding: 8px 10px; font-size: 13px; }
}

/* --- 17. 响应式 --- */
@media (max-width: 1024px) {
    .playback-container { grid-template-columns: 1fr; }
    .featured-scroll { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .menu-btn.mobile-only { display: flex; }
    .header-center { display: none; }
    .icon-btn span { display: none; }
    .main-content { padding: 16px; }

    .music-card-grid { grid-template-columns: 1fr; }
    .music-item { padding: 10px 16px; }

    /* Banner 响应式 */
    .banner-grid { grid-template-columns: 1fr; }
    .banner-main { height: 160px; padding: 0 20px; }
    .banner-title { font-size: 22px; margin-bottom: 12px; }
    .banner-side { grid-template-rows: repeat(2, 80px); }

    /* 热门歌曲卡片响应式 */
    .featured-scroll { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .card-meta { font-size: 12px; flex-wrap: wrap; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar input[type=text] { width: 100%; }
    .player-title { font-size: 18px; }
    .play-stats { gap: 8px; }
}
