/* ============================================================
   在线音乐播放器  ——  style.css
   纯手写 CSS，无任何外部依赖 / 无 @import / 无 Web 字体
   ============================================================ */

/* ---------------- 设计变量 ---------------- */
:root {
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;

  --bg-0: #07070c;
  --bg-1: #0d0d15;
  --bg-2: #14141f;

  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f2f2f7;
  --text-dim: #a3a3b8;
  --text-mute: #6f6f85;

  --accent-1: #a855f7;
  --accent-2: #ec4899;
  --accent-3: #6366f1;
  --grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --grad-soft: linear-gradient(120deg, rgba(168, 85, 247, 0.22), rgba(236, 72, 153, 0.22));

  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.6);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 44px rgba(168, 85, 247, 0.28);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.16s var(--ease);
  --t: 0.28s var(--ease);
  --t-slow: 0.45s var(--ease);

  --mini-h: 66px;
}

/* ---------------- 基础重置 ---------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(1100px 720px at 8% -12%, rgba(168, 85, 247, 0.20), transparent 62%),
    radial-gradient(980px 680px at 98% 4%, rgba(236, 72, 153, 0.15), transparent 60%),
    radial-gradient(900px 900px at 52% 118%, rgba(99, 102, 241, 0.14), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, dt, ol, li, figure { margin: 0; padding: 0; }
ol { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* 隐藏的内联图标库 */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  display: block;
  flex: none;
}

/* 无障碍：仅屏幕阅读器可见 */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- 焦点可见样式 ---------------- */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.play-btn:focus-visible,
.icon-btn:focus-visible { outline-offset: 4px; }

/* ============================================================
   应用外框
   ============================================================ */
.app {
  min-height: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  background: var(--grad);
  box-shadow: var(--glow);
  flex: none;
}

.brand-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(100deg, #fff, #e6d4ff 55%, #ffc9e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.ghost-btn:hover { color: var(--text); background: var(--panel-strong); border-color: var(--border-strong); }
.ghost-btn:active { transform: scale(0.97); }
.ghost-btn-label { font-size: 13.5px; }

/* ============================================================
   布局：桌面端 主区 + 侧栏
   ============================================================ */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
  min-height: 0;
}

/* ---------------- 播放台 ---------------- */
.stage {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(12, 12, 20, 0.6);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
  padding: 26px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.stage-top {
  display: flex;
  gap: 30px;
  align-items: stretch;
  min-width: 0;
}

/* 封面 */
.cover-wrap {
  position: relative;
  width: 320px;
  flex: none;
  aspect-ratio: 1 / 1;
  align-self: center;
}

.cover-spin {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #15121d;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: spin 26s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}
.cover-spin.is-spinning { animation-play-state: running; }
.cover-spin img { width: 100%; height: 100%; object-fit: cover; }

@keyframes spin { to { transform: rotate(360deg); } }

.cover-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 210deg, rgba(168, 85, 247, 0.55), rgba(236, 72, 153, 0.12), rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.55));
  mask: radial-gradient(circle, transparent 0 66%, #000 67%);
  -webkit-mask: radial-gradient(circle, transparent 0 66%, #000 67%);
  opacity: 0.75;
  animation: spin 18s linear infinite;
  animation-play-state: paused;
}
.cover-wrap.is-playing .cover-ring { animation-play-state: running; }
.cover-wrap.is-playing .cover-spin { animation-play-state: running; }

/* 歌词（桌面） */
.lyrics-panel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.lyrics-viewport {
  position: relative;
  flex: 1;
  min-height: 190px;
  overflow: hidden;
  /* 上下边缘遮罩淡出 */
  mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.35) 9%, #000 30%, #000 70%, rgba(0, 0, 0, 0.35) 91%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.35) 9%, #000 30%, #000 70%, rgba(0, 0, 0, 0.35) 91%, transparent 100%);
}

.lyrics-track {
  padding: 46% 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--t-slow);
  will-change: transform;
}

.lyrics-track p {
  text-align: center;
  color: var(--text-mute);
  font-size: 15px;
  line-height: 1.5;
  transition: color var(--t), transform var(--t), opacity var(--t), filter var(--t);
  transform-origin: center;
  opacity: 0.72;
  padding: 0 4px;
}

.lyrics-track p.active {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  opacity: 1;
  transform: scale(1.03);
  text-shadow: 0 0 22px rgba(236, 72, 153, 0.55), 0 0 40px rgba(168, 85, 247, 0.35);
  background: linear-gradient(100deg, #f9d4ff, #ffb3dd 60%, #c9b6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lyrics-track .lyrics-empty {
  color: var(--text-mute);
  font-size: 14px;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

/* ---------------- 播放台下半部分 ---------------- */
.stage-bottom {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}

.now-playing { text-align: center; min-width: 0; }

.track-title {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  margin-top: 3px;
  font-size: 14px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 频谱 */
.viz {
  width: 100%;
  height: 64px;
  display: block;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.viz[hidden] { display: none; }

/* ---------------- 进度条 ---------------- */
.progress-block { display: flex; flex-direction: column; gap: 7px; }

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.time { font-family: var(--font); }

.range-wrap {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.range-wrap.is-disabled { cursor: default; opacity: 0.55; }

.range-rail {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.range-wrap:hover .range-rail { height: 8px; }
.range-rail { transition: height var(--t-fast); }

.range-buffer {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(255, 255, 255, 0.13);
}

.range-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
}

.range-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 15px;
  margin-left: -7.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.26), 0 3px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-50%) scale(0.85);
  transition: transform var(--t-fast), opacity var(--t-fast);
  opacity: 0;
  pointer-events: none;
}
.range-wrap:hover .range-thumb,
.range-wrap:focus-within .range-thumb,
.range-wrap.is-active .range-thumb { opacity: 1; transform: translateY(-50%) scale(1); }

.range-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  transform: translateX(-50%);
  padding: 3px 9px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  background: rgba(20, 18, 30, 0.94);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}
.range-tip.is-visible { opacity: 1; }

/* 原生 range 输入层：完全透明但可交互（保证键盘可达 + 拖动） */
.range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.range-input:disabled { cursor: default; }
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
}
.range-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

/* ---------------- 播放控制按钮 ---------------- */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 2px 0;
}

.ctrl-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.ctrl-btn:hover {
  color: var(--text);
  background: var(--panel-strong);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.ctrl-btn:active { transform: translateY(0) scale(0.94); }

.ctrl-btn.small { width: 40px; height: 40px; font-size: 17px; }

.ctrl-btn.play-btn {
  width: 62px;
  height: 62px;
  font-size: 27px;
  color: #fff;
  border: 0;
  background: var(--grad);
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.ctrl-btn.play-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 36px rgba(236, 72, 153, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}
.ctrl-btn.play-btn.large { width: 70px; height: 70px; font-size: 30px; }

.ctrl-btn.is-on {
  color: #fff;
  border-color: transparent;
  background: var(--grad-soft);
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.5), 0 0 18px rgba(168, 85, 247, 0.32);
}

/* ---------------- 音量 ---------------- */
.volume-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 0 4px;
}

.volume-label {
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  flex: none;
}

.volume-input {
  -webkit-appearance: none;
  appearance: none;
  width: min(280px, 46vw);
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
  flex: none;
}
.volume-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.3);
  transition: box-shadow var(--t-fast);
}
.volume-input::-webkit-slider-thumb:hover { box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.35); }
.volume-input::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.3);
}
.volume-input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.volume-value {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  width: 44px;
  text-align: right;
  flex: none;
}

/* ---------------- 状态提示行 ---------------- */
.status-line {
  min-height: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
  transition: color var(--t-fast);
}
.status-line.is-warn { color: var(--warn); }
.status-line.is-err { color: var(--err); }
.status-line.is-ok { color: var(--ok); }

/* ============================================================
   播放列表侧栏
   ============================================================ */
.sidebar {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(12, 12, 20, 0.62);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: none;
}

.sidebar-title-row { display: flex; align-items: center; gap: 10px; }

.sidebar-title { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }

.sidebar-count {
  font-size: 12px;
  color: var(--text-mute);
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  flex: none;
}

.sidebar-close { margin-left: auto; display: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); border-color: var(--border); }

/* 搜索框 */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 12px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-box:focus-within {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.16);
}
.search-ico { font-size: 16px; color: var(--text-mute); }
.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.search-input::placeholder { color: var(--text-mute); }
.search-input:focus { outline: none; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 26px; height: 26px; font-size: 15px; }

/* 列表滚动区 */
.list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 10px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.list-scroll::-webkit-scrollbar { width: 9px; }
.list-scroll::-webkit-scrollbar-track { background: transparent; }
.list-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
.list-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); background-clip: content-box; }

.playlist { display: flex; flex-direction: column; gap: 4px; }

.pl-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.pl-item:hover { background: rgba(255, 255, 255, 0.055); }
.pl-item:active { transform: scale(0.99); }

.pl-item.is-current {
  background: var(--grad-soft);
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.18);
}

.pl-thumb {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  overflow: hidden;
  flex: none;
  background: #16131f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 当前项跳动动画 */
.pl-bars {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 0 0 9px;
  background: rgba(8, 6, 14, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.pl-item.is-current .pl-bars { display: flex; }

.pl-bars i {
  width: 3.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffd6f2, var(--accent-2));
  height: 22%;
  animation: bar 0.9s ease-in-out infinite;
  transform-origin: bottom;
}
.pl-bars i:nth-child(1) { animation-delay: 0s; }
.pl-bars i:nth-child(2) { animation-delay: 0.18s; }
.pl-bars i:nth-child(3) { animation-delay: 0.36s; }
.pl-bars i:nth-child(4) { animation-delay: 0.54s; }
.pl-item.is-paused .pl-bars i { animation-play-state: paused; }

@keyframes bar {
  0%, 100% { height: 22%; }
  50% { height: 88%; }
}

.pl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.pl-title {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-item.is-current .pl-title {
  background: linear-gradient(100deg, #fff, #ffd0ee 70%, #d9c2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pl-artist {
  font-size: 12.5px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-dur {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-mute);
  flex: none;
  padding-left: 4px;
}
.pl-item.is-current .pl-dur { color: var(--text-dim); }

.list-empty {
  padding: 40px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-mute);
}

/* 快捷键卡片 */
.shortcut-card {
  flex: none;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.shortcut-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.shortcut-title .ico { font-size: 15px; }

.shortcut-list { display: flex; flex-direction: column; gap: 7px; }
.shortcut-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.shortcut-list dt { display: flex; gap: 4px; flex: none; }
.shortcut-list dd { color: var(--text-dim); text-align: right; }

kbd {
  display: inline-block;
  min-width: 26px;
  padding: 2px 7px;
  font-family: var(--font);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

/* ============================================================
   手机端：迷你播放条
   ============================================================ */
.mini-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  align-items: center;
  gap: 10px;
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 6px);
  height: calc(var(--mini-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(14, 12, 22, 0.82);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.5);
  transform: translateY(0);
  transition: transform var(--t), opacity var(--t);
}

.mini-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.1);
}
.mini-progress-fill {
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}

.mini-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast);
}
.mini-info:active { background: rgba(255, 255, 255, 0.06); }

.mini-cover {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
  flex: none;
  box-shadow: var(--shadow-sm);
  background: #16131f;
}

.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mini-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-artist {
  font-size: 11.5px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-chevron { font-size: 17px; color: var(--text-mute); flex: none; }

.mini-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.mini-actions .ctrl-btn { border-color: transparent; background: transparent; }
.mini-actions .ctrl-btn.play-btn { border: 0; background: var(--grad); }

/* ============================================================
   手机端：全屏播放页
   ============================================================ */
.full-player {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 20px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background-color: #0a0912;
  background-image:
    radial-gradient(700px 520px at 20% -8%, rgba(168, 85, 247, 0.34), transparent 66%),
    radial-gradient(640px 480px at 92% 10%, rgba(236, 72, 153, 0.26), transparent 62%),
    radial-gradient(700px 700px at 50% 116%, rgba(99, 102, 241, 0.22), transparent 64%);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  overflow: hidden;
}
.full-player.is-open { transform: translateY(0); }
body.fp-open { overflow: hidden; }

.sheet-handle {
  width: 44px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  flex: none;
}

.fp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.fp-head-title {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.fp-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.fp-cover-wrap {
  position: relative;
  width: min(74vw, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.09);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.fp-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.fp-cover-wrap.is-hidden { opacity: 0; visibility: hidden; transform: scale(0.94); position: absolute; }

.fp-lyrics {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t), visibility var(--t);
}
.fp-lyrics.is-visible { opacity: 1; visibility: visible; }

.fp-lyrics .lyrics-viewport { flex: 1; min-height: 0; }
.fp-lyrics .lyrics-track { padding: 40% 4px; }

.fp-bottom {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 6px;
}

.fp-meta { text-align: center; min-width: 0; }
.fp-title {
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-artist {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-viz { height: 46px; }

.full-player .controls { gap: 10px; }
.full-player .volume-input { width: min(220px, 42vw); }

/* ============================================================
   快捷键说明弹层
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade 0.2s var(--ease);
}

.modal-card {
  position: relative;
  width: min(360px, 100%);
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)), rgba(16, 14, 24, 0.96);
  box-shadow: var(--shadow-lg);
  animation: pop 0.24s var(--ease);
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}
.modal-title .ico { font-size: 18px; color: var(--accent-2); }
.modal-card .shortcut-list { margin-bottom: 20px; }

.primary-btn {
  width: 100%;
  padding: 11px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(168, 85, 247, 0.36);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(236, 72, 153, 0.44); }
.primary-btn:active { transform: translateY(0) scale(0.98); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   响应式
   ============================================================ */

/* 中等宽度：歌词并入下方隐藏，封面缩小 */
@media (max-width: 1240px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .stage-top { flex-direction: column; align-items: center; gap: 20px; }
  .cover-wrap { width: 260px; }
  .lyrics-panel { width: 100%; }
  .lyrics-viewport { min-height: 150px; }
  .lyrics-track { padding: 30% 16px; }
}

/* 平板 / 窄桌面：侧栏变成可滑出的浮层 */
@media (max-width: 1000px) and (min-width: 861px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    max-height: 100vh;
    border-radius: 0;
    z-index: 70;
    transform: translateX(102%);
    transition: transform var(--t);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: grid; }
}

/* ============================================================
   手机端（<= 860px）
   ============================================================ */
@media (max-width: 860px) {
  .app {
    padding: 14px 14px calc(var(--mini-h) + env(safe-area-inset-bottom, 0px) + 16px);
    gap: 14px;
  }

  .brand-text { font-size: 17px; }
  .brand-mark { width: 34px; height: 34px; font-size: 17px; }
  .ghost-btn { padding: 8px 12px; }
  .ghost-btn-label { display: none; }

  /* 桌面播放台整体隐藏，改用迷你条 + 全屏页 */
  .stage { display: none; }
  .desktop-only { display: none !important; }

  .layout { display: block; }

  /* 迷你条显示 */
  .mini-bar { display: flex; }
  .full-player { display: flex; }

  /* 侧栏：从底部升起的浮层 */
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: min(76vh, 620px);
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    z-index: 100;
    transform: translateY(102%);
    transition: transform 0.34s var(--ease);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.65);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sidebar.is-open { transform: translateY(0); }
  .sidebar-close { display: grid; }
  .sidebar-head { padding: 16px 16px 12px; }
  .sidebar-head::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
  }
  .sidebar-head { position: relative; }

  .pl-item { padding: 10px 12px; }
  .pl-thumb { width: 50px; height: 50px; }

  .full-player .controls { gap: 8px; }
  .full-player .ctrl-btn { width: 46px; height: 46px; }
  .full-player .ctrl-btn.play-btn { width: 66px; height: 66px; font-size: 28px; }
}

/* 小屏微调 */
@media (max-width: 400px) {
  .app { padding: 12px 11px calc(var(--mini-h) + env(safe-area-inset-bottom, 0px) + 14px); }
  .fp-title { font-size: 18px; }
  .fp-cover-wrap { width: min(72vw, 260px); }
  .full-player { padding-left: 16px; padding-right: 16px; }
  .full-player .ctrl-btn { width: 42px; height: 42px; font-size: 18px; }
  .full-player .ctrl-btn.play-btn { width: 60px; height: 60px; font-size: 25px; }
  .volume-label { display: none; }
  .full-player .volume-input { width: min(240px, 62vw); }
  .mini-actions .ctrl-btn.small { width: 36px; height: 36px; }
}

/* 桌面大屏（1440px 及以上）优化 */
@media (min-width: 1400px) {
  .app { padding: 30px 44px 40px; }
  .layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 26px; }
  .stage { padding: 32px 34px 28px; }
  .cover-wrap { width: 360px; }
  .stage-top { gap: 36px; }
  .track-title { font-size: 28px; }
  .viz { height: 76px; }
  .lyrics-track p { font-size: 16px; }
  .lyrics-track p.active { font-size: 19.5px; }
  .sidebar { max-height: calc(100vh - 60px); top: 30px; }
}

/* 矮屏幕：压缩封面，保证控制区可见 */
@media (min-width: 861px) and (max-height: 760px) {
  .cover-wrap { width: 230px; }
  .lyrics-viewport { min-height: 140px; }
  .viz { height: 48px; }
}

/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cover-spin,
  .cover-ring,
  .pl-bars i { animation: none !important; }
  .pl-bars i { height: 60%; }
}

/* 无障碍：高对比度模式下的边框增强 */
@media (prefers-contrast: more) {
  :root {
    --border: rgba(255, 255, 255, 0.3);
    --text-dim: #d0d0e0;
    --text-mute: #b0b0c4;
  }
}

/* 打印时隐藏交互元素 */
@media print {
  .mini-bar, .full-player, .topbar-actions, .viz { display: none !important; }
}
