/* ============ 主题变量(浅色默认,深色由 html[data-theme=dark] 覆盖) ============ */
:root {
  --accent: #4f7cff;
  --accent-d: #3a63e0;
  --accent2: #9a6bff;
  --ok: #22a06b;
  --err: #e5563f;
  --warn: #c98a1e;

  --text: #141826;
  --muted: #5c6478;
  --line: rgba(22, 28, 48, .10);

  --glass: rgba(255, 255, 255, .58);
  --glass-brd: rgba(255, 255, 255, .85);
  --glass-hi: rgba(255, 255, 255, .6);
  --field: rgba(255, 255, 255, .62);
  --field-brd: rgba(22, 28, 48, .12);
  --track: rgba(128, 140, 180, .32);

  --shadow: 0 12px 36px rgba(40, 54, 100, .14);
  --shadow-hi: 0 18px 44px rgba(40, 54, 100, .22);
  --bg-base: #eef1fa;
  --glow1: rgba(120, 160, 255, .6);
  --glow2: rgba(200, 140, 255, .5);
  --glow3: rgba(120, 220, 255, .5);
  --radius: 18px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}
html[data-theme="dark"] {
  --text: #e9edfb;
  --muted: #98a2bd;
  --line: rgba(255, 255, 255, .10);

  --glass: rgba(20, 24, 38, .55);
  --glass-brd: rgba(255, 255, 255, .12);
  --glass-hi: rgba(255, 255, 255, .08);
  --field: rgba(255, 255, 255, .06);
  --field-brd: rgba(255, 255, 255, .12);
  --track: rgba(255, 255, 255, .16);

  --shadow: 0 14px 44px rgba(0, 0, 0, .5);
  --shadow-hi: 0 20px 50px rgba(0, 0, 0, .6);
  --bg-base: #080a12;
  --glow1: rgba(70, 110, 255, .45);
  --glow2: rgba(150, 90, 255, .4);
  --glow3: rgba(40, 180, 220, .34);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg-base);
  padding-bottom: 132px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .45s var(--ease), color .35s var(--ease);
}
/* 背景彩色光斑 —— 刻意保持静态:光斑在毛玻璃下面一动,所有 backdrop-filter
   就要每帧重新采样模糊,是整页掉帧的最大单一来源。装饰让位给流畅度。 */
body::before {
  content: ""; position: fixed; inset: -20% -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(640px 440px at 16% 8%, var(--glow1), transparent 62%),
    radial-gradient(700px 500px at 86% 14%, var(--glow2), transparent 62%),
    radial-gradient(740px 580px at 52% 104%, var(--glow3), transparent 62%);
  transition: background .5s var(--ease);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--err); }
.small { font-size: 12px; }

/* ============ 毛玻璃基类(模糊半径收敛:blur 越大,动画叠加时合成开销越凶) ============ */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow);
  position: relative;
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--glass-hi), transparent 42%);
  opacity: .55;
}
.glass-bar {
  background: var(--glass);
  border-color: var(--glass-brd);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  transition: background .45s var(--ease), border-color .45s var(--ease);
}

/* 演示横幅 */
.demo-banner {
  background: linear-gradient(90deg, rgba(201,138,30,.22), rgba(154,107,255,.18));
  border-bottom: 1px solid var(--warn); color: var(--text);
  font-size: 13px; text-align: center; padding: 9px 16px;
  animation: drop-in .5s var(--ease) both;
}
.demo-banner a { color: var(--warn); text-decoration: underline; margin-left: 6px; transition: opacity .2s; }
.demo-banner a:hover { opacity: .7; }

/* ============ 顶栏 ============ */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 20px; border-bottom: 1px solid var(--glass-brd);
  position: sticky; top: 0; z-index: 10;
  animation: drop-in .55s var(--ease) both;
}
.brand { font-size: 17px; font-weight: 700; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.brand-ic { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 10px; }
.chip {
  font-size: 12.5px; color: var(--muted); background: var(--field);
  border: 1px solid var(--field-brd); padding: 6px 12px; border-radius: 999px;
  white-space: nowrap; transition: color .3s;
}
.chip.pulse { animation: chip-pulse .55s var(--ease); }
@keyframes chip-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.09); } 100% { transform: scale(1); } }

.icon-btn {
  width: 38px; height: 38px; flex: none; font-size: 17px; line-height: 1;
  border-radius: 12px; cursor: pointer; color: var(--text);
  background: var(--field); border: 1px solid var(--field-brd);
  transition: transform .15s var(--ease), background .2s;
}
.icon-btn:hover { background: var(--glass-hi); transform: translateY(-1px) rotate(-8deg); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.spin-once { animation: flip .55s var(--ease); }
@keyframes flip { 0% { transform: rotate(0) scale(.6); } 55% { transform: rotate(200deg) scale(1.12); } 100% { transform: rotate(360deg) scale(1); } }

main { max-width: 860px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }

/* ============ 卡片(错峰入场) ============ */
.card { padding: 20px 22px; animation: card-in .6s var(--ease) both; }
main > .card:nth-child(1) { animation-delay: .06s; }
main > .card:nth-child(2) { animation-delay: .14s; }
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 650; position: relative; z-index: 1; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0 0 14px; position: relative; z-index: 1; }
.hint code { background: var(--field); border: 1px solid var(--field-brd); border-radius: 5px; padding: 1px 5px; font-size: 12px; }

@keyframes drop-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

/* ============ 输入 ============ */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: relative; z-index: 1; }
input, select, textarea {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--field-brd);
  background: var(--field); color: var(--text); font-size: 14px; flex: 1; min-width: 0;
  outline: none;
  transition: border-color .2s, box-shadow .25s, background .25s, transform .2s var(--ease);
}
input::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, .20);
  background: var(--glass-hi);
  transform: translateY(-1px);
}

/* ============ 按钮 ============ */
.btn {
  padding: 12px 18px; border: 1px solid var(--field-brd); border-radius: 12px;
  background: var(--field); color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; position: relative; overflow: hidden;
  transition: transform .08s var(--ease), background .2s, border-color .2s, box-shadow .25s, filter .2s;
}
.btn:hover { background: var(--glass-hi); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 22px rgba(79, 124, 255, .38);
}
.btn.primary:hover { filter: brightness(1.07); }
/* 主按钮 hover 扫光 */
.btn.primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.btn.primary:not(:disabled):hover::after { animation: sweep .8s var(--ease); }
@keyframes sweep { from { left: -60%; } to { left: 140%; } }
/* 打包时按钮转圈 */
.btn.loading { color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: var(--accent);
  border-radius: 50%; animation: rot .7s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

.btn.ghost { background: transparent; }
.btn.sm { padding: 9px 15px; font-size: 13px; }

/* ============ 结果区 ============ */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.list-head h3 { margin: 0; }
.sel-bar { display: flex; align-items: center; gap: 12px; }
.sel-count { font-size: 13px; color: var(--muted); transition: color .25s; }
.empty { padding: 22px; text-align: center; font-size: 13px; }

.list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; position: relative; z-index: 1; }

/* 列表项:分批上滑淡入(--i 由 JS 设),翻页会重放 */
.item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--field);
  animation: item-in .45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .16s var(--ease), background .2s, border-color .2s, box-shadow .25s;
}
@keyframes item-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.item:hover { transform: translateY(-2px); border-color: var(--field-brd); background: var(--glass-hi); box-shadow: var(--shadow); }
/* 封面淡入(切封面/翻页都有过渡,不是硬蹦出来) */
@keyframes cover-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.item img, .player .disc img, .ly-head img { animation: cover-in .45s var(--ease) both; }

.item img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: #000; flex: none; transition: transform .3s var(--ease); }
.item:hover img { transform: scale(1.1) rotate(-3deg); }
.item .meta { flex: 1; min-width: 0; }
.item .t { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.item .acts { display: flex; gap: 8px; flex: none; }
.item .acts .btn { padding: 8px 13px; font-size: 13px; }

/* 自定义勾选框(带打勾动画) */
.item input[type=checkbox] {
  appearance: none; -webkit-appearance: none; position: relative;
  width: 20px; height: 20px; flex: none; border-radius: 6px; cursor: pointer; margin: 0;
  border: 1.5px solid var(--field-brd); background: var(--field);
  transition: background .18s, border-color .18s;
}
.item input[type=checkbox]:hover { border-color: var(--accent); }
.item input[type=checkbox]:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  animation: check-pop .32s cubic-bezier(.2, .9, .3, 1.5);
}
.item input[type=checkbox]::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: 2px solid #fff; border-top: 0; border-left: 0;
  transform: rotate(45deg) scale(0); transform-origin: center;
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.5);
}
.item input[type=checkbox]:checked::after { transform: rotate(45deg) scale(1); }
@keyframes check-pop { 0% { transform: scale(.7); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }

.tag { font-size: 11px; border-radius: 6px; padding: 1px 7px; border: 1px solid var(--field-brd); color: var(--muted); }
.tag.qq { color: #4f92ff; }
.tag.kugou { color: #f08a4b; }
.tag[class~="163"] { color: #ec5b5b; }   /* 类名以数字开头,不能用 .163 选择器 */

/* 骨架屏(搜索中) */
.sk { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); }
.sk .c { width: 48px; height: 48px; border-radius: 10px; flex: none; }
.sk .l { flex: 1; height: 12px; border-radius: 6px; }
.sk .c, .sk .l {
  background: linear-gradient(100deg, transparent 20%, var(--glass-hi) 45%, transparent 70%);
  background-size: 220% 100%; background-repeat: no-repeat;
  background-color: var(--line);
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -80% 0; } }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; position: relative; z-index: 1; animation: card-in .4s var(--ease) both; }
.page-info { font-size: 13px; color: var(--muted); min-width: 150px; text-align: center; }

/* ============ 弹层 ============ */
.mask {
  position: fixed; inset: 0; background: rgba(6, 8, 16, .5);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: mask-in .24s ease both;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal { padding: 24px; width: 100%; max-width: 460px; animation: pop-in .34s var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
.modal.login { max-width: 350px; }
.modal.login h2 { margin: 0 0 16px; font-size: 18px; font-weight: 650; position: relative; z-index: 1; }
.modal.login input { width: 100%; margin-bottom: 12px; position: relative; z-index: 1; }
.modal.login .btn { width: 100%; margin-bottom: 2px; position: relative; z-index: 1; }
.modal.login .btn + .btn { margin-top: 10px; }
.modal.login .hint { margin-top: 14px; }

/* ============ 播放器(自定义控件 + 贯穿底边的均衡器) ============ */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  border-top: 1px solid var(--glass-brd);
  padding: 12px 18px 0;
  animation: slide-up .4s var(--ease) both;
}
@keyframes slide-up { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
.player audio { display: none; }               /* 原生控件藏掉,只当引擎用 */

.p-row1 { display: flex; align-items: center; gap: 14px; }
.p-row2 { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-bottom: 25px; }

.player .disc {
  position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #2a3142 0 30%, #0c0e13 31% 100%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .25) inset; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.player .disc img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.player.playing .disc { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.p-meta { flex: 1; min-width: 0; }
.p-meta #pTitle { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 自定义进度 / 音量条(替掉浏览器自带的白色控件) */
.range {
  -webkit-appearance: none; appearance: none;
  padding: 0; border: 0; border-radius: 999px; flex: none;
  height: 6px; cursor: pointer; outline: none;
  background: linear-gradient(90deg,
    var(--accent) 0 var(--p, 0%),
    var(--track) var(--p, 0%) 100%);
  transition: box-shadow .2s, filter .2s;
}
.range:hover { filter: brightness(1.08); }
.range:focus-visible { box-shadow: 0 0 0 4px rgba(79, 124, 255, .22); }
.range::-webkit-slider-runnable-track { height: 6px; background: transparent; border-radius: 999px; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border: 0; border-radius: 50%;
  background: #fff; margin-top: -3.5px;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, .32), 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .15s var(--ease);
}
.range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range::-moz-range-track { height: 6px; background: transparent; border: 0; }
.range::-moz-range-thumb {
  width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, .32);
}
.range.seek { flex: 1; min-width: 0; }
.range.vol { width: 76px; }
.p-row2 .t {
  font-size: 12px; color: var(--muted); min-width: 40px; text-align: center;
  font-variant-numeric: tabular-nums;
}

.p-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.p-btn {
  width: 42px; height: 42px; flex: none; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--field-brd); background: var(--field); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  text-decoration: none; font-size: 15px;
  transition: transform .12s var(--ease), background .2s, box-shadow .25s, filter .2s;
}
.p-btn:hover { background: var(--glass-hi); transform: translateY(-1px) scale(1.05); }
.p-btn:active { transform: scale(.93); }
.p-btn.sm { width: 34px; height: 34px; font-size: 14px; }
.p-btn.play {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px rgba(79, 124, 255, .4);
}
.p-btn.play:hover { filter: brightness(1.08); }

/* 播放 / 暂停 图标切换(svg use) */
.p-btn.play .ic-pause { display: none; }
.player.playing .p-btn.play .ic-play { display: none; }
.player.playing .p-btn.play .ic-pause { display: block; }

/* 统一 SVG 图标尺寸(线性风格,currentColor 跟随文字色) */
.ic-svg { width: 18px; height: 18px; display: block; }
.p-btn .ic-svg { width: 16px; height: 16px; }
.p-btn.play .ic-svg { width: 17px; height: 17px; }

/* 底边频谱:单个 canvas 实画真实音频波动(WebAudio AnalyserNode),
   只在播放时跑 rAF;两端用静态 mask 淡出。不再用几十个 DOM 条子跑 CSS 动画。 */
.p-eq {
  /* canvas 是替换元素,left+right 撑不开宽度,必须显式给 width */
  position: absolute; left: 14px; bottom: 0; height: 17px; width: calc(100% - 28px);
  pointer-events: none; opacity: .38;
  transition: opacity .35s var(--ease);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.p-eq canvas { width: 100%; height: 100%; display: block; }
.player.playing .p-eq { opacity: .92; }

/* ============ Toast ============ */
.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  min-width: 200px; max-width: 90vw; padding: 11px 16px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-brd); color: var(--text);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow); font-size: 13.5px;
  animation: toast-in .32s var(--ease) both;
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--err); }
.toast.out { animation: toast-out .3s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px) scale(.97); } }

/* 主题切换瞬间:禁用全部 transition,避免大面积逐帧重算(掉帧根因) */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after { transition: none !important; }

/* 尊重系统"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 600px) {
  body { padding-bottom: 128px; }
  main { padding: 14px; }
  .card { padding: 16px; }
  .row { flex-direction: column; align-items: stretch; }
  .row .btn { width: 100%; }
  .list-head { gap: 8px; }
  .item { flex-wrap: wrap; }
  .pager { gap: 8px; }
  .page-info { min-width: 0; font-size: 12px; }
  .player { padding: 10px 12px 0; }
  .p-row1 { gap: 10px; }
  .p-actions .range.vol { display: none; }   /* 窄屏只留静音钮,音量条让位 */
  .player .disc { width: 40px; height: 40px; }
  .player .disc img { width: 27px; height: 27px; }
  .p-eq { left: 8px; width: calc(100% - 16px); }
}

/* ============ 歌词面板(播放器上方,玻璃质感) ============ */
.lyrics {
  position: fixed; left: 50%; bottom: 118px; z-index: 19;
  width: min(680px, calc(100% - 24px));
  max-height: min(54vh, 440px);
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hi);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  overflow: hidden;
  animation: panel-in .35s var(--ease) both;
}
.lyrics[aria-hidden="true"] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateX(-50%) translateY(18px); } to { opacity: 1; transform: translateX(-50%) none; } }

.ly-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.ly-head img {
  width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
  background: var(--field); border: 1px solid var(--field-brd);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.ly-meta { flex: 1; min-width: 0; }
.ly-meta #lTitle { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-meta .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.ly-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px 22px 20px;
  scroll-behavior: smooth;
  mask-image: linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
}
.lrc-line {
  padding: 6px 2px;
  font-size: 14.5px; line-height: 1.55;
  color: var(--muted); opacity: .72;
  transition: color .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease);
  transform-origin: left center;
  cursor: default;
}
.lrc-line .tl { display: block; font-size: 12px; opacity: .8; margin-top: 1px; }
.lrc-line.active {
  color: var(--text); opacity: 1; font-weight: 620;
  transform: scale(1.045) translateX(4px);
}
.lrc-line.active .tl { color: var(--accent); }
.lrc-empty { text-align: center; padding: 42px 0 30px; font-size: 14px; }

/* "词"按钮的激活态 */
.p-btn.on { color: var(--accent); }

@media (max-width: 600px) {
  .lyrics { bottom: 128px; width: calc(100% - 16px); max-height: 48vh; }
  .ly-body { padding: 12px 16px 16px; }
}

/* ============ PC 宽屏(≥980px):没播放单列居中,播放后左(搜索+结果) 右(歌词) ============ */
/* main.with-side 由 JS 按播放状态挂/摘:没歌时单列居中,不给出空右栏;
   点播放后切双栏,歌词面板从右侧滑入。窄屏一切不变(浮层 + 词按钮)。 */
@media (min-width: 980px) {
  main { transition: max-width .45s var(--ease); }
  main.with-side {
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
  }
  main.with-side > section:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  main.with-side > section:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  #pLrc, #lyClose { display: none; }   /* 宽屏面板自动管理,开合按钮没意义 */
  main.with-side .lyrics {
    position: sticky; top: 76px; left: auto; bottom: auto;
    transform: none; width: auto; max-height: none;
    height: clamp(400px, calc(100vh - 190px), 780px);
    grid-column: 2; grid-row: 1 / span 2;
    animation: side-in .5s var(--ease) both;
  }
  main.with-side .ly-head img { width: 54px; height: 54px; }
}
@keyframes side-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: none; }
}
