/* static/css/style.css */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #05060a;
  --fg: #e9e9f0;
  --muted: rgba(233,233,240,.5);
  --accent1: #6a5cff;
  --accent2: #ff4d8d;
  --accent3: #22e6c8;
  --line: rgba(255,255,255,.08);
  --flash-energy: 0;
  --carousel-w: 440px;
  --carousel-card-h: 148px;
  --topbar-h: 62px;
  --bottombar-h: 130px;
  --footer-h: 32px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}

#bgImageLayer { position: fixed; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; z-index: 0; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
#bgImageLayer.active { opacity: 1; }

#bgVideoLayer { position: fixed; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; overflow: hidden; background: #000; }
#bgVideoLayer.active { opacity: 1; }
#bgVideoLayer video { width: 100%; height: 100%; object-fit: cover; display: block; }

#bgImageMask { position: fixed; inset: 0; background: radial-gradient(circle at center, rgba(0,0,0,.30) 0%, rgba(0,0,0,.82) 100%); z-index: 1; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
#bgImageMask.active { opacity: 1; }
#bgParticleCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
#bgCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; filter: blur(60px); opacity: .35; transition: opacity .8s ease; pointer-events: none; }
#mvVideo { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; filter: brightness(.65) saturate(1.2); display: none; }
#mvVideo.active { opacity: .7; display: block; }
#particleCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

/* ============ 顶部栏 ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 26px;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(8, 8, 14, 0.78) 0%, rgba(8, 8, 14, 0.55) 70%, rgba(8, 8, 14, 0) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.topbar > * { pointer-events: auto; }
body.pure-mode .topbar { opacity: 0; transform: translateY(-100%); pointer-events: none; }
body.pure-mode .topbar > * { pointer-events: none; }

.logo { display: flex; align-items: center; gap: 8px; letter-spacing: 2px; }
.logo-icon { color: var(--accent2); font-size: 16px; animation: spin 6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-text { font-weight: 600; font-size: 14px; background: linear-gradient(90deg, #fff, #b3b3ff, #fff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.status { font-size: 11px; color: var(--muted); letter-spacing: 1px; padding: 6px 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(8px); }
.status::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent3); margin-right: 6px; box-shadow: 0 0 8px var(--accent3); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.icon-btn { background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--fg); width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .25s cubic-bezier(.34,1.56,.64,1); backdrop-filter: blur(10px); }
.icon-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(106,92,255,.3); }
.icon-btn.active { color: var(--accent3); border-color: rgba(34,230,200,.35); background: rgba(34,230,200,.12); }

.pulse-btn { background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--fg); width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .25s cubic-bezier(.34,1.56,.64,1); backdrop-filter: blur(10px); position: relative; overflow: visible; }
.pulse-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(34,230,200,.3); }
.pulse-btn.active { color: var(--accent3); border-color: rgba(34,230,200,.5); background: rgba(34,230,200,.15); box-shadow: 0 0 20px rgba(34,230,200,.45); }
.pulse-btn.impact { color: #ff8a3d; border-color: rgba(255,138,61,.55); background: rgba(255,138,61,.16); box-shadow: 0 0 24px rgba(255,138,61,.55); }

/* ============ 纯净模式 ============ */
body.pure-mode .bottom-bar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-top-color: transparent; }
body.pure-mode .bottom-bar .title,
body.pure-mode .bottom-bar .artist,
body.pure-mode .bottom-bar .t,
body.pure-mode .bottom-bar .v { text-shadow: 0 1px 4px rgba(0,0,0,.95), 0 0 12px rgba(0,0,0,.6); }
body.pure-mode .bottom-bar .ctrl { background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.10); }
body.pure-mode .bottom-bar .ctrl.main { background: linear-gradient(135deg, var(--accent1), var(--accent2)); border: none; }
body.pure-mode .bottom-bar .progress { background: rgba(0,0,0,.4); }
body.pure-mode .bottom-bar .progress-buffer { background: rgba(255,255,255,.3); }
body.pure-mode .bottom-bar .volume { background: rgba(0,0,0,.4); }

.pure-exit { position: fixed; top: calc(16px + env(safe-area-inset-top)); right: 24px; width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.18); color: #fff; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 130; backdrop-filter: blur(10px); box-shadow: 0 4px 16px rgba(0,0,0,.5); transition: all .25s; animation: pureExitFadeIn .5s ease; }
body.pure-mode .pure-exit { display: flex; }
@keyframes pureExitFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.pure-exit:hover { background: rgba(0,0,0,.7); transform: scale(1.08); }
.pure-exit:active { transform: scale(.95); }

/* ============ 移动端缩放提示 ============ */
.mobile-zoom-hint {
  position: fixed;
  bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom) + var(--footer-h) + 10px);
  left: 50%; transform: translateX(-50%);
  padding: 6px 14px; background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; font-size: 11px; color: rgba(255,255,255,.7);
  letter-spacing: 1px; z-index: 55; pointer-events: none;
  opacity: 0; transition: opacity .4s ease; white-space: nowrap;
}
.mobile-zoom-hint.show { opacity: 1; }
body.pure-mode .mobile-zoom-hint { display: none; }

/* ============ 主舞台 ============ */
.main-stage { position: relative; z-index: 10; width: 100vw; height: 100vh; display: flex; overflow: hidden; padding-top: calc(var(--topbar-h) + env(safe-area-inset-top)); padding-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom) + var(--footer-h)); transition: padding .35s ease; }
body.pure-mode .main-stage { padding-top: calc(20px + env(safe-area-inset-top)); }

.scene { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; perspective: 1400px; display: flex; align-items: center; justify-content: center; cursor: default; transition: flex-basis .45s cubic-bezier(.4,0,.2,1), padding .45s cubic-bezier(.4,0,.2,1), transform .45s cubic-bezier(.4,0,.2,1); will-change: flex-basis, transform; }
.scene.rotating { cursor: grabbing; }
body.carousel-open .scene { flex: 0 0 calc(100% - var(--carousel-w)); padding-right: 12px; }

.stage-3d {
  position: relative;
  width: 100%;
  height: 100%;
  /* ★ 关键：让 stage-3d 的尺寸跟随父容器 scene 变化 */
  min-width: 0;
  min-height: 0;
  transform-style: preserve-3d;
  transition: transform .06s linear, width .45s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.lyric-panel { position: relative; width: min(760px, 88vw); height: min(480px, 62vh); min-height: 300px; display: flex; flex-direction: column; border-radius: 24px; border: 1px solid rgba(255,255,255,.12); padding: 18px 26px 16px; overflow: hidden; transition: box-shadow .5s, transform .3s, width .45s cubic-bezier(.4,0,.2,1), height .45s cubic-bezier(.4,0,.2,1); box-shadow: 0 16px 52px rgba(0,0,0,.55), 0 32px 64px rgba(0,0,0,.45); background: rgba(8,8,14,.55); transform: rotateY(-3deg); touch-action: none; }
body.carousel-open .lyric-panel { width: min(680px, 100%); transform: rotateY(0deg) scale(.96); }
.lyric-panel.has-mv { background: rgba(0,0,0,.55); }

.lyric-bg { position: absolute; inset: 0; z-index: 0; border-radius: 24px; background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0; transition: opacity .8s ease, background-image .5s ease; pointer-events: none; }
.lyric-bg.active { opacity: 1; }
.lyric-mask { position: absolute; inset: 0; z-index: 1; border-radius: 24px; background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.35) 0%, rgba(0,0,0,.80) 100%); pointer-events: none; }

.lyric-header { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; color: rgba(255,255,255,.72); letter-spacing: 2px; flex-shrink: 0; text-shadow: 0 1px 3px rgba(0,0,0,.85); }
.lyric-header .mv-tag { background: linear-gradient(135deg, var(--accent1), var(--accent2)); padding: 2px 10px; border-radius: 20px; font-size: 10px; color: #fff; font-weight: 600; letter-spacing: 1px; display: none; }
.lyric-header .mv-tag.show { display: inline-block; }

.lyric-scroll { position: relative; z-index: 3; flex: 1; overflow-y: auto; scroll-behavior: smooth; padding: 160px 8px; mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%); -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.lyric-scroll::-webkit-scrollbar { width: 4px; }
.lyric-scroll::-webkit-scrollbar-thumb { background: rgba(106,92,255,.5); border-radius: 4px; }

.lyric-line { padding: 12px 16px; border-radius: 12px; font-size: 22px; line-height: 1.75; color: rgba(255, 255, 255, 0.68); transition: all .45s cubic-bezier(.34,1.56,.64,1); text-align: center; letter-spacing: .8px; font-weight: 500; margin: 6px 0; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 0, 0, 0.6); }
.lyric-line.active { color: #fff; font-size: 32px; font-weight: 800; transform: scale(1.05); letter-spacing: 2px; animation: lyricGlow 2s ease-in-out infinite alternate; }
@keyframes lyricGlow {
  from { text-shadow: 0 0 20px rgba(106, 92, 255, 0.8), 0 0 50px rgba(255, 77, 141, 0.4), 0 2px 8px rgba(0, 0, 0, 0.9); }
  to { text-shadow: 0 0 32px rgba(106, 92, 255, 1), 0 0 80px rgba(255, 77, 141, 0.7), 0 0 40px rgba(34, 230, 200, 0.5), 0 2px 8px rgba(0, 0, 0, 0.9); }
}
.lyric-line.near { color: rgba(255, 255, 255, 0.88); font-size: 26px; font-weight: 600; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85); }
.lyric-empty { text-align: center; color: rgba(233,233,240,.62); font-size: 14px; padding: 40px 10px; line-height: 2; text-shadow: 0 1px 3px rgba(0,0,0,.85); }
.lyric-empty code { background: rgba(255,255,255,.10); padding: 2px 8px; border-radius: 5px; font-family: monospace; color: var(--accent3); }

/* ============ 轮播侧栏 ============ */
.carousel-side { position: relative; flex: 0 0 0; width: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(12,12,20,.55) 0%, rgba(12,12,20,.75) 100%); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-left: 1px solid rgba(255,255,255,.08); border-radius: 24px 0 0 24px; opacity: 0; transform: translateX(14px); transition: flex-basis .45s cubic-bezier(.4,0,.2,1), width .45s cubic-bezier(.4,0,.2,1), opacity .3s ease, transform .45s cubic-bezier(.4,0,.2,1); pointer-events: none; will-change: flex-basis, width, transform, opacity; }
body.carousel-open .carousel-side { flex: 0 0 var(--carousel-w); width: var(--carousel-w); opacity: 1; transform: translateX(0); pointer-events: auto; }

.carousel-side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px 14px; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.carousel-side-title { font-size: 13px; letter-spacing: 2px; color: var(--fg); font-weight: 600; }
.carousel-side-close { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .25s; }
.carousel-side-close:hover { background: rgba(255,77,141,.35); border-color: rgba(255,77,141,.6); transform: rotate(90deg); }

.carousel-side-stage { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; padding: 0; margin: 0; overflow: hidden; perspective: 1200px; cursor: grab; }
.carousel-side-stage:active { cursor: grabbing; }
.carousel-track { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }

.carousel-card { position: absolute; top: 0; left: 50%; width: calc(var(--carousel-w) - 60px); height: var(--carousel-card-h); margin-left: calc((var(--carousel-w) - 60px) / -2); border-radius: 16px; background: #0a0a12 center/cover no-repeat; box-shadow: 0 14px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.07), 0 0 60px rgba(106,92,255,.22); overflow: hidden; cursor: pointer; will-change: transform, opacity, filter; backface-visibility: hidden; display: flex; align-items: center; transition: box-shadow .35s ease; }
.carousel-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.1) 100%); z-index: 1; pointer-events: none; }
.carousel-card.active { box-shadow: 0 18px 55px rgba(0,0,0,.85), 0 0 0 2px rgba(255,255,255,.5), 0 0 100px rgba(255,77,141,.5), 0 0 150px rgba(106,92,255,.4); }
.carousel-card-cover { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.carousel-card-info { position: relative; z-index: 2; padding: 0 16px; display: flex; flex-direction: column; gap: 4px; text-shadow: 0 2px 8px rgba(0,0,0,.9); min-width: 0; flex: 1; }
.carousel-card-title { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .3px; }
.carousel-card-artist { font-size: 10px; color: rgba(255,255,255,.72); letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carousel-card-play { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) scale(.8); width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.35); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all .3s cubic-bezier(.34,1.56,.64,1); z-index: 3; pointer-events: none; }
.carousel-card:hover .carousel-card-play { opacity: 1; transform: translateY(-50%) scale(1); background: linear-gradient(135deg, var(--accent1), var(--accent2)); border-color: transparent; box-shadow: 0 0 30px rgba(255,77,141,.7); }
.carousel-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--muted); font-size: 13px; letter-spacing: 2px; }

.carousel-side-controls { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px 0 8px; flex-shrink: 0; }
.carousel-ctrl { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .25s cubic-bezier(.34,1.56,.64,1); backdrop-filter: blur(10px); }
.carousel-ctrl:hover { background: rgba(255,255,255,.16); transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 24px rgba(106,92,255,.45); }
.carousel-ctrl:active { transform: scale(.92); }
.carousel-ctrl.main { width: 52px; height: 52px; background: linear-gradient(135deg, var(--accent1), var(--accent2)); border: none; box-shadow: 0 10px 28px rgba(106,92,255,.55), 0 0 50px rgba(255,77,141,.35); }
.carousel-ctrl.main:hover { transform: scale(1.08); }
.carousel-side-hint { text-align: center; color: var(--muted); font-size: 10px; letter-spacing: 2px; padding: 0 0 14px; flex-shrink: 0; }

/* ============ 底部控制条 ============ */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: var(--footer-h); height: var(--bottombar-h); display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 20px; padding: 16px 32px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(5,6,10,.95) 60%, rgba(5,6,10,.65) 100%); backdrop-filter: blur(18px); border-top: 1px solid rgba(255,255,255,.08); z-index: 50; transition: bottom .35s ease; }
.now-playing { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.meta { min-width: 0; }
.title { font-size: 18px; font-weight: 700; letter-spacing: .5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(90deg, #fff, #b3b3ff, #fff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 4s linear infinite; }
.artist { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center-controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.progress-wrap { display: flex; align-items: center; gap: 12px; width: 100%; }
.t { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 36px; text-align: center; }
.progress { flex: 1; height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; position: relative; cursor: pointer; transition: height .2s; }
.progress:hover { height: 7px; }
.progress-buffer { position: absolute; left: 0; top: 0; height: 100%; background: rgba(255,255,255,.15); border-radius: 4px; width: 0%; transition: width .3s; }
.progress-fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg, var(--accent1), var(--accent2)); border-radius: 4px; width: 0%; box-shadow: 0 0 10px rgba(255,77,141,.6); }
.progress-dot { position: absolute; top: 50%; left: 0; width: 11px; height: 11px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%) scale(0); transition: transform .2s; box-shadow: 0 0 12px rgba(255,255,255,.8); pointer-events: none; }
.progress:hover .progress-dot { transform: translate(-50%, -50%) scale(1); }
.controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.ctrl { background: transparent; border: none; color: var(--fg); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; transition: all .25s cubic-bezier(.34,1.56,.64,1); position: relative; }
.ctrl::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(255,255,255,.08); transform: scale(0); transition: transform .25s; }
.ctrl:hover::before { transform: scale(1); }
.ctrl:hover { color: #fff; }
.ctrl:active { transform: scale(.92); }
.ctrl.active { color: var(--accent2); }
.ctrl.active::before { background: rgba(255,77,141,.15); }
.ctrl.main { width: 54px; height: 54px; background: linear-gradient(135deg, var(--accent1), var(--accent2)); color: #fff; box-shadow: 0 8px 22px rgba(106,92,255,.5), 0 0 40px rgba(255,77,141,.3); }
.ctrl.main::before { display: none; }
.ctrl.main:hover { transform: scale(1.06); }
.right-controls { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; min-width: 0; }
.spectrum { display: flex; align-items: flex-end; justify-content: flex-end; gap: 2px; height: 24px; width: 100%; max-width: 220px; overflow: hidden; }
.spectrum i { display: block; width: 3px; border-radius: 2px; background: linear-gradient(to top, var(--accent1), var(--accent2)); height: 3px; transition: height .08s linear; box-shadow: 0 0 6px rgba(255,77,141,.5); flex-shrink: 0; }
.volume-wrap { display: flex; align-items: center; gap: 8px; color: var(--muted); width: min(220px, 100%); }
.volume { flex: 1; height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; position: relative; cursor: pointer; transition: height .2s; }
.volume:hover { height: 7px; }
.volume-fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg, var(--accent3), var(--accent1)); border-radius: 4px; width: 70%; }
.volume-dot { position: absolute; top: 50%; left: 70%; width: 9px; height: 9px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%) scale(0); transition: transform .2s; pointer-events: none; box-shadow: 0 0 8px #fff; }
.volume:hover .volume-dot { transform: translate(-50%, -50%) scale(1); }
.v { font-size: 11px; min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============ 备案页脚 ============ */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  min-height: var(--footer-h);
  padding: 4px 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.3px;
  box-sizing: border-box;
  transition: opacity .35s ease;
}
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; text-align: center; }
.site-footer-text { color: rgba(255, 255, 255, 0.75); white-space: nowrap; }
.site-footer-divider { opacity: 0.4; }
.site-footer-link { color: #ffffff; text-decoration: none; transition: color .2s ease; white-space: nowrap; border-bottom: 1px dashed rgba(255, 255, 255, 0.3); padding-bottom: 1px; display: inline-flex; align-items: center; }
.site-footer-link:hover { color: var(--accent3); border-bottom-color: rgba(34, 230, 200, 0.6); }
.site-footer-link img { display: inline-block; vertical-align: middle; margin-right: 4px; }
body.pure-mode .site-footer { opacity: 0; pointer-events: none; }

/* ============ 操作手册弹层 ============ */
.manual-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(5,6,10,.72); backdrop-filter: blur(14px) saturate(140%); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.manual-overlay.open { opacity: 1; pointer-events: auto; }
.manual-panel { width: min(640px, 100%); max-height: min(80vh, 720px); display: flex; flex-direction: column; background: rgba(14,14,22,.92); border: 1px solid rgba(255,255,255,.10); border-radius: 20px; box-shadow: 0 24px 80px rgba(0,0,0,.75); overflow: hidden; transform: translateY(12px) scale(.98); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.manual-overlay.open .manual-panel { transform: translateY(0) scale(1); }
.manual-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.manual-title { font-size: 15px; font-weight: 700; letter-spacing: 1.5px; color: var(--fg); }
.manual-close { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .25s; }
.manual-close:hover { background: rgba(255,77,141,.35); border-color: rgba(255,77,141,.6); transform: rotate(90deg); }
.manual-body { flex: 1; overflow-y: auto; padding: 16px 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.manual-body::-webkit-scrollbar { width: 6px; }
.manual-body::-webkit-scrollbar-thumb { background: rgba(106,92,255,.4); border-radius: 3px; }
.manual-section { background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); border-radius: 12px; padding: 12px 14px; }
.manual-section h4 { font-size: 12.5px; font-weight: 700; color: var(--accent3); letter-spacing: 1px; margin-bottom: 8px; }
.manual-section ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.manual-section li { font-size: 12px; line-height: 1.7; color: rgba(233,233,240,.72); padding-left: 12px; position: relative; }
.manual-section li::before { content: ''; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 6px var(--accent2); }
.manual-section b { color: var(--fg); font-weight: 600; background: rgba(106,92,255,.18); padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(106,92,255,.28); font-size: 11px; }
.manual-section code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 4px; font-family: monospace; color: var(--accent3); font-size: 11px; }
.manual-section.mobile-only-section { display: none; }
.manual-foot { padding: 10px 20px 14px; border-top: 1px solid rgba(255,255,255,.06); text-align: center; flex-shrink: 0; }
.manual-tip { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.manual-tip b { color: var(--accent3); background: rgba(34,230,200,.12); padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(34,230,200,.28); font-size: 11px; }

/* ============ 播放列表抽屉 ============ */
.drawer { position: fixed; top: 0; right: -420px; width: 400px; height: 100%; background: rgba(12,12,20,.92); backdrop-filter: blur(24px); border-left: 1px solid var(--line); z-index: 200; display: flex; flex-direction: column; transition: right .5s cubic-bezier(.34,1.56,.64,1); box-shadow: -20px 0 60px rgba(0,0,0,.6); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.drawer.open { right: 0; }
.drawer-head { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 14px; letter-spacing: 2px; font-weight: 500; }
.drawer-toolbar { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.carousel-toggle-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; background: linear-gradient(135deg, rgba(106,92,255,.18), rgba(255,77,141,.18)); border: 1px solid rgba(106,92,255,.4); color: #fff; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: 1px; cursor: pointer; transition: all .25s; font-family: inherit; }
.carousel-toggle-btn:hover { background: linear-gradient(135deg, rgba(106,92,255,.32), rgba(255,77,141,.32)); transform: translateY(-1px); }
.carousel-toggle-btn.active { background: linear-gradient(135deg, var(--accent1), var(--accent2)); border-color: transparent; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px; }
.drawer-body::-webkit-scrollbar { width: 5px; }
.drawer-body::-webkit-scrollbar-thumb { background: rgba(106,92,255,.4); border-radius: 3px; }

.pl-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: all .25s; margin-bottom: 3px; position: relative; }
.pl-item:hover { background: rgba(255,255,255,.06); }
.pl-item.active { background: rgba(106,92,255,.15); }
.pl-item.active::before { content: ''; position: absolute; left: 0; top: 20%; height: 60%; width: 3px; background: linear-gradient(var(--accent1), var(--accent2)); border-radius: 3px; }
.pl-cover { width: 40px; height: 40px; border-radius: 8px; background: #222 center/cover no-repeat; flex-shrink: 0; }
.pl-info { flex: 1; min-width: 0; }
.pl-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.pl-artist { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-badge { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.pl-badge span { width: 3px; background: var(--accent2); border-radius: 2px; animation: playingBar .8s ease-in-out infinite; box-shadow: 0 0 5px var(--accent2); }
.pl-badge span:nth-child(1) { animation-delay: 0s; height: 7px; }
.pl-badge span:nth-child(2) { animation-delay: .2s; height: 12px; }
.pl-badge span:nth-child(3) { animation-delay: .4s; height: 9px; }
@keyframes playingBar { 0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
.pl-del { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(255,77,141,.12); color: var(--accent2); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all .2s; margin-left: 4px; font-family: inherit; }
.pl-item:hover .pl-del { opacity: 1; }
.pl-del:hover { background: rgba(255,77,141,.3); transform: scale(1.1); }
.pl-source { font-size: 9px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--muted); margin-left: 4px; flex-shrink: 0; }
.pl-source.netease { color: #ff5c5c; background: rgba(255,92,92,.12); }
.pl-source.kugou { color: #4db8ff; background: rgba(77,184,255,.12); }
.pl-source.qq { color: #ffd24d; background: rgba(255,210,77,.12); }

.drawer-foot { padding: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.mini-btn { width: 100%; padding: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--fg); border-radius: 8px; cursor: pointer; font-size: 12px; letter-spacing: 1px; transition: all .25s; font-family: inherit; }
.mini-btn:hover { background: rgba(106,92,255,.2); border-color: var(--accent1); }

.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199; opacity: 0; pointer-events: none; transition: opacity .4s; backdrop-filter: blur(2px); }
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 12px; line-height: 1.8; }
.empty code { display: inline-block; background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 5px; font-family: monospace; color: var(--accent3); margin: 3px 0; }

/* ============ 在线音乐抽屉 ============ */
.online-drawer { position: fixed; top: 0; right: -480px; width: 460px; height: 100%; background: rgba(12,12,20,.95); backdrop-filter: blur(24px); border-left: 1px solid var(--line); z-index: 200; display: flex; flex-direction: column; transition: right .5s cubic-bezier(.34,1.56,.64,1); box-shadow: -20px 0 60px rgba(0,0,0,.6); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.online-drawer.open { right: 0; }
.online-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199; opacity: 0; pointer-events: none; transition: opacity .4s; backdrop-filter: blur(2px); }
.online-mask.show { opacity: 1; pointer-events: auto; }
.platform-switcher { display: flex; gap: 8px; padding: 14px 20px 8px; border-bottom: 1px solid var(--line); }
.plat-btn { flex: 1; padding: 8px 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .25s; font-family: inherit; white-space: nowrap; }
.plat-btn.active { background: linear-gradient(135deg, var(--accent1), var(--accent2)); color: #fff; border-color: transparent; box-shadow: 0 3px 12px rgba(106,92,255,.3); }
.plat-btn[data-plat="qq"].active { background: linear-gradient(135deg, #ffb800, #ff6b00); box-shadow: 0 3px 12px rgba(255,140,0,.4); }
.plat-btn[data-plat="kugou"].active { background: linear-gradient(135deg, #4db8ff, #1e6fff); box-shadow: 0 3px 12px rgba(77,184,255,.4); }

.netease-login-area { padding: 14px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.netease-user-info { display: flex; align-items: center; gap: 12px; }
.netease-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent1); object-fit: cover; }
.netease-user-meta { flex: 1; }
.netease-nickname { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.netease-logout-btn { padding: 3px 10px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--muted); border-radius: 5px; font-size: 11px; cursor: pointer; font-family: inherit; }
.netease-qr-area { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.netease-qr-box { width: 150px; height: 150px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.netease-qr-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 5px; }
.netease-qr-placeholder { color: var(--muted); font-size: 11px; text-align: center; padding: 0 16px; line-height: 1.6; }
.netease-qr-btn { padding: 8px 18px; background: linear-gradient(135deg, var(--accent1), var(--accent2)); border: none; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .25s; font-family: inherit; }
.netease-qr-btn:disabled { opacity: .5; cursor: not-allowed; }
.netease-qr-status { font-size: 11px; color: var(--muted); min-height: 14px; letter-spacing: .5px; }

.qq-login-area { padding: 0; }
.qq-qr-area { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }

.qq-phone-form { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 4px 0; }
.qq-phone-input-row { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.32); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; transition: border-color .2s; }
.qq-phone-input-row:focus-within { border-color: #ffb800; box-shadow: 0 0 0 2px rgba(255,184,0,.15); }
.qq-phone-prefix { font-size: 13px; color: var(--muted); font-weight: 600; padding-right: 6px; border-right: 1px solid var(--line); }
.qq-phone-input { flex: 1; background: transparent; border: none; outline: none; color: var(--fg); font-size: 13px; padding: 11px 0; font-family: inherit; letter-spacing: .5px; min-width: 0; }
.qq-phone-input::placeholder { color: rgba(233,233,240,.35); }
.qq-code-btn { flex-shrink: 0; padding: 6px 12px; background: rgba(255,184,0,.15); border: 1px solid rgba(255,184,0,.4); border-radius: 6px; color: #ffb800; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .2s; white-space: nowrap; }
.qq-code-btn:hover { background: rgba(255,184,0,.28); }
.qq-code-btn:disabled { opacity: .5; cursor: not-allowed; }
.qq-login-btn { width: 100%; padding: 10px; background: linear-gradient(135deg, #ffb800, #ff6b00); border-radius: 8px; font-size: 13px; }
.qq-login-btn:disabled { opacity: .5; cursor: not-allowed; }

.online-search-area { flex: 1; display: flex; flex-direction: column; padding: 14px 20px 18px; overflow: hidden; }
.online-search-box { display: flex; gap: 8px; margin-bottom: 14px; }
.online-search-box input { flex: 1; padding: 10px 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 8px; color: var(--fg); font-size: 13px; outline: none; font-family: inherit; }
.online-search-box input:focus { border-color: var(--accent1); }
.online-search-box button { padding: 10px 16px; background: linear-gradient(135deg, var(--accent1), var(--accent2)); border: none; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.online-results { flex: 1; overflow-y: auto; padding-right: 4px; }
.online-results::-webkit-scrollbar { width: 4px; }
.online-results::-webkit-scrollbar-thumb { background: rgba(106,92,255,.4); border-radius: 3px; }
.online-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; background: rgba(255,255,255,.03); transition: all .2s; }
.online-item:hover { background: rgba(106,92,255,.12); }
.online-item-info { flex: 1; min-width: 0; }
.online-item-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-item-artist { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-item-duration { font-size: 10px; color: var(--muted); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.online-actions { display: flex; gap: 6px; flex-shrink: 0; }
.online-btn { padding: 5px 10px; border: none; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit; transition: all .2s; }
.online-btn.play { background: linear-gradient(135deg, var(--accent1), var(--accent2)); }
.online-btn.play:hover { transform: scale(1.05); }
.online-btn.add { background: rgba(34,230,200,.15); color: var(--accent3); border: 1px solid rgba(34,230,200,.35); }
.online-btn.add:hover { background: rgba(34,230,200,.3); transform: scale(1.05); }
.online-btn.added { background: rgba(255,255,255,.08); color: var(--muted); border: 1px solid var(--line); cursor: default; }
.online-empty { text-align: center; color: var(--muted); padding: 30px 16px; font-size: 12px; line-height: 1.8; }

.playlist-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; background: rgba(255,255,255,.03); transition: all .2s; cursor: pointer; }
.playlist-card:hover { background: rgba(106,92,255,.12); }
.playlist-card-cover { width: 44px; height: 44px; border-radius: 8px; background: #222 center/cover no-repeat; flex-shrink: 0; }
.playlist-card-info { flex: 1; min-width: 0; }
.playlist-card-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-card-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-card-arrow { color: var(--muted); font-size: 16px; flex-shrink: 0; }
.playlist-back-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 10px; background: rgba(106,92,255,.12); border-radius: 8px; font-size: 12px; }
.playlist-back-bar button { background: transparent; border: 1px solid var(--line); color: var(--fg); padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; font-family: inherit; }
.playlist-back-bar button:hover { background: rgba(255,255,255,.08); }
.playlist-back-bar button:disabled { opacity: .5; cursor: not-allowed; }
.playlist-back-bar .playlist-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--accent3); font-weight: 600; }

.online-tabs { display: flex; gap: 0; padding: 0 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.online-tab { flex: 1; padding: 10px 0; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; font-family: inherit; }
.online-tab:hover { color: var(--fg); }
.online-tab.active { color: var(--accent3); border-bottom-color: var(--accent3); }
.online-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ============ 流体背景画布 ============ */
#fluidCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .8s ease; mix-blend-mode: screen; }
#fluidCanvas.active { opacity: 0.55; }
body.fluid-mode #bgParticleCanvas,
body.fluid-mode #bgCanvas { opacity: 0 !important; transition: opacity .6s ease; }

/* ============ 律动选择器 ============ */
.pulse-selector { position: relative; display: inline-flex; }
.pulse-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 148px; background: rgba(14, 14, 22, 0.96); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 12px; padding: 6px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(106, 92, 255, 0.08); opacity: 0; transform: translateY(-6px) scale(0.96); pointer-events: none; transition: opacity .22s ease, transform .22s cubic-bezier(.34,1.56,.64,1); z-index: 200; }
.pulse-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.pulse-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: transparent; border: none; border-radius: 8px; color: rgba(233, 233, 240, 0.78); font-size: 12.5px; font-family: inherit; font-weight: 500; letter-spacing: 0.5px; cursor: pointer; text-align: left; transition: all .2s ease; }
.pulse-menu-item:hover { background: rgba(106, 92, 255, 0.18); color: #fff; transform: translateX(2px); }
.pulse-menu-item.active { background: linear-gradient(135deg, rgba(106, 92, 255, 0.35), rgba(255, 77, 141, 0.28)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.pulse-menu-item.active::after { content: '✓'; margin-left: auto; color: var(--accent3); font-weight: 700; font-size: 12px; }
.pmi-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); font-size: 12px; flex-shrink: 0; }
.pulse-menu-item.active .pmi-icon { background: rgba(34, 230, 200, 0.22); color: var(--accent3); }
.pmi-label { flex: 1; }

/* ============ 粒子设置弹层 ============ */
.particle-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(5,6,10,.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.particle-overlay.open { opacity: 1; pointer-events: auto; }
.particle-panel { width: min(480px, 100%); max-height: min(80vh, 680px); display: flex; flex-direction: column; background: rgba(14,14,22,.94); border: 1px solid rgba(255,255,255,.10); border-radius: 20px; box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(106,92,255,.08); overflow: hidden; transform: translateY(12px) scale(.98); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.particle-overlay.open .particle-panel { transform: translateY(0) scale(1); }
.particle-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.particle-title { font-size: 15px; font-weight: 700; letter-spacing: 1.5px; color: var(--fg); }
.particle-close { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .25s; }
.particle-close:hover { background: rgba(255,77,141,.35); border-color: rgba(255,77,141,.6); transform: rotate(90deg); }
.particle-body { flex: 1; overflow-y: auto; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.particle-body::-webkit-scrollbar { width: 6px; }
.particle-body::-webkit-scrollbar-thumb { background: rgba(106,92,255,.4); border-radius: 3px; }
.particle-row { display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); border-radius: 12px; padding: 12px 14px; }
.particle-label { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: rgba(233,233,240,.85); letter-spacing: .5px; }
.particle-value { font-size: 11px; font-weight: 700; color: var(--accent3); background: rgba(34,230,200,.12); border: 1px solid rgba(34,230,200,.28); padding: 1px 8px; border-radius: 6px; min-width: 48px; text-align: center; }
.particle-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); outline: none; cursor: pointer; }
.particle-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--accent1), var(--accent2)); border: 2px solid #fff; box-shadow: 0 2px 10px rgba(106,92,255,.6); cursor: pointer; transition: transform .2s; }
.particle-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.particle-hint { font-size: 10.5px; color: rgba(233,233,240,.45); letter-spacing: .5px; }
.particle-foot { padding: 12px 20px 16px; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.particle-reset-btn { width: 100%; padding: 10px; background: rgba(106,92,255,.12); border: 1px solid rgba(106,92,255,.4); border-radius: 8px; color: var(--accent1); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .25s; font-family: inherit; letter-spacing: .5px; }
.particle-reset-btn:hover { background: rgba(106,92,255,.22); border-color: rgba(106,92,255,.7); transform: translateY(-1px); }
body.pure-mode #particleSettingBtn { display: none !important; }

/* ============================================================
   移动端
   ============================================================ */
@media (max-width: 820px), (pointer: coarse) {
  #bgParticleCanvas, #bgCanvas, #particleCanvas { display: none !important; }
  #bgVideoLayer { display: none !important; }
  #carouselBtn { display: none !important; }
  .pc-only { display: none !important; }

  :root {
    --topbar-h: 56px;
    --bottombar-h: 168px;
    --footer-h: 28px;
    --carousel-w: 88vw;
    --carousel-card-h: 112px;
  }

  .topbar { padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); gap: 6px; }
  .logo-text { font-size: 12px; }
  .status { display: none; }
  .topbar-right { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
  .icon-btn svg { width: 17px; height: 17px; }

  .main-stage { padding-top: calc(var(--topbar-h) + env(safe-area-inset-top) + 4px); padding-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom) + var(--footer-h) + 6px); display: block; overflow: hidden; }
  body.pure-mode .main-stage { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(90px + env(safe-area-inset-bottom)); }

  .scene { width: 100%; height: 100%; padding: 0 10px; perspective: none; transition: transform .35s ease, opacity .35s ease; touch-action: none; }
  body.carousel-open .scene { flex: none; padding-right: 0; transform: scale(.92); opacity: .35; pointer-events: none; }
  body.carousel-open .lyric-panel { transform: none; }

  .stage-3d { transform: none; transition: none; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transform-style: flat; will-change: transform; }

  .lyric-panel { width: 100%; max-width: 100%; height: 100%; min-height: 0; padding: 12px 14px 10px; border-radius: 18px; transform: none !important; transform-origin: center center; will-change: transform; }
  body.carousel-open .lyric-panel { transform: none !important; }

  .lyric-line { font-size: 17px; padding: 8px 10px; line-height: 1.6; color: rgba(255, 255, 255, 0.78); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.7); }
  .lyric-line.active { font-size: 23px; color: #fff; -webkit-text-fill-color: #fff; text-shadow: 0 0 20px rgba(106, 92, 255, 0.95), 0 0 44px rgba(255, 77, 141, 0.65), 0 2px 8px rgba(0, 0, 0, 0.95); }
  .lyric-line.near { font-size: 19px; color: rgba(255, 255, 255, 0.92); }
  .lyric-scroll { padding: 120px 4px; }
  .lyric-empty { font-size: 12px; padding: 30px 10px; color: rgba(233,233,240,.7); }

  .carousel-side { display: none !important; }

  .bottom-bar { height: var(--bottombar-h); grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; gap: 6px; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .now-playing { text-align: center; }
  .title { font-size: 15px; margin-bottom: 1px; }
  .artist { font-size: 10px; letter-spacing: 1.5px; }
  .center-controls { gap: 8px; }
  .progress-wrap { gap: 10px; width: 100%; }
  .t { font-size: 11px; min-width: 40px; }
  .progress { height: 6px; border-radius: 6px; }
  .progress:hover { height: 6px; }
  .progress-fill { border-radius: 6px; }
  .progress-buffer { border-radius: 6px; }
  .progress-dot { transform: translate(-50%, -50%) scale(1); width: 12px; height: 12px; }
  .controls { gap: 14px; }
  .ctrl { width: 40px; height: 40px; }
  .ctrl.main { width: 52px; height: 52px; }
  .ctrl svg { width: 22px; height: 22px; }
  .ctrl.main svg { width: 28px; height: 28px; }
  .right-controls { align-items: center; flex-direction: column; justify-content: center; gap: 4px; }
  .spectrum { max-width: 100%; height: 16px; justify-content: center; }
  .spectrum i { width: 2px; }
  .volume-wrap { width: 100%; max-width: 260px; justify-content: center; }
  .volume-wrap svg { width: 14px; height: 14px; }
  .volume { height: 5px; }
  .volume:hover { height: 5px; }
  .volume-fill { border-radius: 5px; }
  .volume-dot { transform: translate(-50%, -50%) scale(1); width: 11px; height: 11px; }
  .v { min-width: 26px; font-size: 10px; }

  .site-footer {
    min-height: var(--footer-h);
    font-size: 10.5px;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.72);
  }
  .site-footer-divider { display: none; }
  .site-footer-inner { gap: 2px 8px; }
  .site-footer-text { font-size: 10.5px; }
  .site-footer-link { font-size: 10.5px; }

  .manual-overlay { padding: 12px; }
  .manual-panel { max-height: 88vh; border-radius: 16px; }
  .manual-body { grid-template-columns: 1fr; gap: 10px; padding: 12px 14px 16px; }
  .manual-section { padding: 10px 12px; }
  .manual-section li { font-size: 12px; }
  .manual-section.mobile-only-section { display: block; }

  .drawer, .online-drawer { width: 100%; right: -100%; border-left: none; }
  .drawer.open, .online-drawer.open { right: 0; }
  .drawer-head { padding: 14px 16px; }
  .drawer-head h3 { font-size: 13px; }
  .drawer-body { padding: 8px 10px; }
  .online-search-area { padding: 12px 14px 16px; }
  .platform-switcher { padding: 12px 16px 8px; }
  .netease-login-area { padding: 12px 16px; }
  .qq-qr-area { padding: 12px 16px; }
  .online-tabs { padding: 0 16px; }
  .pl-item { padding: 10px 8px; }
  .pl-cover { width: 38px; height: 38px; }
  .pl-title { font-size: 13px; }
  .online-item { padding: 10px 8px; }
  .online-item-title { font-size: 13px; }
  .online-btn { padding: 6px 10px; }
  .carousel-card { filter: none !important; }
}

@media (max-width: 400px) {
  :root { --topbar-h: 52px; --bottombar-h: 162px; --footer-h: 26px; }
  .lyric-line { font-size: 15px; }
  .lyric-line.active { font-size: 20px; }
  .lyric-line.near { font-size: 17px; }
  .title { font-size: 14px; }
  .ctrl { width: 36px; height: 36px; }
  .ctrl.main { width: 46px; height: 46px; }
  .carousel-card-title { font-size: 12px; }
  .site-footer { font-size: 10px; }
  .site-footer-text, .site-footer-link { font-size: 10px; }
}

@media (max-height: 500px) and (pointer: coarse) {
  :root { --topbar-h: 46px; --bottombar-h: 100px; --footer-h: 24px; }
  .bottom-bar { grid-template-columns: 1fr 2fr 1fr; grid-template-rows: none; gap: 12px; padding: 8px 14px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .now-playing { text-align: left; }
  .right-controls { flex-direction: column; }
  .lyric-line { font-size: 14px; }
  .lyric-line.active { font-size: 18px; }
  .lyric-line.near { font-size: 15px; }
  .title { font-size: 13px; }
  .artist { font-size: 9px; }
}

/* ============ QQ 安全验证弹层 ============ */
.qq-verify-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: qqVerifyFadeIn .25s ease; }
@keyframes qqVerifyFadeIn { from { opacity: 0; } to { opacity: 1; } }
.qq-verify-panel { width: min(380px, 100%); background: rgba(20, 20, 28, 0.98); border: 1px solid rgba(255, 184, 0, 0.35); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(255, 184, 0, 0.15); overflow: hidden; transform: translateY(8px) scale(.98); animation: qqVerifyPanelIn .3s cubic-bezier(.34, 1.56, .64, 1) forwards; }
@keyframes qqVerifyPanelIn { to { transform: translateY(0) scale(1); } }
.qq-verify-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: linear-gradient(135deg, rgba(255, 184, 0, 0.12), rgba(255, 107, 0, 0.12)); }
.qq-verify-title { font-size: 14px; font-weight: 700; color: #ffb800; letter-spacing: 1px; }
.qq-verify-close { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .25s; font-family: inherit; }
.qq-verify-close:hover { background: rgba(255, 77, 141, 0.35); border-color: rgba(255, 77, 141, 0.6); transform: rotate(90deg); }
.qq-verify-body { padding: 20px 18px 14px; text-align: center; }
.qq-verify-tip { font-size: 13px; color: rgba(233, 233, 240, 0.85); line-height: 1.7; margin-bottom: 16px; }
.qq-verify-open-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 24px; background: linear-gradient(135deg, #ffb800, #ff6b00); border: none; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .25s cubic-bezier(.34, 1.56, .64, 1); font-family: inherit; box-shadow: 0 6px 20px rgba(255, 140, 0, 0.35); }
.qq-verify-open-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 28px rgba(255, 140, 0, 0.5); }
.qq-verify-open-btn:active { transform: scale(.97); }
.qq-verify-hint { margin-top: 14px; font-size: 11px; color: rgba(233, 233, 240, 0.5); line-height: 1.6; }
.qq-verify-foot { padding: 12px 18px 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.qq-verify-retry-btn { width: 100%; padding: 10px; background: rgba(34, 230, 200, 0.12); border: 1px solid rgba(34, 230, 200, 0.4); border-radius: 8px; color: var(--accent3); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .25s; font-family: inherit; }
.qq-verify-retry-btn:hover { background: rgba(34, 230, 200, 0.22); border-color: rgba(34, 230, 200, 0.7); transform: translateY(-1px); }

@media (max-width: 820px) {
  .qq-verify-panel { width: min(340px, 92vw); }
  .qq-verify-tip { font-size: 12px; }
  .qq-verify-open-btn { padding: 10px 20px; font-size: 13px; }
}
/* ============================================================
   ★ 用户头像框
   ============================================================ */
.user-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.user-avatar-wrap:hover {
  transform: scale(1.08);
}
.user-avatar-wrap:active {
  transform: scale(.95);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #222;
  position: relative;
  z-index: 1;
}

/* 通用环 / 徽章 */
.user-avatar-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  transition: all .3s ease;
}
.user-avatar-badge {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  font-size: 0;
  transition: all .3s ease;
}

/* ★ 头像框预设 —— 无边框 */
.frame-none .user-avatar-ring { display: none; }
.frame-none .user-avatar-badge { display: none; }

/* ★ 发光紫 */
.frame-glow .user-avatar-ring {
  border: 2px solid #a78bfa;
  box-shadow: 0 0 12px #a78bfa, 0 0 24px rgba(167,139,250,.6), inset 0 0 8px rgba(167,139,250,.6);
  animation: frameGlowPulse 2s ease-in-out infinite;
}
@keyframes frameGlowPulse {
  0%,100% { box-shadow: 0 0 10px #a78bfa, 0 0 20px rgba(167,139,250,.5); }
  50% { box-shadow: 0 0 18px #a78bfa, 0 0 36px rgba(167,139,250,.8); }
}

/* ★ 金色皇冠 */
.frame-gold .user-avatar-ring {
  border: 2px solid #fbbf24;
  box-shadow: 0 0 12px #fbbf24, 0 0 24px rgba(251,191,36,.6);
}
.frame-gold .user-avatar-badge::before {
  content: '👑';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-15deg);
  font-size: 16px;
  filter: drop-shadow(0 0 6px rgba(251,191,36,.9));
  animation: crownFloat 3s ease-in-out infinite;
}
@keyframes crownFloat {
  0%,100% { transform: translateX(-50%) rotate(-15deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(-15deg) translateY(-3px); }
}

/* ★ 彩虹渐变 */
.frame-rainbow .user-avatar-ring {
  inset: -3px;
  background: conic-gradient(from 0deg, #ff4d8d, #ffb800, #22e6c8, #6a5cff, #ff4d8d);
  animation: rainbowSpin 4s linear infinite;
  z-index: 2;
  mask: radial-gradient(circle, transparent 60%, #000 61%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%);
}
@keyframes rainbowSpin {
  to { transform: rotate(360deg); }
}

/* ★ 猫爪 */
.frame-cat .user-avatar-ring {
  border: 2px dashed #f472b6;
  box-shadow: 0 0 8px rgba(244,114,182,.5);
}
.frame-cat .user-avatar-badge::before {
  content: '🐾';
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(244,114,182,.9));
}

/* ★ 星星 */
.frame-star .user-avatar-ring {
  border: 2px solid #fde047;
  box-shadow: 0 0 8px #fde047, 0 0 16px rgba(253,224,71,.5);
}
.frame-star .user-avatar-badge::before {
  content: '⭐';
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 12px;
  animation: starSpin 3s linear infinite;
}
@keyframes starSpin {
  to { transform: rotate(360deg); }
}

/* ★ 火焰 */
.frame-fire .user-avatar-ring {
  border: 2px solid #f97316;
  box-shadow: 0 0 12px #f97316, 0 0 28px rgba(249,115,22,.7), inset 0 0 10px rgba(249,115,22,.5);
  animation: firePulse .8s ease-in-out infinite alternate;
}
@keyframes firePulse {
  from { box-shadow: 0 0 10px #f97316, 0 0 20px rgba(249,115,22,.6); }
  to { box-shadow: 0 0 18px #f97316, 0 0 36px rgba(249,115,22,.9); }
}
.frame-fire .user-avatar-badge::before {
  content: '🔥';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 14px;
  filter: drop-shadow(0 0 6px rgba(249,115,22,.9));
}

/* ★ 冰雪 */
.frame-ice .user-avatar-ring {
  border: 2px solid #67e8f9;
  box-shadow: 0 0 12px #67e8f9, 0 0 24px rgba(103,232,249,.6), inset 0 0 8px rgba(103,232,249,.5);
}
.frame-ice .user-avatar-badge::before {
  content: '❄️';
  position: absolute;
  top: -8px;
  left: -8px;
  font-size: 14px;
  animation: iceFloat 2.5s ease-in-out infinite;
}
@keyframes iceFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(15deg); }
}

/* ★ 樱花 */
.frame-sakura .user-avatar-ring {
  border: 2px solid #fbcfe8;
  box-shadow: 0 0 10px #fbcfe8, 0 0 22px rgba(251,207,232,.7);
}
.frame-sakura .user-avatar-badge::before {
  content: '🌸';
  position: absolute;
  bottom: -6px;
  left: -6px;
  font-size: 14px;
  animation: sakuraSpin 4s ease-in-out infinite;
}
@keyframes sakuraSpin {
  0%,100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

/* ★ 宝石 */
.frame-gem .user-avatar-ring {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #10b981, #06b6d4, #8b5cf6, #10b981);
  box-shadow: 0 0 14px #10b981, 0 0 30px rgba(16,185,129,.6);
  animation: gemShine 3s linear infinite;
}
@keyframes gemShine {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ============================================================
   ★ 头像框选择器弹层
   ============================================================ */
.avatar-frame-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(5,6,10,.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.avatar-frame-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.avatar-frame-panel {
  width: min(520px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  background: rgba(14,14,22,.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(106,92,255,.08);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.avatar-frame-overlay.open .avatar-frame-panel {
  transform: translateY(0) scale(1);
}

.avatar-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.avatar-frame-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--fg);
}
.avatar-frame-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
}
.avatar-frame-close:hover {
  background: rgba(255,77,141,.35);
  border-color: rgba(255,77,141,.6);
  transform: rotate(90deg);
}

.avatar-frame-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.avatar-frame-body::-webkit-scrollbar { width: 6px; }
.avatar-frame-body::-webkit-scrollbar-thumb {
  background: rgba(106,92,255,.4);
  border-radius: 3px;
}

.avatar-frame-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
}
.avatar-frame-preview-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-frame-preview-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  position: relative;
  z-index: 1;
}
.avatar-frame-preview-tip {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .5px;
}
.avatar-frame-preview-tip b {
  color: var(--accent3);
  font-weight: 700;
}

.avatar-frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.avatar-frame-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all .25s;
}
.avatar-frame-item:hover {
  background: rgba(106,92,255,.15);
  border-color: rgba(106,92,255,.5);
  transform: translateY(-2px);
}
.avatar-frame-item.active {
  background: linear-gradient(135deg, rgba(106,92,255,.28), rgba(255,77,141,.22));
  border-color: var(--accent3);
  box-shadow: 0 0 0 2px rgba(34,230,200,.3);
}
.avatar-frame-item-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-frame-item-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  position: relative;
  z-index: 1;
}
.avatar-frame-item-name {
  font-size: 11px;
  color: rgba(233,233,240,.8);
  letter-spacing: .5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.avatar-frame-item.active .avatar-frame-item-name {
  color: var(--accent3);
  font-weight: 700;
}
.avatar-frame-item::after {
  content: '';
  display: block;
  height: 2px;
  width: 0;
  transition: width .25s;
}
.avatar-frame-item.active::after {
  content: '✓ 已选';
  height: auto;
  width: auto;
  font-size: 10px;
  color: var(--accent3);
  letter-spacing: .5px;
}

.avatar-frame-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.avatar-frame-reset-btn {
  width: 100%;
  padding: 10px;
  background: rgba(106,92,255,.12);
  border: 1px solid rgba(106,92,255,.4);
  border-radius: 8px;
  color: var(--accent1);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  font-family: inherit;
  letter-spacing: .5px;
}
.avatar-frame-reset-btn:hover {
  background: rgba(106,92,255,.22);
  border-color: rgba(106,92,255,.7);
  transform: translateY(-1px);
}

body.pure-mode #userAvatarWrap { display: none !important; }

/* 移动端 */
@media (max-width: 820px), (pointer: coarse) {
  .user-avatar-wrap { width: 34px; height: 34px; }
  .avatar-frame-overlay { padding: 12px; }
  .avatar-frame-panel { max-height: 88vh; border-radius: 16px; }
  .avatar-frame-body { padding: 14px 16px 16px; gap: 14px; }
  .avatar-frame-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
  .avatar-frame-item { padding: 10px 6px; }
  .avatar-frame-item-thumb { width: 40px; height: 40px; }
  .avatar-frame-preview-wrap { width: 72px; height: 72px; }
}
/* ============================================================
   ★ 用户头像 + 头像框
   ============================================================ */
.user-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.user-avatar-wrap:hover {
  transform: scale(1.08);
}
.user-avatar-wrap:active {
  transform: scale(.95);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #222;
  position: relative;
  z-index: 1;
}

.user-avatar-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  transition: all .3s ease;
}
.user-avatar-badge {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  font-size: 0;
  transition: all .3s ease;
}

/* 无边框 */
.frame-none .user-avatar-ring { display: none; }
.frame-none .user-avatar-badge { display: none; }

/* 发光紫 */
.frame-glow .user-avatar-ring {
  border: 2px solid #a78bfa;
  box-shadow: 0 0 12px #a78bfa, 0 0 24px rgba(167,139,250,.6), inset 0 0 8px rgba(167,139,250,.6);
  animation: frameGlowPulse 2s ease-in-out infinite;
}
@keyframes frameGlowPulse {
  0%,100% { box-shadow: 0 0 10px #a78bfa, 0 0 20px rgba(167,139,250,.5); }
  50% { box-shadow: 0 0 18px #a78bfa, 0 0 36px rgba(167,139,250,.8); }
}

/* 金色皇冠 */
.frame-gold .user-avatar-ring {
  border: 2px solid #fbbf24;
  box-shadow: 0 0 12px #fbbf24, 0 0 24px rgba(251,191,36,.6);
}
.frame-gold .user-avatar-badge::before {
  content: '👑';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-15deg);
  font-size: 18px;
  filter: drop-shadow(0 0 6px rgba(251,191,36,.9));
  animation: crownFloat 3s ease-in-out infinite;
}
@keyframes crownFloat {
  0%,100% { transform: translateX(-50%) rotate(-15deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(-15deg) translateY(-3px); }
}

/* 彩虹 */
.frame-rainbow .user-avatar-ring {
  inset: -3px;
  background: conic-gradient(from 0deg, #ff4d8d, #ffb800, #22e6c8, #6a5cff, #ff4d8d);
  animation: rainbowSpin 4s linear infinite;
  z-index: 2;
  mask: radial-gradient(circle, transparent 60%, #000 61%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%);
}
@keyframes rainbowSpin {
  to { transform: rotate(360deg); }
}

/* 猫爪 */
.frame-cat .user-avatar-ring {
  border: 2px dashed #f472b6;
  box-shadow: 0 0 8px rgba(244,114,182,.5);
}
.frame-cat .user-avatar-badge::before {
  content: '🐾';
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 15px;
  filter: drop-shadow(0 0 4px rgba(244,114,182,.9));
}

/* 星星 */
.frame-star .user-avatar-ring {
  border: 2px solid #fde047;
  box-shadow: 0 0 8px #fde047, 0 0 16px rgba(253,224,71,.5);
}
.frame-star .user-avatar-badge::before {
  content: '⭐';
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 13px;
  animation: starSpin 3s linear infinite;
}
@keyframes starSpin {
  to { transform: rotate(360deg); }
}

/* 火焰 */
.frame-fire .user-avatar-ring {
  border: 2px solid #f97316;
  box-shadow: 0 0 12px #f97316, 0 0 28px rgba(249,115,22,.7), inset 0 0 10px rgba(249,115,22,.5);
  animation: firePulse .8s ease-in-out infinite alternate;
}
@keyframes firePulse {
  from { box-shadow: 0 0 10px #f97316, 0 0 20px rgba(249,115,22,.6); }
  to { box-shadow: 0 0 18px #f97316, 0 0 36px rgba(249,115,22,.9); }
}
.frame-fire .user-avatar-badge::before {
  content: '🔥';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 15px;
  filter: drop-shadow(0 0 6px rgba(249,115,22,.9));
}

/* 冰雪 */
.frame-ice .user-avatar-ring {
  border: 2px solid #67e8f9;
  box-shadow: 0 0 12px #67e8f9, 0 0 24px rgba(103,232,249,.6), inset 0 0 8px rgba(103,232,249,.5);
}
.frame-ice .user-avatar-badge::before {
  content: '❄️';
  position: absolute;
  top: -8px;
  left: -8px;
  font-size: 15px;
  animation: iceFloat 2.5s ease-in-out infinite;
}
@keyframes iceFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(15deg); }
}

/* 樱花 */
.frame-sakura .user-avatar-ring {
  border: 2px solid #fbcfe8;
  box-shadow: 0 0 10px #fbcfe8, 0 0 22px rgba(251,207,232,.7);
}
.frame-sakura .user-avatar-badge::before {
  content: '🌸';
  position: absolute;
  bottom: -6px;
  left: -6px;
  font-size: 15px;
  animation: sakuraSpin 4s ease-in-out infinite;
}
@keyframes sakuraSpin {
  0%,100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

/* 宝石 */
.frame-gem .user-avatar-ring {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #10b981, #06b6d4, #8b5cf6, #10b981);
  box-shadow: 0 0 14px #10b981, 0 0 30px rgba(16,185,129,.6);
  animation: gemShine 3s linear infinite;
}
@keyframes gemShine {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ============================================================
   ★ 头像框选择器弹层
   ============================================================ */
.avatar-frame-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(5,6,10,.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.avatar-frame-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.avatar-frame-panel {
  width: min(520px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  background: rgba(14,14,22,.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(106,92,255,.08);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.avatar-frame-overlay.open .avatar-frame-panel {
  transform: translateY(0) scale(1);
}

.avatar-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.avatar-frame-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--fg);
}
.avatar-frame-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
}
.avatar-frame-close:hover {
  background: rgba(255,77,141,.35);
  border-color: rgba(255,77,141,.6);
  transform: rotate(90deg);
}

.avatar-frame-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.avatar-frame-body::-webkit-scrollbar { width: 6px; }
.avatar-frame-body::-webkit-scrollbar-thumb {
  background: rgba(106,92,255,.4);
  border-radius: 3px;
}

.avatar-frame-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
}
.avatar-frame-preview-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-frame-preview-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  position: relative;
  z-index: 1;
}
.avatar-frame-preview-tip {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .5px;
}
.avatar-frame-preview-tip b {
  color: var(--accent3);
  font-weight: 700;
}

.avatar-frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.avatar-frame-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all .25s;
}
.avatar-frame-item:hover {
  background: rgba(106,92,255,.15);
  border-color: rgba(106,92,255,.5);
  transform: translateY(-2px);
}
.avatar-frame-item.active {
  background: linear-gradient(135deg, rgba(106,92,255,.28), rgba(255,77,141,.22));
  border-color: var(--accent3);
  box-shadow: 0 0 0 2px rgba(34,230,200,.3);
}
.avatar-frame-item-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-frame-item-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  position: relative;
  z-index: 1;
}
.avatar-frame-item-name {
  font-size: 11px;
  color: rgba(233,233,240,.8);
  letter-spacing: .5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.avatar-frame-item.active .avatar-frame-item-name {
  color: var(--accent3);
  font-weight: 700;
}
.avatar-frame-item.active::after {
  content: '✓ 已选';
  font-size: 10px;
  color: var(--accent3);
  letter-spacing: .5px;
}

.avatar-frame-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.avatar-frame-reset-btn {
  width: 100%;
  padding: 10px;
  background: rgba(106,92,255,.12);
  border: 1px solid rgba(106,92,255,.4);
  border-radius: 8px;
  color: var(--accent1);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  font-family: inherit;
  letter-spacing: .5px;
}
.avatar-frame-reset-btn:hover {
  background: rgba(106,92,255,.22);
  border-color: rgba(106,92,255,.7);
  transform: translateY(-1px);
}

body.pure-mode #userAvatarWrap,
body.pure-mode #neteaseAvatarWrap { display: none !important; }

@media (max-width: 820px), (pointer: coarse) {
  .user-avatar-wrap { width: 38px; height: 38px; }
  .avatar-frame-overlay { padding: 12px; }
  .avatar-frame-panel { max-height: 88vh; border-radius: 16px; }
  .avatar-frame-body { padding: 14px 16px 16px; gap: 14px; }
  .avatar-frame-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
  .avatar-frame-item { padding: 10px 6px; }
  .avatar-frame-item-thumb { width: 40px; height: 40px; }
  .avatar-frame-preview-wrap { width: 72px; height: 72px; }
}
/* ============================================================
   ★ 意见反馈弹层
   ============================================================ */
.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 460;
  background: rgba(5,6,10,.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.feedback-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.feedback-panel {
  width: min(520px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  background: rgba(14,14,22,.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(106,92,255,.08);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.feedback-overlay.open .feedback-panel {
  transform: translateY(0) scale(1);
}

.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.feedback-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--fg);
}
.feedback-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
}
.feedback-close:hover {
  background: rgba(255,77,141,.35);
  border-color: rgba(255,77,141,.6);
  transform: rotate(90deg);
}

.feedback-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feedback-body::-webkit-scrollbar { width: 6px; }
.feedback-body::-webkit-scrollbar-thumb {
  background: rgba(106,92,255,.4);
  border-radius: 3px;
}

.feedback-tip {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 4px;
}

.feedback-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(233,233,240,.85);
  letter-spacing: .5px;
}
.feedback-required {
  color: #ff4d8d;
  font-weight: 700;
}
.feedback-optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}

.feedback-select,
.feedback-input,
.feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0,0,0,.32);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.feedback-select:focus,
.feedback-input:focus,
.feedback-textarea:focus {
  border-color: var(--accent1);
  box-shadow: 0 0 0 2px rgba(106,92,255,.15);
}
.feedback-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}
.feedback-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><path fill='%2394a3b8' d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.feedback-count {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin-top: -4px;
}

.feedback-msg {
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 0;
  padding: 0;
  border-radius: 6px;
  transition: all .25s;
}
.feedback-msg.show {
  padding: 10px 12px;
}
.feedback-msg.success {
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.4);
  color: #4ade80;
}
.feedback-msg.error {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.4);
  color: #f87171;
}

.feedback-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.feedback-cancel-btn,
.feedback-submit-btn {
  flex: 1;
  padding: 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .5px;
  transition: all .25s;
}
.feedback-cancel-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--fg);
}
.feedback-cancel-btn:hover {
  background: rgba(255,255,255,.12);
}
.feedback-submit-btn {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  border: none;
  color: #fff;
}
.feedback-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(106,92,255,.4);
}
.feedback-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

body.pure-mode #feedbackBtn { display: none !important; }

@media (max-width: 820px), (pointer: coarse) {
  .feedback-overlay { padding: 12px; }
  .feedback-panel { max-height: 90vh; border-radius: 16px; }
  .feedback-body { padding: 14px 16px 16px; gap: 12px; }
  .feedback-textarea { min-height: 90px; }
}
/* ============================================================
   ★ 主题选择器
   ============================================================ */
.theme-selector { position: relative; display: inline-flex; }
.theme-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 160px;
  background: rgba(14, 14, 22, 0.96);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  opacity: 0; transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s cubic-bezier(.34,1.56,.64,1);
  z-index: 200;
}
.theme-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.theme-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px;
  background: transparent; border: none; border-radius: 8px;
  color: rgba(233, 233, 240, 0.78);
  font-size: 12.5px; font-family: inherit; font-weight: 500;
  letter-spacing: 0.5px; cursor: pointer; text-align: left;
  transition: all .2s ease;
}
.theme-menu-item:hover { background: rgba(106, 92, 255, 0.18); color: #fff; transform: translateX(2px); }
.theme-menu-item.active {
  background: linear-gradient(135deg, rgba(106, 92, 255, 0.35), rgba(255, 77, 141, 0.28));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.theme-menu-item.active::after { content: '✓'; margin-left: auto; color: var(--accent3); font-weight: 700; font-size: 12px; }
.tmi-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,.06); font-size: 12px; flex-shrink: 0; }
.tmi-label { flex: 1; }

/* ============================================================
   ★ 主题皮肤
   ============================================================ */

/* ---------- 纯白主题 ---------- */
body.theme-white {
  --bg: #f5f6fa;
  --fg: #1a1a2e;
  --muted: rgba(26,26,46,.55);
  --line: rgba(0,0,0,.08);
  --accent1: #6a5cff;
  --accent2: #ff4d8d;
  --accent3: #00b894;
}
body.theme-white { background: #f5f6fa; color: #1a1a2e; }
body.theme-white .topbar {
  background: linear-gradient(to bottom, rgba(255,255,255,.92) 0%, rgba(255,255,255,.7) 70%, rgba(255,255,255,0) 100%);
  border-bottom-color: rgba(0,0,0,.06);
}
body.theme-white .logo-text { background: linear-gradient(90deg, #1a1a2e, #6a5cff, #1a1a2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.theme-white .status { background: rgba(0,0,0,.04); color: rgba(26,26,46,.6); }
body.theme-white .icon-btn { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08); color: #1a1a2e; }
body.theme-white .icon-btn:hover { background: rgba(106,92,255,.12); }
body.theme-white .lyric-panel { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.08); box-shadow: 0 16px 52px rgba(0,0,0,.12); }
body.theme-white .lyric-mask { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.3) 0%, rgba(255,255,255,.7) 100%); }
body.theme-white .lyric-line { color: rgba(26,26,46,.55); text-shadow: 0 1px 3px rgba(255,255,255,.9); }
body.theme-white .lyric-line.active { color: #1a1a2e; text-shadow: 0 0 20px rgba(106,92,255,.5), 0 0 40px rgba(255,77,141,.25); }
body.theme-white .lyric-line.near { color: rgba(26,26,46,.8); }
body.theme-white .lyric-header { color: rgba(26,26,46,.7); border-bottom-color: rgba(0,0,0,.08); text-shadow: none; }
body.theme-white .bottom-bar { background: linear-gradient(to top, rgba(255,255,255,.96) 60%, rgba(255,255,255,.75) 100%); border-top-color: rgba(0,0,0,.06); }
body.theme-white .title { background: linear-gradient(90deg, #1a1a2e, #6a5cff, #1a1a2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.theme-white .artist { color: rgba(26,26,46,.55); }
body.theme-white .progress { background: rgba(0,0,0,.08); }
body.theme-white .progress-buffer { background: rgba(0,0,0,.15); }
body.theme-white .ctrl { color: #1a1a2e; }
body.theme-white .volume { background: rgba(0,0,0,.08); }
body.theme-white .v { color: rgba(26,26,46,.55); }
body.theme-white .t { color: rgba(26,26,46,.55); }
body.theme-white .site-footer { background: rgba(255,255,255,.85); border-top-color: rgba(0,0,0,.06); color: rgba(26,26,46,.8); }
body.theme-white .site-footer-text { color: rgba(26,26,46,.7); }
body.theme-white .site-footer-link { color: #1a1a2e; border-bottom-color: rgba(0,0,0,.2); }
body.theme-white #bgImageMask { background: radial-gradient(circle at center, rgba(255,255,255,.3) 0%, rgba(255,255,255,.85) 100%); }

/* ---------- 赛博朋克主题 ---------- */
body.theme-cyberpunk {
  --bg: #0a0014;
  --fg: #00fff9;
  --muted: rgba(0,255,249,.45);
  --line: rgba(255,0,200,.25);
  --accent1: #ff00c8;
  --accent2: #00fff9;
  --accent3: #f9f871;
}
body.theme-cyberpunk { background: #0a0014; color: #00fff9; }
body.theme-cyberpunk .topbar {
  background: linear-gradient(to bottom, rgba(10,0,20,.85) 0%, rgba(10,0,20,.6) 70%, rgba(10,0,20,0) 100%);
  border-bottom-color: rgba(255,0,200,.3);
  box-shadow: 0 4px 24px rgba(255,0,200,.15);
}
body.theme-cyberpunk .logo-text { background: linear-gradient(90deg, #ff00c8, #00fff9, #ff00c8); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.theme-cyberpunk .logo-icon { color: #00fff9; }
body.theme-cyberpunk .status { background: rgba(255,0,200,.1); border-color: rgba(255,0,200,.35); color: #00fff9; }
body.theme-cyberpunk .status::before { background: #f9f871; box-shadow: 0 0 8px #f9f871; }
body.theme-cyberpunk .icon-btn { background: rgba(255,0,200,.08); border-color: rgba(255,0,200,.35); color: #00fff9; }
body.theme-cyberpunk .icon-btn:hover { background: rgba(0,255,249,.18); box-shadow: 0 6px 16px rgba(0,255,249,.3); }
body.theme-cyberpunk .lyric-panel {
  background: rgba(10,0,20,.65);
  border: 1px solid rgba(0,255,249,.4);
  box-shadow: 0 16px 52px rgba(255,0,200,.35), 0 0 0 1px rgba(0,255,249,.2) inset;
}
body.theme-cyberpunk .lyric-line { color: rgba(0,255,249,.5); text-shadow: 0 1px 3px rgba(0,0,0,.9); }
body.theme-cyberpunk .lyric-line.active { color: #00fff9; text-shadow: 0 0 20px #ff00c8, 0 0 40px rgba(0,255,249,.8); }
body.theme-cyberpunk .lyric-line.near { color: rgba(0,255,249,.85); }
body.theme-cyberpunk .lyric-header { color: rgba(0,255,249,.75); border-bottom-color: rgba(0,255,249,.2); text-shadow: 0 0 6px rgba(0,255,249,.6); }
body.theme-cyberpunk .bottom-bar {
  background: linear-gradient(to top, rgba(10,0,20,.96) 60%, rgba(10,0,20,.7) 100%);
  border-top-color: rgba(255,0,200,.35);
}
body.theme-cyberpunk .title { background: linear-gradient(90deg, #00fff9, #ff00c8, #00fff9); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.theme-cyberpunk .artist { color: rgba(0,255,249,.55); }
body.theme-cyberpunk .progress { background: rgba(0,255,249,.1); }
body.theme-cyberpunk .progress-fill { background: linear-gradient(90deg, #ff00c8, #00fff9); box-shadow: 0 0 12px #00fff9; }
body.theme-cyberpunk .progress-buffer { background: rgba(0,255,249,.2); }
body.theme-cyberpunk .ctrl { color: #00fff9; }
body.theme-cyberpunk .ctrl.main { background: linear-gradient(135deg, #ff00c8, #00fff9); box-shadow: 0 8px 22px rgba(255,0,200,.6), 0 0 40px rgba(0,255,249,.4); }
body.theme-cyberpunk .volume { background: rgba(0,255,249,.1); }
body.theme-cyberpunk .v { color: rgba(0,255,249,.55); }
body.theme-cyberpunk .t { color: rgba(0,255,249,.55); }
body.theme-cyberpunk .site-footer { background: rgba(10,0,20,.85); border-top-color: rgba(255,0,200,.3); color: rgba(0,255,249,.85); }
body.theme-cyberpunk .site-footer-text { color: rgba(0,255,249,.75); }
body.theme-cyberpunk .site-footer-link { color: #00fff9; border-bottom-color: rgba(0,255,249,.3); }
body.theme-cyberpunk #bgImageMask { background: radial-gradient(circle at center, rgba(10,0,20,.3) 0%, rgba(10,0,20,.9) 100%); }

/* ---------- 极简主题 ---------- */
body.theme-minimal {
  --bg: #ffffff;
  --fg: #111111;
  --muted: rgba(17,17,17,.4);
  --line: rgba(0,0,0,.08);
  --accent1: #111111;
  --accent2: #555555;
  --accent3: #111111;
}
body.theme-minimal { background: #ffffff; color: #111111; }
body.theme-minimal #bgImageLayer,
body.theme-minimal #bgVideoLayer,
body.theme-minimal #bgImageMask,
body.theme-minimal #bgParticleCanvas,
body.theme-minimal #bgCanvas,
body.theme-minimal #fluidCanvas,
body.theme-minimal #particleCanvas { display: none !important; }
body.theme-minimal .topbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.theme-minimal .logo-text { background: none; -webkit-text-fill-color: #111; color: #111; animation: none; }
body.theme-minimal .logo-icon { color: #111; animation: none; }
body.theme-minimal .status { background: transparent; border-color: rgba(0,0,0,.1); color: rgba(17,17,17,.5); }
body.theme-minimal .status::before { background: #111; box-shadow: none; animation: none; }
body.theme-minimal .icon-btn { background: transparent; border-color: rgba(0,0,0,.1); color: #111; border-radius: 6px; }
body.theme-minimal .icon-btn:hover { background: rgba(0,0,0,.05); transform: none; box-shadow: none; }
body.theme-minimal .lyric-panel {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: none;
  transform: none !important;
}
body.theme-minimal .lyric-bg { display: none; }
body.theme-minimal .lyric-mask { background: none; }
body.theme-minimal .lyric-line { color: rgba(17,17,17,.35); text-shadow: none; font-weight: 400; }
body.theme-minimal .lyric-line.active { color: #111; font-weight: 700; text-shadow: none; animation: none; }
body.theme-minimal .lyric-line.near { color: rgba(17,17,17,.6); }
body.theme-minimal .lyric-header { color: rgba(17,17,17,.6); border-bottom-color: rgba(0,0,0,.06); text-shadow: none; }
body.theme-minimal .bottom-bar { background: #ffffff; border-top: 1px solid rgba(0,0,0,.06); backdrop-filter: none; }
body.theme-minimal .title { background: none; -webkit-text-fill-color: #111; color: #111; animation: none; }
body.theme-minimal .artist { color: rgba(17,17,17,.45); }
body.theme-minimal .progress { background: rgba(0,0,0,.08); }
body.theme-minimal .progress-fill { background: #111; box-shadow: none; }
body.theme-minimal .progress-buffer { background: rgba(0,0,0,.12); }
body.theme-minimal .progress-dot { background: #111; box-shadow: none; }
body.theme-minimal .ctrl { color: #111; }
body.theme-minimal .ctrl:hover::before { background: rgba(0,0,0,.05); }
body.theme-minimal .ctrl.main { background: #111; color: #fff; box-shadow: none; }
body.theme-minimal .volume { background: rgba(0,0,0,.08); }
body.theme-minimal .volume-fill { background: #111; }
body.theme-minimal .volume-dot { background: #111; box-shadow: none; }
body.theme-minimal .v { color: rgba(17,17,17,.5); }
body.theme-minimal .t { color: rgba(17,17,17,.5); }
body.theme-minimal .spectrum i { background: #111; box-shadow: none; }
body.theme-minimal .site-footer { background: #ffffff; border-top-color: rgba(0,0,0,.06); color: rgba(17,17,17,.7); }
body.theme-minimal .site-footer-text { color: rgba(17,17,17,.6); }
body.theme-minimal .site-footer-link { color: #111; border-bottom-color: rgba(0,0,0,.2); }
/* ============================================================
   ★ 入场动画（加长版 3~4s）
   ============================================================ */
body.entry-loading {
  overflow: hidden;
}
body.entry-loading .topbar,
body.entry-loading .main-stage,
body.entry-loading .bottom-bar,
body.entry-loading .site-footer,
body.entry-loading #bgImageLayer,
body.entry-loading #bgVideoLayer,
body.entry-loading #bgImageMask,
body.entry-loading #bgParticleCanvas,
body.entry-loading #bgCanvas,
body.entry-loading #fluidCanvas,
body.entry-loading #particleCanvas,
body.entry-loading #mvVideo {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .8s ease;
}

.entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at 50% 45%, rgba(106,92,255,.28) 0%, rgba(255,77,141,.16) 35%, rgba(5,6,10,1) 78%),
    #05060a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.entry-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 星轨背景 */
.entry-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.entry-stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: .65;
  box-shadow: 0 0 6px rgba(255,255,255,.9);
  animation: entryStarFloat linear infinite;
}
@keyframes entryStarFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: .7; }
  50% { opacity: 1; }
  100% { transform: translate3d(0, -120vh, 0) scale(.4); opacity: 0; }
}

/* 内容区 */
.entry-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  text-align: center;
}

/* Logo：更缓慢的入场 + 呼吸发光 */
.entry-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(106,92,255,.35), rgba(255,77,141,.2) 60%, transparent 75%);
  box-shadow: 0 0 40px rgba(106,92,255,.55), 0 0 80px rgba(255,77,141,.35);
  transform: scale(0.6);
  opacity: 0;
  animation:
    entryLogoIn 1.6s cubic-bezier(.34,1.56,.64,1) .2s forwards,
    entryLogoPulse 2.6s ease-in-out 1.8s infinite;
}
.entry-logo img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255,255,255,.75))
          drop-shadow(0 0 32px rgba(106,92,255,.8));
  animation: entryLogoSpin 8s linear infinite;
}
@keyframes entryLogoIn {
  0% { transform: scale(.4) rotate(-90deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes entryLogoSpin {
  to { transform: rotate(360deg); }
}
@keyframes entryLogoPulse {
  0%,100% {
    box-shadow: 0 0 40px rgba(106,92,255,.55), 0 0 80px rgba(255,77,141,.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 65px rgba(106,92,255,.85), 0 0 130px rgba(255,77,141,.6);
    transform: scale(1.06);
  }
}

/* 标题：延迟到 1.2s，缓慢浮现 */
.entry-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 6px;
  background: linear-gradient(90deg, #fff, #b3b3ff, #ff9ec7, #fff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: entryTitleIn 1.4s ease 1.2s both, shimmer 4s linear infinite 2.6s;
  text-shadow: 0 0 30px rgba(106,92,255,.35);
}
@keyframes entryTitleIn {
  0% { opacity: 0; transform: translateY(20px); letter-spacing: 22px; filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0); letter-spacing: 6px; filter: blur(0); }
}

/* 副标题：1.8s 时出现 */
.entry-subtitle {
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(233,233,240,.55);
  animation: entrySubIn 1.2s ease 1.8s both;
}
@keyframes entrySubIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 进度条：2.0s 时开始出现，总时长约 3.5s */
.entry-bar {
  width: 180px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
  margin-top: 10px;
  animation: entrySubIn 1s ease 2.0s both;
}
.entry-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  box-shadow: 0 0 12px rgba(255,77,141,.7);
  transition: width .12s linear;
}

/* 点击提示：2.4s 时出现 */
.entry-hint {
  position: absolute;
  bottom: calc(48px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(233,233,240,.45);
  animation: entryHintBlink 1.8s ease-in-out infinite 2.4s both;
  white-space: nowrap;
  z-index: 2;
  opacity: 0;
}
@keyframes entryHintBlink {
  0% { opacity: 0; }
  20% { opacity: 1; }
  50% { opacity: .35; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* 入场结束整体过渡 */
body:not(.entry-loading) .topbar,
body:not(.entry-loading) .main-stage,
body:not(.entry-loading) .bottom-bar,
body:not(.entry-loading) .site-footer {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* 移动端 */
@media (max-width: 820px), (pointer: coarse) {
  .entry-logo { width: 80px; height: 80px; }
  .entry-logo-icon { font-size: 34px; }
  .entry-title { font-size: 24px; letter-spacing: 4px; }
  .entry-subtitle { font-size: 12px; letter-spacing: 2px; }
  .entry-bar { width: 150px; }
  @keyframes entryTitleIn {
    0% { opacity: 0; transform: translateY(20px); letter-spacing: 16px; filter: blur(8px); }
    100% { opacity: 1; transform: translateY(0); letter-spacing: 4px; filter: blur(0); }
  }
}

/* 极简主题 */
body.theme-minimal .entry-overlay { background: #ffffff; }
body.theme-minimal .entry-logo {
  background: none;
  box-shadow: none;
  animation: entryLogoIn 1.6s cubic-bezier(.34,1.56,.64,1) .2s forwards;
}
body.theme-minimal .entry-logo-icon {
  color: #111;
  text-shadow: none;
  animation: none;
}
body.theme-minimal .entry-title {
  background: none;
  -webkit-text-fill-color: #111;
  color: #111;
  animation: entryTitleIn 1.4s ease 1.2s both;
  text-shadow: none;
}
body.theme-minimal .entry-subtitle { color: rgba(17,17,17,.45); }
body.theme-minimal .entry-hint { color: rgba(17,17,17,.4); }
body.theme-minimal .entry-stars i { background: #111; box-shadow: none; opacity: .15; }
/* ============================================================
   ★ 语言切换器
   ============================================================ */
.lang-selector {
  position: relative;
  display: inline-flex;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: rgba(14, 14, 22, 0.96);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(106, 92, 255, 0.08);
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s cubic-bezier(.34,1.56,.64,1);
  z-index: 200;
}
.lang-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(233, 233, 240, 0.78);
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-align: left;
  transition: all .2s ease;
}
.lang-menu-item:hover {
  background: rgba(106, 92, 255, 0.18);
  color: #fff;
  transform: translateX(2px);
}
.lang-menu-item.active {
  background: linear-gradient(135deg, rgba(106, 92, 255, 0.35), rgba(255, 77, 141, 0.28));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.lang-menu-item.active::after {
  content: '✓';
  margin-left: auto;
  color: var(--accent3);
  font-weight: 700;
  font-size: 12px;
}
.lmi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  flex-shrink: 0;
}
.lmi-label { flex: 1; }

/* 纯白主题 */
body.theme-white .lang-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}
body.theme-white .lang-menu-item { color: rgba(26, 26, 46, 0.78); }
body.theme-white .lang-menu-item:hover { background: rgba(106, 92, 255, 0.12); color: #1a1a2e; }
body.theme-white .lang-menu-item.active { color: #fff; }

/* 极简主题 */
body.theme-minimal .lang-menu {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
body.theme-minimal .lang-menu-item { color: rgba(17, 17, 17, 0.7); }
body.theme-minimal .lang-menu-item:hover { background: rgba(0, 0, 0, 0.05); color: #111; }
body.theme-minimal .lang-menu-item.active {
  background: #111;
  color: #fff;
  box-shadow: none;
}
body.theme-minimal .lang-menu-item.active::after { color: #fff; }
/* ============================================================
   ★ 音游模式
   ============================================================ */
.rhythm-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(5, 6, 10, 0.92);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  overflow: hidden;
}
.rhythm-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 选择界面 ---------- */
.rhythm-select {
  width: min(560px, 92vw);
  max-height: 90vh;
  background: rgba(14, 14, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(106, 92, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(14px) scale(0.97);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.rhythm-overlay.open .rhythm-select {
  transform: translateY(0) scale(1);
}

.rhythm-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.rhythm-select-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #fff, #b3b3ff, #ff9ec7, #fff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
}
.rhythm-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
  font-family: inherit;
}
.rhythm-close:hover {
  background: rgba(255, 77, 141, 0.35);
  border-color: rgba(255, 77, 141, 0.6);
  transform: rotate(90deg);
}

.rhythm-song-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.rhythm-song-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #222 center/cover no-repeat;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.rhythm-song-meta { flex: 1; min-width: 0; }
.rhythm-song-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.rhythm-song-artist {
  font-size: 11px;
  color: rgba(233, 233, 240, 0.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rhythm-difficulty-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 22px;
  overflow-y: auto;
  flex: 1;
}
.rhythm-difficulty-list::-webkit-scrollbar { width: 6px; }
.rhythm-difficulty-list::-webkit-scrollbar-thumb {
  background: rgba(106, 92, 255, 0.4);
  border-radius: 3px;
}
.rhythm-diff-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.rhythm-diff-item:hover {
  background: rgba(106, 92, 255, 0.15);
  border-color: rgba(106, 92, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(106, 92, 255, 0.25);
}
.rhythm-diff-item:active { transform: scale(.98); }
.rhythm-diff-item[data-diff="easy"]:hover { border-color: rgba(34, 230, 200, 0.6); background: rgba(34, 230, 200, 0.12); }
.rhythm-diff-item[data-diff="normal"]:hover { border-color: rgba(255, 184, 0, 0.6); background: rgba(255, 184, 0, 0.12); }
.rhythm-diff-item[data-diff="hard"]:hover { border-color: rgba(255, 107, 0, 0.6); background: rgba(255, 107, 0, 0.12); }
.rhythm-diff-item[data-diff="extreme"]:hover { border-color: rgba(255, 45, 85, 0.7); background: rgba(255, 45, 85, 0.15); }

.rdi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}
.rdi-info { flex: 1; min-width: 0; }
.rdi-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
  letter-spacing: 1px;
}
.rdi-desc {
  font-size: 11px;
  color: rgba(233, 233, 240, 0.5);
  letter-spacing: .5px;
}
.rdi-arrow {
  font-size: 22px;
  color: rgba(233, 233, 240, 0.3);
  flex-shrink: 0;
  transition: all .25s;
}
.rhythm-diff-item:hover .rdi-arrow {
  color: #fff;
  transform: translateX(4px);
}

.rhythm-options {
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.rhythm-opt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(233, 233, 240, 0.8);
}
.rhythm-opt-row > span:first-child {
  min-width: 90px;
  letter-spacing: .5px;
}
.rhythm-opt-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}
.rhythm-opt-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a5cff, #ff4d8d);
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(106, 92, 255, 0.6);
  cursor: pointer;
}
.rhythm-opt-row > span:last-child {
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #22e6c8;
  font-weight: 700;
  font-size: 12px;
}

/* ---------- 游戏界面 ---------- */
.rhythm-game {
  position: fixed;
  inset: 0;
  background: #05060a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#rhythmCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.rhythm-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 24px;
  padding-top: calc(16px + env(safe-area-inset-top));
  pointer-events: none;
  z-index: 10;
}
.rhythm-hud-left, .rhythm-hud-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rhythm-hud-right { align-items: flex-end; }

.rhythm-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.rhythm-score-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
}
.rhythm-score-val {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(106, 92, 255, 0.8);
  letter-spacing: 1px;
}
.rhythm-combo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  opacity: 0;
  transform: scale(0.8);
  transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
}
.rhythm-combo.active {
  opacity: 1;
  transform: scale(1);
}
.rhythm-combo-val {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, #ffb800, #ff4d8d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.rhythm-combo-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
}

.rhythm-acc {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.rhythm-acc-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
}
.rhythm-acc-val {
  font-size: 16px;
  font-weight: 700;
  color: #22e6c8;
  font-variant-numeric: tabular-nums;
}
.rhythm-pause-btn {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  margin-top: 4px;
}
.rhythm-pause-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

.rhythm-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 11;
}
.rhythm-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6a5cff, #ff4d8d, #22e6c8);
  box-shadow: 0 0 12px rgba(255, 77, 141, 0.8);
  transition: width .1s linear;
}

.rhythm-judge {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 3px;
  pointer-events: none;
  opacity: 0;
  z-index: 12;
  text-shadow: 0 0 24px currentColor;
  transition: all .15s cubic-bezier(.34, 1.56, .64, 1);
}
.rhythm-judge.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.rhythm-judge.perfect { color: #ffd700; }
.rhythm-judge.great { color: #22e6c8; }
.rhythm-judge.good { color: #6a5cff; }
.rhythm-judge.miss { color: #ff4d4d; }

.rhythm-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 96px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 40px rgba(106, 92, 255, 0.9), 0 0 80px rgba(255, 77, 141, 0.6);
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  letter-spacing: 6px;
}
.rhythm-countdown.show {
  animation: rhythmCountdown 0.9s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes rhythmCountdown {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
}

.rhythm-pause-menu {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}
.rhythm-pause-panel {
  background: rgba(20, 20, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 280px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}
.rhythm-pause-panel h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}
.rhythm-pause-panel button {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 1px;
  transition: all .25s;
}
.rhythm-pause-resume {
  background: linear-gradient(135deg, #6a5cff, #ff4d8d);
  color: #fff;
}
.rhythm-pause-resume:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(106, 92, 255, 0.5); }
.rhythm-pause-restart {
  background: rgba(34, 230, 200, 0.15);
  border: 1px solid rgba(34, 230, 200, 0.4) !important;
  color: #22e6c8;
}
.rhythm-pause-restart:hover { background: rgba(34, 230, 200, 0.25); }
.rhythm-pause-quit {
  background: rgba(255, 77, 77, 0.15);
  border: 1px solid rgba(255, 77, 77, 0.4) !important;
  color: #ff4d4d;
}
.rhythm-pause-quit:hover { background: rgba(255, 77, 77, 0.25); }

/* ---------- 结算界面 ---------- */
.rhythm-result {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.94);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
  animation: rhythmResultIn .5s ease;
}
@keyframes rhythmResultIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.rhythm-result-panel {
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(18, 18, 28, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85);
  transform: scale(0.9);
  animation: rhythmResultPanelIn .5s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
@keyframes rhythmResultPanelIn {
  to { transform: scale(1); }
}
.rhythm-result-grade {
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffd700, #ff8c00, #ff4d8d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
  letter-spacing: 2px;
  animation: gradePulse 1.5s ease-in-out infinite;
}
@keyframes gradePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.rhythm-result-grade[data-grade="S"] { background: linear-gradient(135deg, #ffd700, #ff8c00, #ff4d8d); }
.rhythm-result-grade[data-grade="A"] { background: linear-gradient(135deg, #22e6c8, #6a5cff); }
.rhythm-result-grade[data-grade="B"] { background: linear-gradient(135deg, #6a5cff, #a78bfa); }
.rhythm-result-grade[data-grade="C"] { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rhythm-result-grade[data-grade="D"] { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); }
.rhythm-result-grade[data-grade="F"] { background: linear-gradient(135deg, #ff4d4d, #991b1b); }

.rhythm-result-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}
.rhythm-result-song {
  font-size: 13px;
  color: rgba(233, 233, 240, 0.6);
  letter-spacing: 1px;
  text-align: center;
  word-break: break-all;
  padding: 0 10px;
}

.rhythm-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}
.rrs-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.rrs-label {
  font-size: 10px;
  color: rgba(233, 233, 240, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.rrs-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.rhythm-result-judges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.rrj-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.rrj-icon { font-size: 18px; }
.rrj-name {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}
.rrj-val {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rrj-item.perfect { color: #ffd700; }
.rrj-item.great { color: #22e6c8; }
.rrj-item.good { color: #6a5cff; }
.rrj-item.miss { color: #ff4d4d; }

.rhythm-result-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
}
.rhythm-result-btn {
  flex: 1;
  padding: 13px 16px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 1px;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.rhythm-result-btn.retry {
  background: linear-gradient(135deg, #6a5cff, #ff4d8d);
  color: #fff;
  box-shadow: 0 8px 24px rgba(106, 92, 255, 0.4);
}
.rhythm-result-btn.retry:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(106, 92, 255, 0.6); }
.rhythm-result-btn.back {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}
.rhythm-result-btn.back:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- 加载中 ---------- */
.rhythm-loading {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.95);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 50;
}
.rhythm-loading-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #6a5cff;
  border-right-color: #ff4d8d;
  animation: rhythmSpin 1s linear infinite;
}
@keyframes rhythmSpin {
  to { transform: rotate(360deg); }
}
.rhythm-loading-text {
  font-size: 14px;
  color: rgba(233, 233, 240, 0.8);
  letter-spacing: 2px;
}
.rhythm-loading-bar {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.rhythm-loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6a5cff, #ff4d8d);
  border-radius: 4px;
  transition: width .3s ease;
  box-shadow: 0 0 12px rgba(255, 77, 141, 0.6);
}

/* ---------- 响应式 ---------- */
@media (max-width: 820px), (pointer: coarse) {
  .rhythm-select { width: 94vw; max-height: 94vh; }
  .rhythm-select-head { padding: 14px 18px; }
  .rhythm-select-title { font-size: 15px; }
  .rhythm-song-info { padding: 12px 18px; }
  .rhythm-song-cover { width: 48px; height: 48px; }
  .rhythm-difficulty-list { padding: 12px 18px; gap: 8px; }
  .rhythm-diff-item { padding: 12px 14px; }
  .rdi-icon { width: 40px; height: 40px; font-size: 20px; }
  .rdi-name { font-size: 14px; }
  .rdi-desc { font-size: 10px; }
  .rhythm-options { padding: 12px 18px 16px; }
  .rhythm-opt-row { font-size: 11.5px; }
  .rhythm-opt-row > span:first-child { min-width: 76px; }
  .rhythm-hud { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
  .rhythm-score-val { font-size: 22px; }
  .rhythm-combo-val { font-size: 18px; }
  .rhythm-acc-val { font-size: 14px; }
  .rhythm-judge { font-size: 26px; }
  .rhythm-countdown { font-size: 72px; }
  .rhythm-result-panel { padding: 24px 20px 20px; }
  .rhythm-result-grade { font-size: 72px; }
  .rhythm-result-stats { gap: 8px; }
  .rrs-val { font-size: 17px; }
  .rrj-item { padding: 8px 12px; }
  .rrj-val { font-size: 14px; }
  .rhythm-pause-panel { padding: 24px 24px; min-width: 240px; }
}