/* ===== core.css — CSS 变量, Utility, 导航, 搜索, 按钮, 表单 ===== */

/* =========================================
   Music Manager 统一设计系统
   所有页面共享的 CSS 变量和组件样式
   ========================================= */

/* Light theme (default) */
:root, [data-theme="light"] {
    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --bg-hover: #f5f7fa;
    --text: #1a1a2e;
    --text-secondary: #4a4a6a;
    --muted: #8888a0;
    --accent: #5b5ef4;
    --accent-hover: #4a4ae0;
    --accent-glow: rgba(91,94,244,0.15);
    --border: #e2e4ea;
    --border-card: #f0f2f5;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar: #1a1a2e;
    --sidebar-text: #8888aa;
    --sidebar-active: #ffffff;
    --sidebar-bg: #12122a;
    --sidebar-width: 240px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Dark theme */
[data-theme="dark"], .theme-dark {
    --bg: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-hover: #222222;
    --text: #f5f5f5;
    --text-secondary: #a3a3a3;
    --muted: #6b6b6b;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-glow: rgba(249,115,22,0.2);
    --border: #2a2a2a;
    --border-card: #222222;
    --success: #22c55e;
    --warning: #fbbf24;
    --danger: #ef4444;
    --sidebar: #000000;
    --sidebar-text: #6b6b6b;
    --sidebar-active: #f5f5f5;
    --sidebar-bg: #0a0a0a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

/* ===== Utility 类 (替换 JS 里重复出现的 inline style) ===== */
.flex-fill { flex: 1; min-width: 0; }
.txt-mute { color: var(--muted); }
.txt-mute-sm { font-size: 11px; color: var(--muted); }
.txt-mute-xs { font-size: 12px; color: var(--muted); }
.txt-mute-xs-norm { font-size: 12px; color: var(--muted); font-weight: normal; }
.txt-danger { color: var(--danger); }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.txt-ellipsis { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-base { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.input-base { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text); font-size: 13px; }
.input-base-lg { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px; color: var(--text); font-size: 13px; }
.btn-icon-sm { border: none; background: none; cursor: pointer; font-size: 12px; color: var(--muted); padding: 4px; }
.btn-icon-sm-md { border: none; background: none; cursor: pointer; font-size: 14px; color: var(--muted); }
.empty-state-box { text-align: center; padding: 20px; color: var(--muted); }
.empty-state-lg { text-align: center; padding: 40px; color: var(--muted); }

/* 全局重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    /* iOS Safari: 用 100dvh 跟随地址栏收缩/展开, 避免页面跳动 */
    min-height: 100dvh;
}

/* 布局 */
.app-layout { display: flex; min-height: 100vh; align-items: stretch; min-height: 100dvh; }

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar);
    padding: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
}
.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 12px;
    color: var(--sidebar-active);
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 60%, transparent 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25), inset 0 -1px 0 rgba(0,0,0,0.2);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.sidebar-brand small {
    display: block;
    font-size: 11px;
    color: var(--sidebar-text);
    font-weight: 400;
    margin-top: 2px;
}
.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }

/* 导航项 */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 2px 8px;
    border-radius: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.nav-item:hover {
    background: var(--sidebar-bg);
    color: var(--sidebar-active);
    transform: translateX(3px);
}
.nav-item.active {
    background: var(--sidebar-bg);
    color: var(--sidebar-active);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent), 0 2px 8px rgba(0,0,0,0.15);
}
.nav-divider {
    padding: 8px 20px;
    font-size: 11px;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px;
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
    background: var(--bg);
}

/* 页面显示 */
.page { display: none; }
.page.active { display: block; background: var(--bg); min-height: 200px; }
.page h2 { font-size: inherit; }

.raw-sub-page { display: none; }
.raw-sub-page.active { display: block; }

/* 头部 */
.content-header { margin-bottom: 24px; }
.content-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.content-header p { color: var(--muted); font-size: 14px; }

/* 搜索栏 */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.search-bar input {
    flex: 1; min-width: 200px; max-width: 400px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    font-size: 14px;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

/* 统计卡片 */
.stats-bar { display: flex; gap: 20px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 24px;
    flex: 1;
}
.stat-card .num { font-size: 28px; font-weight: 700; }
.stat-card .label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    font-family: inherit;
}
.btn:hover { background: #e8e8ed; }
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 卡片 */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* 表单 */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }

/* 上传区 */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-card);
}
.upload-zone:hover {
    border-color: var(--accent);
    background: rgba(0,113,227,0.03);
}
.upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(0,113,227,0.08);
}
.upload-zone h3 { color: var(--muted); font-weight: normal; margin-bottom: 8px; }

/* 徽章 */
.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
}
.badge-pending { background: rgba(255,159,10,0.15); color: var(--warning); }
.badge-split { background: rgba(48,209,88,0.15); color: var(--success); }
.badge-error { background: rgba(255,69,58,0.15); color: var(--danger); }

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--text); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--border); }

/* Tab */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 20px; cursor: pointer; color: var(--muted); font-size: 14px; transition: all 0.15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); margin-bottom: -2px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 500; }
td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border); }
tr:hover td { background: rgba(0,0,0,0.02); }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h3 { font-weight: normal; margin-bottom: 8px; }

/* 标签输入 */
.tag-input-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); min-height: 42px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--accent); color: white; border-radius: 4px; font-size: 12px; }
.tag .remove { cursor: pointer; font-size: 14px; line-height: 1; }
.tag-input { border: none; background: transparent; outline: none; font-size: 13px; min-width: 80px; flex: 1; color: var(--text); }

/* 进度条 */
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar .fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }


/* =========================================
   v4.2.187 无障碍基础 (审计 UI 优化)
   ========================================= */

/* 键盘焦点环: 全站此前没有任何 :focus-visible 样式,
   用 Tab 导航时完全看不到焦点在哪。鼠标点击不显示(避免视觉噪音),
   仅键盘导航触发。 */
/* 注意: 这里不设 border-radius —— outline 会自动跟随元素自身圆角,
   强行设 4px 会把圆形歌手头像/圆角卡片的焦点框压成方角 */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* 部分按钮/卡片有自己的圆角, 焦点环跟随 */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* 输入框已经有 border-color 变化, 焦点环用 inset 避免布局跳动 */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline-offset: 0;
}

/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 移动端触控目标最小 44px (WCAG 2.5.5)
   只作用于明确的交互控件, 不加到所有元素上以免撑坏布局。
   关键: 不用 min-width, 那会把工具栏里并排的小图标按钮挤爆;
   改成用透明 ::after 扩大**热区**而不改变视觉尺寸。 */
@media (pointer: coarse) {
    button,
    .btn,
    .row-action-btn,
    .favorite-btn,
    .track-card-actions button {
        position: relative;
    }
    /* 视觉尺寸 >= 44 的按钮不用管; 小的靠伪元素补热区。
       注意只加 height 不加 width: 横向撑开会让并排的图标按钮互相抢点击,
       纵向撑开没有副作用 (行高本来就有余量)。 */
    .row-action-btn::after,
    .favorite-btn::after,
    .track-card-actions button::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        height: 100%;
        min-height: 44px;
    }
    /* 主按钮本身够大, 显式保证高度 */
    .btn,
    .btn-primary,
    button.btn {
        min-height: 44px;
    }
    /* 图标小按钮保持视觉尺寸, 只保证可点 */
    .row-action-btn,
    .track-card-actions button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* 统一空状态 (替代散落各处的 "暂无 xxx" 内联 div) */
.empty-state-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 56px 24px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}
.empty-state-block .es-icon {
    font-size: 36px;
    opacity: 0.7;
    line-height: 1;
}
.empty-state-block .es-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}
.empty-state-block .es-hint {
    font-size: 12px;
    max-width: 320px;
}
.empty-state-block .es-action {
    margin-top: 6px;
}
/* 紧凑版: 用于侧栏/弹窗内的小区域 */
.empty-state-block.es-compact {
    padding: 24px 16px;
    gap: 6px;
}
.empty-state-block.es-compact .es-icon { font-size: 24px; }

/* 骨架屏 (v4.2.188) —— 配合 core.js skeletonHtml()
   原有的 .skeleton 定义在 swipe.css, 这里补 grid/row 布局所需的细节 */
.skeleton-grid { margin-top: 8px; }
.skeleton-line {
    display: block;
    height: 12px;
    background: linear-gradient(90deg,
        var(--bg-card) 0%,
        var(--bg) 50%,
        var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
    margin: 6px 0;
}

/* ===== player.css — 桌面播放器条 ===== */

/* =========================================
   移动端元素桌面端隐藏
   ========================================= */
.hamburger-btn { display: none; }  /* v3.2.93: 去掉 !important, 桌面端由 @media (min-width: 1025px) 用 !important 隐藏 */
.sidebar-overlay { display: none; }  /* 移动端由@media控制 */
.mobile-nav { display: none; }
#mobile-more-panel { display: none; }
/* v3.2.91: 取消 mobile-header display 的 !important
   因为 desktop 1025 块需要 !important 隐藏它, default 用 !important 会跟它 cascade 冲突 */
.mobile-header {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0;
    /* v3.2.93x: padding-top 44px, inner 32, hamburger 绝对定位 40x40 独立于 inner */
    padding-top: 44px;
    background: var(--sidebar);
    z-index: 99999;
    border-bottom: 1px solid #38383a;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    position: relative;
}
.hamburger-btn {
    display: flex;
    position: absolute;
    left: 6px;
    top: 47px;
    z-index: 100000;
    width: 40px; height: 40px;
    background: transparent;
    color: white;
    border: none;
    font-size: 22px;
    font-family: inherit;
    padding: 0;
    margin: 0;
    align-items: center; justify-content: center;
    cursor: pointer;
}
.mobile-header-title {
    color: var(--sidebar-active);
    font-size: 14px;
    font-weight: 600;
}
@media (min-width: 1025px) {
    .mobile-header { display: none !important; }
    .hamburger-btn { display: none !important; }
}


/* ===== player-mobile.css — 全屏播放器, 横屏/小屏适配 ===== */

.player-fullscreen { display: none; }

/* 响应式 - 多分辨率适配 */
@media (max-width: 1024px) {
    /* v3.2.93y: 移到 1024 块 (之前在 768 块, 16e 横屏 852 宽不匹配) */
    .player-fullscreen.active { display: flex !important; }
    /* v3.2.93za: 全屏视觉规则 (bg, ::before, padding) 从 768 块挪到 1024 块 */
    .player-fullscreen {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 100000;
        background-color: #0f0f1e;
        background-image: linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 100%);
        background-size: cover;
        background-position: center;
        flex-direction: column;
        padding: 0 20px 20px;
        padding-top: max(47px, env(safe-area-inset-top, 0px));
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        animation: fsSlideUp 0.25s ease;
        overflow: hidden;
    }
    .player-fullscreen::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background-image: inherit;
        background-size: cover;
        background-position: center;
        filter: blur(60px) brightness(0.4) saturate(1.2);
        z-index: -1;
    }
    :root {
        --sidebar-width: 0px;
        /* 底部 mobile-nav 实际占位高度: 50px + iPhone home indicator safe-area
           (landscape 覆盖为 44px) 平板/大屏手机横屏也能用到，避免 player-bar 被压住 */
        --mobile-nav-height: calc(50px + env(safe-area-inset-bottom, 0px));
    }
    .sidebar { display: none !important; }
    .main-content {
        margin-left: 0 !important;
        max-width: 100vw !important;
        /* 底部 padding 跟随 mobile-nav 真实高度 (比手机 70px 多 20px 间距) */
        padding-bottom: calc(20px + var(--mobile-nav-height, 50px)) !important;
    }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .form-row-4 { grid-template-columns: repeat(2, 1fr); }
    /* 专辑网格缩小 */
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    /* 歌手字母栏 */
    .artist-letter-bar { gap: 4px; }
    .letter-item { min-width: 28px; height: 28px; font-size: 12px; }
    /* ===== 底部导航 (平板/手机都显示) ===== */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 50px;
        background: var(--sidebar);
        z-index: 949;
        border-top: 1px solid #38383a;
    }
    /* iPhone home indicator: 用 padding-bottom 撑出 safe-area 高度
       为了避免 icon 被压到顶部, 同时把 .mobile-nav-item 的 padding-bottom 调为 0
       让内容平铺到容器底部 (padding-bottom 仅包含 safe-area) */
    .mobile-nav {
        min-height: calc(50px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mobile-nav-item {
        /* 覆盖上面定义的 padding: 4px 2px, 去掉 padding-bottom 让内容靠下 */
        padding: 4px 2px 0 2px;
    }
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--sidebar-text);
        font-size: 9px;
        cursor: pointer;
        transition: color 0.15s;
        padding: 4px 2px;
    }
    .mobile-nav-item.active, .mobile-nav-item:hover { color: var(--sidebar-active); }
    .mobile-nav-item span:first-child { font-size: 18px; }
    /* ===== 移动端 player-bar bottom 跟随 mobile-nav 高度 ===== */
    #player-bar {
        bottom: 0;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        z-index: 960;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }
    .sidebar-overlay.active { display: block; }

    /* 移动端侧边栏（滑出） */
    .sidebar {
        display: block !important;
        position: fixed;
        top: 0; left: -260px;
        width: 260px;
        height: 100vh;
        height: 100dvh;
        z-index: 1001;
        transition: left 0.25s ease;
        box-shadow: 3px 0 20px rgba(0,0,0,0.3);
        overflow: hidden;
    }
    .sidebar.open { left: 0; }
    .sidebar-brand { position: relative; z-index: 2; }
    /* iOS Safari 关键: sidebar-nav 独立 fixed 定位, 脱离 sidebar 的层叠上下文
       这是 iOS 上 drawer 滚动的标准模式 */
    .sidebar-nav {
        position: fixed;
        top: 75px;
        left: -260px;  /* 默认隐藏 */
        width: 260px;
        height: calc(100vh - 75px);
        height: calc(100dvh - 75px);
        padding: 10px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: left 0.25s ease;
        z-index: 1000;
    }
    .sidebar.open .sidebar-nav {
        left: 0;  /* 跟着 sidebar 同步滑出 */
    }

    /* 2026-06-18 修: 之前 58px 不够, mobile-header 77px 遮挡顶部 19px
       1024 块包括 769-1024 区间 (平板/小桌面), 都需被覆盖
       ≤768 块在下方另有 88px !important 覆盖 */
    .main-content { padding-top: 88px; }

    /* ===== 歌曲列表移动端优化 ===== */
    .track-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .track-table-wrap table { min-width: 500px; }
    .track-table-wrap table .track-row td:first-child { padding-left: 8px; }
    .track-table-wrap table .track-row td:last-child { padding-right: 8px; }

    /* ===== 专辑网格移动端 ===== */
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
    .album-grid .album-card .cover { font-size: 32px; }
    .album-grid .album-card .info { padding: 8px; }
    .album-grid .album-card h4 { font-size: 12px; }
    .album-grid .album-card p { font-size: 10px; }

    /* ===== 内容区块移动端 ===== */
    .content-header { padding: 12px 0 8px; }
    .content-header h2 { font-size: 18px; }
    .content-header p { font-size: 12px; }
    .section-header h2 { font-size: 15px; }
    .stat-card .stat-value { font-size: 22px; }
    .stat-card .stat-label { font-size: 11px; }
}

@media (max-width: 768px) {
    :root {
        /* --sidebar-width / --mobile-nav-height 已在 1024px 媒体查询中定义 */
        /* v3.2.93zd: 竖屏 player-bar 高度 */
        --player-bar-height: 64px;
    }
    .sidebar { display: none; }  /* v3.2.93: 去掉 !important, 1024 块用 !important 显示 (mobile drawer 可见) */
    .main-content {
        /* 2026-06-18 修: 之前 padding: 12px 被 mobile-header (77px 竖屏 / 41px 横屏) 遮挡
           改为 padding-top: 88px (竖屏 header 77 + 11px 间距, 距 banner 更舒服)
           横屏 1024px 媒体查询里另设 52px (横屏 header 41 + 11px 间距) */
        padding: 88px 10px calc(20px + var(--mobile-nav-height, 50px)) !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
    }
    .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }

    /* 统计卡片: 3 个挤一行会超宽, 改 grid 3 列 + 缩小 padding
       (在文件末尾有 !important 兑底) */

    /* ===== 播放器适配 ===== */
    #player-bar {
        left: 0;
        right: 0;
        /* bottom 由 1024px 媒体查询设置, 这里只补 width/size */
        /* v3.2.93zd: 统一 --player-bar-height, 竖屏 64 / 横屏 48 独立设 */
        height: var(--player-bar-height, 64px);
        max-height: var(--player-bar-height, 64px);
        overflow: hidden;
        z-index: 960;
        padding: 6px 12px;
        cursor: pointer;  /* 移动端: 点击展开全屏 */
    }
    #player-bar.active {
        display: flex;
    }
    #player-bar.active ~ .mobile-nav {
        display: none !important;
    }
    /* 移动端: 隐藏桌面播放器条里的次要按钮 (歌词/模式/懒人/队列) */
    #player-lyrics-btn, #player-mode-btn, #player-lazy-btn, #queue-toggle-btn {
        display: none !important;
    }
    /* 移动端: 播放器条进度条与控制布局紧凑 */
    #player-bar #player-volume { display: none !important; }
    #player-bar #player-time { font-size: 10px !important; }
    /* 移动端: 收藏/评分/下载/大号按钮太占空间, 收起 */
    #player-bar #player-fav-btn { display: none !important; }
    #player-bar #player-rate-btn { display: none !important; }
    #player-bar #player-dl-btn { display: none !important; }
    #player-bar #player-max-btn { display: none !important; }
    #player-bar #player-lf-status { display: none !important; }
    /* 移动端: 紧凑 gap */
    #player-bar #player-inner { gap: 8px !important; }
    #player-bar #player-track-info { font-size: 12px !important; }
    #player-bar #player-lyrics-marquee { display: none !important; }
    /* 封面背景 */
    #player-bar #player-cover-thumb { display: none !important; }

    /* 下拉关闭动画: 全屏跟随手指下移 */
    .player-fullscreen.dragging {
        transition: none !important;
    }
    .player-fullscreen.dragging::after {
        content: '↓ 松手关闭';
        position: absolute;
        top: 80px;
        left: 0; right: 0;
        text-align: center;
        color: rgba(255,255,255,0.7);
        font-size: 13px;
        pointer-events: none;
    }
    #mobile-more-panel.active, #mobile-more-panel[style*="display: block"] { display: block !important; }
    @keyframes fsSlideUp {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .pf-close {
        background: none; border: none;
        color: rgba(255,255,255,0.85);
        font-size: 32px; font-weight: 300;
        cursor: pointer;
        padding: 8px 16px;
        line-height: 1;
        flex-shrink: 0;
    }
    .pf-close:active { opacity: 0.6; }
    .pf-mode-btn {
        background: none; border: none;
        color: rgba(255,255,255,0.7);
        cursor: pointer;
        padding: 8px 16px;
        flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
    }
    .pf-mode-btn:active { opacity: 0.6; }
    .pf-title-wrap {
        flex: 1; min-width: 0;
        display: flex; align-items: center; justify-content: center;
        overflow: hidden;
    }
    .pf-title-mini {
        font-size: 14px;
        color: rgba(255,255,255,0.6);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    #pf-header {
        display: flex; align-items: center; justify-content: space-between;
        min-height: 48px;
        padding: 0 4px;
    }
    .pf-cover {
        flex: 1;
        display: flex; align-items: flex-start; justify-content: center;
        min-height: 180px;
        margin: 8px 0 0;
        padding-top: 4px;
    }
    .pf-cover-inner {
        width: min(80vw, 320px);
        aspect-ratio: 1;
        background: linear-gradient(135deg, #2a2a4e 0%, #1a1a2e 100%);
        border-radius: 50%;          /* 圆形黑胶 */
        display: flex; align-items: center; justify-content: center;
        font-size: 80px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        overflow: hidden;
        position: relative;
    }
    .pf-cover-inner img {
        width: 100%; height: 100%;
        border-radius: 50%;
        object-fit: cover;
        animation: coverSpin 12s linear infinite;
        animation-play-state: paused;
    }
    .pf-cover-inner.playing img {
        animation-play-state: running;
    }
    /* 黑胶中心点 */
    .pf-cover-inner::after {
        content: '';
        position: absolute;
        width: 16%;
        aspect-ratio: 1;
        background: #0f0f1e;
        border: 2px solid rgba(255,255,255,0.15);
        border-radius: 50%;
        z-index: 2;
    }
    @keyframes coverSpin {
        from { transform: rotate(0deg); }
        to   { transform: rotate(360deg); }
    }
    .pf-info { text-align: center; color: white; margin-bottom: 16px; }
    .pf-info .pf-title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
    .pf-info .pf-artist { font-size: 14px; color: rgba(255,255,255,0.6); }
    .pf-progress { margin-bottom: 20px; }
    .pf-progress input[type=range] { width: 100%; height: 4px; accent-color: var(--accent); cursor: pointer; }
    .pf-time { display: flex; justify-content: space-between; color: rgba(255,255,255,0.5); font-size: 11px; margin-top: 4px; }
    .pf-controls { display: flex; justify-content: center; align-items: center; gap: 40px; margin-bottom: 16px; }
    .pf-btn {
        background: none; border: none; color: white;
        font-size: 32px; cursor: pointer;
        width: 64px; height: 64px;
        display: flex; align-items: center; justify-content: center;
    }
    .pf-btn.play { font-size: 40px; background: var(--accent); border-radius: 50%; width: 72px; height: 72px; }
    .pf-play-btn { background: var(--accent); border-radius: 50%; width: 72px; height: 72px; color: white; font-size: 24px; border: none; cursor: pointer; }
    .pf-btn:active { transform: scale(0.92); }
    /* 歌词样式 (在 pf-cover-wrap 里) */
    #pf-lyrics-display {
        text-align:center;
        font-size:14px;
        line-height:2.2;
        color:rgba(255,255,255,0.5);
        padding:20px;
        max-height:100%;
        overflow-y:auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    #pf-lyrics-display span {
        display: block;
        padding: 4px 0;
        transition: all 0.3s ease;
    }
    #pf-lyrics-display span.active {
        color: var(--accent);
        font-size: 18px;
        font-weight: 600;
    }
    /* section tag ([Verse] [Chorus]) — 小灰字分隔 */
    #pf-lyrics-display span.section-tag {
        font-size: 11px;
        color: rgba(255,255,255,0.3);
        font-style: italic;
        margin: 16px 0 4px;
        letter-spacing: 1px;
    }
    /* 全屏内第二排工具栏 (队列/收藏/音量) */
    .pf-extras {
        display: flex; align-items: center; justify-content: space-around;
        margin-bottom: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        color: rgba(255,255,255,0.7);
    }
    .pf-extras button {
        background: none; border: none; color: inherit;
        cursor: pointer; padding: 8px;
        display: flex; align-items: center; gap: 4px;
        font-size: 13px;
    }
    .pf-extras button.active { color: var(--accent); }
    .pf-extras input[type=range] {
        /* 全屏音量滑块: 加高到 24px 让手指能拖到; touch-action: manipulation 不干预原生 slider 拖动, 又能避免双击缩放 */
        width: 90px; height: 24px;
        accent-color: var(--accent);
        touch-action: manipulation;
    }
    .pf-extras #pf-volume-icon {
        /* 取消 cursor:default, 让他看起来像可点按钮 */
        cursor: pointer !important;
    }
    .pf-extras #pf-volume-icon.muted { color: var(--muted); }
    /* 进度条拖动气泡 */
    .pf-seek-wrap { position: relative; }
    #pf-seek-bubble {
        position: absolute;
        bottom: 24px;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.85);
        color: var(--mp-fg);
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 11px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s;
    }
    #pf-seek-bubble.visible { opacity: 1; }
    #player-lyrics-panel {
        left: auto; right: 8px;
        width: 300px; bottom: 118px;
    }
    #player-queue-panel {
        left: 8px; right: auto;
        width: 320px; bottom: 118px;
    }


@media (min-width: 1025px) {
    .mobile-header { display: none !important; }
    .hamburger-btn { display: none !important; }
}

}

/* ===== 横屏 / 大屏手机适配 ===== */
@media (max-width: 1024px) and (orientation: landscape) {
    :root {
        /* 横屏: mobile-nav 紧凑高度 44px */
        --mobile-nav-height: calc(44px + env(safe-area-inset-bottom, 0px));
        /* v3.2.93ze: 横屏 48 -> 64px 跟竖屏一致 */
        --player-bar-height: 64px;
    }
    #player-bar {
        height: var(--player-bar-height) !important;
        max-height: var(--player-bar-height) !important;
        padding: 4px 16px !important;
    }
    /* 横屏: 高度 44px (比竖屏 50px 紧凑), home indicator 由 padding-bottom 撑出 */
    .mobile-nav { min-height: calc(44px + env(safe-area-inset-bottom, 0px)); }
    /* 横屏: 刘海在侧, header 顶部不需让位, 压低到 8px */
    .mobile-header { padding-top: 8px !important; }
    /* v3.2.93z: 横屏 hamburger top 47->4px, 跟上 padding-top 8px 配合 */
    .hamburger-btn { top: 4px !important; }
    .mobile-nav-item { font-size: 8px; }
    /* v3.2.93zb: 横屏 player-bar active 隐藏 nav (竖屏 768 块已存在) */
    #player-bar.active ~ .mobile-nav { display: none !important; }
    .mobile-nav-item span:first-child { font-size: 16px; }
    .main-content { padding-bottom: calc(12px + var(--mobile-nav-height, 50px)) !important; }
    /* 2026-06-18 修: 横屏 header 41px, padding-top 80 太空, 改为 52px (header 41 + 11px 间距) */
    .main-content { padding-top: 52px !important; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ===== 小屏手机 (< 480px) ===== */
@media (max-width: 480px) {
    .mobile-nav-item { font-size: 8px; }
    .mobile-nav-item span:first-child { font-size: 16px; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
    .album-grid .album-card .info { padding: 6px; }
    .album-grid .album-card h4 { font-size: 11px; }
    #player-bar { padding: 4px 8px !important; }
    .track-table-wrap table { min-width: 400px; }
}

/* ===== 移动端: 隐藏 Max Player (桌面浮窗), 全屏走 mobile 自己的全屏播放器 ===== */
@media (max-width: 1024px) {
    #max-player.mp-root { display: none !important; }
}

/* ===== 超小屏竖屏 (< 480px) 进一步收窄 ===== */
@media (max-width: 480px) {
    #player-bar .txt-mute-xs,
    #player-bar [title="上一首"],
    #player-bar [title="下一首"] { display: none !important; }
}

/* ====================================================================== */
/* ===== Max Player — Spotify 桌面全屏风格 ===== */
/* ===== Max Player — 主题适配版 ===== */
.mp-root {
    position: fixed;
    bottom: 88px;
    right: 24px;
    z-index: 9997;
    width: 380px;
    height: 540px;
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 16px 40px color-mix(in srgb, var(--bg) 30%, transparent), 0 0 1px color-mix(in srgb, var(--border) 50%, transparent);
    color: var(--text, #1a1a2e);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    display: none;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    --mp-fg: var(--text, #1a1a2e);
    --mp-card-bg: var(--bg-card, #ffffff);
    --mp-accent: var(--accent, #5b5ef4);
    --mp-bg: linear-gradient(135deg, var(--accent, #5b5ef4), var(--bg-card, #ffffff));
}
.mp-root.mp-shown { display: flex; animation: mpFadeIn 0.2s ease; }
@keyframes mpFadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* 取消全局模糊背景, 让主题色直接显示 */

/* ===== 顶部条 ===== */
.mp-topbar {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 12px;
    flex-shrink: 0;
}
.mp-topbar-drag {
    flex: 1;
    height: 100%;
    cursor: grab;
}
.mp-topbar-drag:active { cursor: grabbing; }
.mp-icon-btn {
    background: color-mix(in srgb, var(--mp-fg) 8%, transparent);
    border: none;
    color: color-mix(in srgb, var(--mp-fg) 75%, transparent);
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.mp-icon-btn:hover { background: color-mix(in srgb, var(--mp-fg) 16%, transparent); color: var(--mp-fg); transform: scale(1.05); }
.mp-topbar-mode { display: flex; gap: 8px; }
.mp-mode-btn.mp-mode-single { color: var(--accent, #1db954); }
.mp-mode-btn.mp-mode-shuffle { color: var(--accent, #1db954); }

/* ===== 封面区 ===== */
.mp-cover-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px 0;
    min-height: 0;
}
.mp-cover {
    width: 280px;
    height: 280px;
    max-width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mp-fg) 6%, transparent);
    box-shadow: 0 8px 32px color-mix(in srgb, var(--mp-card-bg) 30%, transparent);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--mp-fg) 35%, transparent);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mp-cover:hover { transform: scale(1.02); box-shadow: 0 12px 40px color-mix(in srgb, var(--mp-card-bg) 35%, transparent); }
.mp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-cover-placeholder { color: color-mix(in srgb, var(--mp-fg) 25%, transparent); }

/* 封面旋转 — Spotify 风格, 播放时转 */
@keyframes mpSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.mp-cover.mp-spin-active { animation: mpSpin 16s linear infinite; border-radius: 50%; }
.mp-cover:not(.mp-spin-active) { border-radius: 8px; }

/* ===== 标题/歌手 ===== */
.mp-meta {
    padding: 16px 24px 0;
    flex-shrink: 0;
}
.mp-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--mp-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.mp-artist {
    font-size: 14px;
    color: color-mix(in srgb, var(--mp-fg) 65%, transparent);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-artist:empty { display: none; }

/* ===== 进度条 ===== */
.mp-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px 6px;
    flex-shrink: 0;
}
.mp-time {
    font-size: 11px;
    color: color-mix(in srgb, var(--mp-fg) 60%, transparent);
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.mp-seek-wrap {
    flex: 1;
    height: 16px;
    display: flex;
    align-items: center;
    position: relative;
}
.mp-seek {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
}
.mp-seek-fill {
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--mp-fg);
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
}
.mp-seek-wrap::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: color-mix(in srgb, var(--mp-fg) 18%, transparent);
    border-radius: 2px;
    z-index: 0;
}
/* thumb */
.mp-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--mp-fg);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 0 transparent;
    transition: box-shadow 0.15s;
}
.mp-seek:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px color-mix(in srgb, var(--mp-fg) 18%, transparent); }
.mp-seek::-moz-range-thumb {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--mp-fg);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 0 transparent;
    transition: box-shadow 0.15s;
}
.mp-seek:hover::-moz-range-thumb { box-shadow: 0 0 0 6px color-mix(in srgb, var(--mp-fg) 18%, transparent); }
.mp-seek::-webkit-slider-runnable-track { background: transparent; height: 4px; }
.mp-seek::-moz-range-track { background: transparent; height: 4px; }

/* ===== 主控制 ===== */
.mp-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 24px 0;
    flex-shrink: 0;
}
.mp-ctrl-btn {
    background: none;
    border: none;
    color: color-mix(in srgb, var(--mp-fg) 65%, transparent);
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.mp-ctrl-btn:hover { color: var(--mp-fg); transform: scale(1.06); }
.mp-ctrl-btn.mp-on { color: var(--accent, #1db954); }
.mp-play-btn {
    background: var(--mp-fg);
    color: var(--mp-card-bg);
    border: none;
    width: 56px; height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--mp-card-bg) 30%, transparent);
}
.mp-play-btn:hover { transform: scale(1.06); box-shadow: 0 6px 16px color-mix(in srgb, var(--mp-card-bg) 40%, transparent); }
.mp-play-icon { display: block; }

/* ===== Extras ===== */
.mp-extras {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 24px 0;
    flex-shrink: 0;
}
.mp-extra-btn {
    background: none;
    border: none;
    color: color-mix(in srgb, var(--mp-fg) 60%, transparent);
    cursor: pointer;
    width: 30px; height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.mp-extra-btn:hover { color: var(--mp-fg); background: color-mix(in srgb, var(--mp-fg) 10%, transparent); }
.mp-extra-btn.mp-on { color: var(--accent, #1db954); }
.mp-extra-btn.mp-muted { color: #e74c3c; }
.mp-volume-row {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 110px;
}
.mp-volume {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: color-mix(in srgb, var(--mp-fg) 18%, transparent);
    border-radius: 2px;
    cursor: pointer;
}
.mp-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--mp-fg);
    cursor: pointer;
    border: none;
}
.mp-volume::-moz-range-thumb {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--mp-fg);
    cursor: pointer;
    border: none;
}

/* ===== 底部切换 ===== */
.mp-bottombar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 24px 10px;
    flex-shrink: 0;
    margin-top: auto;
}
.mp-bottom-btn {
    background: none;
    border: none;
    color: color-mix(in srgb, var(--mp-fg) 45%, transparent);
    cursor: pointer;
    width: 30px; height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.mp-bottom-btn:hover { color: var(--mp-fg); background: color-mix(in srgb, var(--mp-fg) 10%, transparent); }

/* ===== 歌词浮层 (覆盖整个 max) ===== */
.mp-lyrics-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--mp-card-bg) 95%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    padding: 44px 20px 20px;
    box-sizing: border-box;
    animation: mpLyricsFade 0.2s ease;
}
@keyframes mpLyricsFade { from { opacity: 0; } to { opacity: 1; } }
.mp-lyrics-overlay.mp-shown { display: flex; }
.mp-lyrics-content {
    flex: 1;
    overflow-y: auto;
    text-align: center;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.mp-lyrics-content::-webkit-scrollbar { width: 4px; }
.mp-lyrics-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 2px; }
.mp-lyric-line {
    color: color-mix(in srgb, var(--mp-fg) 65%, transparent);
    font-size: 15px;
    line-height: 1.8;
    padding: 4px 0;
    transition: all 0.2s;
    cursor: pointer;
}
.mp-lyric-line:hover { color: var(--mp-fg); }
.mp-lyric-line.mp-lyric-active {
    color: var(--accent, #1db954);
    font-size: 17px;
    font-weight: 700;
    transform: scale(1.02);
    text-shadow: 0 0 12px color-mix(in srgb, var(--accent, #1db954) 40%, transparent);
}
.mp-lyric-tag {
    color: color-mix(in srgb, var(--mp-fg) 35%, transparent);
    font-size: 11px;
    letter-spacing: 2px;
    padding: 12px 0 4px;
    text-transform: uppercase;
}
.mp-lyrics-empty {
    color: color-mix(in srgb, var(--mp-fg) 45%, transparent);
    text-align: center;
    padding: 80px 16px;
    font-size: 14px;
}
.mp-lyrics-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: color-mix(in srgb, var(--mp-fg) 8%, transparent);
    border: none;
    color: color-mix(in srgb, var(--mp-fg) 75%, transparent);
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
}
.mp-lyrics-close:hover { background: color-mix(in srgb, var(--mp-fg) 16%, transparent); color: var(--mp-fg); }

/* ===== 移动端调整 ===== */
@media (max-width: 768px) {
    .mp-root {
        bottom: 0;
        right: 0;
        width: 100vw;
        height: calc(100vh - 50px);
        border-radius: 0;
    }
    .mp-cover { width: 240px; height: 240px; }
    .mp-title { font-size: 18px; }
    .mp-meta, .mp-progress-row, .mp-controls, .mp-extras { padding-left: 16px; padding-right: 16px; }
}

/* 移动端更多菜单项 */
.mobile-more-item {

/* ===== library.css — 整轨, Toast, 搜索, 歌手/专辑, 列表, 网格, 响应式 ===== */

    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.mobile-more-item:last-child { border-bottom: none; }
.mobile-more-item:hover { background: var(--bg); }
.mobile-more-item span:first-child { font-size: 16px; }

/* 整轨管理内嵌页面特殊样式 */
.raw-album-layout { flex-direction: column !important; overflow-y: auto; height: auto !important; }
.raw-album-layout .main-content { padding: 0 !important; max-width: 100% !important; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.raw-album-layout .page { display: none; flex-direction: column; }
.raw-album-layout .page.active { display: flex; flex-direction: column; flex: 1; }

/* 歌单详情头部 */
.pl-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.pl-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.pl-cover-icon {
    width: 44px;
    height: 44px;
    background: var(--bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--muted);
}
.pl-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.pl-count {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.pl-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}
.pl-header .pl-btn {
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    border: none;
    white-space: nowrap;
    line-height: 1.4;
}
.pl-btn-primary { background: var(--accent); color: white; }
.pl-btn-secondary { background: var(--bg); border: 1px solid var(--border) !important; color: var(--text); }
.pl-btn-danger { background: var(--danger); color: white; }
.raw-album-layout .content-header { padding: 20px 24px 10px; flex-shrink: 0; }
.raw-album-layout .content-body[data-theme="light"] { background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 40%, #f5f7fa 100%) !important; }


/* ===== 整轨模块补充样式 ===== */
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #e8e8ed; }

.loading { text-align: center; padding: 40px; color: var(--muted); }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.session-list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; background: var(--bg-card); }
.session-list-item:hover { border-color: var(--accent); background: rgba(0,113,227,0.04); }
.session-list-item .info { flex: 1; min-width: 0; }
.session-list-item .title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-list-item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.session-list-item .badge { margin-left: auto; flex-shrink: 0; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--accent); cursor: pointer; }
.breadcrumb a:hover { text-decoration: underline; }

.form-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* 音轨表格 */
.tracks-table { width: 100%; border-collapse: collapse; }
.tracks-table th { text-align: left; padding: 10px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--bg); font-weight: 500; }
.tracks-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.tracks-table tr:hover td { background: rgba(0,0,0,0.02); }
.track-input { width: 100%; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font-size: 13px; box-sizing: border-box; }
.track-input:focus { border-color: var(--accent); outline: none; }

/* Toast 通知 - 2026-06-14 补回: 历来项目没写过 toast CSS, 76 个 showToast() 都是隐形的
   重写成不依赖 flex / animation 的保险版, 避免某些浏览器/缓存下不出 */
#toast-container {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));  /* 播放器上方, 避开底部安全区 */
    left: 0;
    right: 0;
    z-index: 100200;   /* 高于全屏 100000, 高于队列 fs-mode 100100 */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}
.toast {
    /* 不靠动画填关键属性, 即便动画出问题也是可见的 */
    background: #1f2937;      /* fallback 色, 跟暗色背景 */
    color: #ffffff;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    text-align: center;
    opacity: 1;                /* 明确指定, 不受 keyframe 干扰 */
    transform: none;           /* 明确指定, 不受 keyframe 干扰 */
    max-width: calc(100vw - 32px);
    word-wrap: break-word;
    animation: toastSlideIn 0.2s ease-out;
}
.toast.info    { border-left: 3px solid #3b82f6; background: var(--bg-card, #1f2937); color: var(--text, #ffffff); }
.toast.success { border-left: 3px solid #22c55e; background: var(--bg-card, #1f2937); color: var(--text, #ffffff); }
.toast.error   { border-left: 3px solid #ef4444; background: var(--bg-card, #1f2937); color: var(--text, #ffffff); }
.toast.warning { border-left: 3px solid #fbbf24; background: var(--bg-card, #1f2937); color: var(--text, #ffffff); }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 搜索/批处理模态框 */
.search-modal, .batch-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; z-index: 1000; }
.search-modal.active, .batch-modal.active { display: flex; }
.search-modal .modal-content, .batch-modal .modal-content { background: var(--bg-card); border-radius: 12px; padding: 24px; max-width: 700px; width: 90%; max-height: 80vh; overflow-y: auto; }
.search-modal .modal-header, .batch-modal .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.search-modal .modal-header h3, .batch-modal .modal-header h3 { font-size: 16px; font-weight: 600; }
.search-modal .modal-close, .batch-modal .modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); }

.search-results { max-height: 400px; overflow-y: auto; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; }
.search-result-item:hover { border-color: var(--accent); background: rgba(0,113,227,0.04); }
.search-result-item img { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; }
.search-result-item .info { flex: 1; }
.search-result-item .title { font-size: 14px; font-weight: 500; }
.search-result-item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.batch-field-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; margin-bottom: 12px; }
.batch-field-row label { font-size: 13px; color: var(--muted); }
.batch-field-row select, .batch-field-row input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: var(--bg); color: var(--text); }
.batch-field-row select:focus, .batch-field-row input:focus { border-color: var(--accent); outline: none; }

/* 上传整轨弹窗 */
#upload-raw-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; z-index: 1000; }
#upload-raw-modal.active { display: flex; }
#upload-raw-modal .modal-content { background: var(--bg-card); border-radius: 12px; padding: 24px; max-width: 600px; width: 90%; }
#upload-raw-modal .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
#upload-raw-modal .modal-header h3 { font-size: 16px; font-weight: 600; }

/* ===== 歌手详情页 ===== */
.artist-detail-header { display: flex; gap: 24px; align-items: flex-end; padding: 24px 0 20px; }
.artist-avatar { width: 160px; height: 160px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 700; color: white; flex-shrink: 0; box-shadow: 0 8px 32px rgba(0,0,0,0.3); overflow: hidden; position: relative; }
.artist-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artist-avatar span { line-height: 1; }
.artist-header-info { flex: 1; min-width: 0; padding-bottom: 4px; }
.artist-type-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }
.artist-name { font-size: 36px; font-weight: 700; line-height: 1.2; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-meta { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.artist-meta .meta-sep { color: var(--border); }
.artist-genres { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.genre-tag { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 3px 12px; font-size: 12px; color: var(--muted); }
.genre-tag:first-child { background: var(--accent); color: white; border-color: var(--accent); }

.breadcrumb { margin-bottom: 8px; }
.back-btn { color: var(--accent); cursor: pointer; }
.back-btn:hover { text-decoration: underline; }

.section { margin-bottom: 32px; }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-header h2 { font-size: 20px; font-weight: 600; margin: 0; }
.section-count { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 1px 10px; font-size: 12px; color: var(--muted); }

/* 歌曲列表 */
.track-list-table { background: var(--bg-card); border-radius: 12px; overflow: hidden; }
.track-list-table table { width: 100%; border-collapse: collapse; }
.track-list-table thead tr { background: var(--bg); border-bottom: 1px solid var(--border); }
.track-list-table th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.track-list-table th:nth-child(1) { width: 40px; text-align: center; }
.track-list-table th:nth-child(3) { width: 200px; }
.track-list-table th:nth-child(4) { width: 80px; text-align: right; }
.track-row { border-bottom: 1px solid var(--border); cursor: pointer; }
.track-row:last-child { border-bottom: none; }
.track-row:hover { background: var(--bg-hover, var(--bg)); }

/* table row hover: propagate to cells */

table tr.track-row:hover td { background: var(--bg-hover, var(--bg)); color: inherit; }

[data-theme="dark"] .track-row:hover { background: #222240 !important; color: #ffffff !important; }

[data-theme="dark"] table tr.track-row:hover td { background: #222240 !important; color: #ffffff !important; }

[data-theme="dark"] .track-table-wrap table tbody tr.track-row:hover { background: #222240 !important; color: #ffffff !important; }

[data-theme="dark"] .track-table-wrap table tbody tr.track-row td { background: inherit; color: var(--muted); }
.track-row td { padding: 10px 16px; vertical-align: middle; }
.track-num { text-align: center; color: var(--muted); font-size: 13px; }
.track-info .track-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-info .track-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-album { font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-album:hover { color: var(--accent); }
.track-dur { text-align: right; font-size: 13px; color: var(--muted); }

/* 专辑网格 */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
/* 专辑列表页容器（与 .album-grid 一致） */
.album-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.album-list .album-card { background: var(--bg-card); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.15s; border: 1px solid var(--border); }
.album-list .album-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); border-color: var(--accent); }
.album-list .album-card .cover { width: 100%; aspect-ratio: 1; background: var(--bg); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.album-list .album-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.album-list .album-card .info { padding: 12px; }
.album-list .album-card h4 { font-size: 14px; font-weight: 500; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-list .album-card p { font-size: 12px; color: var(--muted); margin: 0; }
.album-list .album-card .meta { margin-top: 6px; font-size: 12px; color: var(--muted); }
.album-grid .album-card { background: var(--bg-card); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.15s; border: 1px solid var(--border); }
.album-grid .album-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); border-color: var(--accent); }
.album-grid .album-card .cover { width: 100%; aspect-ratio: 1; background: var(--bg); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.album-grid .album-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.album-grid .album-card .info { padding: 12px; }
.album-grid .album-card h4 { font-size: 14px; font-weight: 500; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-grid .album-card p { font-size: 12px; color: var(--muted); margin: 0; }
.album-grid .album-card .meta { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ===== 歌手列表增强 ===== */
.artist-filter-bar { overflow-x: auto; scrollbar-width: none; }
.artist-filter-bar::-webkit-scrollbar { display: none; }
.artist-letter-bar { display: flex; gap: 2px; align-items: center; padding: 4px 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.artist-letter-bar::-webkit-scrollbar { display: none; }
.letter-item { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; transition: all 0.15s; white-space: nowrap; padding: 0 6px; }
.letter-item:hover { background: var(--bg); color: var(--text); }
.letter-item.active { background: var(--accent); color: white; }

.btn-group { display: flex; gap: 4px; }
.btn-group .btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* 歌手卡片增强 */
.artist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.artist-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 0; cursor: pointer; transition: all 0.2s; overflow: hidden; display: flex; flex-direction: column; }
.artist-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); border-color: var(--accent); }
.artist-card.large { grid-column: span 2; }
.artist-card.medium { }
.artist-card-avatar { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; color: rgba(255,255,255,0.9); }
.artist-card-body { padding: 12px 14px; flex: 1; }
.artist-card-body h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-card-body p { font-size: 12px; color: var(--muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 歌手标签列表（圆形） ===== */
#artist-list-content {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 0;
    align-content: flex-start;
}
.artist-tag {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    overflow: hidden;
    font-size: 20px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.artist-tag:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    z-index: 10;
}
.artist-tag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.artist-tag span {
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}



/* =========================================
   UI 美化 — 2026-05-21
   ========================================= */

/* 全局过渡 */
* { transition: background-color 0.2s, border-color 0.2s; }

/* 深色模式切换按钮 */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--sidebar-text);
}
.theme-toggle-btn:hover { background: var(--sidebar-bg); }

/* 页面切换动画 */
.page {
    animation: pageFadeIn 0.2s ease-out;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 卡片 Hover 效果 */
.album-card:hover, .stat-card:hover, .track-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 播放条升级 */
#player-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 72px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
}
#player-bar.active { display: flex; }

/* 2026-06-14: 管理员关掉下载 (DOWNLOAD_ENABLED=false) 时, 播放器上下载按钮不该出现
   用 body 属性控制: JS 只 toggle data-download-enabled, CSS 决定是否显
   避开 !important 优先级问题 (CSS !important 会赢 JS style.display='') */
#player-dl-btn,
#pf-download-btn {
    display: none !important;
}
body[data-download-enabled="true"] #player-dl-btn,
body[data-download-enabled="true"] #pf-download-btn {
    display: inline-block !important;
}
#player-bar .player-cover {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
#player-bar .player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#player-bar.playing .player-cover img {
    animation: coverSpin 8s linear infinite;
}
@keyframes coverSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
#player-bar .player-info {
    flex: 1;
    min-width: 0;
}
#player-bar .player-track-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#player-bar .player-artist-name {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
#player-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--accent-glow);
}
#player-play-btn:hover { background: var(--accent-hover); }
#player-seek {
    width: 180px;
    height: 4px;
    accent-color: var(--accent);
    cursor: pointer;
}
#player-time {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}
#player-volume {
    width: 70px;
    height: 4px;
    accent-color: var(--accent);
    cursor: pointer;
}
#player-bar .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--muted);
    padding: 4px;
}
#player-bar .close-btn:hover { color: var(--text); }

/* 专辑卡片美化 */
.album-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.album-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.album-card .album-cover-wrap {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* 歌手圆形标签美化 */
.artist-tag {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
}
.artist-tag:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(91,94,244,0.35);
}
.artist-tag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 按钮美化 */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.btn:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
}
.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* 统计卡片美化 */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-card);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card .num {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.stat-card .label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
}

/* 搜索栏美化 */
.search-bar input {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-card) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow-sm);
}
.search-bar input:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* 加载动画 */
.global-loading {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--accent);
    height: 3px;
    z-index: 9999;
    animation: loadingPulse 1.2s ease-in-out infinite;
}
@keyframes loadingPulse {
    0% { opacity: 1; transform: scaleX(0.3); transform-origin: left; }
    50% { opacity: 1; transform: scaleX(0.7); transform-origin: left; }
    100% { opacity: 0; transform: scaleX(1); transform-origin: left; }
}

/* 空状态插画 */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}
.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state p {
    font-size: 14px;
    line-height: 1.6;
}

/* 内容区块头部 */
.content-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.content-header p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

/* Tooltip 美化 */
#artist-tooltip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text) !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    backdrop-filter: blur(10px);
}

@keyframes lyricScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}




/* Dashboard Tab Styles */





/* Dashboard Colored Tab Styles (using CSS variables - defined below per theme) */

/* Theme-specific sidebar overrides (force .sidebar to read from body.theme-X) */
body.theme-sunset .sidebar { background: var(--sidebar); }
body.theme-ocean .sidebar { background: var(--sidebar); }
body.theme-forest .sidebar { background: var(--sidebar); }
body.theme-lavender .sidebar { background: var(--sidebar); }
body.theme-mono .sidebar { background: var(--sidebar); }
body.theme-default .sidebar { background: var(--sidebar); }

body.theme-default {
    /* --bg-hover 由 JS _applyColorTheme 写到 html inline, 此处不设 */
    --bg:#f0f2f5;--bg-card:#ffffff;--text:#1a1a2e;--text-secondary:#4a4a6a;--muted:#8888a0;--accent:#5b5ef4;--accent-hover:#4a4ae0;--border:#e2e4ea;--sidebar:#1a1a2e;--sidebar-text:#8888aa;--sidebar-active:#ffffff;
    --tab-rec: #d97706; --tab-rec-bg: rgba(245,158,11,0.12); --tab-rec-active: rgba(245,158,11,0.22);
    --tab-week: #dc2626; --tab-week-bg: rgba(239,68,68,0.1); --tab-week-active: rgba(239,68,68,0.18);
    --tab-month: #1d4ed8; --tab-month-bg: rgba(37,99,235,0.1); --tab-month-active: rgba(37,99,235,0.18);
    --tab-fav: #db2777; --tab-fav-bg: rgba(236,72,153,0.1); --tab-fav-active: rgba(236,72,153,0.18);
    --tab-pl: #9333ea; --tab-pl-bg: rgba(168,85,247,0.1); --tab-pl-active: rgba(168,85,247,0.18);
    --tab-recent: #059669; --tab-recent-bg: rgba(16,185,129,0.1); --tab-recent-active: rgba(16,185,129,0.18);

    --tab-top: #f97316; --tab-top-bg: rgba(249,115,22,0.12); --tab-top-active: rgba(249,115,22,0.22);    --sidebar-bg:#12122a;
    --tab-rec: #d97706; --tab-rec-bg: rgba(245,158,11,0.12); --tab-rec-dark: #fcd34d; --tab-rec-bg-dark: rgba(251,191,36,0.15);
    --tab-week: #dc2626; --tab-week-bg: rgba(239,68,68,0.1); --tab-week-dark: #f87171; --tab-week-bg-dark: rgba(252,129,129,0.15);
    --tab-month: #1d4ed8; --tab-month-bg: rgba(37,99,235,0.1); --tab-month-dark: #60a5fa; --tab-month-bg-dark: rgba(96,165,250,0.15);
    --tab-fav: #db2777; --tab-fav-bg: rgba(236,72,153,0.1); --tab-fav-dark: #f472b6; --tab-fav-bg-dark: rgba(244,114,182,0.15);
    --tab-pl: #9333ea; --tab-pl-bg: rgba(168,85,247,0.1); --tab-pl-dark: #c084fc; --tab-pl-bg-dark: rgba(192,132,252,0.15);
    --tab-recent: #059669; --tab-recent-bg: rgba(16,185,129,0.1); --tab-recent-dark: #34d399; --tab-recent-bg-dark: rgba(52,211,153,0.15);

    --tab-top: #f97316; --tab-top-bg: rgba(249,115,22,0.12); --tab-top-dark: #fdba74; --tab-top-bg-dark: rgba(253,186,116,0.15);}

/* Theme: Sunset (Orange) */
body.theme-sunset {
    /* --bg-hover 由 JS _applyColorTheme 写到 html inline, 此处不设 */
    --bg:#faf5f0;--bg-card:#fffcfa;--text:#2d1b0e;--text-secondary:#6b4423;--muted:#9c7a5a;--accent:#ea580c;--accent-hover:#c2410c;--border:#f0dcc8;--sidebar:#2d1b0e;--sidebar-text:#c4a882;--sidebar-active:#faf5f0;
    --tab-rec: #ea580c; --tab-rec-bg: rgba(234,88,12,0.12); --tab-rec-active: rgba(234,88,12,0.22);
    --tab-week: #dc2626; --tab-week-bg: rgba(239,68,68,0.1); --tab-week-active: rgba(239,68,68,0.18);
    --tab-month: #c2410c; --tab-month-bg: rgba(194,65,12,0.1); --tab-month-active: rgba(194,65,12,0.18);
    --tab-fav: #be185d; --tab-fav-bg: rgba(190,24,93,0.1); --tab-fav-active: rgba(190,24,93,0.18);
    --tab-pl: #7c3aed; --tab-pl-bg: rgba(124,58,237,0.1); --tab-pl-active: rgba(124,58,237,0.18);
    --tab-recent: #0d9488; --tab-recent-bg: rgba(13,148,136,0.1); --tab-recent-active: rgba(13,148,136,0.18);

    --tab-top: #ea580c; --tab-top-bg: rgba(234,88,12,0.12); --tab-top-active: rgba(234,88,12,0.22);    --sidebar-bg:#1a0f08;
    --tab-rec: #ea580c; --tab-rec-bg: rgba(234,88,12,0.12); --tab-rec-dark: #fdba74; --tab-rec-bg-dark: rgba(253,186,116,0.15);
    --tab-week: #dc2626; --tab-week-bg: rgba(239,68,68,0.1); --tab-week-dark: #fca5a5; --tab-week-bg-dark: rgba(252,165,165,0.15);
    --tab-month: #c2410c; --tab-month-bg: rgba(194,65,12,0.1); --tab-month-dark: #fed7aa; --tab-month-bg-dark: rgba(254,215,170,0.15);
    --tab-fav: #be185d; --tab-fav-bg: rgba(190,24,93,0.1); --tab-fav-dark: #f9a8d4; --tab-fav-bg-dark: rgba(249,168,212,0.15);
    --tab-pl: #7c3aed; --tab-pl-bg: rgba(124,58,237,0.1); --tab-pl-dark: #d8b4fe; --tab-pl-bg-dark: rgba(216,180,254,0.15);
    --tab-recent: #0d9488; --tab-recent-bg: rgba(13,148,136,0.1); --tab-recent-dark: #5eead4; --tab-recent-bg-dark: rgba(94,234,212,0.15);

    --tab-top: #ea580c; --tab-top-bg: rgba(234,88,12,0.12); --tab-top-dark: #fdba74; --tab-top-bg-dark: rgba(253,186,116,0.15);}

/* Theme: Ocean (Cyan/Blue) */
body.theme-ocean {
    /* --bg-hover 由 JS _applyColorTheme 写到 html inline, 此处不设 */
    --bg:#f0f8fa;--bg-card:#ffffff;--text:#0a2a3a;--text-secondary:#2a5a72;--muted:#5a8a9a;--accent:#0891b2;--accent-hover:#0369a1;--border:#c8e4ec;--sidebar:#0a2a3a;--sidebar-text:#6ab0c8;--sidebar-active:#f0f8fa;
    --tab-rec: #0891b2; --tab-rec-bg: rgba(8,145,178,0.12); --tab-rec-active: rgba(8,145,178,0.22);
    --tab-week: #0284c7; --tab-week-bg: rgba(2,132,199,0.1); --tab-week-active: rgba(2,132,199,0.18);
    --tab-month: #0369a1; --tab-month-bg: rgba(3,105,161,0.1); --tab-month-active: rgba(3,105,161,0.18);
    --tab-fav: #db2777; --tab-fav-bg: rgba(236,72,153,0.1); --tab-fav-active: rgba(236,72,153,0.18);
    --tab-pl: #7c3aed; --tab-pl-bg: rgba(168,85,247,0.1); --tab-pl-active: rgba(168,85,247,0.18);
    --tab-recent: #059669; --tab-recent-bg: rgba(5,150,105,0.1); --tab-recent-active: rgba(5,150,105,0.18);

    --tab-top: #f97316; --tab-top-bg: rgba(249,115,22,0.12); --tab-top-active: rgba(249,115,22,0.22);    --sidebar-bg:#061820;
    --tab-rec: #0891b2; --tab-rec-bg: rgba(8,145,178,0.12); --tab-rec-dark: #67e8f9; --tab-rec-bg-dark: rgba(103,232,249,0.15);
    --tab-week: #0284c7; --tab-week-bg: rgba(2,132,199,0.1); --tab-week-dark: #7dd3fc; --tab-week-bg-dark: rgba(125,211,252,0.15);
    --tab-month: #0369a1; --tab-month-bg: rgba(3,105,161,0.1); --tab-month-dark: #bae6fd; --tab-month-bg-dark: rgba(186,230,253,0.15);
    --tab-fav: #db2777; --tab-fav-bg: rgba(236,72,153,0.1); --tab-fav-dark: #f472b6; --tab-fav-bg-dark: rgba(244,114,182,0.15);
    --tab-pl: #7c3aed; --tab-pl-bg: rgba(168,85,247,0.1); --tab-pl-dark: #c084fc; --tab-pl-bg-dark: rgba(192,132,252,0.15);
    --tab-recent: #059669; --tab-recent-bg: rgba(5,150,105,0.1); --tab-recent-dark: #6ee7b7; --tab-recent-bg-dark: rgba(110,231,183,0.15);

    --tab-top: #f97316; --tab-top-bg: rgba(249,115,22,0.12); --tab-top-dark: #fdba74; --tab-top-bg-dark: rgba(253,186,116,0.15);}

/* Theme: Forest (Green) */
body.theme-forest {
    /* --bg-hover 由 JS _applyColorTheme 写到 html inline, 此处不设 */
    --bg:#f0f7f2;--bg-card:#ffffff;--text:#1a2e1f;--text-secondary:#2d5a3a;--muted:#5a8a6a;--accent:#15803d;--accent-hover:#166534;--border:#c8e4d0;--sidebar:#1a2e1f;--sidebar-text:#6aaa7a;--sidebar-active:#f0f7f2;
    --tab-rec: #15803d; --tab-rec-bg: rgba(21,128,61,0.12); --tab-rec-active: rgba(21,128,61,0.22);
    --tab-week: #b45309; --tab-week-bg: rgba(180,83,9,0.1); --tab-week-active: rgba(180,83,9,0.18);
    --tab-month: #166534; --tab-month-bg: rgba(22,101,52,0.1); --tab-month-active: rgba(22,101,52,0.18);
    --tab-fav: #be185d; --tab-fav-bg: rgba(190,24,93,0.1); --tab-fav-active: rgba(190,24,93,0.18);
    --tab-pl: #6d28d9; --tab-pl-bg: rgba(109,40,217,0.1); --tab-pl-active: rgba(109,40,217,0.18);
    --tab-recent: #047857; --tab-recent-bg: rgba(4,120,87,0.1); --tab-recent-active: rgba(4,120,87,0.18);

    --tab-top: #ea580c; --tab-top-bg: rgba(234,88,12,0.12); --tab-top-active: rgba(234,88,12,0.22);    --sidebar-bg:#0f1f14;
    --tab-rec: #15803d; --tab-rec-bg: rgba(21,128,61,0.12); --tab-rec-dark: #86efac; --tab-rec-bg-dark: rgba(134,239,172,0.15);
    --tab-week: #b45309; --tab-week-bg: rgba(180,83,9,0.1); --tab-week-dark: #fde68a; --tab-week-bg-dark: rgba(253,230,138,0.15);
    --tab-month: #166534; --tab-month-bg: rgba(22,101,52,0.1); --tab-month-dark: #bbf7d0; --tab-month-bg-dark: rgba(187,247,208,0.15);
    --tab-fav: #be185d; --tab-fav-bg: rgba(190,24,93,0.1); --tab-fav-dark: #f9a8d4; --tab-fav-bg-dark: rgba(249,168,212,0.15);
    --tab-pl: #6d28d9; --tab-pl-bg: rgba(109,40,217,0.1); --tab-pl-dark: #ddd6fe; --tab-pl-bg-dark: rgba(221,214,254,0.15);
    --tab-recent: #047857; --tab-recent-bg: rgba(4,120,87,0.1); --tab-recent-dark: #a7f3d0; --tab-recent-bg-dark: rgba(167,243,208,0.15);

    --tab-top: #ea580c; --tab-top-bg: rgba(234,88,12,0.12); --tab-top-dark: #fbbf24; --tab-top-bg-dark: rgba(251,191,36,0.15);}

/* Theme: Lavender (Purple) */
body.theme-lavender {
    /* --bg-hover 由 JS _applyColorTheme 写到 html inline, 此处不设 */
    --bg:#f8f5ff;--bg-card:#ffffff;--text:#2a1a3a;--text-secondary:#5a3a72;--muted:#8a6a9a;--accent:#7c3aed;--accent-hover:#6d28d9;--border:#e4d0f0;--sidebar:#2a1a3a;--sidebar-text:#a88ac8;--sidebar-active:#f8f5ff;
    --tab-rec: #7c3aed; --tab-rec-bg: rgba(124,58,237,0.12); --tab-rec-active: rgba(124,58,237,0.22);
    --tab-week: #db2777; --tab-week-bg: rgba(219,39,119,0.1); --tab-week-active: rgba(219,39,119,0.18);
    --tab-month: #9333ea; --tab-month-bg: rgba(147,51,234,0.1); --tab-month-active: rgba(147,51,234,0.18);
    --tab-fav: #e11d48; --tab-fav-bg: rgba(225,29,72,0.1); --tab-fav-active: rgba(225,29,72,0.18);
    --tab-pl: #4f46e5; --tab-pl-bg: rgba(79,70,229,0.1); --tab-pl-active: rgba(79,70,229,0.18);
    --tab-recent: #0f766e; --tab-recent-bg: rgba(15,118,110,0.1); --tab-recent-active: rgba(15,118,110,0.18);

    --tab-top: #f97316; --tab-top-bg: rgba(249,115,22,0.12); --tab-top-active: rgba(249,115,22,0.22);    --sidebar-bg:#1a0f2a;
    --tab-rec: #7c3aed; --tab-rec-bg: rgba(124,58,237,0.12); --tab-rec-dark: #c4b5fd; --tab-rec-bg-dark: rgba(196,181,253,0.15);
    --tab-week: #db2777; --tab-week-bg: rgba(219,39,119,0.1); --tab-week-dark: #f9a8d4; --tab-week-bg-dark: rgba(249,168,212,0.15);
    --tab-month: #9333ea; --tab-month-bg: rgba(147,51,234,0.1); --tab-month-dark: #d8b4fe; --tab-month-bg-dark: rgba(216,180,254,0.15);
    --tab-fav: #e11d48; --tab-fav-bg: rgba(225,29,72,0.1); --tab-fav-dark: #fda4af; --tab-fav-bg-dark: rgba(253,164,175,0.15);
    --tab-pl: #4f46e5; --tab-pl-bg: rgba(79,70,229,0.1); --tab-pl-dark: #a5b4fc; --tab-pl-bg-dark: rgba(165,180,252,0.15);
    --tab-recent: #0f766e; --tab-recent-bg: rgba(15,118,110,0.1); --tab-recent-dark: #5eead4; --tab-recent-bg-dark: rgba(94,234,212,0.15);

    --tab-top: #f97316; --tab-top-bg: rgba(249,115,22,0.12); --tab-top-dark: #fdba74; --tab-top-bg-dark: rgba(253,186,116,0.15);}

/* Theme: Mono (Gray) */

/* Theme: Midnight (Deep Dark) */
body.theme-midnight {
    /* --bg-hover 由 JS _applyColorTheme 写到 html inline, 此处不设 */
    --bg:#0c0e16;--bg-card:#131520;--text:#e2e4ea;--text-secondary:#8890a4;--muted:#5a6070;--accent:#5b8def;--accent-hover:#93b4f0;--border:#252836;--sidebar:#0a0b10;--sidebar-text:#5a6070;--sidebar-active:#e2e4ea;--sidebar-bg:#161922;
    --tab-rec:#f59e0b; --tab-rec-bg:rgba(245,158,11,0.15); --tab-rec-active:rgba(245,158,11,0.28);
    --tab-week:#f87171; --tab-week-bg:rgba(248,113,113,0.12); --tab-week-active:rgba(248,113,113,0.25);
    --tab-month:#60a5fa; --tab-month-bg:rgba(96,165,250,0.12); --tab-month-active:rgba(96,165,250,0.25);
    --tab-fav:#f472b6; --tab-fav-bg:rgba(244,114,182,0.12); --tab-fav-active:rgba(244,114,182,0.25);
    --tab-pl:#a78bfa; --tab-pl-bg:rgba(167,139,250,0.12); --tab-pl-active:rgba(167,139,250,0.25);
    --tab-recent:#34d399; --tab-recent-bg:rgba(52,211,153,0.12); --tab-recent-active:rgba(52,211,153,0.25);
    --tab-top: #f97316; --tab-top-bg: rgba(249,115,22,0.12); --tab-top-active: rgba(249,115,22,0.22);
}
body.theme-midnight .sidebar { background: var(--sidebar); }

body.theme-mono {
    /* --bg-hover 由 JS _applyColorTheme 写到 html inline, 此处不设 */
    --bg:#f5f5f5;--bg-card:#ffffff;--text:#111827;--text-secondary:#4b5563;--muted:#6b7280;--accent:#374151;--accent-hover:#1f2937;--border:#e5e7eb;--sidebar:#111827;--sidebar-text:#6b7280;--sidebar-active:#f5f5f5;
    --tab-rec: #374151; --tab-rec-bg: rgba(55,65,81,0.12); --tab-rec-active: rgba(55,65,81,0.22);
    --tab-week: #4b5563; --tab-week-bg: rgba(75,85,99,0.1); --tab-week-active: rgba(75,85,99,0.18);
    --tab-month: #6b7280; --tab-month-bg: rgba(107,114,128,0.1); --tab-month-active: rgba(107,114,128,0.18);
    --tab-fav: #1f2937; --tab-fav-bg: rgba(31,41,55,0.1); --tab-fav-active: rgba(31,41,55,0.18);
    --tab-pl: #111827; --tab-pl-bg: rgba(17,24,39,0.1); --tab-pl-active: rgba(17,24,39,0.18);
    --tab-recent: #0f172a; --tab-recent-bg: rgba(15,23,42,0.1); --tab-recent-active: rgba(15,23,42,0.18);

    --tab-top: #374151; --tab-top-bg: rgba(55,65,81,0.12); --tab-top-active: rgba(55,65,81,0.22);    --sidebar-bg:#0a0a0a;
    --tab-rec: #374151; --tab-rec-bg: rgba(55,65,81,0.12); --tab-rec-dark: #d1d5db; --tab-rec-bg-dark: rgba(209,213,219,0.15);
    --tab-week: #4b5563; --tab-week-bg: rgba(75,85,99,0.1); --tab-week-dark: #e5e7eb; --tab-week-bg-dark: rgba(229,231,235,0.15);
    --tab-month: #6b7280; --tab-month-bg: rgba(107,114,128,0.1); --tab-month-dark: #f3f4f6; --tab-month-bg-dark: rgba(243,244,246,0.15);
    --tab-fav: #1f2937; --tab-fav-bg: rgba(31,41,55,0.1); --tab-fav-dark: #e5e7eb; --tab-fav-bg-dark: rgba(229,231,235,0.15);
    --tab-pl: #111827; --tab-pl-bg: rgba(17,24,39,0.1); --tab-pl-dark: #f9fafb; --tab-pl-bg-dark: rgba(249,250,251,0.15);
    --tab-recent: #0f172a; --tab-recent-bg: rgba(15,23,42,0.1); --tab-recent-dark: #f1f5f9; --tab-recent-bg-dark: rgba(241,245,249,0.15);

    --tab-top: #374151; --tab-top-bg: rgba(55,65,81,0.12); --tab-top-dark: #d1d5db; --tab-top-bg-dark: rgba(209,213,219,0.15);}

/* ============================================
   Tab Button Theme Styles
   ============================================ */
.dash-tab {
    border: none !important;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 14px;
    transition: all 0.25s;
    font-weight: 500;
}
.dash-tab:hover { filter: brightness(0.92); }
.dash-tab.active { font-weight: 700; background: var(--tab-rec-active); color: var(--tab-rec); box-shadow: 0 -3px 10px rgba(0,0,0,0.08); }

/* Apply theme colors to tabs using CSS variables */
.dash-tab[data-tab="rec"] { color: var(--tab-rec); background: var(--tab-rec-bg); }
.dash-tab[data-tab="rec"].active { background: var(--tab-rec-active); color: var(--tab-rec); }

.dash-tab[data-tab="week"] { color: var(--tab-week); background: var(--tab-week-bg); }
.dash-tab[data-tab="week"].active { background: var(--tab-week-active); color: var(--tab-week); }

.dash-tab[data-tab="month"] { color: var(--tab-month); background: var(--tab-month-bg); }
.dash-tab[data-tab="month"].active { background: var(--tab-month-active); color: var(--tab-month); }

.dash-tab[data-tab="fav"] { color: var(--tab-fav); background: var(--tab-fav-bg); }
.dash-tab[data-tab="fav"].active { background: var(--tab-fav-active); color: var(--tab-fav); }

.dash-tab[data-tab="pl"] { color: var(--tab-pl); background: var(--tab-pl-bg); }
.dash-tab[data-tab="pl"].active { background: var(--tab-pl-active); color: var(--tab-pl); }

.dash-tab[data-tab="recent"] { color: var(--tab-recent); background: var(--tab-recent-bg); }
.dash-tab[data-tab="recent"].active { background: var(--tab-recent-active); color: var(--tab-recent); }

.dash-tab[data-tab="top"] { color: var(--tab-top); background: var(--tab-top-bg); }
.dash-tab[data-tab="top"].active { background: var(--tab-top-active); color: var(--tab-top); }

/* ============================================
   Theme Selector in Settings
   ============================================ */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.theme-card {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}
.theme-card:hover { border-color: var(--muted); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,113,227,0.2); }
.theme-name { font-size: 13px; margin-bottom: 8px; }
.theme-swatches { display: flex; gap: 4px; justify-content: center; }
.theme-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); }

/* ============================================
   Player Bar — Scrolling Lyrics
   ============================================ */
@keyframes lyric-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

#player-lyric-line {
    display: block;
    max-width: 300px;
    white-space: nowrap;
    overflow: visible;   /* 让动画露出来 */
    text-overflow: ellipsis;
}

#player-lyric-line.scrolling {
    overflow: hidden;
    animation: lyric-scroll var(--lyric-duration, 8s) linear infinite;
    /* 文字向左滚动的速度由 --lyric-duration 控制 */
}

#player-lyric-line.scrolling:hover {
    animation-play-state: paused;
}




    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-group > .nav-summary::-webkit-details-marker { display: none; }
.admin-group > .nav-summary:hover { background: var(--hover, rgba(255,255,255,0.05)); color: var(--text); }
.admin-group > .nav-summary .admin-arrow { transition: transform 0.2s; font-size: 11px; }
.admin-group[open] > .nav-summary .admin-arrow { transform: rotate(90deg); }
.admin-group .admin-sub { padding-left: 0; margin-top: 2px; }
.admin-group .admin-sub .nav-item { padding-left: 28px; font-size: 13px; }

.nav-item.admin-only { display: none; }
/* 2026-06-12: 任何带 admin-only class 的元素默认隐藏 (不只是 nav-item) */
.admin-only { display: none !important; }
/* 2026-06-12: 管理员用户时, body.user-admin 下的 admin-only 恢复为 inline-flex (覆盖 !important) */
body.user-admin .admin-only { display: flex !important; }

/* === 2026-06-09: 服务与接口 settings 卡片布局 === */
/* 桌面: 2 列网格, Last.fm 跨 2 行 (左大), LRC + Discogs 上下堆 (右小) */
.svc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}
.svc-cell-tall { grid-row: span 2; }
@media (max-width: 720px) {
    /* 窄屏 fallback: 单列堆叠 */
    .svc-grid { grid-template-columns: 1fr; }
    .svc-cell-tall { grid-row: auto; }
}

/* ===== 移动端 stat-card 兑底 (文件末尾覆盖上面 .stat-card 块) ===== */
@media (max-width: 768px) {
    .stats-bar {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
    }
    .stat-card {
        padding: 10px 8px !important;
        min-width: 0;
    }
    .stat-card .num {
        font-size: 18px !important;
    }
    .stat-card .label {
        font-size: 11px !important;
    }
}

/* ===== 响应式网格断点总表 (从大到小) =====
 *  PC      (>=1280px)  : 容器最大 1100px 居中, auto-fill minmax(180px)
 *  小PC     (>=1024px)  : 容器 100%, auto-fill minmax(170px)
 *  平板横屏 (768-1024)  : auto-fill minmax(150px)
 *  平板竖屏 (481-768)   : auto-fill minmax(130px)
 *  手机横屏 (<=480px)   : auto-fill minmax(110px)
 *  手机竖屏 (<=360px)   : auto-fill minmax(90px)
 *  上一套是 < 768px 固定 3 列, 列数不随宽度变; 现在改 auto-fill 自动增减
 */

/* 大屏 PC: 限制最大宽度, 别让 4K 屏塞 10 列 */
@media (min-width: 1280px) {
    .album-grid,
    .artist-grid {
        max-width: 1240px;
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    }
}

/* 平板横屏 / iPad Pro 11" (768-1024): 比之前 140px 略大 */
@media (min-width: 768px) and (max-width: 1024px) {
    .album-grid,
    .artist-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 12px !important;
    }
}

/* 平板竖屏 / 手机横屏 (481-768) */
@media (min-width: 481px) and (max-width: 768px) {
    .album-grid,
    .artist-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 10px !important;
    }
    .artist-grid .artist-card-body { padding: 8px 10px !important; }
    .artist-grid .artist-card-body h3 { font-size: 12px !important; }
    .artist-grid .artist-card-body p { font-size: 10px !important; }
    .album-grid .album-card .info { padding: 8px !important; }
    .album-grid .album-card h4 { font-size: 12px !important; }
    .album-grid .album-card p { font-size: 10px !important; }
    .album-grid .album-card .cover { font-size: 32px !important; }
}

/* 手机竖屏 (<=480px) — 之前固定 3 列, 现在 auto-fill */
@media (max-width: 480px) {
    .album-grid,
    .artist-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
        gap: 8px !important;
    }
    .artist-grid .artist-card-avatar { font-size: 28px !important; }
    .artist-grid .artist-card-body { padding: 8px !important; }
    .artist-grid .artist-card-body h3 { font-size: 11px !important; }
    .artist-grid .artist-card-body p { font-size: 9px !important; }
    .album-grid .album-card .cover { font-size: 28px !important; }
    .album-grid .album-card .info { padding: 6px !important; }
    .album-grid .album-card h4 { font-size: 11px !important; }
    .album-grid .album-card p { font-size: 9px !important; }
}

/* 超小屏 (<=360px) - 旧小屏机/分割屏 */
@media (max-width: 360px) {
    .album-grid,
    .artist-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
        gap: 6px !important;
    }
    .album-grid .album-card .info { padding: 4px !important; }
    .album-grid .album-card h4 { font-size: 10px !important; }
    .album-grid .album-card p { font-size: 8px !important; }
}

/* ===== 歌手页 (flex wrap, 不用 .artist-grid) =====
   .artist-tag 是按歌手专辑数分级的圆形 (JS 动态设 width/height 56-120px),
   不是响应式 grid. JS 里 .artist-tag.style.width/height 会覆盖这里的 flex,
   所以这里只调 gap, 不动尺寸.
   原 33vw 计算是给 flex 容器的兑底, 保留. */
#artist-list-content {
    gap: 10px;
    justify-content: flex-start;
}
@media (max-width: 768px) {
    #artist-list-content { gap: 8px !important; justify-content: center !important; }
}

/* ===== 移动端 theme-grid 3 列 (兑底) ===== */
@media (max-width: 768px) {
    .theme-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .theme-card {
        padding: 8px !important;
    }
    .theme-name {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }
    .theme-swatch {
        width: 12px !important;
        height: 12px !important;
    }
}

/* ===== 移动端 theme-card 内子框 (兑底) ===== */
@media (max-width: 768px) {
    .theme-card {
        overflow: hidden;
    }
    .theme-name {
        font-size: 10px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .theme-swatches {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 3px !important;
    }
    .theme-swatch {
        width: 10px !important;
        height: 10px !important;
    }
}

/* ===== 歌手详情页移动端适配 ===== */
@media (max-width: 768px) {
    /* header 改成上下结构 */
    .artist-detail-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 16px !important;
        padding: 16px 0 !important;
    }
    .artist-avatar {
        width: 96px !important;
        height: 96px !important;
        font-size: 38px !important;
    }
    .artist-type-label {
        display: none;
    }
    .artist-name {
        font-size: 22px !important;
    }
    .artist-meta {
        justify-content: center !important;
        font-size: 13px !important;
    }
    .artist-genres {
        justify-content: center !important;
    }

    /* 热门歌曲表格 - 移动端处理 */
    .track-list-table {
        font-size: 13px;
    }
    .track-list-table th,
    .track-list-table td {
        padding: 8px 10px !important;
    }
    /* 隐藏专辑列（标题下已显示） */
    .track-list-table th:nth-child(3),
    .track-list-table td.track-album {
        display: none !important;
    }
    .track-list-table th:nth-child(1),
    .track-list-table td.track-num {
        width: 32px !important;
    }
    .track-list-table th:nth-child(4),
    .track-list-table td.track-dur {
        width: 50px !important;
        text-align: right !important;
    }
    .track-list-table .track-info .track-sub {
        font-size: 11px !important;
    }

    /* 专辑grid已统一处理 */
}

/* ===== 歌手列表页移动端优化 ===== */
@media (max-width: 768px) {
    /* 搜索框全宽 */
    .search-bar { flex-wrap: wrap !important; }
    .search-bar input[type="text"] { flex: 1 1 100% !important; min-width: 0 !important; margin-bottom: 8px !important; }
    .search-bar .btn-group { flex-wrap: wrap !important; gap: 4px !important; }

    /* 筛选/排序按钮缩小 */
    .search-bar .btn-group .btn { font-size: 12px !important; padding: 4px 10px !important; }

    /* 字母栏固定，不横滚 */
    .artist-letter-bar { flex-wrap: wrap !important; overflow-x: visible !important; justify-content: center !important; gap: 2px !important; }
    .letter-item { min-width: 24px !important; height: 26px !important; font-size: 11px !important; padding: 0 4px !important; }

    /* 歌手列表 3 列 + 圆头大小统一为 30vw 左右（容纳名字 tooltip 视觉对齐） */
    #artist-list-content { gap: 10px !important; padding: 12px 0 !important; }
    .artist-tag {
        width: calc((100vw - 60px) / 3) !important;
        height: calc((100vw - 60px) / 3) !important;
        font-size: 16px !important;
    }

    /* 圆头下的文字 label（如果加了） */
    .artist-tag-label {
        margin-top: 4px;
        font-size: 11px;
        text-align: center;
        color: var(--text);
        line-height: 1.2;
        max-width: calc((100vw - 60px) / 3);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===== 专辑列表页移动端适配 ===== */
@media (max-width: 768px) {
    /* 专辑列表 2 列 */
    .album-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .album-list .album-card .cover { font-size: 32px !important; }
    .album-list .album-card .info { padding: 8px !important; }
    .album-list .album-card h4 { font-size: 13px !important; }
    .album-list .album-card p { font-size: 11px !important; }
    .album-list .album-card .meta { font-size: 10px !important; }

    /* 排序/每页/分类按钮行紧凑 */
    .search-bar { flex-wrap: wrap !important; }
    .search-bar > input[type="text"] { flex: 1 1 100% !important; min-width: 0 !important; margin-bottom: 8px !important; }

    /* 分类按钮 wrap + 缩小 */
    .search-bar > div[style*="flex-wrap"] { gap: 6px !important; }
    .search-bar .btn { font-size: 12px !important; padding: 5px 10px !important; }

    /* 排序行 wrap */
    .search-bar > div[style*="align-items:center"] { flex-wrap: wrap !important; }

    /* 翻页按钮小一点 */
    .pagination button { font-size: 12px !important; padding: 5px 8px !important; min-width: 28px !important; }
}

/* ===== 专辑详情页移动端适配 ===== */
@media (max-width: 768px) {
    /* 专辑 cover 缩小 + 名字缩 */
    .album-info-panel > div:first-child { gap: 12px !important; margin-bottom: 12px !important; }
    #album-cover-container {
        width: 120px !important;
        height: 120px !important;
    }
    .album-info-panel h2 { font-size: 17px !important; }
    .album-info-panel p { font-size: 12px !important; }

    /* toolbar 紧凑 */
    .album-toolbar { gap: 6px !important; }
    .album-toolbar .btn { font-size: 12px !important; padding: 5px 8px !important; }

    /* ===== 曲目表格：保持表格，只精简列 ===== */
    .track-table-wrap table { min-width: 0; }
    /* 隐藏"格式"列 */
    .track-table-wrap table thead th:nth-child(4),
    .track-table-wrap table tbody tr td:nth-child(4) { display: none !important; }
    /* 缩窄时间列 */
    .track-table-wrap table thead th.tdur,
    .track-table-wrap table tbody tr td.tdur { padding-left: 4px !important; padding-right: 4px !important; font-size: 11px !important; }
    /* 隐藏后三列（播放/收藏/歌单）— 长按弹菜单代替 */
    .track-table-wrap table thead th:nth-child(5),
    .track-table-wrap table thead th:nth-child(6),
    .track-table-wrap table thead th:nth-child(7),
    .track-table-wrap table tbody tr td:nth-child(5),
    .track-table-wrap table tbody tr td:nth-child(6),
    .track-table-wrap table tbody tr td:nth-child(7) { display: none !important; }
    /* 缩小全局 padding 让表格不那么挤 */
    .track-table-wrap table thead th { padding: 8px 6px !important; font-size: 10px !important; }
    .track-table-wrap table tbody tr td { padding: 6px 4px !important; }
}

/* ===== 歌曲列表行内操作按钮（SVG） ===== */
.row-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.row-action-btn:hover {
    color: var(--accent);
    background: var(--bg);
}
.row-action-btn svg {
    display: block;
    pointer-events: none;
}

/* ===== 歌曲列表移动端简化模式 ===== */
@media (max-width: 768px) {
    /* 表格：紧湩 padding */
    .track-table { font-size: 14px; }
    .track-table thead th { padding: 8px 4px !important; font-size: 10px !important; font-weight: 600; }
    .track-table tbody td { padding: 8px 4px !important; }

    /* 隐藏 # 列 */
    .track-table thead th:nth-child(1),
    .track-table tbody td:nth-child(1) { display: none !important; }

    /* 隐藏操作列（长按弹菜单代替） */
    .track-table thead th:nth-child(4),
    .track-table tbody td:nth-child(4) { display: none !important; }

    /* 标题列：占剩余空间，ellipsis */
    .track-table tbody td:nth-child(2) > div {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .track-table tbody td:nth-child(2) > div > div {
        min-width: 0;
        flex: 1;
    }
    .track-table tbody td:nth-child(2) > div > div > div {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 时长列：右对齐 */
    .track-table thead th:nth-child(3),
    .track-table tbody td:nth-child(3) {
        text-align: right;
        font-size: 12px;
        color: var(--muted);
        width: 60px;
    }

    /* 行高：轻点增加，便于触摸 */
    .track-table tbody tr.track-row { height: 56px; }
}


/* =========================================================
   v4.2 AI 时段 Banner 移动端适配
   ========================================================= */
.time-banner {
    /* 桌面: 顶部留 8px 间距, 不被任何 header 遮挡 */
    margin-top: 8px;
}

/* 移动端: main-content padding-top 58px 不够 banner (banner 240px 高)
   需要额外让出空间让 banner 不被 mobile-header (76px) 遮挡
   桌面: 无 mobile-header, 这个 rule 不生效 */
@media (max-width: 1024px) {
    .time-banner {
        /* mobile-header 高 76px (44+32), main-content 已 padding-top 58px
           banner 顶部再加 18px 间距, 跟 main-content 顶部对齐 */
        margin-top: 0;
    }
    /* 移动端把 cover 缩小, 整体更紧凑 */
    .time-banner-cover {
        width: 100px !important;
        height: 100px !important;
    }
    .time-banner-title {
        font-size: 20px !important;
    }
    .time-banner-artist {
        font-size: 13px !important;
    }
    .time-banner-greeting {
        font-size: 11px !important;
    }
    .time-banner-reason {
        font-size: 12px !important;
    }
}

/* =========================================================
   v4.2 AI 时段 Banner 背景 + 主题适配
   ========================================================= */
.time-banner {
    /* 默认: 时段渐变 (5 种) */
    margin-top: 8px;
    min-height: 200px;
    /* 2026-06-18: 设 border-radius 让 ::before/::after 走 inherit 正确跟随
       (之前只写在 inline style, ::before/::after 用 inherit 时继承的是.page.active 无圆角) */
    border-radius: 16px;
    /* 立体感: 下边框高光线 */
    border-bottom: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

/* 加载到背景封面后: 模糊 + 暗化覆盖在时段渐变上 */
.time-banner--has-bg {
    background-blend-mode: overlay;
}

/* 背景层 (::before 模糊 + saturate 增强, 轻微暗化让文字可读) */
.time-banner--has-bg::before {
    content: '';
    position: absolute;
    inset: -30px;  /* 2026-06-18: 扩大超出边界, 避免 blur(50px) 裁切后在圆角留灰色边缘 */
    background: inherit;
    background-size: cover;
    background-position: center;
    /* 2026-06-18 调整: brightness 0.4 → 0.7 (太暗看不清封面颜色了)
       saturate 1.2 → 1.5 (让封面颜色更鲜艳)
       blur 40px → 50px (模糊更明显) */
    filter: blur(50px) saturate(1.5) brightness(0.7);
    z-index: 0;
    pointer-events: none;
    /* 让背景延续到 border-radius 外, 避免边缘空隙 */
    border-radius: inherit;
}

/* 暗化 overlay (轻微, 仅保证文字可读) */
.time-banner--has-bg::after {
    content: '';
    position: absolute;
    inset: -30px;  /* 2026-06-18: 同步扩大, 配合 ::before */
    /* 2026-06-18 调整: 35% 黑色 → 15% (太重, 让背景看不出来)
       渐变方向保留, 左上深一点, 右下透明 */
    background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 100%);
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
}

/* 确保主内容在背景层之上 */
.time-banner--has-bg > * { position: relative; }
.time-banner--has-bg > div[style*="z-index:1"],
.time-banner--has-bg > div[style*="z-index:2"] { z-index: 3 !important; }
.time-banner--has-bg > .time-banner-accent-bar { z-index: 4 !important; }

/* 移动端: 调小 cover 尺寸, 调高密度 */
@media (max-width: 1024px) {
    .time-banner {
        margin-top: 0;
        padding: 16px !important;
        /* 移动端 banner 高度小, blur(50px) 裁切后圆角灰色更明显
           额外放大 ::before/::after, 避免裁切到模糊密集区 */
    }
    .time-banner--has-bg::before,
    .time-banner--has-bg::after {
        inset: -60px !important;
    }
    /* iOS Safari/PWA: border-radius + overflow:hidden + filter:blur 有 bug,
       ::before 的 blur 边缘不会被正确裁切到圆角内, 导致四角有灰色溢出。
       移除 ::before 的 blur, 使用 banner 自身背景色 + 渐变 overlay 兜底 */
    .time-banner--has-bg::before {
        filter: none !important;
        background: rgba(0,0,0,0.35);
    }
    .time-banner-cover {
        width: 100px !important;
        height: 100px !important;
    }
    .time-banner-title {
        font-size: 20px !important;
    }
    .time-banner-artist {
        font-size: 13px !important;
    }
    .time-banner-greeting {
        font-size: 11px !important;
    }
    .time-banner-reason {
        font-size: 12px !important;
    }
    .time-banner-playall, .time-banner-refresh {
        font-size: 12px !important;
        padding: 6px 14px !important;
    }
}

/* ===== 2026-11-03 v4.2.169: banner 5 首 → 8 首 =====
   8 个圆点比 5 个宽, 居中会和右下角副标题 (为你精选 N 首) 重叠。
   窄屏下圆点换行成两排, 副标题让位。 */
.time-banner-dots {
    max-width: 60%;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 6px;
}

@media (max-width: 1024px) {
    .time-banner-dots {
        max-width: 52%;
        bottom: 10px !important;
    }
    /* 副标题移到圆点上方一行, 避免横向撞车 */
    .time-banner-subtitle {
        bottom: 30px !important;
        right: 16px !important;
        font-size: 10px !important;
    }
}

/* ===== admin.css — 系统设置, 音量浮层, 队列面板, 个人设置 ===== */

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        .settings-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
        .settings-card h3 { font-size: 15px; color: var(--accent); margin-bottom: 8px; }
        .settings-card .desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
        .settings-card .current { font-size: 12px; color: var(--muted); margin-bottom: 8px; word-break: break-all; }
        .settings-card input[type="text"],
        .settings-card input[type="number"],
        .settings-card input[type="password"] { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px; color: var(--text); font-size: 14px; }
        .settings-card input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
        .settings-card .checkbox-row { display: flex; align-items: center; gap: 10px; }
        .settings-card .checkbox-row label { cursor: pointer; color: var(--text); }
        .settings-card .warning { background: rgba(210,153,34,0.15); border: 1px solid #d29922; border-radius: 6px; padding: 10px; font-size: 12px; color: #d29922; margin-bottom: 12px; }
        .settings-card.full-width { grid-column: 1 / -1; }
        .save-btn { background: var(--success); color: var(--bg); padding: 10px 30px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; margin-top: 20px; }
        .save-btn:hover { opacity: 0.85; }
/* 移动端音量浮层指示器 */
#volume-indicator {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 12px 20px;
    font-size: 14px;
    color: white;
    pointer-events: none;
    animation: volFadeIn 0.2s ease-out;
}
#volume-indicator #vi-icon { font-size: 20px; }
#volume-indicator #vi-bar {
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}
#volume-indicator #vi-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.05s;
}
@keyframes volFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 播放器歌词跑马灯 */
#player-lyrics-marquee {
    animation: marquee 12s linear infinite;
    overflow: hidden;
}
#player-lyrics-marquee.paused {
    animation-play-state: paused;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
#player-lyrics-marquee-wrapper {
    overflow: hidden;
    width: 100%;
}

/* 播放队列面板 */

#queue-content {
    padding: 8px;
    overflow-y: auto;
    max-height: 280px;
}
/* 播放器歌词跑马灯 */

/* 播放器歌词跑马灯 */
#player-lyrics-marquee {
    font-size: 11px;
    color: var(--muted);
    height: 16px;
    line-height: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}
#player-lyrics-marquee.playing {
    animation: marquee-scroll 12s linear infinite;
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* 播放队列面板 */
#player-queue-panel {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 260px;
    width: 320px;
    max-height: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 899;
    overflow: hidden;
}
/* 全屏模式: 从全屏底部滑出, 占下半屏 (z-index 高于全屏 100000) */
#player-queue-panel.fs-mode {
    bottom: 0; left: 0; right: 0;
    width: auto;
    max-width: 100vw;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
    z-index: 100100;
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    animation: queueFsSlideUp 0.25s ease;
}
@keyframes queueFsSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
#queue-content {
    padding: 8px;
    overflow-y: auto;
    max-height: 280px;
}
#player-lyrics-panel {
    display: none;
    position: fixed;
    bottom: 60px;
    right: 264px;
    width: 300px;
    max-height: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 899;
    overflow: hidden;
}
#player-lyrics-content {
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.8;
}

/* 个人设置页 */
.lastfm-status { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: 8px; margin-bottom: 12px; }
.lastfm-status.linked { border: 1px solid rgba(48,209,88,0.3); }
.lastfm-status.unlinked { border: 1px solid var(--border); }
.lastfm-badge { font-size: 20px; }
.lastfm-info { flex: 1; }
.lastfm-name { font-weight: 600; font-size: 15px; color: var(--text); }
.lastfm-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 管理员专属菜单项 - 隐藏状态 */
/* 2026-06-13: 管理员菜单分组 (默认收缩) */
.admin-group { display: none; margin: 8px 0; }
body.user-admin .admin-group { display: block; }
.admin-group > .nav-summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 16px;
    color: var(--muted);
    font-size: 13px;
    user-select: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== common.css — ActionSheet, 曲目表格, 卡片化, 折叠 ===== */

.actionsheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.actionsheet-backdrop.show {
    opacity: 1;
}
.actionsheet {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 8px 0 16px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}
.actionsheet-backdrop.show .actionsheet {
    transform: translateY(0);
}
.actionsheet-header {
    padding: 14px 20px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.actionsheet-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.actionsheet-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.actionsheet-actions {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}
.actionsheet-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.15s;
}
.actionsheet-btn:hover,
.actionsheet-btn:active {
    background: var(--bg);
}
.actionsheet-btn svg {
    flex-shrink: 0;
    color: var(--accent);
}
.actionsheet-cancel {
    display: block;
    width: calc(100% - 24px);
    margin: 8px 12px 0;
    padding: 12px;
    background: var(--bg);
    border: none;
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

/* ===== 曲目表格整体间距优化（PC + Mobile 通用） ===== */
.track-table-wrap {
    /* 跟 .main-content 边对齐，不额外加 padding */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.track-table-wrap .track-table {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    table-layout: auto;
    width: 100%;
    min-width: 0;
}
.track-table-wrap .track-table th {
    padding: 12px 20px;
    background: var(--bg);
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.track-table-wrap .track-table td {
    padding: 14px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}
.track-table-wrap .track-row:last-child td {
    border-bottom: none;
}
/* hover 整行高亮 */
.track-table-wrap .track-row {
    transition: background 0.15s;
}
.track-table-wrap .track-row:hover td {
    background: var(--bg);
}

/* 移动端：减少 padding 适配小屏 */
@media (max-width: 768px) {
    .track-table-wrap { padding: 0 8px; }
    .track-table-wrap .track-table th { padding: 10px 14px; font-size: 10px; }
    .track-table-wrap .track-table td { padding: 12px 14px; }
}

/* ===== 专辑曲目卡片化（概览页风格） ===== */
.track-cards-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.track-card {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 0 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.track-card:hover {
    background: var(--bg);
    border-color: var(--accent);
}
.track-card-num {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}
/* 2026-11-11: 多碟专辑的序号列 —— "CD2" 小标签 + 曲目号, 上下两行 */
.track-card-num.track-card-num-disc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.15;
}
.track-card-num .cd-tag {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--accent);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0 3px;
    white-space: nowrap;
}
.track-card-num .cd-num {
    font-size: 12px;
}
.track-card-main {
    min-width: 0;
}
.track-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-card-sub {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 2px;
}
.track-card-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}
.track-card-actions .row-action-btn {
    padding: 6px;
}

/* 移动端卡片化微调 */
@media (max-width: 768px) {
    .track-card { padding: 10px 12px; gap: 0 8px; }
    .track-card-num { font-size: 12px; }
    .track-card-title { font-size: 13px; }
    .track-card-sub { font-size: 10px; }
    .track-card-actions .row-action-btn { padding: 4px; }
    .track-card-actions .row-action-btn svg { width: 14px; height: 14px; }
}

/* 全部歌曲页 卡片封面图 (有封面的版本) */
.track-card-cover {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
}
.track-card:has(.track-card-cover) {
    grid-template-columns: 32px 42px 1fr auto;
}
@media (max-width: 768px) {
    .track-card-cover { width: 36px; height: 36px; }
    .track-card:has(.track-card-cover) {
        grid-template-columns: 24px 36px 1fr auto;
    }
}

/* ===== 全部歌曲页 搜索/筛选行 移动端 2 列紧凑布局 ===== */
@media (max-width: 768px) {
    /* 容器允许 wrap */
    #page-tracks > div:nth-of-type(2) {
        gap: 6px !important;
    }
    /* input/select 2 列布局, 各占 50% 减 gap */
    #track-search,
    #track-artist-filter,
    #track-genre-filter,
    #track-year-filter {
        flex: 1 1 calc(50% - 3px) !important;
        min-width: 0 !important;
        width: auto !important;
        padding: 6px 8px !important;
        font-size: 12px !important;
        box-sizing: border-box;
    }
    /* 搜索框独占一行, 更醒目 */
    #track-search {
        flex: 1 1 100% !important;
    }
    /* 总数自己占一行 */
    #track-total-count {
        flex: 1 1 100% !important;
        margin-left: 0 !important;
        font-size: 11px !important;
        text-align: right;
        margin-top: 2px;
    }
}

/* 折叠 section 通用样式 (系统设置 + 个人设置) */
.sec-header {
    cursor: pointer;
    user-select: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sec-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}
.sec-body {
    padding: 16px;
}
/* 个人设置页 - 移动端适配 */
@media (max-width: 600px) {
    .sec-header {
        padding: 10px 12px;
        font-size: 10px;
    }
    .sec-body {
        padding: 12px;
    }
}

/* ===== 左滑操作 (Swipe) ===== */
/* 从 shared.css 迁移到独立模块 — 2026-06-18 */

/* 左滑操作: track-card 加 .swipeable class 后支持左滑
   背后露出的快捷按钮在 .track-card-swipe-actions */
.track-card.swipeable {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
/* 2026-06-16: Swipe wrap 包裹在 track-card 内部但不参与 grid
   用 position: relative + width: 0 + overflow: visible 让子元素
   (track-card-num / main / actions) 不占 grid 空间, 而是作为 track-card 的 grid 子元素
   
   实际子元素在 HTML 里真正顺序是: track-card > swipe-wrap + swipe-actions
   swipe-wrap: 透明的 flex 容器, 没 width 限制, 内容自然堆叠在 grid cell 里 */
/* 2026-06-16: swipe-wrap 占满 track-card grid 所有列
   内部用 flex 排列子元素, translateX 做左滑动画 */
.track-card-swipe-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    grid-column: 1 / -1;
    box-sizing: border-box;
    transition: transform 0.18s ease-out;
    background: var(--bg-card);
}
.track-card-swipe-wrap > .track-card-num {
    flex: 0 0 32px;
    text-align: center;
}
.track-card-swipe-wrap > .track-card-cover {
    flex: 0 0 42px;
}
.track-card-swipe-wrap > .track-card-main {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}
.track-card-swipe-wrap > .track-card-actions {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden;
    pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
    .track-card-swipe-wrap > .track-card-actions {
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        overflow: visible;
        pointer-events: auto;
    }
}
.track-card-swipe-wrap.swiping {
    transition: none;
}
.track-card-swipe-actions {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.18s ease-out;
    z-index: 1;
}
.track-card.swipeable.swiping .track-card-swipe-actions,
.track-card.swipeable.swipe-open .track-card-swipe-actions {
    transform: translateX(0);
}
.track-card-swipe-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    flex-shrink: 0;
    padding: 0 8px;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    gap: 2px;
    white-space: nowrap;
}
.track-card-swipe-btn.fav { background: #e74c3c; }
.track-card-swipe-btn.playlist { background: var(--accent); }
.track-card-swipe-btn svg { display: block; }
.track-card-swipe-btn:active { opacity: 0.85; }

@media (hover: hover) and (pointer: fine) {
    .track-card-swipe-actions { display: none; }
}

/* ===== 骨架屏 (Skeleton) ===== */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-card) 0%,
        var(--bg) 50%,
        var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 6px;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 12px; margin: 4px 0; }
.skeleton-text-lg { height: 16px; margin: 6px 0; }
.skeleton-circle { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.skeleton-card { padding: 12px; }
.skeleton-card .skeleton-line {
    display: block;
    height: 12px;
    background: linear-gradient(90deg,
        var(--bg-card) 0%,
        var(--bg) 50%,
        var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
    margin: 6px 0;
}

/* ===== 下拉刷新 ===== */
.pull-to-refresh-indicator {
    height: 0;
    overflow: hidden;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    transition: height 0.2s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.pull-to-refresh-indicator.pulling { height: 50px; }
.pull-to-refresh-indicator.refreshing { height: 50px; }
.pull-to-refresh-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--muted);
    border-top-color: transparent;
    border-radius: 50%;
    animation: ptr-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

/* 2026-06-21 v4.3: 电台编排样式 */
/* v4.3.1: 所有硬编码颜色替换为 CSS 变量，9主题适配 + 移动端响应式 */

.radio-page { max-width: 900px; margin: 0 auto; }

/* 关闭 / 无编排 */
.radio-closed {
    text-align: center;
    padding: 80px 20px;
}
.radio-closed-icon { font-size: 64px; margin-bottom: 16px; }
.radio-closed h2 { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.radio-closed p { font-size: 14px; color: var(--muted); }

/* 播放器头部 */
.radio-player-header {
    position: relative;
    padding: 32px 24px 20px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}
.radio-player-bg {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    z-index: 0;
}
.radio-player-header h2 {
    position: relative;
    z-index: 1;
    font-size: 24px;
    margin: 0 0 8px;
    color: var(--text);
}
.radio-player-meta {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: var(--muted);
}
.radio-diy-link {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
.radio-diy-link:hover { border-color: var(--accent); background: var(--bg); }

/* 时段 accordion */
.radio-hours { display: flex; flex-direction: column; gap: 6px; }
.radio-hour-tab {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}
/* 状态变体 */
.radio-hour-past { opacity: 0.45; }
.radio-hour-past .radio-hour-toggle { cursor: default; }
.radio-hour-live {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.radio-hour-future { opacity: 0.65; }
.radio-hour-future .radio-hour-toggle { cursor: default; }
.radio-hour-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.radio-hour-toggle:hover { background: var(--bg); }
.radio-hour-chevron {
    font-size: 10px;
    color: var(--muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.radio-hour-tab.open .radio-hour-chevron { transform: rotate(90deg); }
.radio-hour-time {
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.radio-hour-summary {
    font-size: 12px;
    color: var(--muted);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.radio-hour-now {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
}

/* 时段状态 badge */
.radio-hour-badge {
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 10px;
}
.badge-live {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
}
.badge-past { background: var(--bg); color: var(--muted); }
.badge-future { background: var(--bg); color: var(--muted); }
.radio-hour-body {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px 14px;
}
.radio-hour-tab.open .radio-hour-body { display: flex; }

/* 时间块 */
.radio-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    transition: box-shadow 0.2s;
}
.radio-block:hover { box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
.radio-block-music { border-left: 3px solid var(--accent); }
.radio-block-talk {
    border-left: 3px solid var(--radio-talk);
    background: color-mix(in srgb, var(--radio-talk) 4%, transparent);
}
.radio-block-news { border-left: 3px solid var(--danger); }
.radio-block-weather { border-left: 3px solid var(--accent); }
.radio-block-fact { border-left: 3px solid var(--success); }
.radio-block-ad { border-left: 3px solid var(--muted); opacity: 0.7; }

.radio-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.radio-block-icon { font-size: 14px; }
.radio-block-time {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.radio-block-type { font-size: 11px; color: var(--muted); margin-left: auto; }
.radio-block-body { }
.radio-block-genre {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: white;
    font-weight: 500;
    margin-right: 6px;
    background: var(--accent);
}
.radio-block-mood { font-size: 11px; color: var(--muted); }
.radio-block-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 8px;
}
.radio-block-talk-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    margin-top: 4px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--radio-talk) 8%, transparent);
    border-radius: 8px;
    font-style: italic;
}

/* 歌曲列表 */
.radio-block-tracks { margin-top: 8px; }
.radio-track-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-bottom: 1px solid var(--bg);
    font-size: 13px;
    border-radius: 6px;
    transition: background 0.15s;
    cursor: pointer;
}
.radio-track-item:hover { background: var(--bg); }
.radio-track-item:last-child { border-bottom: none; }
.radio-track-num {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    flex-shrink: 0;
}
.radio-track-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.radio-track-artist {
    color: var(--muted);
    font-size: 12px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.radio-track-dur {
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* DIY 弹窗 */
.radio-diy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.radio-diy-modal {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.radio-diy-modal h3 { font-size: 18px; margin: 0 0 4px; }
.radio-prompt-wrap {
    position: relative;
    display: block;
}
.radio-prompt-input {
    width: 100%;
    min-height: 80px;
    padding: 10px 14px 24px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.radio-diy-tip {
    display: none;
    text-align: center;
}
.radio-prompt-input:focus { outline: none; border-color: var(--accent); }

.radio-diy-actions { display: flex; gap: 10px; margin-top: 12px; }
.radio-gen-btn {
    flex: 1;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, white));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.radio-gen-btn:hover { opacity: 0.9; }
.radio-gen-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.radio-preview-btn {
    padding: 10px 20px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}
.radio-preview-btn:hover { background: var(--bg-card); }

/* ============ 独立播放指示器 ============ */

.radio-now-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--bg-card)), color-mix(in srgb, var(--accent) 5%, var(--bg-card)));
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    border-radius: 12px;
}
.radio-now-bar.playing {
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--bg-card)), color-mix(in srgb, var(--accent) 8%, var(--bg-card)));
}
.radio-now-icon { font-size: 20px; flex-shrink: 0; }

/* 封面旋转 */
.radio-now-cover {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.radio-now-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: radio-cover-spin 8s linear infinite;
}
.radio-now-bar.playing .radio-now-cover img {
    animation-play-state: running;
}
.radio-now-bar:not(.playing) .radio-now-cover img {
    animation-play-state: paused;
}
.radio-now-cover-fallback {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    animation: radio-cover-spin 8s linear infinite;
}
.radio-now-bar.playing .radio-now-cover-fallback {
    animation-play-state: running;
}
.radio-now-bar:not(.playing) .radio-now-cover-fallback {
    animation-play-state: paused;
}
.radio-now-cover.fallback img { display: none; }
.radio-now-cover.fallback .radio-now-cover-fallback { display: flex; }

@keyframes radio-cover-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.radio-now-info { flex: 1; min-width: 0; }
.radio-now-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.radio-now-artist {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 声波动画 */
.radio-now-wave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    flex-shrink: 0;
}
.radio-wave-bar {
    width: 3px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0.5;
    animation: radio-wave 1.2s ease-in-out infinite;
}
.radio-wave-bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.radio-wave-bar:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.radio-wave-bar:nth-child(3) { height: 12px; animation-delay: 0.4s; }
.radio-wave-bar:nth-child(4) { height: 18px; animation-delay: 0.6s; }
.radio-wave-bar:nth-child(5) { height: 8px; animation-delay: 0.8s; }
.radio-now-bar.playing .radio-wave-bar {
    animation-play-state: running;
}
.radio-now-bar:not(.playing) .radio-wave-bar {
    animation-play-state: paused;
}
@keyframes radio-wave {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

/* 音量控制 */
.radio-now-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.radio-vol-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.radio-vol-btn:hover { opacity: 1; }
.radio-vol-slider {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.radio-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.radio-vol-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid white;
}

/* ============ 正在播放高亮 ============ */

.radio-track-now {
    background: color-mix(in srgb, var(--accent) 10%, transparent) !important;
    border-radius: 6px;
}
.radio-track-now .radio-track-num {
    background: var(--accent) !important;
    color: white !important;
}
.radio-track-now .radio-track-title { color: var(--accent); }

/* 当前匹配小时 */
.radio-now-hour {
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
}

/* ============ 移动端响应式适配 ============ */

@media (max-width: 768px) {
    .radio-page {
        max-width: 100%;
        padding: 0 12px;
    }

    .radio-player-header {
        padding: 20px 14px;
    }
    .radio-player-header h2 {
        font-size: 18px;
    }

    .radio-now-bar {
        padding: 8px 12px;
        flex-wrap: wrap;
    }
    .radio-now-cover {
        width: 36px;
        height: 36px;
    }
    .radio-now-wave {
        gap: 1px;
        height: 16px;
    }
    .radio-wave-bar {
        width: 2px;
    }
    .radio-vol-slider {
        width: 50px;
    }

    .radio-hour-toggle {
        padding: 10px 12px;
    }
    .radio-hour-time {
        font-size: 14px;
    }

    .radio-block {
        padding: 10px 12px;
    }

    .radio-track-item {
        padding: 3px 6px;
    }
    .radio-track-artist {
        max-width: 80px;
    }

    .radio-diy-modal {
        width: 95%;
    }
    .radio-diy-actions {
        flex-direction: column;
    }

    .radio-gen-btn {
        font-size: 13px;
        padding: 12px 16px;
    }
    .radio-preview-btn {
        font-size: 13px;
        padding: 12px 16px;
    }

    /* 管理员 tab 按钮缩小 */
    #radio-tab-tpl,
    #radio-tab-tracks,
    #radio-tab-calendar {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }

    /* 日历格子缩小 */
    #radio-calendar-grid table td {
        padding: 4px !important;
        font-size: 13px !important;
    }
    #radio-calendar-grid table td > div:first-child {
        font-size: 13px;
    }
    #radio-calendar-grid table th {
        font-size: 11px !important;
        padding: 4px !important;
    }
}

/* ======== 管理员编辑功能 ======== */

/* 编辑按钮 */
.radio-block-editable .radio-track-item {
    position: relative;
    padding-right: 100px;
}
.radio-track-actions {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}
.radio-track-item:hover .radio-track-actions {
    opacity: 1;
}
.rta-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 5px;
    color: var(--text);
    line-height: 1.4;
    transition: background 0.15s;
}
.rta-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* 搜索弹窗 */
.radio-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.radio-edit-modal {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 24px;
    width: min(520px, 90vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.radio-edit-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.radio-edit-old {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 8px;
}
.radio-edit-search {
    display: flex;
    gap: 8px;
}
.radio-edit-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
}
.radio-edit-input:focus {
    border-color: var(--accent);
}
.radio-edit-search-btn {
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.radio-edit-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 60px;
}
.radio-edit-hint,
.radio-edit-searching,
.radio-edit-none,
.radio-edit-err {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}
.radio-edit-err { color: var(--danger); }

/* 搜索结果行 */
.radio-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.radio-search-result:hover {
    background: var(--bg);
}
.radio-search-result:last-child {
    border-bottom: none;
}
.rsr-dur {
    font-size: 12px;
    font-family: monospace;
    min-width: 40px;
    text-align: center;
    padding: 2px 6px;
    border-radius: 4px;
}
.rsr-dur.dur-match { background: #d4edda; color: #155724; }
.rsr-dur.dur-close { background: #fff3cd; color: #856404; }
.rsr-dur.dur-far { background: #f8d7da; color: #721c24; }
.rsr-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rsr-artist {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.radio-edit-actions {
    display: flex;
    justify-content: flex-end;
}
.radio-edit-cancel {
    padding: 8px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ======== 管理员歌曲清单编辑 (后台) ======== */

.admin-track-row:hover {
    background: var(--bg);
}
.admin-track-row:hover .admin-track-btns {
    display: flex !important;
}
.atb-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

/* 拖拽排序 */
.admin-track-row.drag-over {
    border-top: 2px solid var(--accent) !important;
    background: rgba(var(--accent-rgb, 100, 140, 255), 0.08) !important;
}
.admin-track-row[draggable="true"]:active {
    cursor: grabbing;
}
.admin-track-drag-handle {
    opacity: 0.4;
    transition: opacity 0.15s;
}
.admin-track-row:hover .admin-track-drag-handle {
    opacity: 1;
}
