/* ============================================================
   音乐播放器 · 桌面音乐中心（新设计：侧栏 + 顶栏搜索 + 底部播放条）
   资源：Bootstrap Icons（assets/vendor/css/bootstrap-icons.min.css）
   ============================================================ */
:root {
  --bg: #0b0c12;
  --panel: #13151f;
  --card: #191d2b;
  --card2: #222738;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.12);
  --text: #eef0f8;
  --sub: #9aa1b5;
  --dim: #5f6679;
  --accent: #4f7cff;
  --accent-2: #8f5cff;
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 70%, #c05cff 120%);
  --radius: 14px;
  --pb-h: 120px;
  --side-w: 236px;
  --top-h: 62px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1100px 700px at 88% -12%, rgba(79, 124, 255, 0.14), transparent 62%),
    radial-gradient(900px 700px at -8% 112%, rgba(150, 92, 255, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
.ellip { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2b3045; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3a4060; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 三栏骨架 ============ */
#layout {
  display: grid; height: 100vh;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  grid-template-rows: var(--top-h) minmax(0, 1fr);
}
#side { grid-area: 1 / 1 / 3 / 2; display: flex; flex-direction: column; min-height: 0;
  background: rgba(16, 18, 27, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--line); padding: 18px 12px 14px; }
.sb-head { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; }
.sb-logo { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.sb-title { font-size: 16px; font-weight: 800; letter-spacing: 0.4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.sb-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 10px; color: var(--sub);
  font-size: 14px; text-align: left; transition: background 0.18s, color 0.18s;
}
.sb-item i { font-size: 18px; width: 20px; text-align: center; }
.sb-item:hover { color: var(--text); background: var(--card); }
.sb-item.active { color: #fff; background: linear-gradient(135deg, rgba(79,124,255,.22), rgba(143,92,255,.16)); }
.sb-item.active i { color: var(--accent); }
.sb-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 3px; }
#srv-name { font-size: 12px; }

/* ============ 顶栏 ============ */
#topbar {
  grid-area: 1 / 2 / 2 / 3;
  display: flex; align-items: center; gap: 12px;
  padding: 0 26px; z-index: 70;
  background: rgba(11, 12, 18, 0.66); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.tb-btn { color: var(--sub); font-size: 19px; padding: 8px; border-radius: 10px; transition: 0.18s; }
.tb-btn:hover { color: var(--text); background: var(--card); }
.search-ct { flex: 1; display: flex; align-items: center; gap: 10px; max-width: 780px; margin: 0 auto; }
.sug-anchor { position: relative; flex: 1; display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px 0 16px; height: 40px;
  transition: border-color 0.2s, box-shadow 0.2s; }
.sug-anchor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.18); }
.search-ico { color: var(--dim); font-size: 15px; }
#q { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; font-size: 14px; }
#q::placeholder { color: var(--dim); }
#q-clear { color: var(--dim); padding: 6px; font-size: 13px; }
#q-clear:hover { color: var(--text); }
.btn-go { flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 17px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(79, 124, 255, 0.35); transition: transform 0.18s, box-shadow 0.18s; }
.btn-go:hover { transform: translateX(2px) scale(1.04); box-shadow: 0 8px 22px rgba(79, 124, 255, 0.5); }
.btn-go:active { transform: scale(0.94); }
/* 搜索建议 */
.sug-box { position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--panel); border: 1px solid var(--line2); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; z-index: 90; }
.sug-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 16px;
  font-size: 13px; color: var(--text); text-align: left; }
.sug-item i { color: var(--dim); font-size: 14px; }
.sug-item:hover, .sug-item.hot { background: var(--card2); }
.sug-item + .sug-item { border-top: 1px solid var(--line); }
.sug-tip { display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px 6px 16px; color: var(--dim); font-size: 12px; }
.sug-clear { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border: 0; background: none; border-radius: 8px; color: var(--dim); font-size: 13px; cursor: pointer;
  transition: 0.15s; }
.sug-clear:hover { color: #e5484d; background: var(--card2); }

/* ============ 主内容 ============ */
#main { grid-area: 2 / 2 / 3 / 3; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; padding: 26px 30px 140px; }
.view::-webkit-scrollbar { width: 10px; }
@media (min-width: 1600px) { .view { padding-left: 48px; padding-right: 48px; } }

/* 页面头 */
.page-head { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 22px; }
.page-head .ph-ico { width: 118px; height: 118px; flex: none; border-radius: 18px; overflow: hidden;
  background: linear-gradient(140deg, var(--card2), var(--card)); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); }
.page-head .ph-ico img { width: 100%; height: 100%; object-fit: cover; }
.page-head .ph-ico i { font-size: 44px; color: var(--dim); }
.ph-title { font-size: 20px; font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.ph-sub { color: var(--sub); font-size: 13px; }
.ph-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ph-actions .back { color: var(--sub); font-size: 22px; padding: 6px 10px 6px 0; }
.ph-actions .back:hover { color: #fff; }
.ph-actions { padding-top: 18px; }

.btn-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 22px rgba(79, 124, 255, 0.35); transition: transform 0.15s, box-shadow 0.2s; }
.btn-pill:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(79, 124, 255, 0.5); }
.btn-pill:active { transform: scale(0.97); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--sub); font-size: 13px; font-weight: 500; transition: 0.18s; }
.btn-ghost:hover { color: #fff; border-color: var(--dim); background: var(--card); }
.btn-ghost.danger:hover { color: #ff7a87; border-color: rgba(255, 92, 108, 0.5); }

/* ============ 发现页 Hero ============ */
.hero { position: relative; border-radius: 22px; overflow: hidden; padding: 6px 23px; margin-bottom: 4px;
  background:
    radial-gradient(700px 300px at 88% -40%, rgba(255, 255, 255, 0.16), transparent 60%),
    var(--grad);
  box-shadow: 0 24px 60px rgba(79, 124, 255, 0.22); }
.hero::after { content: ""; position: absolute; right: -70px; top: -90px; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 65%); pointer-events: none; }
.hero h1 { margin: 0 0 1px; font-size: 16px; font-weight: 800; letter-spacing: 0.5px; }
.hero p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 12px; }
.hero-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-acts { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 2; }
.hero .btn-pill { background: rgba(255, 255, 255, 0.94); color: #1c1c26; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* 区块 */
.sec { margin-bottom: 34px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sec-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.sec-head .more { margin-left: auto; color: var(--sub); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.sec-head .more:hover { color: var(--accent); }

/* 推荐歌单网格 */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }
@media (hover: none) {
  .pl-play { opacity: 1; transform: none; }
}
.pl-card { cursor: pointer; }
.pl-cover { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1;
  background: linear-gradient(150deg, #232940, #161a26); }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease); }
.pl-card:hover .pl-cover img { transform: scale(1.06); }
.pl-cnt { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: #fff; background: rgba(10, 10, 18, 0.55); backdrop-filter: blur(4px);
  padding: 3px 9px; border-radius: 999px; }
.pl-play { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(8px); transition: 0.25s var(--ease); }
.pl-card:hover .pl-play { opacity: 1; transform: none; }
.pl-play:active { transform: scale(0.92); }
.pl-name { margin-top: 10px; font-size: 13.5px; line-height: 1.35; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }

/* 分类 chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--sub);
  font-size: 13px; transition: 0.18s; }
.chip:hover { color: #fff; border-color: var(--dim); }
.chip.active { color: #fff; background: var(--grad); border-color: transparent; font-weight: 600; }

/* ============ 歌曲列表（表格） ============ */
.slist { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: rgba(22, 25, 38, 0.5); }
.shead, .srow { display: grid; grid-template-columns: 40px 52px minmax(0, 1.7fr) minmax(0, 1fr) 78px 40px; align-items: center; }
.shead { padding: 10px 18px; font-size: 12px; color: var(--dim); border-bottom: 1px solid var(--line); }
.srow { padding: 6px 18px; border-radius: 0; cursor: default; transition: background 0.15s; }
.srow:hover { background: rgba(255, 255, 255, 0.045); }
.srow.playing { background: rgba(79, 124, 255, 0.10); }
.srow + .srow { border-top: 1px solid var(--line); }
.srow .c { min-width: 0; }
.sc-idx { font-size: 13px; color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.sc-cover { position: relative; width: 46px; height: 46px; border-radius: 9px; overflow: hidden;
  background: linear-gradient(150deg, #232940, #161a26); flex: none; display: flex; align-items: center; justify-content: center; }
.sc-cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.sc-cover .cover-ph { position: absolute; color: var(--dim); font-size: 19px; z-index: 0; }
.cover-ph-wrap { display: flex; align-items: center; justify-content: center; }
.sc-main { padding: 0 14px 0 0; }
.sc-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.srow.playing .sc-name { color: #8fa7ff; }
.sc-artist { font-size: 12.5px; color: var(--sub); margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sc-artist .src-badge { margin-left: 6px; }
.sc-album { font-size: 13px; color: var(--sub); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sc-dur { font-size: 12.5px; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.sc-more { color: var(--dim); font-size: 17px; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; justify-self: center; }
.sc-more:hover { color: #fff; background: var(--card2); }
.srow.playing .sc-idx { color: var(--accent); font-weight: 700; }
.sc-idx-pl { display: none; }
.srow:hover .sc-idx-pl { display: inline; }
.srow:hover .sc-idx-num { display: none; }

/* 行内迷你均衡器 */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 8px; }
.eq i { width: 2.5px; background: var(--accent); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: 0.22s; }
.eq i:nth-child(3) { animation-delay: 0.44s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }
.eq.paused i { animation-play-state: paused; height: 4px; }

/* 状态（空/加载/错误） */
.state { text-align: center; padding: 90px 0 40px; color: var(--dim); }
.state .st-ico { font-size: 52px; opacity: 0.5; display: block; margin-bottom: 14px; }
.state p { margin: 6px 0 0; font-size: 14px; }
.spin { display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line2); border-top-color: var(--accent); animation: rot 0.7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ============ 底部播放条 ============ */
#playerbar {
  position: fixed; left: var(--side-w); right: 0; bottom: 0; z-index: 80; height: var(--pb-h);
  display: grid; grid-template-columns: minmax(200px, 30%) minmax(300px, 1fr) minmax(180px, 24%);
  align-items: center; gap: 18px; padding: 0 20px;
  background: rgba(15, 17, 25, 0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line); }
#playerbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--line); }
#playerbar::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--grad); }
#playerbar.buffering::after { width: 100%; opacity: 0.4; transition: width 0.3s ease; }
.pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-cover { position: relative; width: 56px; height: 56px; flex: none; border-radius: 10px; overflow: hidden;
  background: linear-gradient(150deg, #232940, #161a26); transition: transform 0.18s; }
.pb-cover:hover { transform: scale(1.05); }
.pb-cover img { width: 100%; height: 100%; object-fit: cover; }
.pb-eq { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2.5px;
  background: rgba(8, 9, 15, 0.55); opacity: 0; transition: opacity 0.2s; }
.pb-eq i { width: 3px; background: #fff; border-radius: 2px; animation: eq 0.8s ease-in-out infinite; }
.pb-eq i:nth-child(2) { animation-delay: 0.2s; }
.pb-eq i:nth-child(3) { animation-delay: 0.4s; }
#playerbar.playing .pb-eq { opacity: 1; }
.pb-meta { flex: 1; min-width: 0; }
.pb-title { font-size: 14px; font-weight: 700; cursor: pointer; }
#pb-artist { cursor: pointer; }
.pb-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--sub); font-size: 12px; min-width: 0; }
.pb-act { color: var(--sub); font-size: 18px; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; transition: 0.15s; position: relative; }
.pb-act:hover { color: #fff; background: var(--card2); }
.pb-act.on { color: var(--accent); }
.pb-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.pb-ctrl { display: flex; align-items: center; gap: 4px; }
.pb-play { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #0d0e15; font-size: 22px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s; }
.pb-play:hover { transform: scale(1.06); }
.pb-play:active { transform: scale(0.94); }
.pb-seekwrap { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 720px; }
.tm { font-size: 11.5px; color: var(--dim); min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), rgba(255, 255, 255, 0.14) var(--fill, 0%));
  outline: none; cursor: pointer; transition: height 0.15s; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 0; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); opacity: 0.7; transition: opacity 0.15s, transform 0.15s; }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:active::-webkit-slider-thumb { opacity: 1; transform: scale(1.4); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0.7; transition: opacity 0.15s, transform 0.15s; }
input[type="range"]:hover::-moz-range-thumb, input[type="range"]:active::-moz-range-thumb { opacity: 1; transform: scale(1.4); }
/* 自定义进度条：原生 input 透明化仅作交互层（拖动/键盘），视觉由 track/fill/dot 承担，
   避免原生滑块 thumb 在高频更新下的渲染回跳 */
.seek-ui { position: relative; flex: 1; height: 20px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek-ui input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  -webkit-appearance: none; appearance: none; background: transparent !important; opacity: 0; cursor: pointer; border-radius: 0; transition: none; }
.seek-ui input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: transparent; opacity: 0; }
.seek-ui input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: transparent; opacity: 0; }
.seek-ui .seek-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.14); transform: translateY(-50%); pointer-events: none; }
.seek-ui .seek-fill { position: absolute; left: 0; top: 50%; height: 4px; border-radius: 4px; width: 0;
  background: var(--accent); transform: translateY(-50%); pointer-events: none; }
.seek-ui .seek-dot { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); opacity: 0.7;
  transform: translate(-50%, -50%); pointer-events: none; transition: opacity 0.15s, transform 0.15s; }
.seek-ui:hover .seek-dot, .seek-ui:active .seek-dot { opacity: 1; transform: translate(-50%, -50%) scale(1.4); }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.qn { position: absolute; top: 0; right: -3px; font-size: 10px; font-weight: 700; min-width: 15px; height: 15px;
  border-radius: 8px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; }

/* ============ 桌面/平板（≥576px）：封面跨两行 + 歌名/进度条在上、歌手/按钮在下 ============ */
@media (min-width: 576px) {
  #playerbar {
    height: auto;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto auto minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 2px;
    padding: 12px 26px;
  }
  .pb-left { display: contents; }
  .pb-meta { display: contents; }
  .pb-mid { display: contents; }

  .pb-cover { grid-area: 1 / 1 / 3 / 2; width: 86px; height: 86px; align-self: center; }
  .pb-title { grid-area: 1 / 2 / 2 / 3; align-self: center; max-width: min(24vw, 300px); }
  .pb-sub { grid-area: 2 / 2 / 3 / 3; align-self: center; margin-top: 0; max-width: min(24vw, 300px); }
  .pb-seekwrap { grid-area: 1 / 3 / 2 / 8; align-self: center; justify-self: stretch;
    width: 100%; max-width: none; gap: 12px; }
  #pb-fav { grid-area: 2 / 4 / 3 / 5; align-self: center; justify-self: center; }
  .pb-ctrl { grid-area: 2 / 5 / 3 / 6; align-self: center; justify-self: center; }
  .pb-right { grid-area: 2 / 6 / 3 / 7; align-self: center; justify-self: center; }
}

/* ============ Toast ============ */
.toasts { position: fixed; bottom: calc(var(--pb-h) + 22px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 300; pointer-events: none; }
.toast-item { background: rgba(32, 36, 52, 0.96); border: 1px solid var(--line2); color: #fff; font-size: 13px;
  padding: 10px 20px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: tin 0.3s var(--ease); }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ 歌曲上下文菜单 ============ */
.ctx { position: fixed; z-index: 260; min-width: 190px; background: var(--panel);
  border: 1px solid var(--line2); border-radius: 13px; box-shadow: var(--shadow); padding: 6px;
  animation: ctxin 0.16s var(--ease); }
@keyframes ctxin { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.ctx-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px;
  border-radius: 8px; font-size: 13.5px; color: var(--text); text-align: left; }
.ctx-item i { font-size: 15px; color: var(--dim); width: 18px; text-align: center; }
.ctx-item:hover { background: var(--card2); }
.ctx-item.fav.on { color: #ff7a87; }
.ctx-item.fav.on i { color: #ff5c6c; }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 8px; }

/* ============ 全屏正在播放 ============ */
.np { position: fixed; inset: 0; z-index: 220; color: #fff;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(79, 124, 255, 0.22), transparent 60%),
    radial-gradient(700px 500px at 0% 115%, rgba(143, 92, 255, 0.16), transparent 60%),
    #0a0b11;
  display: flex; align-items: stretch; padding: 18px 34px 22px; }
.np-back { position: absolute; top: 18px; left: 20px; z-index: 5; color: rgba(255, 255, 255, 0.7);
  font-size: 24px; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(6px); transition: 0.2s; }
.np-back:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.np-wrap { width: 100%; max-width: 1240px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 16px 56px; }
.np-art { grid-area: 1 / 1 / 3 / 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; text-align: center; }
.np-disc { width: min(46vh, 400px); height: min(46vh, 400px); border-radius: 50%; position: relative; flex: none;
  background: #14161f; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55); }
.np-disc img { width: calc(100% - 34px); height: calc(100% - 34px); border-radius: 50%; object-fit: cover;
  position: absolute; inset: 17px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08); }
.np-disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255,255,255,0.028) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.np-disc::after { content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, #2b2f40 0%, #12141c 70%); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14); }
.np-disc.spin { animation: np-rot 28s linear infinite; }
.np-disc.spin.paused { animation-play-state: paused; }
@keyframes np-rot { to { transform: rotate(360deg); } }
.np-title { font-size: clamp(20px, 3vw, 30px); font-weight: 800; line-height: 1.25; }
.np-sub { display: flex; align-items: center; justify-content: center; gap: 10px; color: rgba(255, 255, 255, 0.6); font-size: 14px; margin-top: 8px; min-width: 0; }
.np-actrow { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.np-act { position: relative; color: rgba(255, 255, 255, 0.75); width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
  background: rgba(255, 255, 255, 0.07); transition: 0.18s; }
.np-act:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }
.np-act.on { color: #ff7a87; }
.np-lrc-ct { grid-area: 1 / 2 / 2 / 3; display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 18px; padding: 16px 8px 10px; }
.np-lrc-head { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px; letter-spacing: 1px; padding: 0 18px 10px; }
.np-lrc-head i { color: var(--accent); }
.np-lrc { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  position: relative; padding: 6px 4px; text-align: center; }
.np-lrc::-webkit-scrollbar { display: none; }
.lrc-line { padding: 7px 22px; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, 0.32);
  transition: color 0.3s, transform 0.3s, opacity 0.3s; opacity: 0.55; cursor: pointer; }
.lrc-line.active { color: #fff; font-size: 17px; font-weight: 800; opacity: 1; transform: scale(1.04);
  text-shadow: 0 0 22px rgba(113, 156, 255, 0.55);
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.16), transparent); }
.lrc-line.soft { opacity: 0.2; }
/* 空歌词：铺满歌词容器并垂直居中（避免小屏靠 padding 顶下去导致必须滚动） */
.lrc-empty { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 12px; text-align: center;
  color: rgba(255, 255, 255, 0.35); font-size: 13px; }
.lrc-empty i { font-size: 44px; margin-bottom: 12px; }
.lrc-empty p { margin: 0; }
.np-ctrls { grid-area: 2 / 2 / 3 / 3; align-self: center; }
.np-seekwrap { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; }
.np-seekwrap .tm { color: rgba(255, 255, 255, 0.55); }
.np-seekwrap .seek-ui .seek-track { background: rgba(255, 255, 255, 0.15); }
.np-seekwrap .seek-ui .seek-fill { background: #fff; }
.np-ctrl { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.np-big { width: 48px; height: 48px; font-size: 24px; background: transparent; }
.np-play { width: 74px; height: 74px; border-radius: 50%; background: #fff; color: #0d0e15; font-size: 34px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s; }
.np-play:hover { transform: scale(1.05); }
.np-play:active { transform: scale(0.95); }

/* ============ Offcanvas（队列/移动导航） ============ */
.wb-off { --bs-offcanvas-width: 380px; background: var(--panel); border-left: 1px solid var(--line2); }
.offcanvas-start.wb-off { --bs-offcanvas-width: 300px; }
.offcanvas-header { border-bottom: 1px solid var(--line); }
.oc-title { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.3px; }
.oc-logo { width: 28px; height: 28px; border-radius: 8px; }
.qn2 { color: var(--accent); font-size: 13px; }
.oc-acts { display: flex; align-items: center; gap: 2px; }
.oc-btn { position: relative; color: var(--sub); font-size: 17px; width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; }
.oc-btn:hover { color: #fff; background: var(--card2); }
.oc-acts { margin-left: auto; }
.wb-off .btn-close { filter: invert(1) brightness(1.6); margin-left: 8px; opacity: 0.9; flex: none; }
.wb-off .btn-close:hover { opacity: 1; }
#nav-site { cursor: pointer; }
#site-name { cursor: pointer; }
.offcanvas-start .offcanvas-header .btn-close { margin-left: auto; }
.qb { padding: 8px; }
.q-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; }
.q-item:hover { background: var(--card); }
.q-item.playing { background: rgba(79, 124, 255, 0.12); }
.q-item.playing .q-name { color: #8fa7ff; }
.q-cover { width: 42px; height: 42px; border-radius: 8px; flex: none; object-fit: cover;
  background: linear-gradient(150deg, #232940, #161a26); }
.q-meta { flex: 1; min-width: 0; }
.q-name { font-size: 13.5px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.q-artist { font-size: 12px; color: var(--sub); margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.q-rm { color: var(--dim); font-size: 15px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: none; }
.q-rm:hover { color: #ff7a87; background: var(--card2); }
.q-empty { text-align: center; color: var(--dim); padding: 70px 0; }
.q-empty i { font-size: 46px; display: block; margin-bottom: 14px; opacity: 0.5; }
#nav-panel-list { display: flex; flex-direction: column; gap: 3px; }
#nav-panel-list .sb-item { padding: 12px 14px; }

/* 源标签 */
.src-tag { flex: none; font-size: 10px; font-weight: 600; letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.72); border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5px 7px; border-radius: 5px; }
.src-tag.proxy { color: #ffd479; border-color: rgba(255, 212, 121, 0.5); }

/* ============ 设置页 ============ */
.set-card { background: rgba(22, 25, 38, 0.5); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 16px; }
.set-card h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.set-card h3 i { color: var(--accent); }
.set-card .desc { color: var(--sub); font-size: 12.5px; margin: 4px 0 14px; line-height: 1.6; }
.set-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.srv-input { flex: 1; min-width: 260px; height: 42px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card); padding: 0 14px; font-size: 13.5px; outline: none; }
.srv-input:focus { border-color: var(--accent); }
/* 搜索音源选择（设置页） */
.srv-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.srv-opt { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line2); background: var(--card); color: var(--sub); font-size: 13px; transition: 0.18s; }
.srv-opt:hover { color: var(--text); border-color: var(--accent); }
.srv-opt.on { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px rgba(79, 124, 255, 0.28); }
.stat-line { font-size: 13px; color: var(--sub); }
.stat-line b { color: var(--text); font-weight: 600; }

/* ============ 响应式：窄屏（无侧栏，顶栏折叠） ============ */
@media (max-width: 991.98px) {
  #layout { grid-template-columns: 1fr; grid-template-rows: var(--top-h) minmax(0, 1fr); }
  #side { display: none; }
  #topbar { grid-area: 1 / 1 / 2 / 2; padding: 0 10px; }
  #main { grid-area: 2 / 1 / 3 / 2; }
  #playerbar { left: 0; padding: 10px 16px; }
  .pb-cover { width: 64px; height: 64px; }
  .view { padding: 18px 14px 120px; }
  .hero { padding: 28px 22px; }
  .ph-title { font-size: 18px; }
  .sec-head h2 { font-size: 18px; }
  .page-head { gap: 14px; }
  .page-head .ph-ico { width: 84px; height: 84px; }
  .np { padding: 64px 16px 18px; overflow-y: auto; }
  .np-wrap { display: flex; flex-direction: column; gap: 20px; flex: 1 1 auto; min-height: 0; }
  .np-art { order: 1; }
  .np-disc { width: min(58vw, 300px); height: min(58vw, 300px); }
  .np-lrc-ct { order: 2; height: auto; flex: 1 1 auto; min-height: 26vh; }
  .np-ctrls { order: 3; width: 100%; }
  .toasts { bottom: calc(var(--pb-h) + 14px); }
  .shead { display: none; }
  .srow { grid-template-columns: 40px 48px minmax(0, 1fr) auto; padding: 7px 10px; }
  .sc-album, .sc-dur { display: none; }
  .sc-main { padding-right: 6px; }
  .pl-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
}
@media (max-width: 575.98px) {
  #playerbar { height: auto; padding: 5px 8px 8px; gap: 2px 6px;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-rows: auto auto; }
  .pb-mid { display: contents; }
  .pb-left { display: contents; }
  .pb-cover { grid-area: 2 / 1 / 3 / 2; width: 44px; height: 44px; }
  .pb-meta { grid-area: 2 / 2 / 3 / 3; min-width: 0; }
  #pb-fav { grid-area: 2 / 3 / 3 / 4; }
  #pb-mode { display: none; }
  .pb-ctrl { grid-area: 2 / 4 / 3 / 5; gap: 2px; }
  .pb-right { grid-area: 2 / 5 / 3 / 6; }
  .pb-seekwrap { grid-area: 1 / 1 / 2 / 6; gap: 6px; }
  .pb-title { font-size: 13px; }
  .pb-sub { display: none; }
  .pb-act { width: 34px; height: 34px; font-size: 17px; }
  .pb-play { width: 38px; height: 38px; font-size: 18px; }
  .np { padding: 56px 12px 16px; }
  .np-disc { width: min(56vw, 280px); height: min(56vw, 280px); }
  .np-lrc-ct { height: auto; min-height: 24vh; }
  .lrc-empty i { font-size: 34px; margin-bottom: 8px; }
  .np-ctrl { gap: 8px; margin-top: 14px; }
  .np-act { width: 42px; height: 42px; font-size: 20px; flex: none;
    background: rgba(255, 255, 255, 0.12); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18); }
  .np-big { width: 46px; height: 46px; font-size: 23px;
    background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.10); }
  .np-play { width: 64px; height: 64px; font-size: 30px; flex: none; }
  .pl-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pl-name { font-size: 12.5px; }
  .wb-off { --bs-offcanvas-width: 92vw; }
  .sc-idx { display: none; }
  .srow { grid-template-columns: 48px minmax(0, 1fr) auto; }
}
