/* --- 1. CSS 变量（参考 code1.html 配色） --- */
:root {
    --bg-body: #F5F7FA;
    --bg-surface: #FFFFFF;
    --bg-hover: #EBF5FF;
    --bg-input: #F1F3F5;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --text-light: #BDC3C7;
    --border-color: #E8ECF0;
    --accent-color: #1E90FF;
    --accent-dark: #1873CC;
    --accent-light: #5BB0FF;
    --accent-bg: #E0F0FF;
    --secondary-color: #FF6B35;
    --accent-gold: #FFD700;
    --header-height: 56px;
    --shadow-soft: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 20px rgba(30,144,255,0.12);
    --radius: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    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: #F1F3F5; }
::-webkit-scrollbar-thumb { background: #C5CED6; 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-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: box-shadow 0.3s ease;
}
.header-primary.header-scrolled {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.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: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.header-center .nav-link:hover {
    color: var(--accent-color);
    background-color: var(--bg-hover);
}
.header-center .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    box-shadow: 0 2px 8px rgba(30,144,255,0.3);
}

.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-color) 0%, var(--accent-light) 100%);
    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;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--accent-color);
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    width: fit-content;
}
.banner-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

.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, var(--secondary-color) 0%, #FF8C42 100%); }
.banner-side-item.purple { background: linear-gradient(135deg, #A855F7 0%, #C084FC 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;
    margin-bottom: 16px;
    color: var(--text-primary);
    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;
    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);
    transition: all 0.25s ease;
}
.featured-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-light);
}
.featured-item .f-cover {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--bg-input);
    position: relative;
}
.featured-item .f-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.featured-item:hover .f-cover img { transform: scale(1.05); }

/* 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-play-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* 无封面时的渐变色背景（模拟图片中的彩色卡片） */
.featured-item .f-cover-placeholder {
    width: 100%;
    height: 100%;
}
.featured-item .f-cover-bg-1 .f-cover-placeholder { background: linear-gradient(135deg, #60A5FA, #22D3EE); }
.featured-item .f-cover-bg-2 .f-cover-placeholder { background: linear-gradient(135deg, #34D399, #2DD4BF); }
.featured-item .f-cover-bg-3 .f-cover-placeholder { background: linear-gradient(135deg, #A78BFA, #818CF8); }
.featured-item .f-cover-bg-4 .f-cover-placeholder { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.featured-item .f-cover-bg-5 .f-cover-placeholder { background: linear-gradient(135deg, #F472B6, #FB7185); }
.featured-item .f-cover-bg-6 .f-cover-placeholder { background: linear-gradient(135deg, #FB923C, #F87171); }
.featured-item .f-cover-bg-7 .f-cover-placeholder { background: linear-gradient(135deg, #F472B6, #FB7185); }
.featured-item .f-cover-bg-8 .f-cover-placeholder { background: linear-gradient(135deg, #67E8F9, #60A5FA); }
.featured-item .f-cover-bg-9 .f-cover-placeholder { background: linear-gradient(135deg, #A78BFA, #C084FC); }
.featured-item .f-cover-bg-10 .f-cover-placeholder { background: linear-gradient(135deg, #818CF8, #60A5FA); }

.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; color: var(--text-primary); }
.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-color: var(--accent-color); color: #fff; }
.btn-primary:hover { background-color: var(--accent-dark); 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); }
.pagination span.current { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.pagination span.disabled { color: var(--text-light); }

/* --- 音乐大卡片列表 --- */
.music-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.music-big-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}
.music-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.music-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
}
.music-card-range {
    font-size: 12px;
    color: var(--text-light);
}
.music-play-all-btn {
    background: linear-gradient(135deg, #4facfe, #00c6fb);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.4);
}
.music-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.music-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    overflow: hidden;
    transition: background .15s;
}
.music-item:hover {
    background: #f8f9fa;
}
.music-rank {
    width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #ccc;
    flex-shrink: 0;
}
.music-rank.top {
    color: #ff6b35;
}
.music-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}
.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.music-cover-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f472b6, #fb7185);
}
.music-info {
    flex: 1;
    min-width: 0;
}
.music-title {
    font-size: 14px;
    font-weight: 500;
    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-album-col {
    font-size: 12px;
    color: var(--text-light);
    flex: 1 1 auto;
    max-width: 200px;
    min-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.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: #fff;
    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; }
.filter-bar input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 14px; width: 240px; background: var(--bg-input); }
.filter-bar .category-tags { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.filter-bar .cat-tag { padding: 5px 14px; border-radius: 18px; font-size: 13px; color: var(--text-secondary); background: var(--bg-input); border: 1px solid var(--border-color); transition: all 0.2s; text-decoration: none; white-space: nowrap; }
.filter-bar .cat-tag:hover { color: var(--text-primary); border-color: var(--accent-color); }
.filter-bar .cat-tag.active { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }

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

.player-card { background: linear-gradient(135deg,#1a1a2e 0%,#16213e 100%); border-radius: 16px; padding: 40px 30px; text-align: center; color: #fff; 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; }
.cover-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto 20px; }
.cover-img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.cover-spinning { animation: qtSpin 20s linear infinite; }
@keyframes qtSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.player-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: #fff; 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,#667eea 0%,#764ba2 100%); border-radius: 16px; padding: 30px; margin-bottom: 24px; color: #fff; 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: 24px; font-weight: 700; 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-light); }
.fav-card-icon { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; 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: var(--bg-surface); border-top: 1px solid var(--border-color); padding: 32px 0; margin-top: 10px; }
.footer-copyright { text-align: center; font-size: 13px; color: var(--text-light); line-height: 1.8; }
.footer-copyright a { color: var(--text-light); text-decoration: none; }
.footer-copyright a:hover { color: var(--accent-color); }
.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: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow .25s;
}
.rank-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

/* 卡片头部颜色 */
.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: 18px; font-weight: 700; }
.rank-update { font-size: 12px; opacity: .85; }

.rank-orange .rank-card-header {
    background: linear-gradient(135deg, #FF8A4C, #FFB87A);
}
.rank-blue .rank-card-header {
    background: linear-gradient(135deg, #4EA8FF, #8CC9FF);
}
.rank-green .rank-card-header {
    background: linear-gradient(135deg, #34C77B, #6FE0A3);
}

/* 排行列表 */
.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: #F5F7FA; }

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

/* 封面 */
.rank-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #F0F0F0;
}
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-cover-empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E8E8E8, #D0D0D0);
}

/* 歌名/分类 */
.rank-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rank-title {
    font-size: 14px;
    font-weight: 500;
    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: #fff;
    border-top: 1px solid #E8E8E8;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    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: var(--text-secondary); min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.pb-progress-bar {
    flex: 1; height: 4px; background: #E8E8E8; border-radius: 2px;
    cursor: pointer; position: relative;
}
.pb-progress-fill {
    height: 100%; background: var(--accent-color); 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-cover {
    width: 48px; height: 48px; border-radius: 6px;
    overflow: hidden; flex-shrink: 0; position: relative;
    background: linear-gradient(135deg, #E8E8E8, #D0D0D0);
}
.pb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-cover-empty { width: 100%; height: 100%; display: none; }
.pb-info { min-width: 0; max-width: 160px; flex: 1; }
.pb-title {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-sub {
    font-size: 12px; color: var(--text-secondary);
    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: #F0F0F0; }
.pb-btn.pb-play {
    width: 40px; height: 40px;
    background: var(--accent-color);
}
.pb-btn.pb-play:hover { background: var(--accent-hover, #1581D6); }
.pb-btn.pb-play img { width: 20px; height: 20px; }
/* 白色图标在蓝色播放按钮上保持原色，其余按钮反色为深色 */
.pb-btn:not(.pb-play) img { filter: invert(1); }

/* 右侧 */
.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: var(--text-secondary); 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: var(--bg-hover); color: var(--text-primary); }
.pb-vol-bar {
    width: 80px; height: 4px; background: #E8E8E8; border-radius: 2px;
    position: relative; cursor: pointer;
}
.pb-vol-fill { height: 100%; background: var(--accent-color); border-radius: 2px; width: 70%; }

/* 播放列表抽屉 */
.pb-list-panel {
    position: fixed;
    bottom: 72px;
    right: 24px;
    width: 360px;
    max-height: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 1px solid #E8E8E8;
    z-index: 10000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.pb-list-header {
    padding: 12px 16px;
    border-bottom: 1px solid #F0F0F0;
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    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: #FF4D4F; }
.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(--text-primary); }
.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: #F8F9FA; }
.pb-list-item.active { background: #EBF5FF; 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: #FF4D4F; }

/* 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: #fff;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.song-list-table thead th {
    background: #F7F8FA;
    padding: 12px 16px;
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid #F0F0F0;
}
.song-list-table tbody td {
    padding: 10px 16px;
    font-size: 14px; color: var(--text-primary);
    border-bottom: 1px solid #F5F5F5;
    vertical-align: middle;
}
.song-list-table tbody tr { cursor: pointer; transition: background .15s; }
.song-list-table tbody tr:hover { background: #F8F9FA; }
.song-list-table tbody tr.playing { background: #EBF5FF; }
.song-list-table tbody tr.playing td:first-child { color: var(--accent-color); }

.music-item.playing { background: #EBF5FF; }
.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-album { color: var(--text-secondary); }
.song-col-duration { width: 80px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.song-col-actions { width: 90px; }

.song-cover-sm {
    width: 36px; height: 36px; border-radius: 4px;
    overflow: hidden; display: inline-block; vertical-align: middle;
    margin-right: 10px;
    background: linear-gradient(135deg, #E8E8E8, #D0D0D0);
}
.song-cover-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.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-cover { width: 36px; height: 36px; }
    .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-album { display: none; }
    .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; }
    .music-album-col { display: none; }

    /* 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%; }
    .filter-bar .category-tags { margin-left: 0; justify-content: center; gap: 6px; }
    .filter-bar .cat-tag { padding: 4px 12px; font-size: 12px; }
    .player-title { font-size: 18px; }
    .play-stats { gap: 8px; }
}
