/**
 *
 * 音乐搜索器 - CSS 文件（多站同屏·对比流 · 纯前端重写）
 *
 * 椿硕定制版
 *
 * @since   1.6.2
 *
 */

/* ============ 基础变量（浅色 / 深色） ============ */
:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-2: #eef2f6;
    --text: #1f2933;
    --muted: #64748b;
    --border: #e2e8f0;
    --accent: #0F6E56;
    --accent-2: #1D9E75;
    --accent-deep: #0A5340;
    --accent-soft: rgba(15, 110, 86, 0.10);
    --accent-glow: rgba(15, 110, 86, 0.28);
    --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
    --radius: 14px;
    --radius-sm: 9px;
    --skeleton: #e2e8f0;
    --skeleton-2: #eef2f6;
}

:root[data-theme='dark'] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #172033;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #334155;
    --accent: #1D9E75;
    --accent-2: #2bbd8c;
    --accent-deep: #24B388;
    --accent-soft: rgba(29, 158, 117, 0.14);
    --accent-glow: rgba(43, 189, 140, 0.32);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    --skeleton: #243049;
    --skeleton-2: #2c3a55;
}

* {
    box-sizing: border-box;
}

/* 统一隐藏语义：作者样式里的 display 会盖掉 UA 的 [hidden]{display:none}，这里显式兜底 */
[hidden] {
    display: none !important;
}

html {
    /* 显式基准字号：Chrome 桌面端默认 16px 且不缩放，写死可杜绝继承链上的意外缩小 */
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Microsoft YaHei', 'PingFang SC',
        'Hiragino Sans GB', 'WenQuanYi Micro Hei', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
        'Fira Sans', 'Droid Sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}
/* 全屏歌词打开时锁定背景滚动 */
html.fs-open,
html.fs-open body {
    overflow: hidden;
}

body {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 110px;
    transition: background .25s ease, color .25s ease;
}

a {
    color: var(--accent-2);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover {
    color: var(--accent);
}

/* ============ 顶栏 ============ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    /* 性能：默认高不透明纯色，零毛玻璃重绘（低配机器不会卡帧） */
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border-bottom: 1px solid var(--border);
}
/* 仅当浏览器确实支持 backdrop-filter 时才恢复毛玻璃质感，并收窄模糊半径 */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .topbar {
        background: color-mix(in srgb, var(--surface) 84%, transparent);
        backdrop-filter: saturate(150%) blur(8px);
        -webkit-backdrop-filter: saturate(150%) blur(8px);
    }
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* 品牌：音符图标 + 标题/副标题（图标 flex:none，窄屏只缩图标不挤标题） */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.brand-text { min-width: 0; }
.brand-logo {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--accent);
}
.brand-logo svg {
    display: block;
    width: 100%;
    height: 100%;
}
.brand-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--accent);
}
.brand-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--muted);
}
.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover {
    transform: rotate(12deg);
    border-color: var(--accent);
    color: var(--accent);
}
:root[data-theme='light'] .ico-moon { display: none; }
:root[data-theme='dark'] .ico-sun { display: none; }

/* ============ 搜索 hero ============ */
.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 34px 18px 10px;
}
.tabs {
    display: inline-flex;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    margin: 0 auto 16px;
    gap: 4px;
}
.tabs { display: flex; width: fit-content; }
.tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    padding: 8px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .2s ease;
    font-weight: 600;
}
.tab.is-active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-soft);
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 18px;
}
.chip {
    --chip: #888;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    padding: 7px 15px;
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    padding-left: 28px;
    transition: all .18s ease;
    display: inline-flex;
    align-items: center;
}
.chip::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--chip);
}
.chip:hover {
    border-color: var(--chip);
}
.chip[data-active='true'] {
    border-color: var(--chip);
    background: color-mix(in srgb, var(--chip) 14%, var(--surface));
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip) 30%, transparent);
}
.chip-all {
    --chip: var(--accent);
    font-weight: 700;
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.chip-all[data-active='true'] {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 2px var(--accent-soft);
}
.platforms.is-hidden { display: none; }

.search {
    display: flex;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}
.search-input {
    flex: 1;
    height: 54px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 17px;
    padding: 0 18px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-btn {
    width: 116px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}
.search-btn:hover { background: var(--accent-2); }
.search-btn:active { transform: scale(.97); }
.search-btn[disabled] { opacity: .6; cursor: default; }

/* 历史 */
.history {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 640px;
    margin: 14px auto 0;
}
.history.is-hidden { display: none; }
.history-label {
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 2px;
}
.history-chip {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    padding: 5px 13px;
    border-radius: 999px;
    cursor: pointer;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all .15s ease;
}
.history-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.history-clear {
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
}
.history-clear:hover { color: var(--accent); border-color: var(--accent); }

/* 快捷入口：我的收藏 / 返回搜索结果 */
.quick-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 640px;
    margin: 12px auto 0;
}
.quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .15s ease;
}
.quick-btn:hover { border-color: var(--accent); color: var(--accent); }
.quick-btn.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.quick-btn svg { width: 15px; height: 15px; }
/* 次要操作（导出/导入）：弱化底色，触摸目标 ≥32px */
.quick-btn-ghost {
    background: transparent;
    color: var(--text);
    opacity: .82;
    border-color: var(--border);
    min-height: 32px;
    padding: 6px 12px;
}
.quick-btn-ghost:hover,
.quick-btn-ghost:focus-visible {
    opacity: 1;
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.quick-btn-ghost svg { width: 14px; height: 14px; }
.quick-count {
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    /* 全站最小字号下限 12px（QA 有 <12px 即失败的不变量） */
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}
.quick-count:not(:empty) { display: inline-flex; }

/* 提示 toast */
.toast {
    max-width: 640px;
    margin: 14px auto 0;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow);
}
.toast.is-hidden { display: none; }
.toast.toast-error {
    border-color: #ef4444;
    background: color-mix(in srgb, #ef4444 10%, var(--surface));
    color: #ef4444;
}
.toast.toast-loading { color: var(--muted); }

/* ============ 结果区 ============ */
.results {
    max-width: 1100px;
    margin: 22px auto 0;
    padding: 0 18px;
}
.results.is-hidden { display: none; }
.results-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}
.results-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}
.results-count {
    font-size: 14px;
    color: var(--muted);
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

/* 结果卡片 */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--surface-2);
    overflow: hidden;
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--chip, var(--accent));
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    white-space: nowrap;
}
.card-nonplay {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
}
/* 收藏星标：常显在封面右下角（操作栏默认 hover 才出现，触屏够不着） */
.card-fav {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, .42);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
.card-fav:hover { transform: scale(1.12); background: rgba(15, 23, 42, .64); }
.card-fav .ico-star {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
}
.card-fav.is-on { background: rgba(255, 255, 255, .94); color: var(--accent); }
.card-fav.is-on .ico-star { fill: currentColor; }
.card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-author {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
}
.card:hover .card-actions { opacity: 1; transform: translateY(0); }
.card-act {
    flex: 1;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 6px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}
.card-act:hover { border-color: var(--accent); color: var(--accent); }
.card-act svg { width: 17px; height: 17px; }

/* 骨架屏 */
.skeleton .sk-cover,
.skeleton .sk-line {
    background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-2) 37%, var(--skeleton) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.3s infinite;
}
.sk-cover { width: 100%; aspect-ratio: 1 / 1; }
.sk-line { height: 12px; border-radius: 6px; margin: 10px 12px 0; }
.sk-line.short { width: 55%; margin-bottom: 12px; }
@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* 载入更多 */
/* 空态提示（收藏为空 / 无结果时） */
.empty-tip {
    grid-column: 1 / -1;
    margin: 0;
    padding: 34px 12px;
    text-align: center;
    font-size: 15px;
    color: var(--muted);
}
.loadmore-wrap { text-align: center; margin: 22px 0 6px; }
.loadmore {
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    padding: 9px 28px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s ease;
}
.loadmore:hover { background: var(--accent); color: #fff; }
.loadmore[disabled] { opacity: .6; cursor: default; }
.loadmore.is-hidden { display: none; }

/* ============ 帮助 / 页脚 ============ */
.help {
    max-width: 1100px;
    margin: 34px auto 0;
    padding: 0 18px;
}
.help-details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 16px;
}
.help-summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 0;
    list-style: none;
    color: var(--text);
}
.help-summary::-webkit-details-marker { display: none; }
.help-summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    color: var(--accent);
    transition: transform .2s ease;
}
.help-details[open] .help-summary::before { transform: rotate(90deg); }
.help-body { padding: 0 0 16px; color: var(--muted); font-size: 14px; }
.help-body code {
    background: var(--surface-2);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
    font-size: 13px;
    color: var(--text);
}
.help-body blockquote {
    margin: 14px 0 0;
    padding: 12px 16px;
    border-left: 3px solid var(--accent);
    background: var(--surface-2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
    font-size: 14px;
    overflow: hidden;
    max-height: 220px;
    transition: max-height .3s ease;
}
.help-body blockquote.is-expanded { max-height: 2000px; }
.help-body blockquote p { margin: 4px 0; }
.help-body blockquote span { display: inline-block; min-width: 84px; color: var(--text); }
.help-body blockquote b { font-weight: 600; color: #ef4444; }
.help-body blockquote u { color: var(--accent); text-decoration: none; }
/* 长地址（酷狗 hash 等）窄屏下不折行：整块横向滚动查看 */
.help-body .music-overflow {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.help-body .music-overflow p {
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
}
.help-body .music-overflow u,
.help-body .music-overflow span,
.help-body .music-overflow b {
    white-space: nowrap;
}
.help-body .music-overflow::-webkit-scrollbar { width: 6px; height: 6px; }
.help-body .music-overflow::-webkit-scrollbar-track { background: transparent; }
.help-body .music-overflow::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 999px;
}
.help-body .music-overflow::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

.footer {
    max-width: 1100px;
    margin: 30px auto 0;
    padding: 0 18px;
}
.footer-p {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin: 0;
}
.footer-p a { color: var(--muted); text-decoration: underline; }
.footer-p a:hover { color: var(--accent); }

/* ============ 更新日志（折叠区块，沿用 help 区视觉语言） ============ */
.changelog-sub {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}
/* 条目多（50+），固定高度内滚动，避免把页面撑长 */
.changelog-body {
    max-height: 40vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 4px 0 16px;
    font-size: 14px;
    color: var(--text);
}
.changelog-group {
    margin: 0 0 10px;
    padding: 6px 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}
.changelog-group:not(:first-child) { margin-top: 18px; }
.changelog-item {
    padding: 0 0 12px;
    margin: 0 0 12px;
    border-bottom: 1px dashed var(--border);
}
.changelog-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}
.changelog-ver {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}
.changelog-date {
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.changelog-tag {
    font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.changelog-list {
    margin: 0;
    padding-left: 20px;
}
.changelog-list li {
    margin: 3px 0;
    line-height: 1.65;
}
.changelog-list li::marker { color: var(--accent); }

/* ============ 免责声明弹层 ============ */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.modal-panel {
    position: relative;
    width: min(440px, 90vw);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.modal-title { margin: 0; font-size: 17px; }
.modal-close {
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 18px; font-size: 15px; color: var(--text); }
.modal-body p { margin: 6px 0; }

/* ============ 迷你播放器 ============ */
.player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    /* 性能：默认接近实色的高不透明背景，避免播放器弹出瞬间大面积毛玻璃重绘 */
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .10);
    /* 提升为独立合成层，减少对下方封面网格的重绘 */
    transform: translateZ(0);
}
/* 毛玻璃仅在浏览器支持时启用，模糊半径由 14px 收窄到 8px */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .player {
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        backdrop-filter: saturate(150%) blur(8px);
        -webkit-backdrop-filter: saturate(150%) blur(8px);
    }
}
.player.is-hidden { display: none; }
.player-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 18px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(280px, 2fr) auto;
    align-items: center;
    gap: 16px;
}
.player-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-2);
    flex: none;
}
.player-text { min-width: 0; }
.player-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-author {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-center { display: flex; flex-direction: column; gap: 6px; }
.player-buttons { display: flex; align-items: center; justify-content: center; gap: 14px; }
.p-btn {
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    transition: color .15s ease, background .15s ease;
}
.p-btn:hover { color: var(--accent); background: var(--accent-soft); }
.p-btn-main {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    position: relative;
    transition: background .2s ease, transform .15s ease, box-shadow .25s ease;
}
.p-btn-main:hover { background: var(--accent-2); color: #fff; }
.p-btn-main:active { transform: scale(.94); }
/* 播放中：主色加深 + 轻微放大 + 外圈光晕，让「点了有反应」一目了然 */
.p-btn-main.is-playing {
    background: var(--accent-deep);
    transform: scale(1.06);
    box-shadow: 0 0 0 6px var(--accent-glow), 0 4px 14px rgba(15, 23, 42, .18);
}
.p-btn-main.is-playing:hover { background: var(--accent-deep); }
/* 缓冲中：图标变淡 + 转圈，200ms 未真正开始播放时出现 */
.p-btn-main.is-loading { background: var(--accent-2); opacity: .85; }
.p-btn-main.is-loading svg { opacity: .25; }
.p-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: p-spin .7s linear infinite;
}
.p-btn-main.is-loading .p-spinner { display: block; }
@keyframes p-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.player-progress { display: flex; align-items: center; gap: 10px; }
.p-time {
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    min-width: 44px;
    text-align: center;
}
.p-bar {
    position: relative;
    flex: 1;
    height: 6px;
    background: var(--surface-2);
    border-radius: 999px;
    cursor: pointer;
}
.p-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--accent);
    border-radius: 999px;
}
.p-bar-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    opacity: 0;
    transition: opacity .15s ease;
}
.p-bar:hover .p-bar-thumb { opacity: 1; }
.player-extra { display: flex; align-items: center; gap: 6px; }
.p-icon {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color .15s ease, background .15s ease;
}
.p-icon:hover { color: var(--accent); background: var(--accent-soft); }
.p-icon.is-active { color: var(--accent); background: var(--accent-soft); }
.p-icon svg { width: 20px; height: 20px; }
/* 收藏：未收藏描边，已收藏实心 + 主色 */
.p-fav .ico-star {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
}
.p-fav.is-on { color: var(--accent); background: var(--accent-soft); }
.p-fav.is-on .ico-star { fill: currentColor; }

/* 音量：桌面端内联滑块；窄屏收进按钮上方的弹层（见响应式段） */
.p-volume {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--muted);
}
.p-vol-wrap { display: flex; align-items: center; gap: 2px; }
.p-vol-toggle { display: none; }
.p-vol-mute { width: 32px; height: 32px; }
.p-vol-mute .ico-vol,
.p-vol-mute .ico-vol-mute,
.p-vol-toggle .ico-vol,
.p-vol-toggle .ico-vol-mute { width: 19px; height: 19px; }
.p-vol {
    width: 64px;
    height: 24px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* 歌词面板 */
.lyrics {
    max-height: 38vh;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    padding: 14px 18px;
    scroll-behavior: smooth;
}
.lyrics.is-hidden { display: none; }
.lyrics-inner { max-width: 760px; margin: 0 auto; cursor: pointer; }
.lyrics-inner p {
    margin: 5px 0;
    text-align: center;
    font-size: 15px;
    color: var(--muted);
    line-height: 1.65;
    transition: color .2s ease, transform .2s ease;
}
.lyrics-inner p.is-current {
    color: var(--accent);
    font-weight: 700;
    transform: scale(1.04);
}
.lyrics-empty { color: var(--muted) !important; font-weight: 400 !important; }

/* ============ 全屏歌词浮层 ============ */
.lyrics-fs {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: linear-gradient(160deg, #0B5A46 0%, #0F6E56 46%, #07392E 100%);
}
.lyrics-fs[hidden] { display: none; }
.lyrics-fs-head {
    flex: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 10px;
}
.lyrics-fs-meta { flex: 1; min-width: 0; }
.lyrics-fs-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lyrics-fs-author {
    margin-top: 2px;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lyrics-fs-close {
    flex: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.lyrics-fs-close:hover { background: rgba(255, 255, 255, .26); transform: rotate(90deg); }

.lyrics-fs-body {
    position: relative;
    flex: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.lyrics-fs-track {
    position: relative;
    padding: 0 18px;
    will-change: transform;
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.lyrics-fs-line {
    margin: 0;
    padding: 7px 12px;
    text-align: center;
    font-size: 27px;
    line-height: 1.55;
    font-weight: 500;
    color: #fff;
    opacity: .42;
    transition: opacity .35s ease, transform .35s ease;
    transform-origin: center center;
}
.lyrics-fs-line.is-current {
    opacity: 1;
    font-weight: 800;
    transform: scale(1.06);
}

.lyrics-fs-foot {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 20px;
}
.lyrics-fs-ctrl { display: flex; align-items: center; gap: 22px; }
.lyrics-fs-btn {
    width: 46px;
    height: 46px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
}
.lyrics-fs-btn:hover { color: #fff; background: rgba(255, 255, 255, .26); }
.lyrics-fs-btn.p-btn-main {
    width: 58px;
    height: 58px;
    background: #fff;
    color: var(--accent);
}
.lyrics-fs-btn.p-btn-main:hover { background: #fff; color: var(--accent); }
.lyrics-fs-btn.p-btn-main.is-playing {
    background: #fff;
    color: var(--accent-deep);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .18);
}
.lyrics-fs-btn.p-btn-main.is-loading { background: rgba(255, 255, 255, .8); }
.lyrics-fs-btn.p-btn-main .p-spinner {
    border-color: rgba(15, 110, 86, .3);
    border-top-color: var(--accent);
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
}
.lyrics-fs-time {
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    font-variant-numeric: tabular-nums;
}
.lyrics-fs-sep { margin: 0 6px; opacity: .6; }

/* ============ 响应式 ============ */
/* 大屏：字号整体再抬一档，避免 1280px+ 上显得空而小（网格列数不变） */
@media (min-width: 1280px) {
    body { font-size: 17px; }
    .brand-logo { width: 30px; height: 30px; }
    .brand-title { font-size: 24px; }
    .brand-sub { font-size: 14px; }
    .tab { font-size: 16px; padding: 9px 26px; }
    .chip { font-size: 15px; padding: 8px 17px 8px 30px; }
    .search-input { font-size: 18px; height: 58px; }
    .search-btn { font-size: 18px; width: 128px; }
    .toast { font-size: 16px; }
    .results-title { font-size: 22px; }
    .results-count { font-size: 15px; }
    .card-title { font-size: 17px; }
    .card-author { font-size: 14px; }
    .card-pill { font-size: 13px; }
    .card-nonplay { font-size: 13px; }
    .card-act svg { width: 18px; height: 18px; }
    .loadmore { font-size: 16px; }
    .help-summary { font-size: 16px; }
    .help-body { font-size: 15px; }
    .help-body code { font-size: 14px; }
    .help-body blockquote { font-size: 15px; }
    .footer-p { font-size: 15px; }
    .changelog-sub { font-size: 14px; }
    .changelog-body { font-size: 15px; }
    .changelog-group { font-size: 16px; }
    .changelog-date { font-size: 14px; }
    .changelog-tag { font-size: 15px; }
    .modal-title { font-size: 18px; }
    .modal-body { font-size: 16px; }
    .player-title { font-size: 17px; }
    .player-author { font-size: 14px; }
    .p-time { font-size: 14px; min-width: 50px; }
    .lyrics-inner p { font-size: 17px; }
    .lyrics-fs-title { font-size: 19px; }
    .lyrics-fs-author { font-size: 14px; }
    .lyrics-fs-line { font-size: 31px; }
    .lyrics-fs-time { font-size: 14px; }
}

@media (max-width: 720px) {
    /* 播放器变三行（meta / center / extra）：收藏 + 音量 + 原有 5 个图标共 7 个，
       挤在 meta 右侧会把歌名压没，独占一行反而都点得到 */
    body { padding-bottom: 200px; }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .player-inner {
        grid-template-columns: 1fr;
        grid-template-areas: 'meta' 'center' 'extra';
        gap: 8px;
        padding: 8px 12px;
    }
    .player-meta { grid-area: meta; }
    .player-extra { grid-area: extra; justify-content: center; flex-wrap: wrap; }
    .player-center { grid-area: center; }
    .p-icon { width: 34px; height: 34px; }
    /* 音量：隐藏内联滑块，改由按钮弹出小滑块（点外部 / ESC 关闭） */
    .p-vol-toggle { display: inline-flex; }
    .p-vol-wrap {
        position: absolute;
        right: 0;
        bottom: calc(100% + 10px);
        display: none;
        padding: 6px 12px 6px 8px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 999px;
        box-shadow: var(--shadow);
        z-index: 5;
    }
    .p-volume.is-open .p-vol-wrap { display: flex; }
    .p-vol { width: 96px; height: 32px; }
    .lyrics { max-height: 30vh; }
    .search { flex-direction: column; }
    .search-input { height: 54px; flex: none; }
    .search-btn { width: 100%; height: 54px; }
    .lyrics-fs-line { font-size: 23px; padding: 6px 10px; }
    .lyrics-fs-ctrl { gap: 18px; }
}
@media (max-width: 420px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .brand { gap: 6px; }
    .brand-logo { width: 20px; height: 20px; }
}
