/* ============ 云音播放器 主题与布局 ============ */
:root {
  --bg: #121212;
  --bg-elev: #1a1a1f;
  --bg-card: #232329;
  --bg-hover: #2c2c34;
  --border: #2e2e36;
  --text: #f2f2f5;
  --text-dim: #9a9aa3;
  --accent: #ff4d5a;
  --accent2: #ff8a5c;
  --grad: linear-gradient(135deg, #ff4d5a, #ff8a5c);
  --radius: 12px;
  --sidebar-w: 220px;
  --topbar-h: 60px;
  --playerbar-h: 84px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  user-select: none;
}
img { -webkit-user-drag: none; }
button { font-family: var(--font); border: none; background: none; color: var(--text); cursor: pointer; }
input, select { font-family: var(--font); }

/* ============ 顶栏 ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: rgba(18,18,18,.85); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border); z-index: 100;
  display: flex; align-items: center;
}
.topbar-inner { width: 100%; max-width: 1500px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.brand-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #fff; box-shadow: 0 2px 12px rgba(255,77,90,.4);
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .5px; white-space: nowrap; }
.search-wrap { position: relative; flex: 1; max-width: 520px; }
.search-ic {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none; transition: color .2s; z-index: 2;
}
#top-search {
  width: 100%; height: 38px; border-radius: 20px; border: 1px solid rgba(255,255,255,.14);
  background: #2a2a33; color: var(--text); padding: 0 18px 0 38px; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.25) inset;
}
#top-search::placeholder { color: rgba(154,154,163,.75); }
#top-search:hover { border-color: rgba(255,255,255,.26); background: #2e2e38; }
#top-search:focus {
  border-color: var(--accent);
  background: #2e2e38;
  box-shadow: 0 0 0 3px rgba(255,77,90,.16), 0 1px 4px rgba(0,0,0,.25) inset;
}
.search-wrap:focus-within .search-ic { color: var(--accent); }
.search-tip {
  position: absolute; top: 44px; left: 0; right: 0; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.5);
  max-height: 340px; overflow: auto; display: none; z-index: 200;
}
.search-tip.show { display: block; }
.search-tip .tip-item { padding: 10px 16px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.search-tip .tip-item:hover { background: var(--bg-hover); color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#source-select {
  height: 34px; border-radius: 17px; background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); padding: 0 12px; font-size: 13px; outline: none;
}
.btn-icon { width: 36px; height: 36px; border-radius: 50%; font-size: 16px; background: var(--bg-card); border: 1px solid var(--border); }
.btn-icon:hover { background: var(--bg-hover); }

/* ============ 侧边栏 ============ */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: var(--playerbar-h);
  width: var(--sidebar-w); background: #16161b; border-right: 1px solid var(--border);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; z-index: 50;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px;
  font-size: 14px; color: var(--text-dim); cursor: pointer; transition: all .15s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg-card); color: #fff; font-weight: 600; }
.nav-item.active .nav-ico { color: var(--accent); }
.nav-ico { width: 20px; text-align: center; font-size: 14px; }
.nav-section-grow { flex: 1; overflow-y: auto; margin-top: 10px; }
.nav-title { font-size: 12px; color: #666; padding: 10px 14px 6px; }
.nav-source-item { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.nav-source-item:hover { background: var(--bg-hover); }
.nav-source-item .dot { width: 8px; height: 8px; border-radius: 50%; }
.nav-source-item.active { color: #fff; }

/* ============ 主内容区 ============ */
.main {
  position: fixed; top: var(--topbar-h); left: var(--sidebar-w); right: 0; bottom: var(--playerbar-h);
  overflow-y: auto; padding: 24px 32px 40px;
  /* 防御：主界面始终为实色底，杜绝任何封面背景透出 */
  background: var(--bg);
}
.view { display: none; background: transparent; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.page-title .sub { font-size: 13px; color: var(--text-dim); font-weight: 400; }

/* 卡片网格 */
.grid { display: grid; gap: 16px; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-card); border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform .18s, background .18s; position: relative;
}
.card:hover { transform: translateY(-4px); background: var(--bg-hover); }
.card-img-wrap { position: relative; aspect-ratio: 1; background: var(--bg-elev); overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img.ph { display: flex; align-items: center; justify-content: center; font-size: 42px; color: #555; }
.card-play {
  position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(8px); transition: all .2s; box-shadow: 0 4px 14px rgba(255,77,90,.5);
}
.card:hover .card-play { opacity: 1; transform: none; }
.card-info { padding: 10px 12px 12px; }
.card-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { font-size: 12px; color: var(--text-dim); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 区块标题 */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.sec-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec-ic { color: var(--accent); }
.sec-ops { display: flex; align-items: center; gap: 8px; }
.set-btn.mini { padding: 5px 12px; font-size: 12.5px; border-radius: 8px; }
.set-btn.danger { background: rgba(255,77,90,.14); color: #ff6b76; border-color: rgba(255,77,90,.35); }
.set-btn.danger:hover { background: rgba(255,77,90,.24); }
.s-card-ic { color: var(--accent); }

/* 最近播放管理 */
.rec-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--bg-elev); }
.rec-bar-tip { flex: 1; font-size: 13px; color: var(--text-dim); }
.rec-bar-tip b { color: var(--accent); }
.song-row .s-del { opacity: .6; color: var(--text-dim); display: flex; padding: 5px; border-radius: 6px; transition: opacity .15s, background .15s, color .15s; }
.song-row:hover .s-del { opacity: 1; }
.song-row .s-del:hover { color: #ff6b76; background: rgba(255,77,90,.12); }
.song-row .s-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.song-row.rec-sel { background: rgba(255,77,90,.10); }
.song-row.rec-sel .s-name { color: var(--accent); }
.s-cover.ph-mini { display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 16px; }

/* 歌曲行 */
.song-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  cursor: pointer; transition: background .15s;
}
.song-row:hover { background: var(--bg-hover); }
.song-row.playing { background: rgba(255,77,90,.12); }
.song-row .s-idx { width: 26px; text-align: center; font-size: 13px; color: var(--text-dim); flex-shrink: 0; }
.song-row.playing .s-idx { color: var(--accent); font-weight: 700; }
.song-row .s-cover { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--bg-elev); flex-shrink: 0; }
.song-row .s-main { flex: 1; min-width: 0; }
.song-row .s-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-row.playing .s-name { color: var(--accent); }
.song-row .s-artist { font-size: 12px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-row .s-album { width: 28%; font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
.song-row .s-dur { font-size: 12.5px; color: var(--text-dim); flex-shrink: 0; }
.song-row .s-act { display: flex; gap: 6px; flex-shrink: 0; }
.song-row .s-act button { width: 30px; height: 30px; border-radius: 50%; font-size: 13px; color: var(--text-dim); }
.song-row .s-act button:hover { background: var(--bg-hover); color: #fff; }
.song-list { display: flex; flex-direction: column; gap: 2px; }

/* 标签/筛选 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  padding: 6px 14px; border-radius: 16px; font-size: 13px; background: var(--bg-card);
  color: var(--text-dim); cursor: pointer; border: 1px solid transparent;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ============ 底部播放栏 ============ */
.playerbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--playerbar-h);
  background: rgba(18,18,18,.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border); z-index: 100;
  display: flex; align-items: center; padding: 0 20px; gap: 24px;
}
.pb-left { display: flex; align-items: center; gap: 12px; width: 26%; min-width: 200px; cursor: pointer; }
.pb-cover { width: 54px; height: 54px; border-radius: 8px; overflow: hidden; background: var(--bg-elev); flex-shrink: 0; }
.pb-cover img { width: 100%; height: 100%; object-fit: cover; }
.pb-info { min-width: 0; }
.pb-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-artist { font-size: 12px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-center { flex: 1; max-width: 620px; }
.pb-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.pb-btn { font-size: 17px; color: var(--text-dim); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.pb-btn:hover { color: #fff; background: var(--bg-hover); }
.pb-play { width: 44px; height: 44px; background: var(--grad) !important; color: #fff !important; font-size: 17px; box-shadow: 0 4px 16px rgba(255,77,90,.4); }
.pb-play:hover { transform: scale(1.06); }
.pb-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pb-time { font-size: 11.5px; color: var(--text-dim); min-width: 36px; text-align: center; }
.pb-bar { flex: 1; height: 4px; border-radius: 2px; background: #3a3a42; position: relative; cursor: pointer; }
.pb-bar-fill { height: 100%; border-radius: 2px; background: var(--grad); width: 0; position: relative; }
.pb-bar-dot {
  position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%); box-shadow: 0 1px 6px rgba(0,0,0,.4);
  opacity: 0; transition: opacity .15s;
}
.pb-bar:hover .pb-bar-dot { opacity: 1; }
.pb-right { display: flex; align-items: center; gap: 10px; width: 20%; justify-content: flex-end; }
.pb-quality { font-size: 11px; color: var(--text-dim); background: var(--bg-card); padding: 3px 8px; border-radius: 10px; }
.pb-volbar { width: 80px; height: 4px; border-radius: 2px; background: #3a3a42; cursor: pointer; position: relative; }

/* ============ 移动端 ============ */
.mobile-tab, .mini-bar { display: none; }

/* ============ 全局背景层（已弃用：播放页自带背景，此层不再显示） ============ */
.bg-layer { display: none !important; }
.bg-shade { display: none !important; }

/* ============ 全屏播放页（QQ 音乐风格） ============ */
.player-page {
  position: fixed; inset: 0; z-index: 300; display: none; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #0d0d12; /* 兜底实心底色：即使背景图未加载也完全不透明 */
  --pp-fg: #fff;
  --pp-dim: rgba(255,255,255,.68);
  --pp-weak: rgba(255,255,255,.42);
  --pp-line: rgba(255,255,255,.16);
  --pp-glass: rgba(255,255,255,.10);
}
body.pp-light .player-page {
  background: #e9e9ef;
  --pp-fg: #1d1d24;
  --pp-dim: rgba(25,25,34,.66);
  --pp-weak: rgba(25,25,34,.4);
  --pp-line: rgba(25,25,34,.16);
  --pp-glass: rgba(25,25,34,.08);
}
.player-page.open { display: flex; animation: ppIn .32s ease; }
/* 播放页自足背景层：模糊封面 + 遮罩，位于内容之下 */
.pp-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: transparent; }
.pp-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(76px) saturate(1.3) brightness(1.05); transform: scale(1.28);
}
.pp-bg-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,14,.62) 0%, rgba(10,10,16,.76) 55%, rgba(6,6,12,.96) 100%);
}
body.pp-light .pp-bg img { filter: blur(76px) saturate(1.15) brightness(1.12); }
body.pp-light .pp-bg-shade {
  background: linear-gradient(180deg, rgba(255,255,255,.46) 0%, rgba(238,238,244,.7) 55%, rgba(214,214,224,.92) 100%);
}
@keyframes ppIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.pp-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; padding: 14px 22px 6px; gap: 14px; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 100%); pointer-events: none; }
.pp-top > * { pointer-events: auto; }
.pp-close {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--pp-dim); transition: all .2s;
}
.pp-close:hover { color: var(--pp-fg); background: rgba(255,255,255,.15); }
.pp-index { flex: 1; text-align: center; font-size: 15px; font-weight: 600; letter-spacing: .5px; color: var(--pp-dim); }
.pp-btn {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--pp-dim); transition: all .2s;
}
.pp-btn:hover { color: var(--pp-fg); background: rgba(255,255,255,.15); }

.pp-body { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; gap: 5vw; padding: 0 5vw; min-height: 0; }
.pp-disc-wrap { position: relative; width: min(42vh, 34vw, 380px); aspect-ratio: 1; flex-shrink: 0; }
.pp-disc {
  position: absolute; inset: 0; border-radius: 50%;
  background: #0a0a0c;
  box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  animation: spin 24s linear infinite; animation-play-state: paused;
  transition: transform .3s ease;
}
.pp-disc.playing { animation-play-state: running; }
.pp-cover { width: 60%; height: 60%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.1); }
.pp-disc-hole { position: absolute; width: 5%; height: 5%; border-radius: 50%; background: #000; box-shadow: inset 0 0 4px #000; }
.pp-tonearm {
  position: absolute; top: 15%; right: 0%; z-index: 5; transform-origin: 25% 12%;
  transform: rotate(-20deg); transition: transform .45s ease; opacity: .95;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
}
.pp-tonearm.off { transform: rotate(-60deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.pp-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 130px; color: var(--pp-weak); }

.pp-lyric-wrap { flex: 1; max-width: 600px; height: 65%; min-height: 0; display: flex; flex-direction: column; position: relative; }
.pp-song-info { padding: 10px 4px 10px; }
.pp-song-name { font-size: 24px; font-weight: 700; color: var(--pp-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-song-artist { font-size: 14px; color: var(--pp-dim); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-lyric { flex: 1; overflow: hidden auto; padding: 14px 8px 26%; scrollbar-width: none; min-height: 0; }
.pp-lyric::-webkit-scrollbar { display: none; }
.pp-lyric-line { text-align: left; font-size: 16px; color: var(--pp-weak); padding: 10px 2px; transition: all .28s; line-height: 1.7; letter-spacing: .3px; }
.pp-lyric-line.active { color: var(--pp-fg); font-size: 19px; font-weight: 700; }
.pp-lyric-line.trans { color: var(--pp-dim); }
.pp-lyric-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--pp-weak); font-size: 15px; }

.pp-controls { position: relative; z-index: 1; padding: 8px 4vw 20px; }
.pp-progress { display: flex; align-items: center; gap: 14px; max-width: 760px; margin: 0 auto 12px; }
.pp-time { font-size: 12.5px; color: var(--pp-dim); min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.pp-btns { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pp-cbtn {
  color: var(--pp-dim); width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.pp-cbtn:hover { color: var(--pp-fg); background: var(--pp-glass); }
.pp-big {
  width: 66px; height: 66px; border-radius: 50%; background: #fff; color: #141419 !important;
  box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: transform .15s ease;
}
.pp-big:hover { transform: scale(1.06); background: #fff; }
body.pp-light .pp-big { background: #1d1d24; color: #fff !important; box-shadow: 0 8px 30px rgba(0,0,0,.22); }
.pp-small { width: 40px; height: 40px; }
.pp-sep { width: 1px; height: 22px; background: var(--pp-line); margin: 0 6px; }
.pp-quality {
  font-size: 12px; color: var(--pp-dim); background: var(--pp-glass); backdrop-filter: blur(8px);
  padding: 5px 12px; border-radius: 14px; cursor: pointer; transition: all .2s; border: 1px solid transparent;
}
.pp-quality:hover { color: var(--pp-fg); border-color: var(--pp-line); }
.pp-volbar { width: 86px; height: 4px; border-radius: 2px; background: var(--pp-line); cursor: pointer; position: relative; }

/* 播放页内进度条 / 音量条适配动态背景 */
.player-page .pb-bar { background: var(--pp-line); }
.player-page .pb-bar-fill { background: linear-gradient(90deg, #1e6bff, #3aa0ff); }
.player-page .pb-bar-dot { background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.3); }
body.pp-light .player-page .pb-bar-dot { background: #1d1d24; }
.pp-vol-btn.muted { opacity: .42; }
.pp-cbtn svg { display: block; }
.pp-big svg { display: block; }

/* 动态频谱（蓝色波形可视化） */
.pp-spectrum {
  position: relative; z-index: 1;
  width: 100%; max-width: 760px; margin: 0 auto; height: 48px; display: block; flex-shrink: 0;
  padding: 0 0 8px; opacity: .95;
}

/* 播放列表抽屉 */
.pp-queue {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 90vw);
  background: rgba(18,18,24,.92); backdrop-filter: blur(20px); border-left: 1px solid var(--pp-line);
  transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; z-index: 10;
}
.pp-queue.open { transform: none; }
/* 队列遮罩：点击抽屉外区域关闭（含手机端触摸） */
.pp-queue-mask {
  position: absolute; inset: 0; z-index: 9; background: rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; -webkit-tap-highlight-color: transparent;
}
.pp-queue-mask.show { opacity: 1; pointer-events: auto; }
.pq-head { padding: 16px 18px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--pp-line); display: flex; align-items: center; gap: 8px; color: #fff; }
.pq-head span { font-size: 12px; color: var(--text-dim); font-weight: 400; }
.pq-clear { margin-left: auto; font-size: 12px; color: var(--text-dim); }
.pq-clear:hover { color: var(--accent); }
.pq-list { flex: 1; overflow-y: auto; padding: 8px; }

/* ============ 设置页 ============ */
.set-card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; max-width: 760px; }
.set-card h3 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.set-card h3 .tag { font-size: 11px; color: var(--accent); background: rgba(255,77,90,.12); padding: 2px 8px; border-radius: 10px; font-weight: 400; }
.set-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.set-row input, .set-row select {
  flex: 1; min-width: 140px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); padding: 0 12px; font-size: 13px; outline: none;
}
.set-row input:focus { border-color: var(--accent); }
.set-btn {
  height: 38px; padding: 0 18px; border-radius: 8px; font-size: 13.5px;
  background: var(--grad); color: #fff; font-weight: 600; white-space: nowrap;
}
.set-btn.ghost { background: var(--bg-hover); color: var(--text); }
.set-btn:hover { filter: brightness(1.1); }
.set-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-elev); margin-bottom: 8px; }
.set-item .si-main { flex: 1; min-width: 0; }
.set-item .si-name { font-size: 14px; font-weight: 600; }
.set-item .si-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-item .si-act { display: flex; gap: 6px; }
.set-item .si-act button { font-size: 12px; color: var(--text-dim); padding: 5px 10px; border-radius: 6px; background: var(--bg-card); }
.set-item .si-act button:hover { color: #fff; }
textarea.plugin-input {
  width: 100%; height: 140px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); padding: 12px; font-size: 12px; font-family: monospace;
  resize: vertical; outline: none;
}
.help { font-size: 12.5px; color: var(--text-dim); line-height: 1.8; margin-top: 10px; }
.help b { color: #cfcfd8; }

/* ============ 图标系统（本地 SVG sprite） ============ */
.ic { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.nav-ic { width: 19px; height: 19px; }
.brand-icon svg { width: 30px; height: 30px; }
/* 播放/暂停双图标：.playing 时显示暂停 */
.p-ic-pause { display: none; }
.playing .p-ic-play { display: none; }
.playing .p-ic-pause { display: block; }
/* 收藏空心/实心：.on 时显示实心 */
/* 收藏图标：所有位置统一 */
.s-fav {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: all .15s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.s-fav svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.s-fav:hover {
  color: var(--accent) !important;
}

.s-fav.on {
  color: var(--accent) !important;
}

/* 播放页收藏图标 */
.pp-fav {
  color: var(--pp-dim);
  transition: all .15s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.pp-fav:hover {
  color: var(--pp-fg);
}

.pp-fav.fav {
  color: var(--accent);
}
/* 移动 tab 图标 */
.m-tab-item svg { width: 21px; height: 21px; }
/* mini-bar 图标 */
.mini-prev, .mini-play, .mini-next, .mini-mode { display: flex; align-items: center; justify-content: center; color: #fff; }
/* 卡片播放按钮 */
.card-play svg { fill: #fff; }
/* 歌单卡片 ph 图标 */
.card-img.ph svg { fill: rgba(255,255,255,.55); width: 42px; height: 42px; }
.set-card h3 .card-ic { display: inline-flex; vertical-align: -3px; margin-right: 2px; }
.set-card h3 .card-ic svg { fill: var(--accent); }
/* s-more 按钮 */
.s-more { color: var(--text-dim); display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; }
.s-more:hover { color: #fff; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px);
  background: rgba(40,40,48,.95); color: #fff; padding: 10px 20px; border-radius: 20px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 500;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 加载中 */
.loading { text-align: center; padding: 60px 0; color: var(--text-dim); font-size: 14px; }
.loading::before { content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; }
.empty-tip { text-align: center; padding: 60px 0; color: #555; font-size: 14px; }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .grid-5, .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  body { padding-bottom: 0; }
  .sidebar { display: none; }
  .main {
    left: 0; bottom: 56px; padding: 16px 14px 90px;
  }
  .playerbar { display: none; }
  .brand-name { display: none; }
  .brand { min-width: auto; }
  .topbar-inner { gap: 10px; padding: 0 12px; }
  .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .card-name { font-size: 12.5px; }
  .card-desc { font-size: 11px; }
  /* 移动端 Tab */
  .mobile-tab {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 56px;
    background: rgba(18,18,18,.96); backdrop-filter: blur(18px); border-top: 1px solid var(--border); z-index: 100;
  }
  .m-tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-dim); font-size: 19px; }
  .m-tab-item em { font-style: normal; font-size: 10.5px; }
  .m-tab-item.active { color: var(--accent); }
  /* mini 播放条 */
  .mini-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 56px; height: 56px;
    background: rgba(28,28,34,.97); border-top: 1px solid var(--border); z-index: 99;
    align-items: center; gap: 10px; padding: 0 12px;
  }
  .mini-cover { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--bg-elev); }
  .mini-cover img { width: 100%; height: 100%; object-fit: cover; }
  .mini-info { flex: 1; min-width: 0; }
  .mini-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mini-artist { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mini-prev, .mini-play, .mini-next, .mini-mode { font-size: 18px; color: #fff; width: 36px; height: 36px; }
  .mini-mode { width: 30px; height: 30px; opacity: .7; }
  /* 播放页竖排 */
  .pp-body { flex-direction: column; gap: 0; overflow-y: auto; }
  .pp-disc-wrap { width: min(58vw, 300px); margin-top: 4px; }
  .pp-lyric-wrap { width: 100%; max-width: none; height: 42%; }
  .pp-lyric { padding-top: 18%; }
  .pp-lyric-line { font-size: 13.5px; padding: 8px 0; }
  .pp-lyric-line.active { font-size: 15.5px; }
  .song-row .s-album { display: none; }
  /* 播放页控制栏自适应：窄屏允许换行、收紧按钮，避免溢出 */
  .pp-top { padding: 10px 14px 4px; gap: 10px; }
  .pp-close, .pp-btn { width: 36px; height: 36px; }
  .pp-body { gap: 2px; }
  .pp-disc-wrap { width: min(64vw, 320px); }
  .pp-controls { padding: 6px 12px 4px; }
  .pp-progress { gap: 8px; margin: 0 auto 8px; max-width: 100%; }
  .pp-time { font-size: 11.5px; min-width: 34px; }
  .pp-btns { flex-wrap: wrap; gap: 6px 10px; padding-bottom: 2px; }
  .pp-cbtn { width: 42px; height: 42px; }
  .pp-small { width: 36px; height: 36px; }
  .pp-big { width: 58px; height: 58px; }
  .pp-sep { display: none; }
  .pp-volbar { display: none; }
  .pp-quality { font-size: 11px; padding: 4px 10px; }
  #pp-speed { font-size: 11px; }
  .pp-spectrum { height: 46px; }
}
@media (max-width: 420px) {
  .pp-btns { gap: 4px 8px; }
  .pp-cbtn { width: 38px; height: 38px; }
  .pp-small { width: 33px; height: 33px; }
  .pp-big { width: 54px; height: 54px; }
  .pp-controls { padding: 4px 8px 2px; }
  .pp-progress { margin-bottom: 6px; }
  .pp-time { font-size: 11px; min-width: 30px; }
  .pp-disc-wrap { width: min(68vw, 300px); }
  .pp-lyric-wrap { height: 38%; }
  .pp-lyric { padding-top: 12%; }
  .pp-spectrum { height: 40px; }
}
@media (min-width: 701px) {
  .song-row .s-album { display: block; }
}

/* ============ 登录页 ============ */
.no-scroll { overflow: hidden; }
.login-page {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 800px at 20% -10%, #1a2a45 0%, #0d0d12 55%);
  opacity: 0; visibility: hidden; transition: opacity .35s ease;
}
.login-page.show { opacity: 1; visibility: visible; }
.login-blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35;
  animation: lp-float 14s ease-in-out infinite alternate;
}
.lp-1 { width: 420px; height: 420px; left: -120px; top: -80px; background: #2a5bd7; }
.lp-2 { width: 380px; height: 380px; right: -100px; bottom: -120px; background: #35c759; animation-delay: -7s; }
@keyframes lp-float { from { transform: translateY(0) scale(1); } to { transform: translateY(-40px) scale(1.12); } }
.login-card {
  position: relative; width: min(400px, calc(100vw - 40px));
  background: rgba(24, 26, 34, .88); backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  padding: 30px 28px 22px; text-align: center;
}
.login-brand { margin-bottom: 24px; }
.login-logo {
  width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 10px 30px rgba(42, 91, 215, .4);
}
.login-name { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.login-sub { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.login-field { text-align: left; margin-bottom: 16px; }
.login-field label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 7px; }
.login-input-wrap {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px; padding: 0 13px; height: 44px;
  transition: border-color .2s;
}
.login-input-wrap:focus-within { border-color: #4a9eff; }
.login-ic { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }
.login-input-wrap input {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-size: 14.5px; height: 100%;
}
.login-btn {
  width: 100%; height: 46px; margin-top: 6px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #ff4d5a, #e63946); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: 4px; cursor: pointer;
  transition: transform .15s, opacity .2s;
}
.login-btn:hover { transform: translateY(-1px); }
.login-btn:disabled { opacity: .6; transform: none; }
.login-tip { min-height: 20px; margin-top: 12px; font-size: 12.5px; color: #ffb454; }
.login-tip.show { display: block; }
.login-foot { margin-top: 18px; font-size: 11.5px; color: var(--text-dim); }

/* 设置页：账号 / 用户管理 / 我的飞牛 */
.acct-chip, .role-chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  border-radius: 20px; font-size: 12.5px;
}
.acct-chip { background: rgba(74, 158, 255, .14); color: #6cb2ff; }
.role-chip { background: rgba(53, 199, 89, .14); color: #4ade80; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); line-height: 38px; cursor: pointer; }
.chk input { accent-color: #4a9eff; width: 15px; height: 15px; }
.set-item .tag { font-size: 11px; margin-left: 6px; }