/* ============================================================
   ShyMusic 样式 —— 暗夜玻璃拟态 + 极光渐变，桌面 / 平板 / 手机自适应
   ============================================================ */
:root {
  --bg: #0b0e14;
  --bg-2: #10141d;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .085);
  --border: rgba(255, 255, 255, .09);
  --text: #f2f5f9;
  --dim: #9aa3b2;
  --faint: #6b7484;
  --acc: #35e0b0;
  --acc-2: #4ea1ff;
  --grad: linear-gradient(135deg, #35e0b0, #4ea1ff);
  --danger: #ff6b81;
  --warn: #ffb54d;
  --gold: #ffd76a;
  --purple: #c084fc;
  --r: 16px;
  --pb-h: 76px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; }
img { display: block; max-width: 100%; }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.grow { flex: 1; }
.hidden { display: none !important; }
.ic { width: 20px; height: 20px; fill: currentColor; display: block; pointer-events: none; }
.ic.sm { width: 16px; height: 16px; }
.ic.big { width: 56px; height: 56px; }

/* ---------- 背景 ---------- */
.bg-aurora {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(52vw 52vh at 8% -8%, rgba(53, 224, 176, .16), transparent 60%),
    radial-gradient(60vw 60vh at 96% 6%, rgba(78, 161, 255, .15), transparent 62%),
    radial-gradient(48vw 48vh at 50% 108%, rgba(139, 92, 246, .12), transparent 60%),
    var(--bg);
}
.bg-aurora::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70vw 70vh at 50% 40%, #000 30%, transparent 100%);
}

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px;
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  transition: transform .15s, filter .15s, background .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn-grad { background: var(--grad); color: #06231c; }
.btn-grad:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-ghost { background: rgba(255, 107, 129, .1); border-color: rgba(255, 107, 129, .3); color: var(--danger); }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; color: var(--dim);
  transition: background .15s, color .15s, transform .15s;
  flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on { color: var(--acc); }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field > span { font-size: 12px; color: var(--dim); }
.field input, .field select {
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; color: var(--text);
  outline: none; transition: border .15s; width: 100%;
  color-scheme: dark;
}
.field input:focus, .field select:focus { border-color: rgba(53, 224, 176, .6); }
.field-row { display: flex; gap: 12px; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row.end { justify-content: flex-end; }

/* 开关 */
.switch { appearance: none; width: 44px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.15); position: relative; transition: background .2s; flex: none; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch:checked { background: var(--acc); }
.switch:checked::after { left: 23px; }

/* ---------- 登录页 ---------- */
#login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 400px;
  background: rgba(16, 20, 29, .72);
  border: 1px solid var(--border); border-radius: 24px;
  padding: 40px 34px 26px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: rise .5s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.login-brand { text-align: center; margin-bottom: 26px; }
.logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--grad); color: #06231c;
  box-shadow: 0 8px 24px rgba(53, 224, 176, .35);
}
.logo-badge .ic { width: 30px; height: 30px; }
.logo-badge.sm { width: 36px; height: 36px; border-radius: 12px; }
.logo-badge.sm .ic { width: 18px; height: 18px; }
.login-brand h1 { font-size: 24px; margin-top: 14px; letter-spacing: .5px; }
.login-sub { color: var(--dim); font-size: 12px; margin-top: 4px; letter-spacing: 2px; }
#login-form { display: flex; flex-direction: column; gap: 14px; }
.login-err {
  background: rgba(255, 107, 129, .12); border: 1px solid rgba(255, 107, 129, .3);
  color: #ffb3c0; border-radius: 12px; padding: 10px 14px; font-size: 13px;
}
.setup-box { margin-bottom: 14px; }
.setup-box .chk {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(255, 181, 77, .1); border: 1px solid rgba(255, 181, 77, .3);
  color: #ffd9a1; border-radius: 12px; padding: 10px 12px; font-size: 12px; margin-bottom: 8px;
}
.setup-box .chk .ic { width: 15px; height: 15px; margin-top: 2px; flex: none; }
.login-foot { text-align: center; color: var(--faint); font-size: 11px; margin-top: 18px; letter-spacing: 1px; }

/* ---------- 顶栏 ---------- */
#app-view { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px; position: sticky; top: 0; z-index: 30;
  background: rgba(11, 14, 20, .78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .5px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  flex: 1; max-width: 640px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 6px 4px 14px;
  transition: border .15s;
}
.search-box:focus-within { border-color: rgba(53, 224, 176, .5); }
.search-ic { color: var(--faint); flex: none; }
.search-box input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--text); padding: 8px 0; font-size: 14px;
}
.search-box input::placeholder { color: var(--faint); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.master-badge {
  font-size: 11px; color: var(--warn); border: 1px solid rgba(255, 181, 77, .4);
  padding: 3px 10px; border-radius: 999px; background: rgba(255, 181, 77, .08);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { opacity: .55; } }
.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--grad); color: #06231c;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta b { font-size: 13px; }
.role-tag { font-style: normal; font-size: 10px; color: var(--acc); }
.role-tag.admin { color: var(--gold); }

/* ---------- 子导航 ---------- */
.subbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 22px; position: sticky; top: 61px; z-index: 25;
  background: rgba(11, 14, 20, .6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.view-tabs { display: flex; gap: 4px; }
.vtab, .ptab {
  padding: 7px 16px; border-radius: 999px; font-size: 13px;
  color: var(--dim); transition: all .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.vtab.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.platform-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.ptab i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--acc)); flex: none; }
.ptab.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.ptab:hover { color: var(--text); }

/* ---------- 列表 ---------- */
.content { flex: 1; padding: 18px 22px 140px; max-width: 1120px; width: 100%; margin: 0 auto; }
.list-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.list-title { font-weight: 600; font-size: 15px; }
.pager { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--dim); font-size: 13px; }
.song-list { display: flex; flex-direction: column; gap: 6px; }
.song {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid transparent;
  transition: background .15s, border .15s, transform .15s;
  cursor: pointer;
}
.song:hover { background: var(--surface-2); border-color: var(--border); }
.song.playing { border-color: rgba(53, 224, 176, .45); background: rgba(53, 224, 176, .07); }
.song-cover {
  width: 52px; height: 52px; border-radius: 10px; flex: none;
  object-fit: cover; background: rgba(255, 255, 255, .06);
}
.song-cover-fb {
  width: 52px; height: 52px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, rgba(53,224,176,.15), rgba(78,161,255,.15));
  display: flex; align-items: center; justify-content: center; color: var(--faint);
}
.song-main { flex: 1; min-width: 0; }
.song-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song.playing .song-name { color: var(--acc); }
.song-sub { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.song-chips { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
.chip {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--dim); white-space: nowrap;
}
.chip.hifi { color: var(--gold); border-color: rgba(255, 215, 106, .4); }
.chip.z3d { color: var(--purple); border-color: rgba(192, 132, 252, .4); }
.song-dur { color: var(--faint); font-size: 12px; flex: none; width: 42px; text-align: right; }
.song-acts { display: flex; gap: 2px; flex: none; }
.song-acts .icon-btn { width: 32px; height: 32px; border-radius: 10px; }
.song-acts .icon-btn.on { color: var(--danger); }
.song-acts .icon-btn .ic { width: 17px; height: 17px; }
.eq-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 4px; }
.eq-bars i { width: 3px; background: var(--acc); border-radius: 2px; animation: eq 1s infinite ease-in-out; }
.eq-bars i:nth-child(1) { height: 60%; animation-delay: 0s; }
.eq-bars i:nth-child(2) { height: 100%; animation-delay: .15s; }
.eq-bars i:nth-child(3) { height: 40%; animation-delay: .3s; }
@keyframes eq { 50% { transform: scaleY(.4); } }

.empty-state { text-align: center; padding: 70px 20px; color: var(--faint); }
.empty-state .ic.big { margin: 0 auto 16px; opacity: .4; }
.skel { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }
.skel i { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; border-radius: 10px; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 播放条 ---------- */
.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: var(--pb-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 12px;
  padding: 0 18px;
  background: rgba(13, 16, 24, .82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.pb-progress-line { position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, .06); }
.pb-progress-line i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s linear; }
.pb-left { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.pb-cover { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,.06); flex: none; }
.pb-meta { min-width: 0; display: flex; flex-direction: column; }
.pb-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-meta span { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-center { display: flex; align-items: center; gap: 6px; }
.play-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: #06231c;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(53, 224, 176, .3);
  transition: transform .15s; flex: none;
}
.play-btn:hover { filter: brightness(1.08); }
.play-btn:active { transform: scale(.92); }
.play-btn .ic { width: 22px; height: 22px; }
.play-btn.xl { width: 60px; height: 60px; }
.play-btn.xl .ic { width: 28px; height: 28px; }
.pb-loading { display: flex; gap: 3px; margin-left: 8px; }
.pb-loading i { width: 5px; height: 5px; border-radius: 50%; background: var(--acc); animation: bounce 1s infinite; }
.pb-loading i:nth-child(2) { animation-delay: .15s; }
.pb-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 40% { transform: translateY(-5px); opacity: .5; } }
.pb-right { display: flex; align-items: center; gap: 10px; min-width: 0; justify-content: flex-end; }
.pb-time { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; flex: none; }
.pb-extra { display: flex; gap: 2px; }

/* 进度条 */
.progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .1); cursor: pointer; position: relative; flex: 1; min-width: 60px; touch-action: none; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad); position: relative; }
.progress-thumb {
  position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  opacity: 0; transition: opacity .15s; box-shadow: 0 0 0 3px rgba(53, 224, 176, .25);
}
.progress:hover .progress-thumb, .progress.drag .progress-thumb { opacity: 1; }

/* ---------- 全屏播放页 ---------- */
.np { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow: hidden; animation: npIn .3s ease; }
@keyframes npIn { from { opacity: 0; transform: translateY(24px); } }
.np-bg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(70px) brightness(.35) saturate(1.3); transform: scale(1.15); }
.np-close { position: absolute; top: 16px; right: 16px; z-index: 3; background: rgba(0, 0, 0, .3); }
.np-body {
  position: relative; z-index: 2; height: 100%;
  display: grid; grid-template-columns: minmax(320px, 5fr) 4fr;
  gap: 30px; align-items: center;
  max-width: 1080px; margin: 0 auto; padding: 60px 40px 40px;
}
.np-left { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }
.disc-wrap { width: min(46vw, 300px); aspect-ratio: 1; }
.disc {
  width: 100%; height: 100%; border-radius: 50%; position: relative;
  background: radial-gradient(circle, #1c212b 62%, #0e1119 63%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
  animation: spin 24s linear infinite;
  display: flex; align-items: center; justify-content: center;
}
.disc img { width: 62%; height: 62%; border-radius: 50%; object-fit: cover; }
.disc-hole { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 1px solid rgba(255,255,255,.2); }
.disc-wrap.paused .disc { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .disc { animation: none; } }
.np-info { text-align: center; min-width: 0; }
.np-info h2 { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; margin: 0 auto; }
.np-info p { color: var(--dim); margin-top: 4px; }
.np-info .dim { font-size: 12px; }
.np-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.np-chips .chip { font-size: 11px; padding: 3px 10px; }
.np-progress-row { display: flex; align-items: center; gap: 12px; width: min(46vw, 340px); }
.np-progress-row span { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; flex: none; }
.np-controls { display: flex; align-items: center; gap: 10px; }
.np-tools { display: flex; gap: 2px; margin-left: 10px; }
.np-lyrics { height: min(72vh, 560px); overflow: hidden; position: relative; mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.lyrics-list { padding: 25% 8px; display: flex; flex-direction: column; gap: 14px; transition: transform .4s cubic-bezier(.2,.7,.3,1); }
.ly-line { text-align: center; font-size: 15px; color: var(--dim); padding: 6px 10px; border-radius: 10px; transition: all .3s; cursor: pointer; white-space: pre-wrap; }
.ly-line:hover { color: var(--text); }
.ly-line.active { color: var(--text); font-size: 18px; font-weight: 700; text-shadow: 0 0 18px rgba(53, 224, 176, .45); }
.ly-line.no-time { cursor: default; }

/* ---------- 抽屉 / 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 45; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 46;
  width: min(360px, 92vw);
  background: rgba(15, 18, 27, .96);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  animation: slideL .25s ease;
}
@keyframes slideL { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.queue-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.q-item:hover { background: var(--surface-2); }
.q-item.playing { background: rgba(53, 224, 176, .1); }
.q-idx { color: var(--faint); font-size: 12px; width: 20px; text-align: center; flex: none; font-variant-numeric: tabular-nums; }
.q-main { flex: 1; min-width: 0; }
.q-main b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.q-main span { color: var(--dim); font-size: 11px; }

.modal-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; animation: fade .2s;
}
.admin-panel, .user-panel {
  width: 100%; max-width: 960px; max-height: 90vh;
  background: rgba(16, 20, 29, .97);
  border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  animation: rise .3s ease;
}
.user-panel { max-width: 560px; }
.admin-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex: none; }
.admin-body { display: flex; min-height: 0; flex: 1; }
.admin-tabs { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-right: 1px solid var(--border); width: 130px; flex: none; }
.atab { text-align: left; padding: 10px 14px; border-radius: 12px; color: var(--dim); }
.atab.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.admin-content { flex: 1; overflow-y: auto; padding: 20px; min-width: 0; }
.apane .pane-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.apane .pane-head p { flex: 1; font-size: 12px; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--faint); font-weight: 500; font-size: 11px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); white-space: nowrap; }
.tbl tr:hover td { background: var(--surface); }
.tbl .u-name { font-weight: 600; }
.tbl .tag { font-size: 10px; padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.tag.ok { background: rgba(53, 224, 176, .12); color: var(--acc); }
.tag.off { background: rgba(255, 107, 129, .12); color: var(--danger); }
.tag.admin { background: rgba(255, 215, 106, .12); color: var(--gold); }
.cell-acts { display: flex; gap: 2px; }
.cell-acts .icon-btn { width: 30px; height: 30px; }
.cell-acts .icon-btn .ic { width: 15px; height: 15px; }

.settings-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.switch-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; cursor: pointer; }
.switch-row > div { flex: 1; }
.switch-row b { font-size: 14px; }
.switch-row p { font-size: 12px; margin-top: 2px; }
.pwd-box { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.cache-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.stat-card b { font-size: 20px; display: block; }
.stat-card span { color: var(--dim); font-size: 12px; }

.user-form { padding: 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }

.video-panel { width: 100%; max-width: 960px; background: rgba(16, 20, 29, .97); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; }
.video-panel video { width: 100%; max-height: 70vh; background: #000; display: block; }

/* ---------- 下载菜单 ---------- */
.dl-menu {
  position: fixed; z-index: 90; min-width: 200px;
  background: rgba(20, 24, 34, .98);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 8px;
  animation: rise .18s ease;
}
.dl-menu .dl-title { font-size: 11px; color: var(--faint); padding: 6px 10px 4px; }
.dl-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 10px; text-align: left;
}
.dl-item:hover { background: var(--surface-2); }
.dl-item b { font-size: 13px; flex: 1; }
.dl-item span { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.dl-item .ic { width: 15px; height: 15px; color: var(--acc); }
.dl-menu .dl-other { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }

/* ---------- 拦截层 / 提示 ---------- */
.block-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 10, 15, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  animation: fade .3s;
}
.block-card { text-align: center; max-width: 380px; padding: 30px; }
.block-card .ic.big { margin: 0 auto 18px; color: var(--acc); opacity: .85; }
.block-card h3 { font-size: 20px; margin-bottom: 8px; }
.block-card p { margin-bottom: 22px; font-size: 13px; }
.toasts { position: fixed; bottom: calc(var(--pb-h) + 18px); left: 50%; transform: translateX(-50%); z-index: 110; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  background: rgba(25, 30, 42, .96); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 999px; font-size: 13px;
  box-shadow: var(--shadow); animation: rise .25s ease;
  max-width: 92vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toast.err { border-color: rgba(255, 107, 129, .4); color: #ffb3c0; }
.toast.ok { border-color: rgba(53, 224, 176, .4); color: #b8f4e2; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .np-body { grid-template-columns: 1fr; padding: 64px 24px 30px; gap: 18px; overflow-y: auto; align-items: start; }
  .np-left { padding-top: 8px; }
  .disc-wrap { width: min(52vw, 240px); }
  .np-info h2 { max-width: 88vw; }
  .np-progress-row { width: min(80vw, 360px); }
  .np-lyrics { height: 40vh; }
}
@media (max-width: 760px) {
  :root { --pb-h: 62px; }
  .topbar { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .brand-name { display: none; }
  .search-box { order: 3; flex-basis: 100%; max-width: none; }
  .user-meta { display: none; }
  .subbar { top: 0; padding: 8px 12px; position: relative; }
  .platform-tabs { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .platform-tabs::-webkit-scrollbar { display: none; }
  .ptab { padding: 6px 12px; flex: none; }
  .view-tabs { overflow-x: auto; scrollbar-width: none; }
  .content { padding: 12px 12px 110px; }
  .song { padding: 8px 8px; gap: 9px; }
  .song-cover, .song-cover-fb { width: 46px; height: 46px; }
  .song-chips { display: none; }
  .song-acts .act-hide-m { display: none; }
  .song-dur { display: none; }
  .player-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 12px; }
  .pb-right { display: none; }
  .pb-center { gap: 2px; }
  .play-btn { width: 40px; height: 40px; }
  .np-body { padding: 56px 16px 24px; }
  .ly-line { font-size: 14px; }
  .ly-line.active { font-size: 16px; }
  .np-controls { gap: 6px; }
  .np-tools { margin-left: 0; }
  .modal-mask { padding: 10px; align-items: stretch; }
  .admin-panel, .user-panel { max-height: none; height: 100%; border-radius: 18px; }
  .admin-body { flex-direction: column; }
  .admin-tabs { flex-direction: row; width: 100%; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .atab { flex: none; }
  .admin-content { padding: 14px; }
  .field-row { flex-direction: column; gap: 12px; }
  .toasts { bottom: calc(var(--pb-h) + 14px); }
}
@media (min-width: 761px) and (max-width: 1080px) {
  .content { max-width: 860px; }
  .song-chips { max-width: 180px; }
}
