/* ============ 音隅 · 设计令牌 ============ */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #efede8;
  --surface-3: #e6e3dc;
  --text: #1d1c1a;
  --text-2: #6b6862;
  --text-3: #a29e96;
  --line: rgba(29, 28, 26, 0.08);
  --accent: #e0533d;
  --accent-2: #c8432f;
  --accent-soft: rgba(224, 83, 61, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(30, 24, 16, 0.06);
  --shadow-lg: 0 24px 60px rgba(30, 24, 16, 0.18);
  --glass: rgba(255, 255, 255, 0.78);

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Segoe UI", "Helvetica Neue", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 232px;
  --player-h: 84px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113;
    --surface: #19191c;
    --surface-2: #222226;
    --surface-3: #2c2c31;
    --text: #f1f0ee;
    --text-2: #a3a19c;
    --text-3: #6d6b67;
    --line: rgba(255, 255, 255, 0.07);
    --accent: #ff6a52;
    --accent-2: #ff8571;
    --accent-soft: rgba(255, 106, 82, 0.13);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    --glass: rgba(25, 25, 28, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111113;
  --surface: #19191c;
  --surface-2: #222226;
  --surface-3: #2c2c31;
  --text: #f1f0ee;
  --text-2: #a3a19c;
  --text-3: #6d6b67;
  --line: rgba(255, 255, 255, 0.07);
  --accent: #ff6a52;
  --accent-2: #ff8571;
  --accent-soft: rgba(255, 106, 82, 0.13);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --glass: rgba(25, 25, 28, 0.8);
  color-scheme: dark;
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0.01em; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }

i[data-icon] { display: inline-flex; width: 20px; height: 20px; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; }

/* 滚动条 */
.main, .queue ol, .lyrics { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ============ 布局 ============ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100vh - var(--player-h));
  height: calc(100dvh - var(--player-h));
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 16px 18px;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 22px;
  font: 600 21px/1 var(--serif);
  letter-spacing: 0.12em;
}
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.nav a.active i { color: var(--accent); }
.nav-label { margin: 22px 12px 6px; font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; }
.sidebar-foot { margin-top: auto; }
.ghost-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 38px; padding: 0 12px;
  border-radius: 10px; color: var(--text-2);
}
.ghost-btn:hover { background: var(--surface-2); color: var(--text); }

.main { position: relative; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 40px 14px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.search {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: min(460px, 100%);
  height: 42px; padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--text-3);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--text-2); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14.5px;
}
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  font: 12px/1 var(--sans); padding: 4px 7px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-3);
}
.mobile-theme { display: none; margin-left: auto; }

.view { padding: 8px 40px 56px; max-width: 1280px; outline: none; animation: fade-in 0.35s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ 通用组件 ============ */
.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm i[data-icon] { width: 18px; height: 18px; }
.icon-btn.on { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 18px var(--accent-soft);
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(0.97); }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--surface-2); }
.btn i[data-icon] { width: 18px; height: 18px; }
.text-btn { color: var(--text-2); font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.text-btn:hover { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge.vip { background: rgba(214, 160, 52, 0.14); color: #b8862a; }
.badge.preview { background: rgba(88, 120, 220, 0.13); color: #5878dc; }
.badge.full { background: rgba(64, 160, 110, 0.13); color: #3b9a69; }

.src { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.src::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--text-3)); }
.src-netease { --dot: #e2402f; }
.src-kugou { --dot: #2a8bf2; }
.src-kuwo { --dot: #f2a71b; }
.src-douyin { --dot: #25b8bf; }
.src-qishui { --dot: #66b532; }
.src-bilibili { --dot: #fb7299; }
a.src:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* 标题区 */
.hero { padding: 18px 0 30px; }
.hero h1 { font: 600 34px/1.25 var(--serif); letter-spacing: 0.04em; }
.hero p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; }
.section { margin-top: 38px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font: 600 21px/1.3 var(--serif); letter-spacing: 0.03em; }
.section-head .muted { color: var(--text-3); font-size: 13px; }
.section-head .more { margin-left: auto; color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.section-head .more:hover { color: var(--accent); }
.section-head .more i[data-icon] { width: 16px; height: 16px; }

/* 歌单卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 20px; }
.card { display: block; min-width: 0; }
.card-cover {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2);
  box-shadow: var(--shadow);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .card-cover img { transform: scale(1.05); }
.card-count {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.38); backdrop-filter: blur(8px);
  color: #fff; font-size: 11.5px;
}
.card-count i[data-icon] { width: 12px; height: 12px; }
.card-play {
  position: absolute; right: 10px; bottom: 10px;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--glass); backdrop-filter: blur(12px); color: var(--accent);
  opacity: 0; transform: translateY(8px); transition: 0.3s var(--ease);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.card:hover .card-play { opacity: 1; transform: none; }
.card-play i[data-icon] { width: 18px; height: 18px; margin-left: 2px; }
.card-title {
  margin-top: 10px; font-size: 14px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 榜单卡片 */
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.chart {
  display: flex; gap: 16px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.chart:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.chart-cover { position: relative; width: 104px; height: 104px; flex: none; border-radius: 11px; overflow: hidden; background: var(--surface-2); }
.chart-cover img { width: 100%; height: 100%; object-fit: cover; }
.chart-cover span {
  position: absolute; inset: auto 0 0 0; padding: 14px 8px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #fff; font-size: 11px;
}
.chart-body { min-width: 0; flex: 1; }
.chart-body h3 { font: 600 16px/1.4 var(--serif); margin-bottom: 8px; }
.chart-body ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.chart-body li { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.chart-body li b { width: 14px; flex: none; color: var(--accent); font-weight: 700; font-style: italic; }
.chart-body li:nth-child(n+3) b { color: var(--text-3); }
.chart-body li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-body li em { font-style: normal; color: var(--text-3); }

/* ============ 歌曲列表 ============ */
.songs { display: flex; flex-direction: column; }
.song {
  display: grid;
  grid-template-columns: 34px minmax(0, 2.4fr) minmax(0, 1.3fr) 92px 52px 104px;
  align-items: center; gap: 14px;
  height: 62px; padding: 0 12px;
  border-radius: 11px;
  transition: background 0.15s;
  cursor: default;
}
.songs.no-album .song { grid-template-columns: 34px minmax(0, 1fr) 92px 52px 104px; }
.songs.no-album .song-album { display: none; }
.song:hover { background: var(--surface); box-shadow: var(--shadow); }
.song.playing { background: var(--accent-soft); box-shadow: none; }
.song.unavailable .song-name { color: var(--text-3); }
.song-idx { text-align: center; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 13px; position: relative; height: 34px; display: grid; place-items: center; }
.song-idx.top { color: var(--accent); font-weight: 700; font-style: italic; font-size: 15px; }
.song-idx .idx-play { display: none; width: 34px; height: 34px; border-radius: 50%; place-items: center; color: var(--text); }
.song:hover .song-idx .idx-num { display: none; }
.song:hover .song-idx .idx-play { display: grid; }
.song.playing .song-idx .idx-num { display: none; }
.song.playing .song-idx .eq { display: flex; }
.song.playing:hover .song-idx .eq { display: none; }
.eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.eq span { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: -0.3s; }
.eq span:nth-child(3) { animation-delay: -0.6s; }
body:not(.is-playing) .eq span { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

.song-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.song-cover { width: 42px; height: 42px; flex: none; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.song-cover.ph { display: grid; place-items: center; color: var(--text-3); }
.song-cover.ph i[data-icon] { width: 18px; height: 18px; }
.song-text { min-width: 0; }
.song-name { display: flex; align-items: center; gap: 6px; font-size: 14.5px; white-space: nowrap; overflow: hidden; }
.song-name span { overflow: hidden; text-overflow: ellipsis; }
.song.playing .song-name { color: var(--accent); }
.song-artist { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist a:hover, .song-album a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.song-reason { font-size: 12px; color: var(--accent); opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-album { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-srcs { display: flex; flex-wrap: wrap; gap: 2px 8px; overflow: hidden; max-height: 40px; }
.song-dur { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.song-acts { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.song:hover .song-acts, .song-acts .on { opacity: 1; }
.song-acts .on { color: var(--accent); }
.song:has(.song-acts .on) .song-acts { opacity: 1; }

.list-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 2.4fr) minmax(0, 1.3fr) 92px 52px 104px;
  gap: 14px; padding: 0 12px 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--text-3); letter-spacing: 0.05em;
}
.songs.no-album .list-head { grid-template-columns: 34px minmax(0, 1fr) 92px 52px 104px; }
.list-head span:first-child { text-align: center; }
.list-head .r { text-align: right; }

/* ============ 页面头（歌单/榜单详情） ============ */
.detail-head { display: flex; gap: 30px; align-items: flex-end; padding: 14px 0 32px; }
.detail-cover { width: 200px; height: 200px; flex: none; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface-2); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { min-width: 0; }
.detail-info .kicker { font-size: 12px; color: var(--accent); letter-spacing: 0.15em; font-weight: 600; }
.detail-info h1 { font: 600 32px/1.3 var(--serif); margin: 6px 0 10px; letter-spacing: 0.03em; }
.detail-info p { margin: 0 0 18px; color: var(--text-2); font-size: 13.5px; max-width: 640px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ 搜索 ============ */
.search-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; padding: 14px 0 20px; }
.search-head h1 { font: 600 28px/1.3 var(--serif); }
.search-head h1 em { font-style: normal; color: var(--accent); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; width: fit-content; margin-bottom: 18px; overflow-x: auto; max-width: 100%; }
.tab { height: 32px; padding: 0 14px; border-radius: 9px; color: var(--text-2); font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab small { color: var(--text-3); font-size: 11px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.tab.err { opacity: 0.55; }

.elsewhere {
  margin-top: 34px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.elsewhere h3 { font: 600 15px/1.4 var(--serif); margin-bottom: 4px; }
.elsewhere p { margin: 0 0 14px; color: var(--text-3); font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: 13px; color: var(--text-2);
  transition: 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip i[data-icon] { width: 14px; height: 14px; }

/* ============ 推荐 ============ */
.profile {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 8px;
}
.panel {
  padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow);
}
.panel h3 { font: 600 15px/1.4 var(--serif); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel h3 i[data-icon] { width: 18px; height: 18px; color: var(--accent); }
.taste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.taste a {
  display: inline-flex; align-items: center;
  padding: 4px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: calc(12px + var(--w, 0.3) * 6px);
  font-weight: calc(400 + var(--w, 0.3) * 300);
  opacity: calc(0.55 + var(--w, 0.3) * 0.45);
  transition: 0.2s;
}
.taste a:hover { opacity: 1; background: var(--accent); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat b { display: block; font: 600 28px/1.2 var(--serif); }
.stat span { color: var(--text-3); font-size: 12px; }
.empty-taste { color: var(--text-3); font-size: 13px; }

/* 新歌网格 */
.grid-songs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 18px; }
.grid-songs .song { grid-template-columns: minmax(0, 1fr) 52px; height: 64px; }
.grid-songs .song-cover { width: 46px; height: 46px; }
.grid-songs .song-cover-wrap { position: relative; }
.grid-songs .cover-play {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 8px;
  background: rgba(0, 0, 0, 0.35); color: #fff; opacity: 0; transition: 0.2s;
}
.grid-songs .song:hover .cover-play, .grid-songs .song.playing .cover-play { opacity: 1; }
.grid-songs .cover-play i[data-icon] { width: 18px; height: 18px; }

/* ============ 状态 ============ */
.empty {
  display: grid; place-items: center; gap: 10px; text-align: center;
  padding: 70px 20px; color: var(--text-3);
}
.empty i[data-icon] { width: 42px; height: 42px; color: var(--surface-3); }
.empty h3 { font: 600 17px/1.4 var(--serif); color: var(--text-2); }
.empty p { margin: 0; font-size: 13px; max-width: 360px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; margin-bottom: 16px;
  border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 13px;
}
.notice i[data-icon] { width: 18px; height: 18px; margin-top: 1px; color: var(--accent); }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.sk-row { height: 54px; margin: 8px 0; }
.sk-card { aspect-ratio: 1; border-radius: var(--radius); }
.sk-line { height: 14px; margin-top: 10px; width: 70%; }

/* ============ 播放栏 ============ */
.player {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 20px;
  height: var(--player-h); padding: 0 24px;
  background: var(--glass); backdrop-filter: saturate(1.6) blur(24px); -webkit-backdrop-filter: saturate(1.6) blur(24px);
  border-top: 1px solid var(--line);
}
.player-progress { display: none; }
.player-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.player-cover {
  position: relative; width: 54px; height: 54px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow);
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-cover img:not([src]), .player-cover img[src=""] { visibility: hidden; }
.player-cover i[data-icon] {
  position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; color: #fff;
  opacity: 0; transition: 0.2s; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}
.player-cover::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); opacity: 0; transition: 0.2s; }
.player-cover:hover::after, .player-cover:hover i[data-icon] { opacity: 1; }
.player-cover i[data-icon] { z-index: 1; }
.player-meta { min-width: 0; }
.player-title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player[data-empty="true"] .like-btn, .player[data-empty="true"] .player-cover i { display: none; }
.like-btn.on { color: var(--accent); }
.like-btn.on svg { fill: currentColor; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.controls { display: flex; align-items: center; gap: 10px; }
.play-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  transition: transform 0.15s, background 0.2s;
}
.play-btn:hover { transform: scale(1.06); background: var(--accent); color: #fff; }
.play-btn i[data-icon] { width: 18px; height: 18px; }
.play-btn.loading i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.timeline span { width: 38px; text-align: center; flex: none; }
.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.volume { display: flex; align-items: center; gap: 4px; }
.volume input { width: 96px; }

/* 滑块 */
input[type="range"] {
  --p: 0%;
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 16px; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--p), var(--surface-3) var(--p));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); opacity: 0; transition: opacity 0.15s;
}
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }

/* ============ 正在播放 ============ */
.now {
  position: fixed; inset: 0 0 var(--player-h) 0; z-index: 15;
  overflow: hidden; background: var(--bg);
  animation: slide-up 0.45s var(--ease);
}
.now.closing { animation: slide-down 0.3s var(--ease) forwards; }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slide-down { to { transform: translateY(100%); } }
.now-bg {
  position: absolute; inset: -80px;
  background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.4); opacity: 0.45;
  transform: scale(1.1); transition: background-image 0.6s;
}
.now-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg), transparent 30%, transparent 70%, var(--bg)); opacity: 0.6; }
.now-close { position: absolute; top: 20px; left: 24px; z-index: 2; background: var(--glass); }
.now-inner {
  position: relative; height: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 60px; align-items: center;
  max-width: 1160px; margin: 0 auto; padding: 40px 60px;
}
.now-art { display: flex; flex-direction: column; align-items: center; text-align: center; }
.now-art img {
  width: min(380px, 38vh, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 22px;
  box-shadow: var(--shadow-lg); background: var(--surface-2);
  transition: transform 0.6s var(--ease);
}
body:not(.is-playing) .now-art img { transform: scale(0.94); }
.now-art h2 { margin-top: 30px; font: 600 26px/1.35 var(--serif); letter-spacing: 0.03em; }
.now-art p { margin: 6px 0 0; color: var(--text-2); }
.now-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.lyrics {
  height: 70vh; overflow-y: auto; scrollbar-width: none;
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.lyrics::-webkit-scrollbar { display: none; }
.lyrics-inner { padding: 35vh 0; }
.lyric-line {
  padding: 9px 0; font-size: 18px; line-height: 1.55; color: var(--text-3);
  transition: color 0.35s, transform 0.35s var(--ease); transform-origin: left center; cursor: pointer;
}
.lyric-line small { display: block; font-size: 14px; opacity: 0.85; }
.lyric-line:hover { color: var(--text-2); }
.lyric-line.active { color: var(--text); font-weight: 600; transform: scale(1.06); }
.lyric-empty { color: var(--text-3); font-size: 16px; text-align: center; }

/* ============ 播放队列 ============ */
.queue {
  position: fixed; top: 12px; right: 12px; bottom: calc(var(--player-h) + 12px); z-index: 25;
  width: min(380px, calc(100vw - 24px));
  display: flex; flex-direction: column;
  background: var(--glass); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
  animation: slide-left 0.35s var(--ease);
}
@keyframes slide-left { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.queue header { display: flex; align-items: center; gap: 6px; padding: 16px 12px 10px 20px; }
.queue h3 { flex: 1; font: 600 16px/1.4 var(--serif); }
.queue h3 small { font: 12px var(--sans); color: var(--text-3); margin-left: 4px; }
.queue ol { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; flex: 1; }
.queue li {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
}
.queue li:hover { background: var(--surface-2); }
.queue li.current { color: var(--accent); }
.queue li .q-text { min-width: 0; flex: 1; }
.queue li .q-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue li .q-artist { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue li .icon-btn { opacity: 0; }
.queue li:hover .icon-btn { opacity: 1; }

/* ============ Toast ============ */
.toasts { position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast {
  padding: 10px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 13px;
  box-shadow: var(--shadow-lg); animation: toast-in 0.3s var(--ease);
  max-width: 86vw; text-align: center;
}
.toast.out { animation: toast-out 0.3s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

.tabbar { display: none; }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .song, .list-head { grid-template-columns: 34px minmax(0, 2fr) minmax(0, 1fr) 52px 104px; }
  .songs.no-album .song, .songs.no-album .list-head { grid-template-columns: 34px minmax(0, 1fr) 52px 104px; }
  .song-srcs, .list-head .h-src { display: none; }
  .profile { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --player-h: 72px; --tabbar-h: 58px; }
  .app { grid-template-columns: 1fr; height: calc(100dvh - var(--player-h) - var(--tabbar-h)); }
  .sidebar { display: none; }
  .topbar { padding: 14px 16px 10px; }
  .mobile-theme { display: inline-grid; }
  .view { padding: 4px 16px 40px; }
  .hero h1 { font-size: 26px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; }
  .charts { grid-template-columns: 1fr; }
  .song, .list-head, .songs.no-album .song, .songs.no-album .list-head { grid-template-columns: 28px minmax(0, 1fr) 70px; gap: 10px; padding: 0 6px; }
  .song-album, .song-dur, .list-head .h-album, .list-head .h-dur { display: none; }
  .song-acts { opacity: 1; }
  .song-acts .act-link { display: none; }
  .detail-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .detail-cover { width: 150px; height: 150px; }
  .detail-info h1 { font-size: 24px; }

  .player { bottom: var(--tabbar-h); grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 12px; border-top: 0; }
  .player-progress { display: block; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--line); }
  .player-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
  .player-cover { width: 46px; height: 46px; }
  .player-center { flex-direction: row; }
  .timeline, #pMode, #pPrev, #pLyricBtn, .player-right .volume, .player-right .badge, .like-btn { display: none; }
  .player-right { display: none; }
  .controls { gap: 2px; }
  .controls::after { content: none; }

  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 20; height: var(--tabbar-h);
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--text-3); }
  .tabbar a.active { color: var(--accent); }
  .now { inset: 0 0 calc(var(--player-h) + var(--tabbar-h)) 0; }
  .now-inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 18px; padding: 64px 22px 16px; align-content: start; }
  .now-art { flex-direction: row; text-align: left; gap: 14px; }
  .now-art img { width: 72px; border-radius: 12px; }
  .now-art h2 { margin: 0; font-size: 18px; }
  .now-art > div { min-width: 0; }
  .now-links { display: none; }
  .lyrics { height: auto; min-height: 0; }
  .lyric-line { font-size: 16px; }
  .queue { bottom: calc(var(--player-h) + var(--tabbar-h) + 12px); }
  .toasts { bottom: calc(var(--player-h) + var(--tabbar-h) + 16px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============ 补充 ============ */
.song-acts .on svg, .like-btn.on svg { fill: currentColor; }
.song-album .song-reason { font-size: 12.5px; }
.now-text { min-width: 0; }
.idx-play i[data-icon] { width: 16px; height: 16px; }
.lyric-line small { font-weight: 400; }

/* 免费源提示 */
.avail-slot { display: inline-flex; flex: none; }
.avail {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; cursor: help;
}
.avail.ok { background: rgba(64, 160, 110, .13); color: #3b9a69; }
.avail.ok.via-bilibili { background: rgba(251, 114, 153, .14); color: #e45a8a; }
.avail.pre { background: rgba(88, 120, 220, .13); color: #5878dc; }
.avail.no { background: var(--surface-2); color: var(--text-3); }
.avail.wait { width: 6px; height: 6px; padding: 0; border-radius: 50%; background: var(--text-3); opacity: .5; animation: avail-pulse 1s ease-in-out infinite; }
@keyframes avail-pulse { 50% { opacity: .15; } }

.avail { cursor: pointer; border: 0; }
.avail:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avail.wait { min-width: 16px; min-height: 16px; }
.resource-dialog { width: min(560px, calc(100vw - 32px)); max-height: 80vh; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow-y: auto; }
.resource-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.resource-dialog header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.resource-dialog h2 { font-size: 18px; margin: 0; flex: 1; overflow-wrap: anywhere; }
.resource-dialog header button { font-size: 26px; color: var(--text-2); padding: 4px 10px; }
.resource-option { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; width: 100%; text-align: left; padding: 14px; margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface-2); }
.resource-option strong { font-size: 14px; overflow-wrap: anywhere; }
.resource-option small { grid-column: 1; color: var(--text-2); }
.resource-option span { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--accent); }
.resource-option:hover, .resource-option:focus-visible { border-color: var(--accent); }
.resource-note, .resource-status { font-size: 12px; color: var(--text-2); line-height: 1.7; margin: 16px 0; }
.deployment-panel { margin: 16px 24px 0; padding: 14px 18px; background: var(--accent-soft); border-radius: 12px; }
.deployment-panel summary { cursor: pointer; font-weight: 600; }
.deployment-panel p { color: var(--text-2); font-size: 13px; margin: 8px 0; }
.backend-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.backend-form input { min-width: 160px; flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); }
.backend-error { color: var(--accent) !important; }
@media (max-width: 600px) { .song-name { flex-wrap: wrap; gap: 2px; } .song-name > span:first-child { flex-basis: 100%; } .song { min-height: 76px; height: auto; padding-top: 8px; padding-bottom: 8px; } .avail { font-size: 10px; } }
