/* =========================================================
   私人音乐推荐 · 2026 UI Refresh
   这一层只覆盖视觉与新增组件，不改变原有业务逻辑。
   ========================================================= */

:root {
  --bg: #090a0e;
  --bg-soft: #101319;
  --bg-card: #151922;
  --bg-hover: #1e2430;
  --line: #262d3a;
  --text: #f1f4fa;
  --text-dim: #a2acc0;
  --text-mute: #6d778a;
  --accent: #ff5f6d;
  --accent-2: #ff9a62;
  --accent-soft: #ff8d95;
  --ok: #49dc9b;
  --warn: #ffb454;
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 248px;
  --glow: 0 24px 70px rgba(0, 0, 0, .48);
  --glass: rgba(12, 14, 20, .84);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-soft: #eaedf5;
  --bg-card: #ffffff;
  --bg-hover: #f0f2f8;
  --line: #dfe3ed;
  --text: #151a25;
  --text-dim: #596276;
  --text-mute: #8a93a5;
  --accent: #e94b5f;
  --accent-2: #f2844e;
  --accent-soft: #d94358;
  --glass: rgba(255, 255, 255, .88);
  --glow: 0 24px 60px rgba(34, 45, 75, .14);
  color-scheme: light;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "SF Pro Display", "Segoe UI Variable", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: .005em;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 42% at 16% 4%, rgba(255, 95, 109, .13), transparent 68%),
    radial-gradient(42% 38% at 86% 8%, rgba(105, 82, 255, .13), transparent 70%),
    radial-gradient(36% 30% at 55% 105%, rgba(255, 154, 98, .08), transparent 72%);
  animation: none;
}
html[data-theme="light"] body::before { opacity: .55; }
@keyframes aurora {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}
#app { position: relative; z-index: 1; }

* { scrollbar-width: thin; scrollbar-color: #3a4354 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #353e4e; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(255, 95, 109, .32); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { letter-spacing: -.02em; }
h1 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; }
h2 { font-weight: 680; }
.muted { color: var(--text-dim); }

/* ---------- 品牌与导航 ---------- */
.logo {
  width: 42px; height: 42px; border-radius: 14px;
  background: conic-gradient(from 210deg, #ff5f6d, #ff9a62, #b06cff, #ff5f6d);
  box-shadow: 0 10px 28px rgba(255, 95, 109, .28), inset 0 1px 0 rgba(255,255,255,.35);
  font-size: 21px; font-weight: 700;
}
.brand-name { font-size: 15px; font-weight: 720; letter-spacing: .02em; }
.brand-sub { color: var(--text-mute); letter-spacing: .01em; }
.nav-ic { display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.nav-ic svg { width: 18px; height: 18px; display: block; }
.side-search {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.035); color: var(--text-mute);
  font-size: 13px; transition: .18s;
}
.side-search:hover { border-color: #3a4352; color: var(--text); background: var(--bg-hover); }
.side-search kbd {
  margin-left: auto; font: 10px/1 ui-monospace, Consolas, monospace;
  color: var(--text-mute); border: 1px solid var(--line); border-radius: 5px;
  padding: 4px 6px; background: rgba(255,255,255,.03);
}
.side-tools { display: none; }

/* ---------- 桌面侧栏 ---------- */
@media (min-width: 1000px) {
  #app { padding-left: var(--sidebar); }
  .topbar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
    display: flex; flex-direction: column; align-items: stretch; gap: 16px;
    padding: 24px 16px 18px;
    background: rgba(10, 11, 15, .78);
    border-right: 1px solid var(--line); border-bottom: 0;
    backdrop-filter: blur(24px) saturate(1.3);
    z-index: 70;
  }
  html[data-theme="light"] .topbar { background: rgba(255,255,255,.8); }
  .brand { min-width: 0; padding: 2px 8px 10px; gap: 12px; }
  .brand-sub { font-size: 11px; line-height: 1.45; }
  .tabs { flex: none; flex-direction: column; gap: 4px; overflow: visible; }
  .tab {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 11px 14px; border-radius: 12px;
    text-align: left; font-size: 14px; color: var(--text-dim);
  }
  .tab:hover { background: rgba(255,255,255,.045); color: var(--text); }
  .tab.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(255,95,109,.20), rgba(255,154,98,.045));
    box-shadow: inset 3px 0 0 var(--accent);
  }
  html[data-theme="light"] .tab.active { color: var(--text); }
  .tab.active .nav-ic { color: var(--accent); }
  .topbar-right {
    margin-top: auto; flex-direction: column; align-items: stretch;
    gap: 9px; padding-top: 14px; border-top: 1px solid var(--line);
  }
  .quality-pick select { width: 100%; padding: 9px 12px; border-radius: 12px; }
  .account {
    justify-content: flex-start; padding: 9px 11px; border: 1px solid var(--line);
    border-radius: 12px; background: rgba(255,255,255,.035);
  }
  .acct-menu { left: 0; right: auto; top: auto; bottom: calc(100% + 8px); width: 100%; }
  .side-tools { display: block; }
  .side-tools .ghost { width: 100%; text-align: left; padding: 9px 12px; border-radius: 12px; }
  main { max-width: 1280px; padding: 36px 40px 132px; margin: 0 auto; }
  .player { left: var(--sidebar); }
  .queue-panel { width: 400px; }
  .toast { bottom: 104px; }
}

/* ---------- 通用控件 ---------- */
button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0; color: #fff; font-weight: 650;
  box-shadow: 0 10px 26px rgba(255, 95, 109, .20);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
button.primary:hover { filter: brightness(1.06); box-shadow: 0 14px 32px rgba(255, 95, 109, .30); transform: translateY(-1px); }
button.primary:active { transform: translateY(0) scale(.98); }
button.ghost {
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  transition: .16s;
}
html[data-theme="light"] button.ghost { background: rgba(255,255,255,.7); }
button.ghost:hover { background: var(--bg-hover); border-color: #3b4556; transform: translateY(-1px); }
.filters input[type=search], .filters select, .filters input[type=number],
.feed-actions input[type=search], .feed-actions input[type=text], .crawl-form input {
  background: rgba(255,255,255,.035); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
html[data-theme="light"] .filters input, html[data-theme="light"] .filters select,
html[data-theme="light"] .feed-actions input, html[data-theme="light"] .crawl-form input { background: #fff; }
.filters input:focus, .filters select:focus, .feed-actions input:focus, .crawl-form input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,95,109,.12);
}

/* ---------- 页面标题 ---------- */
.feed-head { align-items: flex-end; margin-bottom: 18px; }
.feed-head h1 { margin-bottom: 6px; }
.feed-head p { color: var(--text-mute); font-size: 13px; }
.panel > h1 { margin-bottom: 18px; }
.section-title { border-left: 0; padding-left: 0; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(180px, .65fr);
  gap: 24px; align-items: center;
  padding: 30px 32px; margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 26px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255,154,98,.16), transparent 55%),
    linear-gradient(120deg, rgba(255,95,109,.17), rgba(103,82,255,.10) 46%, rgba(19,23,32,.92) 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  animation: fadeUp .5s cubic-bezier(.2,.7,.3,1) both;
}
.hero::after {
  content: ""; position: absolute; right: -70px; bottom: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.018);
  pointer-events: none;
}
.hero-kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 8px; }
.hero-title { font-size: clamp(25px, 3.1vw, 40px); line-height: 1.18; font-weight: 760; letter-spacing: -.04em; margin: 0 0 10px; }
.hero-title span { background: linear-gradient(100deg, #fff 12%, #ffb3a0 48%, #c3b4ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="light"] .hero-title span { background: linear-gradient(100deg, #1b2130 12%, #c74654 48%, #7359d7 100%); -webkit-background-clip: text; background-clip: text; }
.hero-desc { color: var(--text-dim); font-size: 13px; max-width: 520px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-actions button { padding: 11px 20px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.hero-stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 11px; color: var(--text-mute); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 190px; }
.hero-disc {
  position: relative; width: min(190px, 100%); aspect-ratio: 1; border-radius: 50%;
  background: #111 center/cover no-repeat;
  box-shadow: 0 24px 55px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.14);
  animation: spin 18s linear infinite; animation-play-state: paused;
}
.hero-disc.playing { animation-play-state: running; }
.hero-disc::before {
  content: ""; position: absolute; inset: 18%; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,.10), rgba(0,0,0,.70) 72%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.hero-disc::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12%; aspect-ratio: 1;
  border-radius: 50%; transform: translate(-50%,-50%);
  background: var(--bg); box-shadow: 0 0 0 4px rgba(255,255,255,.15);
}
.hero-disc .disc-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 44px; height: 44px; border-radius: 50%; z-index: 2;
  border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.45);
  color: #fff; font-size: 16px; backdrop-filter: blur(8px);
}
.hero-disc .disc-play:hover { background: var(--accent); border-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片 / 统计 ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border-color: var(--line); border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
}
html[data-theme="light"] .card { background: #fff; box-shadow: 0 10px 30px rgba(30,45,80,.06); }
.stats-row { gap: 12px; }
.stat {
  flex: 1 1 130px; min-width: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  border-radius: 14px; padding: 14px 16px;
}
html[data-theme="light"] .stat { background: #fff; }
.stat b { font-size: 22px; letter-spacing: -.02em; }
.profile-strip {
  border-radius: 16px; border-color: var(--line);
  background: linear-gradient(90deg, rgba(255,95,109,.055), rgba(255,255,255,.02));
}
.chip { border-radius: 999px; transition: .15s; }
.chip:hover { background: var(--bg-hover); transform: translateY(-1px); }
.chip.hot { background: rgba(255,95,109,.12); color: var(--accent-soft); }
html[data-theme="light"] .chip.hot { background: rgba(233,75,95,.10); }

/* ---------- 歌曲行 ---------- */
.song-list { gap: 3px; }
.song {
  grid-template-columns: 30px 52px minmax(0, 1fr) 46px auto auto auto;
  gap: 13px; padding: 9px 13px; border-radius: 13px;
  transition: background .16s, transform .16s, box-shadow .16s;
  position: relative;
}
.song:hover {
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}
html[data-theme="light"] .song:hover { background: #fff; box-shadow: 0 5px 18px rgba(30,45,80,.07); }
.song-cover { width: 52px; height: 52px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.24); }
.song .act-play {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid transparent; color: transparent;
  background: transparent; transition: .15s;
}
.song:hover .act-play { color: var(--text-dim); background: rgba(255,255,255,.05); border-color: var(--line); }
.song .act-play:hover { color: #fff; background: var(--accent); border-color: transparent; }
.song-name { font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.song-sub { margin-top: 2px; }
.song-reason { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.song-time { font-size: 11px; }
.song-actions { opacity: .16; transform: translateX(5px); transition: opacity .16s, transform .16s; }
.song:hover .song-actions { opacity: 1; transform: none; }
.song.playing {
  background: linear-gradient(90deg, rgba(255,95,109,.12), rgba(255,95,109,.015) 72%);
  box-shadow: inset 3px 0 0 var(--accent);
}
.song.playing .song-name { color: var(--accent); }
.song .act-more { font-size: 16px; letter-spacing: 1px; }
.play-count { background: rgba(255,95,109,.11); }

/* ---------- 骨架屏 ---------- */
.sk-row {
  display: grid; grid-template-columns: 30px 52px minmax(0,1fr) 150px;
  gap: 13px; align-items: center; padding: 9px 13px;
}
.sk-block {
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.045) 25%, rgba(255,255,255,.09) 42%, rgba(255,255,255,.045) 60%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.sk-cover { width: 52px; height: 52px; border-radius: 10px; }
.sk-line { height: 11px; }
.sk-line.short { width: 55%; height: 9px; margin-top: 7px; }
.sk-actions { width: 100%; height: 24px; justify-self: end; }
.sk-card { height: 180px; border-radius: 16px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.load-error {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 8px 0; padding: 16px 18px; border-radius: 14px;
  border: 1px solid rgba(255,95,109,.25); background: rgba(255,95,109,.06);
  color: var(--text-dim);
}
.load-error button { flex: none; }

/* ---------- 歌手 / 专辑 ---------- */
.artist-grid { gap: 14px; }
.artist-card {
  border-radius: 16px; padding: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.artist-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(0,0,0,.24); border-color: #3a4354; }
html[data-theme="light"] .artist-card { background: #fff; }
.artist-cover { border-radius: 12px; }
.album-grid { gap: 14px; }
.album { transition: transform .2s; }
.album:hover { transform: translateY(-3px); }

/* ---------- 播放器 ---------- */
.player {
  background: rgba(11, 13, 18, .86);
  border-top-color: rgba(255,255,255,.07);
  backdrop-filter: blur(26px) saturate(1.45);
  box-shadow: 0 -16px 46px rgba(0,0,0,.30);
  padding-top: 11px; padding-bottom: 13px;
}
html[data-theme="light"] .player { background: rgba(255,255,255,.88); box-shadow: 0 -14px 40px rgba(30,45,80,.10); }
.np-cover { width: 56px; height: 56px; border-radius: 11px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.np-name { font-weight: 620; }
.np:hover .np-name { color: var(--accent); }
.ctrl-main {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px rgba(255,95,109,.30);
}
.ctrl-main:hover { box-shadow: 0 10px 28px rgba(255,95,109,.46); }
.seek { background: rgba(255,255,255,.10); }
.seek-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.seek-knob { box-shadow: 0 0 12px rgba(255,95,109,.6); }
#volumeBar { accent-color: var(--accent); }

/* ---------- 队列 / 歌词 ---------- */
.queue-panel {
  background: rgba(12, 14, 20, .94);
  backdrop-filter: blur(26px);
  box-shadow: -20px 0 60px rgba(0,0,0,.35);
}
html[data-theme="light"] .queue-panel { background: rgba(255,255,255,.96); }
.queue-now, .queue-head { border-color: var(--line); }
.lyrics-page .lp-inner { background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.62)); }
.lp-title { font-size: 22px; letter-spacing: -.02em; }
.lp-tool { border-radius: 999px; transition: .15s; }

/* ---------- 搜索命令面板 ---------- */
#searchOverlay {
  position: fixed; inset: 0; z-index: 160;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 9vh 16px 16px;
  background: rgba(4, 5, 8, .72);
  backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
#searchOverlay.open { opacity: 1; visibility: visible; }
.search-panel {
  width: min(760px, 100%); max-height: 78vh;
  display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,.11); border-radius: 20px;
  background: rgba(16, 19, 26, .97);
  box-shadow: 0 30px 100px rgba(0,0,0,.6);
  overflow: hidden; transform: translateY(-8px) scale(.99); transition: .2s;
}
#searchOverlay.open .search-panel { transform: none; }
html[data-theme="light"] .search-panel { background: #fff; }
.search-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search-top svg { width: 20px; height: 20px; color: var(--text-mute); flex: none; }
.search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--text); }
.search-input::placeholder { color: var(--text-mute); }
.search-kbd {
  font: 10px/1 ui-monospace, Consolas, monospace; color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 5px; padding: 5px 6px; background: rgba(255,255,255,.03);
}
.search-tabs { display: flex; gap: 6px; padding: 10px 14px 0; }
.search-tab {
  border: 0; background: transparent; color: var(--text-mute); font-size: 12px;
  padding: 6px 11px; border-radius: 999px;
}
.search-tab.active { background: var(--bg-hover); color: var(--text); }
.search-results { flex: 1; overflow: auto; padding: 8px 10px 12px; min-height: 120px; }
.search-group-label { font-size: 11px; color: var(--text-mute); letter-spacing: .1em; text-transform: uppercase; padding: 9px 10px 5px; }
.search-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text); text-align: left;
}
.search-item.active, .search-item:hover { background: var(--bg-hover); }
.search-cover { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; background: var(--bg-hover); flex: none; }
.search-item-main { flex: 1; min-width: 0; }
.search-item-main b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-main span { display: block; font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.search-kind { font-size: 10px; color: var(--text-mute); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; }
.search-empty { padding: 38px 16px; text-align: center; color: var(--text-mute); font-size: 13px; }
.search-foot { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-mute); }
.search-foot kbd { font: 10px/1 ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; margin-right: 4px; }

/* ---------- 歌曲右键菜单 ---------- */
#ctxMenu {
  position: fixed; z-index: 170; display: none; width: 232px;
  padding: 6px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px;
  background: rgba(18, 21, 29, .98); box-shadow: 0 22px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(20px);
}
html[data-theme="light"] #ctxMenu { background: #fff; }
#ctxMenu.open { display: block; animation: ctxIn .12s ease-out; }
@keyframes ctxIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.ctx-title { padding: 8px 10px 6px; font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text-dim); font-size: 13px; text-align: left;
}
.ctx-item:hover { background: var(--bg-hover); color: var(--text); }
.ctx-item .ic { width: 18px; text-align: center; color: var(--text-mute); }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 6px; }

/* ---------- 相似歌曲抽屉 ---------- */
#similarDrawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
  width: min(430px, 100%); display: flex; flex-direction: column;
  background: rgba(13, 16, 22, .97); border-left: 1px solid var(--line);
  box-shadow: -24px 0 70px rgba(0,0,0,.45);
  backdrop-filter: blur(24px);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.3,.7,.3,1);
}
html[data-theme="light"] #similarDrawer { background: rgba(255,255,255,.98); }
#similarDrawer.open { transform: none; }
.sim-head { padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.sim-kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-soft); }
.sim-title { font-size: 19px; font-weight: 700; margin: 5px 0 3px; }
.sim-sub { font-size: 12px; color: var(--text-mute); }
.sim-actions { display: flex; gap: 8px; margin-top: 14px; }
.sim-body { flex: 1; overflow: auto; padding: 10px; }
.sim-close { position: absolute; top: 14px; right: 14px; }

/* ---------- 近期回顾 ---------- */
.recap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: 14px; margin-bottom: 16px; }
.recap-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); }
html[data-theme="light"] .recap-card { background: #fff; }
.recap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.recap-head h3 { margin: 0; }
.recap-head span { font-size: 11px; color: var(--text-mute); }
.recap-bars { display: flex; align-items: flex-end; gap: 7px; height: 128px; padding-top: 8px; }
.recap-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.recap-bar i { display: block; width: 100%; max-width: 26px; min-height: 4px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent), rgba(255,95,109,.20)); transition: height .4s; }
.recap-bar:hover i { filter: brightness(1.2); }
.recap-bar span { font-size: 9px; color: var(--text-mute); white-space: nowrap; }
.recap-list { display: flex; flex-direction: column; gap: 9px; }
.recap-artist { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.recap-artist .idx { width: 18px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.recap-artist .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recap-artist .val { color: var(--text-mute); font-size: 11px; }
.recap-meta { display: flex; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.recap-meta b { display: block; font-size: 16px; }
.recap-meta span { font-size: 10px; color: var(--text-mute); }

/* ---------- 快捷工具 / 快捷键 ---------- */
#toolsMenu {
  position: fixed; z-index: 180; display: none; width: 220px; padding: 6px;
  border: 1px solid rgba(255,255,255,.11); border-radius: 14px;
  background: rgba(18,21,29,.98); box-shadow: 0 22px 60px rgba(0,0,0,.55);
}
html[data-theme="light"] #toolsMenu { background: #fff; }
#toolsMenu.open { display: block; animation: ctxIn .12s ease-out; }
#shortcutSheet {
  position: fixed; inset: 0; z-index: 170; display: none; place-items: center;
  padding: 20px; background: rgba(4,5,8,.7); backdrop-filter: blur(12px);
}
#shortcutSheet.open { display: grid; }
.shortcut-box { width: min(480px, 100%); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-card); box-shadow: var(--glow); }
.shortcut-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.shortcut-row:last-child { border-bottom: 0; }
.shortcut-row kbd { font: 11px/1 ui-monospace, Consolas, monospace; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; background: var(--bg-soft); }

/* ---------- 移动端底部导航 ---------- */
#mobileNav { display: none; }
@media (max-width: 640px) {
  .tabs { display: none !important; }
  #mobileNav {
    display: grid; grid-template-columns: repeat(7, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 64;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding: 5px 4px env(safe-area-inset-bottom, 0px);
    background: rgba(10, 12, 17, .93);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(22px);
  }
  html[data-theme="light"] #mobileNav { background: rgba(255,255,255,.94); }
  .mn-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; background: transparent; color: var(--text-mute); font-size: 9px; padding: 0;
  }
  .mn-item .nav-ic { width: 18px; height: 18px; }
  .mn-item .nav-ic svg { width: 17px; height: 17px; }
  .mn-item.active { color: var(--accent); }
  .player { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  main { padding-bottom: calc(196px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(176px + env(safe-area-inset-bottom, 0px)); }
  .hero { grid-template-columns: 1fr; padding: 22px 20px; border-radius: 20px; }
  .hero-art { display: none; }
  .hero-desc { display: none; }
  .hero-actions { margin-top: 14px; }
  .hero-actions button { flex: 1; padding: 10px 12px; font-size: 12px; }
  .hero-stats { gap: 14px; margin-top: 16px; }
  .hero-stat b { font-size: 15px; }
  .hero-stat span { font-size: 10px; }
  .search-panel { max-height: 84vh; }
  .search-foot { display: none; }
  .recap { grid-template-columns: 1fr; }
  .recap-bars { height: 96px; }
  .recap-card { padding: 15px; }
  #similarDrawer { top: auto; bottom: 0; height: 82vh; width: 100%; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; transform: translateY(105%); }
  #similarDrawer.open { transform: none; }
  .song .act-more { display: none; }
  .song { padding: 8px 7px; }
  .song-cover { width: 48px; height: 48px; }
  .song-actions { opacity: 1; }
  .feed-actions { gap: 6px; }
  .feed-actions button { padding: 8px 11px; font-size: 12px; }
}

@media (max-width: 380px) {
  #mobileNav { grid-template-columns: repeat(7, 1fr); }
  .mn-item { font-size: 8px; }
  .hero-stats .hero-stat:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 补充：移动端工具按钮 / 相似歌曲行 ---------- */
.mobile-only { display: none; }
@media (max-width: 999px) { .side-search { display: none; } }
@media (max-width: 640px) {
  .mobile-only { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 10px; }
  .mobile-only .nav-ic { width: 16px; height: 16px; }
  .quality-pick select { max-width: 88px; padding: 6px 8px; font-size: 11px; }
  #acctText { max-width: 68px; }
}
.hero-actions .nav-ic { width: 16px; height: 16px; margin-right: 2px; }
.hero-actions .nav-ic svg { width: 15px; height: 15px; }
.sim-song { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.sim-song:hover { background: var(--bg-hover); }
.sim-cover { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--bg-hover); flex: none; }
.sim-main { flex: 1; min-width: 0; }
.sim-main b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-main span { display: block; font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.sim-score { font-size: 10px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.sim-play { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--text-mute); border: 1px solid transparent; font-size: 12px; flex: none; }
.sim-song:hover .sim-play { color: #fff; background: var(--accent); border-color: transparent; }
.sim-head { position: relative; }
.sim-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; }
.sim-close .nav-ic svg { width: 14px; height: 14px; }

/* ---------- 播放条右侧按钮不再被压缩 ---------- */
.player-right { gap: 8px; }
.player-right .ghost.small { white-space: nowrap; flex: none; }
.player-right .ctrl { flex: none; }
#volumeBar { width: 82px; }
.song-actions { opacity: .34; }
.song:hover .song-actions { opacity: 1; }
.song-reason { max-width: 220px; }

/* ---------- 移动端顶栏收敛：品牌不换行，音质移入工具菜单 ---------- */
@media (max-width: 640px) {
  .brand-name { white-space: nowrap; }
  .brand-sub { display: none !important; }
  .quality-pick { display: none !important; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-right { gap: 6px; }
  #acctText { max-width: 58px; }
  .brand { gap: 8px; }
  .logo { width: 32px; height: 32px; }
}

@media (max-width: 640px) {
  #btnMode { display: none !important; }
  .controls { gap: 3px; }
  .np-meta { min-width: 0; }
  .np-name { font-size: 13px; }
  .np-artist { font-size: 10px; }
  .player { column-gap: 6px; }
}

/* ---------- 浅色主题的 Hero 对比度 ---------- */
html[data-theme="light"] .hero {
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255,154,98,.16), transparent 55%),
    linear-gradient(120deg, #ffffff, #f4f1ff 48%, #ffffff 100%);
  border-color: #e4e7f0;
  box-shadow: 0 20px 55px rgba(50, 65, 110, .10);
}
html[data-theme="light"] .hero::after {
  border-color: rgba(70, 80, 120, .10);
  box-shadow: 0 0 0 34px rgba(70,80,120,.035), 0 0 0 70px rgba(70,80,120,.022);
}
html[data-theme="light"] .hero-desc { color: #5d6678; }
html[data-theme="light"] .hero-kicker { color: var(--accent); }
html[data-theme="light"] .hero-stat span { color: #7c8598; }
html[data-theme="light"] .hero-disc { box-shadow: 0 20px 50px rgba(50,65,110,.18), inset 0 0 0 1px rgba(255,255,255,.5); }
html[data-theme="light"] .hero-disc::before { background: radial-gradient(circle, rgba(255,255,255,.05), rgba(0,0,0,.55) 72%); }
html[data-theme="light"] .hero-disc::after { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.45); }

/* ---------- 641–900px：大屏手机 / 小平板统一用底部导航 ---------- */
@media (min-width: 641px) and (max-width: 999px) {
  .tabs { display: none !important; }
  .topbar { flex-wrap: nowrap; }
  .quality-pick { display: none !important; }
  .mobile-only { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; }
  .mobile-only .nav-ic { width: 16px; height: 16px; }
  #mobileNav {
    display: grid; grid-template-columns: repeat(7, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 64;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding: 5px 10px env(safe-area-inset-bottom, 0px);
    background: rgba(10, 12, 17, .93);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(22px);
  }
  html[data-theme="light"] #mobileNav { background: rgba(255,255,255,.94); }
  .mn-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; background: transparent; color: var(--text-mute); font-size: 10px; padding: 0;
  }
  .mn-item .nav-ic { width: 18px; height: 18px; }
  .mn-item .nav-ic svg { width: 17px; height: 17px; }
  .mn-item.active { color: var(--accent); }
  .player { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  main { padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 横向溢出保护 ---------- */
html, body { max-width: 100%; }
html { overflow-x: clip; }
#app { width: 100%; max-width: 100%; min-width: 0; }
main { width: 100%; max-width: 100%; min-width: 0; }
.panel, .hero, .feed-head, .feed-actions, .profile-strip, .song-list, .song, .artist-grid, .stats-row { min-width: 0; max-width: 100%; }
.hero-title, .hero-desc, .feed-head p, .song-name, .song-sub, .song-reason { overflow-wrap: anywhere; }

/* ---------- 641–900px：内容也按单栏手机布局 ---------- */
@media (min-width: 641px) and (max-width: 999px) {
  .hero { grid-template-columns: 1fr; padding: 24px 22px; border-radius: 22px; }
  .hero-art { display: none; }
  .hero-title { font-size: clamp(26px, 4.2vw, 36px); }
  .hero-desc { max-width: none; }
  .hero-actions { flex-wrap: wrap; }
  .hero-actions button { flex: 1 1 auto; min-width: 0; }
  .feed-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .feed-actions { flex-wrap: wrap; }
  .feed-actions button { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
  .feed-actions input, .feed-actions select { flex: 1 1 150px; min-width: 0; }
  .profile-strip { font-size: 12px; }
  .song-reason { max-width: none; }
}

/* ---------- 1000–1199px：侧栏刚出现时，播放条压缩一点，避免“歌词”被挤掉 ---------- */
@media (min-width: 1000px) and (max-width: 1199px) {
  .player {
    grid-template-columns: minmax(170px, 1fr) minmax(250px, 1.3fr) auto;
    gap: 12px; padding-left: 18px; padding-right: 18px;
  }
  .player-right { gap: 6px; }
  #volumeBar { width: 58px; }
}

/* ---------- 播放条上方渐隐，避免内容被硬切 ---------- */
.player::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -18px; height: 18px;
  background: linear-gradient(180deg, rgba(9,10,14,0), rgba(9,10,14,.88));
  pointer-events: none;
}
html[data-theme="light"] .player::before {
  background: linear-gradient(180deg, rgba(244,246,251,0), rgba(244,246,251,.94));
}

/* ---------- 窄屏 Hero：允许内容收缩，统计与按钮两列排布 ---------- */
.hero > div:first-child { min-width: 0; }
.hero-actions, .hero-stats { min-width: 0; }
@media (max-width: 640px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-actions button { min-width: 0; max-width: 100%; }
  .feed-head p { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .feed-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .feed-actions button { width: 100%; padding: 9px 10px; font-size: 13px; }
}
@media (max-width: 340px) {
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hero-actions button { width: 100%; padding: 9px 8px; font-size: 12px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
  .hero-title { font-size: 22px; }
  .hero-stat b { font-size: 15px; }
  .hero-stat span { font-size: 9px; }
  .feed-actions button { padding: 8px 6px; font-size: 11px; }
}

/* ---------- 修复：桌面 .feed-head 的 align-items 覆盖手机端 ---------- */
@media (max-width: 999px) {
  .feed-head { align-items: stretch; }
  .feed-head > div { min-width: 0; max-width: 100%; }
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 170px; z-index: 72;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(18, 21, 29, .86);
  color: var(--text); font-size: 18px; line-height: 1;
  display: grid; place-items: center;
  backdrop-filter: blur(16px); box-shadow: 0 10px 28px rgba(0,0,0,.32);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, visibility .2s, transform .2s;
}
html[data-theme="light"] .to-top { background: rgba(255,255,255,.9); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
@media (min-width: 1000px) { .to-top { bottom: 108px; } }

/* ---------- 手机端歌曲行：强制 3 列，歌名完整显示 ---------- */
@media (max-width: 640px) {
  .song {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 2px 10px !important;
    padding: 8px !important;
  }
  .song .act-play { display: none !important; }
  .song {
    align-items: start !important;
    row-gap: 4px !important;
  }
  .song .song-cover {
    grid-column: 1 !important; grid-row: 1 / span 2 !important;
    width: 46px; height: 46px; align-self: start; margin-top: 1px;
  }
  .song .song-main { grid-column: 2 !important; grid-row: 1 !important; min-width: 0; }
  .song .song-name {
    white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
    font-size: 15px; line-height: 1.35;
  }
  .song .song-sub { white-space: normal !important; overflow-wrap: anywhere; }
  .song .song-time, .song .song-idx { display: none !important; }
  .song .song-reason {
    grid-column: 2 / -1 !important; grid-row: 2 !important;
    white-space: normal !important; max-width: none !important; margin-top: 2px;
  }
  .song .song-actions {
    grid-column: 3 !important; grid-row: 1 !important;
    align-self: start; opacity: .9; transform: none;
  }
  .song .song-actions .act { width: 30px; height: 30px; font-size: 14px; }
  .song .act-save, .song .act-dislike, .song .act-more { display: none !important; }
  .song .play-count { display: none !important; }
}
