/* =========================================================================
 * 全局播放条 / 播放列表抽屉 / 沉浸式播放页（五套年代皮肤）
 * ========================================================================= */

/* ============================== 底部播放条 ============================== */
.playerbar {
  position: fixed;
  z-index: 80;
  /* ★ 与 .app 的左内边距同源：必须带上 --nav-left（导航条的 left 偏移），
     否则播放条左端会与导航条右边缘严丝合缝贴住。 */
  left: calc(var(--nav-left) + var(--nav-w) + 18px);
  right: 18px;
  bottom: 16px;
  height: var(--player-h);
  display: grid;
  grid-template-columns: auto minmax(120px, 1.05fr) minmax(280px, 2.2fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-2), 0 20px 50px -30px var(--tint);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  transition: left var(--dur) var(--ease), background var(--dur), box-shadow 0.7s var(--ease);
  overflow: hidden;
}
.pb-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--tint) 16%, transparent), transparent 46%);
  pointer-events: none;
  transition: background 1s var(--ease);
}
.playerbar > *:not(.pb-tint) { position: relative; z-index: 1; }

.pb-cover {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 15px;
  overflow: hidden;
  flex: none;
  background: var(--panel-2);
  box-shadow: var(--shadow-1);
  transition: transform 0.34s var(--ease-out);
}
.pb-cover img { width: 100%; height: 100%; object-fit: cover; }
.pb-cover:hover { transform: scale(1.05); }
.pb-cover-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(6, 6, 10, 0.5);
  color: #fff;
  opacity: 0;
  transition: opacity var(--dur);
}
.pb-cover-play .ic { width: 24px; height: 24px; }
.pb-cover:hover .pb-cover-play { opacity: 1; }
.playerbar.is-playing .pb-cover-play { opacity: 0; }

.pb-meta { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pb-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-sub { display: flex; align-items: center; gap: 7px; margin-top: 1px; font-size: 11.5px; color: var(--mute); min-width: 0; }
.pb-sub > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pb-main { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; width: 100%; }
.pb-controls { display: flex; align-items: center; gap: 4px; }
.pb-controls .icon-btn { width: 34px; height: 34px; }
.pb-play {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  box-shadow: 0 8px 22px -8px var(--brand);
  transition: transform 0.24s var(--ease), filter var(--dur);
  margin: 0 4px;
}
.pb-play .ic { width: 22px; height: 22px; }
.pb-play:hover { transform: scale(1.07); filter: brightness(1.06); }
.pb-play:active { transform: scale(0.97); }
.pb-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; }
.pb-time { font-size: 11px; color: var(--mute); font-family: var(--font-num); flex: none; min-width: 34px; text-align: center; }

.pb-right { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.vol-wrap { display: flex; align-items: center; }
.range-vol { width: 76px; }

/* ------------------------------ 进度条 / 音量 ------------------------------ */
.range { position: relative; flex: 1; height: 20px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.range-track { position: relative; width: 100%; height: 5px; border-radius: 99px; background: var(--panel-3); overflow: visible; }
.range-buf { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: color-mix(in srgb, var(--text) 16%, transparent); }
.range-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.08s linear;
}
.range-dot {
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 0 var(--glow);
  opacity: 0;
  transition: opacity var(--dur), box-shadow var(--dur), transform var(--dur);
}
.range:hover .range-dot, .range.is-drag .range-dot { opacity: 1; }
.range:hover .range-track { height: 6px; }
.range.is-drag .range-dot { transform: scale(1.25); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 6px var(--glow); }
.range:focus-visible { outline: none; }
.range:focus-visible .range-dot { opacity: 1; box-shadow: 0 0 0 5px var(--glow); }
.range-lg { height: 26px; }
.range-lg .range-track { height: 6px; }

/* ============================== 播放列表抽屉 ============================== */
.queue {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: calc(var(--player-h) + 26px);
  width: min(400px, calc(100vw - 32px));
  max-height: min(62vh, 620px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(26px) saturate(1.6);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  overflow: hidden;
  animation: queueIn 0.36s var(--ease-out) both;
}
@keyframes queueIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.queue-head b { font-size: 14.5px; }
.queue-head span { font-size: 11.5px; margin-left: 8px; }
.queue-head-actions { display: flex; align-items: center; gap: 4px; }
.queue-body { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.queue-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; transition: background var(--dur); }
.queue-row:hover { background: var(--panel-2); }
.queue-row.on { background: color-mix(in srgb, var(--brand) 13%, transparent); }
.queue-row img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex: none; }
.queue-row .qm { min-width: 0; flex: 1; }
.queue-row .qm b { font-size: 12.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-row .qm span { font-size: 11px; color: var(--mute); }

/* ============================== 沉浸式播放页 ============================== */
.stage {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  /* ★★ 必须显式声明列宽：grid 的隐式列默认 `auto`（≈ max-content），
     窄屏下会被头部/操作区的内容撑宽（实测 390/360/320 三个视口下都被撑成同一个 475px），
     右侧内容（分享/全屏、皮肤条的末项、部分操作按钮）直接被裁到视口外。
     而且因为这层是 position:fixed，溢出不会计入 documentElement.scrollWidth，
     常规「横向溢出探针」查不出来 —— 只能靠逐元素的 getBoundingClientRect().right > vw 判定。 */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg-0);
  animation: stageIn 0.42s var(--ease-out) both;
}
@keyframes stageIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.stage.closing { animation: stageOut 0.3s var(--ease) both; }
@keyframes stageOut { to { opacity: 0; transform: translateY(18px); } }

.stage-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.stage-bg-img {
  position: absolute;
  inset: -22%;
  background-size: cover;
  background-position: center;
  filter: blur(74px) saturate(1.5);
  transform: scale(1.16);
  opacity: 0.5;
  transition: background-image 0.9s var(--ease), opacity 0.6s;
}
.stage-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(72% 68% at 50% 42%, transparent, var(--bg-0) 78%),
    linear-gradient(to bottom, color-mix(in srgb, var(--bg-0) 42%, transparent), var(--bg-0) 96%);
}
.stage-top, .stage-body, .stage-bottom { position: relative; z-index: 2; min-width: 0; }

.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.stage-skin-switch { display: flex; gap: 3px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow-x: auto; scrollbar-width: none; }
.stage-skin-switch::-webkit-scrollbar { display: none; }
.stage-skin-switch button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: background var(--dur), color var(--dur); }
.stage-skin-switch button:hover { color: var(--text); }
.stage-skin-switch button.on { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); }
.stage-top-right { display: flex; gap: 4px; }

.stage-body {
  display: grid;
  /* ★ 三列：视觉区 | 信息/歌词 | 播放列表 + 智能推荐（用户要求右侧栏）。
     每列都显式写 minmax(...) —— 隐式列是 auto，会把内容撑出视口造成静默裁切。 */
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr) minmax(248px, 310px);
  gap: clamp(18px, 2.4vw, 40px);
  align-content: center;
  /* 前两列维持原来的垂直居中观感；右侧栏单独拉伸，好让内部列表有确定高度可滚动 */
  align-items: center;
  padding: 0 clamp(18px, 4vw, 68px) 8px;
  min-height: 0;
}

/* ------------------------------ 左侧视觉区 ------------------------------ */
.stage-visual { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: min(52vh, 440px); margin: 0 auto; }
.skin-panel { position: absolute; inset: 0; display: none; place-items: center; }
body[data-skin="70s"] .skin-70s,
body[data-skin="80s"] .skin-80s,
body[data-skin="90s"] .skin-90s,
body[data-skin="00s"] .skin-00s,
body[data-skin="modern"] .skin-modern { display: grid; animation: skinIn 0.5s var(--ease-out) both; }
@keyframes skinIn { from { opacity: 0; transform: scale(0.94) rotate(-1.5deg); } to { opacity: 1; transform: none; } }

/* —— 70 年代：黑胶 + 木质面板 —— */
.skin-70s .wood {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 22px;
  background:
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 5px),
    linear-gradient(140deg, #6b4423, #4a2c14 60%, #5a3620);
  box-shadow: inset 0 0 0 3px rgba(255, 214, 150, 0.16), var(--shadow-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.skin-70s .wood::before {
  content: "";
  position: absolute; inset: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 220, 160, 0.2);
}
.skin-70s .disc {
  position: relative;
  width: 74%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #15100b 0 3px, #1d1611 3px 4.4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: grid; place-items: center;
}
.skin-70s .disc::after {
  content: "";
  position: absolute; inset: 6%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(255, 220, 150, 0.12) 22%, transparent 34%, rgba(255, 220, 150, 0.08) 62%, transparent 76%);
}
.skin-70s .disc-label {
  width: 34%; aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
  z-index: 1;
}
.skin-70s .disc-label img { width: 100%; height: 100%; object-fit: cover; }
.skin-70s .disc-label::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  left: 50%; top: 50%;
  border-radius: 50%;
  background: #0d0a07;
}
.skin-70s .tonearm {
  position: absolute;
  right: 7%; top: 4%;
  width: 5px; height: 46%;
  border-radius: 4px;
  background: linear-gradient(to bottom, #d9c9a8, #8a7355);
  transform-origin: top center;
  transform: rotate(24deg);
  transition: transform 0.7s var(--ease-out);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.skin-70s .tonearm::after { content: ""; position: absolute; left: -4px; bottom: -7px; width: 13px; height: 13px; border-radius: 3px; background: #cfc0a0; }
.is-playing .skin-70s .tonearm { transform: rotate(6deg); }
.is-playing .skin-70s .disc { animation: spin 3.4s linear infinite; }
.skin-70s .platter-hint { position: absolute; bottom: -28px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--mute); letter-spacing: 0.1em; }

/* —— 80 年代：磁带 + 霓虹网格 —— */
.skin-80s { place-items: center; }
.skin-80s .grid80 {
  position: absolute; inset: -10% -10% 6% -10%;
  background-image:
    linear-gradient(rgba(255, 0, 200, 0.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 220, 255, 0.32) 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px;
  transform: perspective(320px) rotateX(58deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, #000, transparent 74%);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 74%);
  animation: gridScroll 5s linear infinite;
}
@keyframes gridScroll { to { background-position: 0 34px, 34px 0; } }
.skin-80s .cassette {
  position: relative;
  width: 78%; aspect-ratio: 1.52 / 1;
  border-radius: 14px;
  background: linear-gradient(160deg, #2a1035, #15081f 70%);
  border: 2px solid rgba(255, 60, 200, 0.5);
  box-shadow: 0 0 30px rgba(255, 0, 200, 0.36), inset 0 0 26px rgba(0, 220, 255, 0.14), var(--shadow-2);
  padding: 11px;
  display: flex; flex-direction: column; gap: 8px;
}
.skin-80s .cassette-label {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  background: linear-gradient(120deg, rgba(255, 0, 200, 0.24), rgba(0, 220, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.skin-80s .cassette-label img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; }
.skin-80s .cassette-title { font-size: 12.5px; font-weight: 700; color: #ffd6ff; letter-spacing: 0.06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-num); }
.skin-80s .cassette-reels { display: flex; justify-content: center; gap: 22px; padding-bottom: 3px; }
.skin-80s .reel-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #ff3cc8 0 16deg, #1a0a24 16deg 32deg);
  box-shadow: inset 0 0 0 8px #12061b, 0 0 12px rgba(255, 60, 200, 0.5);
  position: relative;
}
.skin-80s .reel-sm::after { content: ""; position: absolute; inset: 43%; border-radius: 50%; background: #ffd6ff; }
.is-playing .skin-80s .reel-sm { animation: spin 1.5s linear infinite; }
.skin-80s .reel-sm:last-child { animation-direction: reverse; }
.skin-80s .platter-hint { display: none; }

/* —— 90 年代：CD 光盘 + 激光 —— */
.skin-90s { overflow: hidden; }
.skin-90s .cd {
  position: relative;
  width: 80%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, #7dd3fc, #a78bfa, #f0abfc, #67e8f9, #818cf8, #7dd3fc);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(255, 255, 255, 0.36);
  display: grid; place-items: center;
  opacity: 0.94;
}
.skin-90s .cd::before {
  content: "";
  position: absolute; inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.3);
}
.skin-90s .cd-hole { width: 32%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.34), 0 0 26px rgba(139, 92, 246, 0.6); position: relative; }
.skin-90s .cd-hole img { width: 100%; height: 100%; object-fit: cover; }
.skin-90s .cd-hole::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: rgba(10, 10, 20, 0.6); }
.is-playing .skin-90s .cd { animation: spin 4.6s linear infinite; }
.skin-90s .cd-laser {
  position: absolute; left: 8%; right: 8%; bottom: 6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
  box-shadow: 0 0 18px 2px rgba(34, 211, 238, 0.7);
  animation: laser 2.6s ease-in-out infinite;
}
@keyframes laser { 0%, 100% { transform: translateY(-160px) scaleX(0.5); opacity: 0.3; } 50% { transform: translateY(-260px) scaleX(1); opacity: 1; } }

/* —— 00 年代：iPod 白色界面 —— */
.skin-00s { place-items: center; }
.skin-00s .ipod {
  width: 62%; aspect-ratio: 0.62 / 1;
  border-radius: 30px;
  background: linear-gradient(165deg, #ffffff, #e6e8ee);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.skin-00s .ipod-screen {
  flex: 1.1;
  border-radius: 8px;
  background: linear-gradient(180deg, #dfe7f5, #c9d6ee);
  border: 2px solid #9aa6bd;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  overflow: hidden;
  padding: 8px;
}
.skin-00s .ipod-screen img { width: 52%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); }
.skin-00s .ipod-screen span { font-size: 10.5px; color: #2b3245; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-00s .clickwheel {
  position: relative;
  flex: 1;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #f7f8fa 0 40%, #eceef3 40% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 3px 12px rgba(0, 0, 0, 0.14);
  font-size: 8.5px; color: #7b8497; font-weight: 700;
  align-self: center;
  width: 78%;
}
.skin-00s .clickwheel .cw-center { position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: linear-gradient(160deg, #fff, #e9ebf1); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07); }
.skin-00s .clickwheel span { position: absolute; }
.skin-00s .cw-menu { top: 9%; left: 50%; transform: translateX(-50%); }
.skin-00s .cw-play { bottom: 9%; left: 50%; transform: translateX(-50%); }
.skin-00s .cw-prev { left: 8%; top: 50%; transform: translateY(-50%); }
.skin-00s .cw-next { right: 8%; top: 50%; transform: translateY(-50%); }
.is-playing .skin-00s .clickwheel { animation: spin 8s linear infinite; }
.skin-00s .platter-hint { display: none; }

/* —— 10 年代+：现代毛玻璃 + 频谱波形 —— */
.skin-modern { place-items: center; }
.skin-modern .coverwrap {
  position: relative;
  width: 86%; aspect-ratio: 1;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-3), 0 0 60px -20px var(--tint);
}
.skin-modern .coverwrap img { width: 100%; height: 100%; object-fit: cover; }
.skin-modern .cover-glow {
  position: absolute; inset: 0;
  background: linear-gradient(200deg, transparent 40%, color-mix(in srgb, var(--tint) 36%, transparent));
  mix-blend-mode: soft-light;
}
.is-playing .skin-modern .coverwrap { animation: floaty 5.5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.skin-modern .wavebars { position: absolute; left: 0; right: 0; bottom: -34px; height: 26px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.skin-modern .wavebars i { width: 3.5px; border-radius: 3px; background: linear-gradient(to top, var(--wave-1), var(--wave-2)); height: 20%; transition: height 0.14s ease; }
.is-playing .skin-modern .wavebars i { animation: waveJump 1.1s ease-in-out infinite; }
@keyframes waveJump { 0%, 100% { height: 16%; } 50% { height: 100%; } }

/* ------------------------------ 右侧信息区 ------------------------------ */
.stage-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; min-height: 0; }
.stage-head { display: flex; flex-direction: column; gap: 8px; }
/* ★ column flex 默认 align-items:stretch，会把「音乐」药丸拉成整行宽的空白长条 */
.stage-head > .chip { align-self: flex-start; }
.stage-title { font-size: clamp(22px, 2.8vw, 40px); line-height: 1.15; letter-spacing: -0.02em; }
.stage-sub { font-size: clamp(12px, 1.1vw, 15px); color: var(--dim); }
.stage-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.stage-mid { position: relative; min-height: 0; flex: 1; }
.stage-lyric {
  --lh: min(38vh, 320px);
  height: var(--lh);
  overflow-y: auto;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.stage-lyric::-webkit-scrollbar { display: none; }
/* ★ 上下留白必须按「容器高度」算，不能写 padding:42% ——
   CSS 竖向 padding 的百分比是按【宽度】解析的，847px 宽会算出 356px 留白，
   直接把歌词顶到可视区之外（表现为「歌词区一片空白」）。
   这里用 --lh 显式按高度计算，保证当前行落在可视区内。 */
.lyric-inner { display: flex; flex-direction: column; gap: 12px; padding: calc(var(--lh, 320px) * 0.42) 0; }
.lyric-line {
  font-size: 15px;
  line-height: 1.5;
  color: var(--mute);
  transition: color 0.32s var(--ease), transform 0.32s var(--ease), opacity 0.32s, font-size 0.32s;
  cursor: pointer;
  transform-origin: left center;
}
.lyric-line:hover { color: var(--dim); }
.lyric-line.on { color: var(--text); font-size: 18px; font-weight: 700; transform: scale(1.02); text-shadow: 0 0 26px var(--glow); }
.lyric-line.tr { font-size: 12.5px; color: var(--mute); margin-top: -8px; }
.lyric-line.tr.on { font-size: 13.5px; }
.lyric-empty { color: var(--mute); font-size: 13px; }

/* 视频区（MV） */
.stage-video { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; }
.stage-video video { width: 100%; display: block; max-height: min(46vh, 400px); background: #000; }
.stage-video[hidden] { display: none; }
.danmaku-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* ★ 弹幕开关关掉时整层隐藏（由 player.js 的 applyDanmakuPref() 挂 .off）。
   只靠 spawnDanmaku 里拦新弹幕是不够的：已经在飞的十几条会照旧飘完，
   用户点开关后画面几乎没变化，观感就是"按钮没反应"。 */
.danmaku-layer.off { display: none; }
.dm-item {
  position: absolute;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.9);
  will-change: transform;
}
@keyframes dmRun { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.danmaku-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 8px; z-index: 3; }
.danmaku-bar input {
  flex: 1; height: 36px; padding: 0 14px;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-size: 12.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.danmaku-bar input::placeholder { color: rgba(255, 255, 255, 0.55); }
.danmaku-bar .btn { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.2); color: #fff; backdrop-filter: blur(10px); }

.stage-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-actions .icon-btn { border: 1px solid var(--line); background: var(--panel); }
.stage-actions .icon-btn.is-on { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }

/* ============ 右侧栏：播放列表 + 智能推荐（用户要求） ============
 * ★ 布局要点：两块共用同一列，各自 flex:1 且 min-height:0 —— 这样列表内部滚动，
 *   不会把播放页整体撑高、把底部的进度条顶出视口。
 *   （min-height:0 是必须的：flex 子项默认 min-height:auto 会拒绝收缩，
 *    列表一长就把父容器撑破 —— 这个坑在本项目已经踩过一次。）
 */
.stage-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; max-height: 100%; align-self: stretch; }
.side-block {
  display: flex; flex-direction: column; flex: 1 1 0; min-height: 0;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.side-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px; flex: none; }
.side-toggle {
  display: flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left; cursor: default;
}
.side-toggle b { font-size: 13px; font-weight: 650; }
.side-toggle .ic { opacity: 0.75; flex: none; }
.side-count { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.side-caret { display: none; margin-left: auto; transition: transform 0.18s ease; }
.side-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn-sm { width: 28px; height: 28px; }
.side-body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.side-sub { margin: 0; padding: 0 12px 8px; font-size: 11.5px; color: var(--dim); flex: none; }
.side-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.side-empty { padding: 18px 12px; font-size: 12px; color: var(--dim); text-align: center; }

.side-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px; align-items: center;
  padding: 5px 6px; border-radius: 10px; cursor: pointer; border: 0; background: none; color: inherit; text-align: left; font: inherit;
}
.side-item:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.side-item.on { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.side-item.on .si-name { color: var(--brand); font-weight: 650; }
.side-item img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--panel); display: block; }
.side-item .si-main { min-width: 0; }
.side-item .si-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .si-artist { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.side-item .si-index { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; text-align: center; }
.side-item .si-ops { display: flex; align-items: center; gap: 1px; opacity: 0; transition: opacity 0.15s ease; }
.side-item:hover .si-ops,
.side-item:focus-within .si-ops { opacity: 1; }
.side-item .si-ops button {
  width: 24px; height: 24px; border-radius: 7px; border: 0; background: none;
  color: var(--dim); display: inline-grid; place-items: center; cursor: pointer;
}
.side-item .si-ops button:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--text); }
.side-item .si-ops .ic { width: 15px; height: 15px; }
.side-item .si-ops button[data-op="up"] .ic { transform: rotate(180deg); }
/* ★ 触屏没有 hover：操作按钮必须常显，否则手机上永远点不到「上移/删除」 */
@media (hover: none) { .side-item .si-ops { opacity: 1; } }

.stage-bottom { display: flex; align-items: center; gap: 14px; padding: 12px clamp(18px, 4vw, 68px) 26px; }
.stage-time { font-size: 11.5px; color: var(--mute); font-family: var(--font-num); min-width: 40px; text-align: center; }

/* =========================================================================
 * 全屏（两条独立路径，因为用户诉求不同）
 *   ① #stageFull  → .stage 整体全屏：看歌词/操作区时用
 *   ② 视频全屏     → .stage-video 全屏：看 MV 画面时用（连弹幕一起带上）
 *   ★ 两条都必须显式处理，因为 .stage 是 grid:
 *     - .stage-video video 平时被 max-height: min(46vh,400px) 压着，
 *       全屏时若不解除，画面只会占屏幕 46% 高，看着像"没全屏"；
 *     - .stage-visual 也被 max-height 压着，全屏下要放开才有沉浸感。
 *   两套选择器都带 -webkit- 前缀：老 WebKit 只认 :-webkit-full-screen。
 * ========================================================================= */
.stage:fullscreen,
.stage:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; }
.stage:fullscreen .stage-video video,
.stage:-webkit-full-screen .stage-video video { max-height: none; }
.stage:fullscreen .stage-visual,
.stage:-webkit-full-screen .stage-visual { max-height: min(64vh, 620px); }
.stage:fullscreen .stage-lyric,
.stage:-webkit-full-screen .stage-lyric { --lh: min(46vh, 420px); }

.stage-video:fullscreen,
.stage-video:-webkit-full-screen { border-radius: 0; background: #000; }
.stage-video:fullscreen video,
.stage-video:-webkit-full-screen video {
  width: 100%; height: 100%; max-height: none; object-fit: contain;
}
/* 全屏看片时弹幕输入条先淡出，悬停或聚焦再出现，别一直压在画面上 */
.stage-video:fullscreen .danmaku-bar,
.stage-video:-webkit-full-screen .danmaku-bar { opacity: 0; transition: opacity 0.3s var(--ease); }
.stage-video:fullscreen:hover .danmaku-bar,
.stage-video:fullscreen:focus-within .danmaku-bar,
.stage-video:-webkit-full-screen:hover .danmaku-bar,
.stage-video:-webkit-full-screen:focus-within .danmaku-bar { opacity: 1; }

/* 全屏中的按钮要有「已全屏」的视觉反馈 */
.stage-top-right .icon-btn.is-on {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}

/* 年代皮肤下的整页色调联动 */
body[data-skin="70s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, #150e05 78%), linear-gradient(to bottom, rgba(21, 14, 5, 0.5), #150e05 96%); }
body[data-skin="70s"] .stage-bg-img { filter: blur(80px) sepia(0.5) saturate(1.2); opacity: 0.42; }
body[data-skin="80s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, #14061f 78%), linear-gradient(to bottom, rgba(20, 6, 31, 0.5), #14061f 96%); }
body[data-skin="80s"] .stage-title { color: #ffd6ff; text-shadow: 0 0 22px rgba(255, 60, 200, 0.55); }
body[data-skin="90s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, #070d1c 78%), linear-gradient(to bottom, rgba(7, 13, 28, 0.5), #070d1c 96%); }
body[data-skin="00s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, var(--bg-0) 78%), linear-gradient(to bottom, color-mix(in srgb, var(--bg-0) 50%, transparent), var(--bg-0) 96%); }
body[data-skin="70s"] .lyric-line.on { color: #ffe6b8; }
body[data-skin="80s"] .lyric-line.on { color: #ff9ee8; }

/* ============================== 响应式 ============================== */
@media (max-width: 1279px) {
  .playerbar { grid-template-columns: auto minmax(90px, 1fr) minmax(230px, 2fr) auto; gap: 12px; padding: 0 14px; }
  .pb-right .vol-wrap { display: none; }
}

@media (max-width: 1439px) {
  /* 空间收紧一档：右侧栏变窄，间距变小，保证中间歌词区仍有足够宽度 */
  .stage-body { grid-template-columns: minmax(210px, 320px) minmax(0, 1fr) minmax(220px, 268px); gap: clamp(14px, 1.8vw, 26px); }
}

@media (max-width: 1023px) {
  .playerbar { left: calc(var(--nav-left) + var(--nav-w) + 14px); right: 14px; bottom: 14px; }
  .stage-body { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 26px; }
  .stage-visual { max-height: min(40vh, 320px); }
  .stage-lyric { --lh: min(30vh, 240px); }
  /**
   * ★ 1023 以下没有"右侧"可言 —— 右侧栏改为整行铺开（跨两列）并横向并排两块，
   *   这样不会把歌词区再挤窄，也不会把播放页拉得很长。
   * ★ 同时启用折叠：两块都可点标题收起，默认在窄屏收起（由 stage.js 里的初始逻辑决定）。
   */
  .stage-side { grid-column: 1 / -1; flex-direction: row; align-self: auto; max-height: none; }
  .stage-side .side-block { min-width: 0; }
  .stage-side .side-caret { display: block; }
  .stage-side .side-toggle { cursor: pointer; }
  .stage-side .side-block.collapsed .side-body { display: none; }
  .stage-side .side-block.collapsed .side-caret { transform: rotate(-90deg); }
  .stage-side .side-list { max-height: 34vh; }
}

@media (max-width: 767px) {
  .playerbar { display: none; }
  .queue { right: 8px; left: 8px; width: auto; bottom: 124px; max-height: 58vh; }
  .stage { grid-template-rows: auto minmax(0, 1fr) auto; }
  .stage-body { grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; padding: 6px 16px 0; overflow-y: auto; }
  .stage-visual { max-height: 30vh; width: min(58vw, 240px); }
  .stage-info { gap: 12px; }
  .stage-lyric { --lh: 30vh; }
  .lyric-line { font-size: 14px; }
  .lyric-line.on { font-size: 16.5px; }
  .stage-skin-switch { padding: 3px; }
  .stage-skin-switch button { height: 27px; padding: 0 11px; font-size: 11px; }
  .stage-top { padding: 10px 12px; }
  /* ★ 窄屏下把年代皮肤条单独占一行并居中：
     否则它与「收起/分享/全屏」挤在一行，只拿到约 240px，五个年代按钮（合计 333px）必被裁。
     换行后可用宽 = 视口 - 24px padding，390/430 下可完整展示，320 以下才需内部滑动。 */
  .stage-top { flex-wrap: wrap; row-gap: 8px; }
  .stage-skin-switch { order: 3; width: 100%; justify-content: center; }
  /* 单列时右侧栏也竖排，两块都折叠着出现，避免播放页被拉成一长条 */
  .stage-side { flex-direction: column; }
  .stage-side .side-list { max-height: none; }
  .stage-bottom { padding: 8px 16px 18px; gap: 8px; }
  .stage-video video { max-height: 32vh; }
  .danmaku-bar { left: 8px; right: 8px; bottom: 8px; }
  .stage-actions .btn { height: 34px; padding: 0 14px; font-size: 12.5px; }
}

/* 折叠屏外屏 */
@media (max-width: 380px) {
  .stage-visual { width: min(64vw, 190px); }
  .lyric-line.on { font-size: 15.5px; }
  /* 极窄屏再压一档，让五个年代按钮仍能完整排下（≈293px < 296px 可用宽） */
  .stage-skin-switch button { padding: 0 8px; font-size: 10.5px; }
}
