/* ============================================
   TY Music — Apple Music 液态玻璃 · Liquid Glass
   空间折射 · 微妙景深 · 多层透明叠加
   ============================================ */

:root {
  /* 核心底色 */
  --bg: #05050f;

  /* ====== 液态玻璃层（暗色主题） ====== */
  /* 层级 0: 深度底色（body/bg） */
  --glass-deep-bg: rgba(8, 8, 20, 0.92);

  /* 层级 1: 侧边栏 / 弹窗级 — 最厚重玻璃 */
  --glass-layer-1: rgba(18, 18, 34, 0.68);
  --glass-blur-1: 52px;

  /* 层级 2: 播放器栏 / 面板级 — 更轻薄玻璃 */
  --glass-layer-2: rgba(16, 16, 30, 0.48);
  --glass-blur-2: 60px;

  /* 层级 3: 卡片 / 可交互元素 — 轻薄玻璃 */
  --glass-layer-3: rgba(22, 22, 40, 0.48);
  --glass-blur-3: 24px;

  /* 层级 4: hover / active — 微高光 */
  --glass-layer-4: rgba(28, 28, 48, 0.55);

  /* 玻璃高光 — 模拟折射 */
  --glass-highlight: rgba(255, 255, 255, 0.04);
  --glass-highlight-strong: rgba(255, 255, 255, 0.07);
  --glass-highlight-edge: rgba(255, 255, 255, 0.06);

  /* 玻璃阴影 — 景深 */
  --glass-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2);
  --glass-shadow-deep: 0 8px 32px rgba(0, 0, 0, 0.35);
  --glass-shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.03);

  /* 背景卡片（旧变量兼容） */
  --bg-glass: var(--glass-layer-3);
  --bg-glass-heavy: var(--glass-layer-1);
  --bg-card: var(--glass-layer-3);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(255, 255, 255, 0.08);
  --text: #f0f0f7;
  --text-secondary: #8888aa;
  --text-tertiary: #5a5a7a;

  /* 旧玻璃变量（兼容） */
  --glass-sidebar-bg: var(--glass-layer-1);
  --glass-player-bg: var(--glass-layer-2);
  --glass-panel-bg: var(--glass-layer-1);
  --glass-card-bg: var(--glass-layer-3);
  --glass-card-hover: var(--glass-layer-4);

  /* 霓虹调色板 */
  --neon-purple: #b45eff;
  --neon-pink: #ff3da1;
  --neon-cyan: #00e0ff;
  --neon-blue: #448aff;
  --neon-green: #39ff14;

  --accent: #b45eff;
  --accent-glow: rgba(180, 94, 255, 0.3);
  --accent-strong: rgba(180, 94, 255, 0.55);

  /* 边框 — 关键：微妙玻璃边缘 */
  --border: rgba(255, 255, 255, 0.05);
  --border-glow: rgba(180, 94, 255, 0.12);
  --border-highlight: rgba(255, 255, 255, 0.08);

  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --transition: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 0.12s cubic-bezier(0.25, 0.1, 0.25, 1);
  --sidebar-width: 240px;
  --player-height: 72px;
  --dock-safe-area: 44px;
}

/* ====== 首次进入欢迎页 ====== */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: auto;
  isolation: isolate;
  background: #080611;
  color: #fff;
  transition: opacity 520ms cubic-bezier(.22, .8, .25, 1), visibility 520ms;
}

.welcome-screen.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-liquid-ether-mount,
.welcome-liquid-ether-mount .liquid-ether-container,
.welcome-liquid-ether-mount canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.welcome-liquid-ether-mount {
  z-index: 0;
  pointer-events: none;
}

.welcome-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(5, 4, 12, 0.28);
  box-shadow: inset 0 0 180px rgba(4, 3, 12, 0.72);
}

.welcome-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100vw - 48px));
  text-align: center;
  transform: translateY(0);
  animation: welcome-content-in 900ms cubic-bezier(.22, .8, .25, 1) both;
}

.welcome-kicker {
  margin-bottom: 24px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
}

.welcome-content h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(46px, 7.4vw, 88px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.02;
  text-wrap: balance;
}

.welcome-content h1 span {
  display: block;
  color: rgba(255,255,255,.9);
  font-weight: 560;
}

.welcome-content p {
  max-width: 440px;
  margin: 26px auto 36px;
  color: rgba(255,255,255,.78);
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 450;
  line-height: 1.75;
  letter-spacing: 0;
}

.welcome-start-button,
.welcome-learn-more {
  min-width: 142px;
  min-height: 48px;
  border-radius: 999px !important;
  background: rgba(255,255,255,.045) !important;
  color: #fff !important;
}

.welcome-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.welcome-disclaimer {
  width: min(520px, 100%);
  max-width: 100%;
  margin: 14px auto 0 !important;
  color: rgba(255,255,255,.42) !important;
  font-size: 10px !important;
  line-height: 1.7 !important;
  text-align: center !important;
}

.welcome-learn-more {
  cursor: pointer;
}

.welcome-learn-more:hover,
.welcome-learn-more[aria-expanded="true"] {
  background: rgba(255,255,255,.075) !important;
}

.welcome-learn-more:active { transform: scale(.97); }

.welcome-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
  max-width: 590px;
  margin: 26px auto 0;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  text-align: left;
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}

.welcome-features.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.welcome-feature {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.welcome-feature strong { color: #fff; font-size: 13px; font-weight: 650; }
.welcome-feature span { color: rgba(255,255,255,.68); font-size: 12px; line-height: 1.55; }

.welcome-start-button .shiny-text {
  color: #fff;
}

@keyframes welcome-content-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .welcome-content { transform: translateY(0); }
  .welcome-content h1 { font-size: clamp(38px, 12vw, 58px); }
  .welcome-content p { margin-top: 20px; font-size: 15px; }
  .welcome-features { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-content { animation: none; }
  .welcome-screen { transition: opacity 180ms ease, visibility 180ms; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ====== 全局玻璃纹理（SVG 噪音滤镜） ====== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  /* 极其微弱的噪点纹理，模仿真实玻璃表面 */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.025;
  mix-blend-mode: overlay;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.amp-artwork #ampTiltedCardMount {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.amp-artwork #ampTiltedCardMount .tilted-card-img {
  border-radius: 16px;
}

/* Fullscreen cover uses the official TiltedCard interaction.  Keep its
   hover scale inside this local stacking context, never the page root. */
.amp-fullscreen-player .amp-artwork,
.amp-fullscreen-player .amp-artwork-wrapper {
  overflow: visible;
}

.amp-fullscreen-player .amp-artwork #ampTiltedCardMount {
  transform: translateZ(0);
}

/* ====== SoftAurora 动态背景 ====== */
#softAuroraHost {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
}

/* GradientWaves is reserved for the local library and playlist surfaces. */
#libraryGradientWavesMount {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 560px at 18% 18%, rgba(109, 70, 255, .34), transparent 72%),
    radial-gradient(ellipse 780px 520px at 82% 76%, rgba(255, 155, 252, .22), transparent 70%),
    linear-gradient(135deg, #141125 0%, #211a43 48%, #171329 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 360ms ease, visibility 0s linear 360ms;
}
body:has(#page-local.active) #libraryGradientWavesMount,
body:has(#page-playlists.active) #libraryGradientWavesMount,
body.library-gradient-active #libraryGradientWavesMount {
  opacity: .94;
  visibility: visible;
  transition-delay: 0s;
}
#libraryGradientWavesMount canvas { pointer-events: none !important; }
body.library-gradient-active #page-local,
body.library-gradient-active #page-playlists {
  background: transparent !important;
}
body.library-gradient-active #bgGradient,
body.library-gradient-active #softAuroraHost {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Prism is the only ambient background for the browse page. */
body:has(#page-search.active) #bgGradient,
body:has(#page-search.active) #softAuroraHost,
body:has(#page-search.active) #libraryGradientWavesMount {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* 首页底色仍由专辑取色动态更新，SoftAurora 叠加在其上方。 */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: background 0.6s ease, opacity 0.6s ease;
  background:
    radial-gradient(ellipse 800px 600px at 25% 15%, rgba(180, 94, 255, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at 75% 55%, rgba(0, 224, 255, 0.11) 0%, transparent 70%),
    radial-gradient(ellipse 600px 450px at 45% 80%, rgba(255, 61, 161, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 15% 75%, rgba(68, 138, 255, 0.08) 0%, transparent 70%);
}

/* Fullscreen playback owns its own GridDistortion background. */
body:has(.amp-fullscreen-player.show) .bg-gradient {
  opacity: 0;
}

/* ============================================
   侧边栏 — 最厚重液态玻璃 + 边缘折射
   ============================================ */
.sidebar {
  position: relative;
  z-index: 10;
  width: var(--sidebar-width);
  height: 100dvh;  background: var(--glass-layer-1);
  backdrop-filter: blur(var(--glass-blur-1)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur-1)) saturate(1.6);
  border-right: 1px solid var(--border-highlight);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 18px 14px 8px;
  /* 玻璃内部阴影 — 营造厚度感 */
  box-shadow:
    var(--glass-shadow-soft),
    inset 1px 0 0 rgba(255, 255, 255, 0.03),
    2px 0 40px rgba(180, 94, 255, 0.04);
  transition: background-color 0.2s ease;
}

/* 侧边栏玻璃边缘高光 — 空间折射 */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 30%,
    rgba(255, 255, 255, 0.01) 50%,
    rgba(255, 255, 255, 0.05) 70%,
    rgba(255, 255, 255, 0.1) 100%
  );
  pointer-events: none;
  opacity: 0.5;
}

/* 侧边栏顶部折射光 */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 4px;
  margin-bottom: 14px;
  cursor: default;
}

.logo svg {
  width: 30px; height: 30px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-cyan) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 侧边栏搜索框 — 轻玻璃卡片 */
.search-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 18px;
  padding: 8px 14px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px solid var(--border);
  box-shadow:
    var(--glass-shadow-soft),
    var(--glass-shadow-inner);
  transition: var(--transition-fast);
  cursor: text;
}

.search-mini:focus-within {
  border-color: rgba(180, 94, 255, 0.3);
  box-shadow: 0 0 20px rgba(180, 94, 255, 0.12), var(--glass-shadow-inner);
  background: var(--glass-layer-4);
}

.search-mini input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
}

.search-mini input::placeholder { color: var(--text-tertiary); }
.search-mini i { color: var(--text-tertiary); }

/* Nav */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 450;
  letter-spacing: -0.1px;
  transition: all 0.12s ease;
  cursor: pointer;
  position: relative;
}

.nav-item svg {
  opacity: 0.55;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-item:hover svg {
  opacity: 0.9;
  transform: translateX(2px);
}

.nav-item:active {
  transform: scale(0.97);
}

.nav-item.active {
  background: rgba(180, 94, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--neon-purple);
  font-weight: 600;
  box-shadow:
    inset 0 0 0 1px rgba(180, 94, 255, 0.15),
    0 0 12px rgba(180, 94, 255, 0.08);
}

.nav-item.active svg {
  opacity: 1;
  transform: none;
  filter: drop-shadow(0 0 6px rgba(180, 94, 255, 0.5));
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03), transparent);
  margin: 10px 10px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 设置齿轮 */
.settings-gear {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  align-self: flex-end;
  box-shadow: var(--glass-shadow-soft);
  transition: all 0.12s ease, transform 0.15s ease;
}

.settings-gear:hover {
  color: var(--neon-purple);
  border-color: rgba(180, 94, 255, 0.2);
  background: rgba(180, 94, 255, 0.1);
  box-shadow: 0 0 16px rgba(180, 94, 255, 0.15);
  transform: rotate(90deg);
}

.settings-gear:active {
  transform: scale(0.9) rotate(90deg);
  transition: transform 0.12s ease;
}

/* 主题切换按钮 */
.theme-toggle-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  align-self: flex-end;
  box-shadow: var(--glass-shadow-soft);
  transition: all 0.12s ease;
  font-family: inherit;
}

.theme-toggle-btn:hover {
  color: var(--neon-cyan);
  border-color: rgba(0, 224, 255, 0.2);
  background: rgba(0, 224, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 224, 255, 0.12);
}

/* 迷你播放器 — 玻璃卡片 */
.now-playing-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-radius: 12px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow-soft), var(--glass-shadow-inner);
  transition: var(--transition-fast), background-color 0.2s ease;
}

.now-playing-mini:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--glass-shadow-soft), 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 迷你封面后景 — 色彩渗出 */
.mini-art-bg {
  position: absolute;
  inset: -12px;
  opacity: 0.18;
  filter: blur(30px) saturate(3.5) brightness(1.2);
  transform: scale(1.2);
  transition: all 0.8s ease;
}

.mini-cover-img {
  position: relative; z-index: 1;
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 12px rgba(180, 94, 255, 0.12);
}

.mini-info { position: relative; z-index: 1; flex: 1; min-width: 0; }

.mini-title {
  font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}

.mini-artist {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}

.mini-play {
  position: relative; z-index: 1;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--neon-purple);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
  box-shadow: 0 0 16px rgba(180, 94, 255, 0.35);
}

.mini-play:hover {
  background: var(--neon-cyan);
  box-shadow: 0 0 24px rgba(0, 224, 255, 0.5);
  transform: scale(1.1);
}

.mini-play:active {
  transform: scale(0.92);
  transition: transform 0.1s ease;
}

/* Native Tauri mini-player window. The window itself is resized by Rust;
   this layer only turns the existing player bar into the complete surface. */
.native-mini-btn { display: none; }
.ty-desktop .native-mini-btn { display: flex; }

body.native-mini-mode {
  min-width: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0b0b0d;
}

body.native-mini-mode .top-dock,
body.native-mini-mode .sidebar,
body.native-mini-mode .main-content,
body.native-mini-mode .mobile-topbar,
body.native-mini-mode .welcome-screen,
body.native-mini-mode .amp-fullscreen-player,
body.native-mini-mode .page-overlay { display: none !important; }

body.native-mini-mode .player-bar {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px 16px;
  gap: 14px;
  border: 0;
  border-radius: 0;
  background: rgba(20, 20, 24, 0.92);
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

body.native-mini-mode .player-bubble-mount,
body.native-mini-mode #playerBubbleMount,
body.native-mini-mode .player-collapse-btn,
body.native-mini-mode .player-collapsed-label,
body.native-mini-mode .player-like,
body.native-mini-mode #playerDownload,
body.native-mini-mode #playerMore,
body.native-mini-mode #shuffleBtn,
body.native-mini-mode #repeatBtn,
body.native-mini-mode #volumeBtn,
body.native-mini-mode #volumeBar,
body.native-mini-mode #fullscreenBtn { display: none !important; }

body.native-mini-mode .player-left {
  flex: 1 1 220px;
  min-width: 0;
  gap: 10px;
}

body.native-mini-mode .player-nowplaying,
body.native-mini-mode .player-cover { width: 54px; height: 54px; }
body.native-mini-mode .player-cover { border-radius: 9px; }
body.native-mini-mode .player-info { min-width: 0; }
body.native-mini-mode .player-title { font-size: 13px; }
body.native-mini-mode .player-artist { font-size: 11px; }
body.native-mini-mode .player-center {
  flex: 0 1 260px;
  min-width: 220px;
  gap: 7px;
}
body.native-mini-mode .player-controls { gap: 4px; }
body.native-mini-mode .ctrl-btn { width: 30px; height: 30px; }
body.native-mini-mode .ctrl-play { width: 38px; height: 38px; }
body.native-mini-mode .progress-container { gap: 7px; }
body.native-mini-mode .time { font-size: 10px; min-width: 28px; }
body.native-mini-mode .player-right {
  flex: 0 0 auto;
  width: auto;
  gap: 6px;
}
body.native-mini-mode #nativeMiniBtn { display: flex !important; }

@media (prefers-reduced-motion: reduce) {
  body.native-mini-mode .player-bar { transition: none !important; }
}

/* ============================================
   主内容区
   ============================================ */
.main-content {
  position: relative; z-index: 1;
  flex: 1;
  min-height: 0;
  height: calc(100vh - var(--player-height));
  overflow-y: scroll; overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: var(--dock-safe-area) 0 16px;
  scroll-padding-top: var(--dock-safe-area);
}

.top-dock {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  z-index: 10010;
  overflow: hidden;
  pointer-events: none;
  transform: none;
  will-change: transform;
  contain: layout paint;
}
.top-dock.glass-surface-host { position: fixed !important; }
html:has(.amp-fullscreen-player.show) .top-dock {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.top-dock .glass-surface--svg {
  background: rgba(13, 12, 30, .34) !important;
  box-shadow: none !important;
}
.top-dock .glass-surface--fallback {
  background: rgba(13, 12, 30, .4) !important;
  border: 0 !important;
  box-shadow: none !important;
}
.glass-surface-host.browse-search-box {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.browse-search-box > .glass-surface-mount { border-radius: inherit; }
.top-dock__brand { position: relative; z-index: 1; display: flex; align-items: center; min-width: 0; }
.top-dock__client-entry {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  width: 132px;
  min-width: 132px;
  height: 28px;
  padding: 0;
  margin-left: auto;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: rgba(255,255,255,.82);
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  pointer-events: auto;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.top-dock__client-entry:hover { color: #fff; background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.9); box-shadow: inset 0 1px rgba(255,255,255,.16), 0 10px 24px rgba(0,0,0,.3); transform: translateY(-1px); }
.top-dock__client-entry:hover { background: transparent; box-shadow: none; }
.top-dock__client-surface { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.top-dock__client-entry > i,
.top-dock__client-entry > span:not(.top-dock__client-surface) { position: relative; z-index: 1; }
.top-dock__client-entry > i:first-child { color: #c49aff; text-shadow: 0 0 10px rgba(196,154,255,.45); }
.top-dock__client-arrow { color: rgba(255,255,255,.5); font-size: 9px; }
html.ty-desktop .top-dock__client-entry { display: none; }
.top-dock__glitch {
  margin: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 5px rgba(0,0,0,.55);
}
.top-dock__glitch::after,
.top-dock__glitch::before {
  background-color: transparent !important;
  opacity: .7;
}
.top-dock__glitch::after {
  left: 2px !important;
  text-shadow: -2px 0 rgba(255, 54, 106, .94) !important;
}
.top-dock__glitch::before {
  left: -2px !important;
  text-shadow: 2px 0 rgba(68, 232, 255, .94) !important;
}
@media (max-width: 768px) {
  .mobile-topbar { display: none !important; }
  .top-dock { top: 0; left: 0; width: 100vw; height: 32px; padding: 0 12px; }
  .top-dock__glitch { font-size: 11px; }
  .top-dock__client-entry { min-height: 24px; padding: 0 9px; font-size: 10px; }
  .top-dock__client-arrow { display: none; }
}

/* Playlist detail: a compact, scan-first workspace with the official
   glass-colored GlassIcons identity at the top. */
.playlist-detail-page {
  min-height: 100%;
  padding: 0 0 84px;
  background: transparent;
}
.playlist-detail-shell {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 30px 0 72px;
}
.playlist-detail-back { margin-bottom: 26px; }
.playlist-detail-header {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px 0 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.playlist-detail-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
}
.playlist-detail-icon > span {
  width: 4.1em;
  height: 4.1em;
  display: block;
}
.playlist-detail-icon .library-glass-icon .icon-btn__back {
  background: linear-gradient(145deg, rgba(255,255,255,.28), rgba(255,255,255,.06)) !important;
  box-shadow: .5em -.5em .8em rgba(0,0,0,.34);
}
.playlist-detail-icon .library-glass-icon .icon-btn__front {
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 .1em rgba(255,255,255,.26) inset, inset 0 -12px 20px rgba(255,255,255,.035);
  backdrop-filter: blur(.9em) saturate(1.25);
  -webkit-backdrop-filter: blur(.9em) saturate(1.25);
}
.playlist-detail-icon .library-glass-icon .icon-btn__icon { color: rgba(255,255,255,.94); }
.playlist-detail-eyebrow {
  display: block;
  color: rgba(255,255,255,.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}
.playlist-detail-copy h1 {
  min-height: 44px;
  margin: 7px 0 6px;
  color: #fff;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}
.playlist-detail-copy p { color: rgba(255,255,255,.64); font-size: 13px; }
.playlist-detail-actions { display: flex; justify-content: flex-end; }
.playlist-detail-list { padding-top: 26px; }
.playlist-detail-list-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) 68px 40px;
  gap: 12px;
  padding: 0 14px 10px 76px;
  color: rgba(255,255,255,.48);
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.playlist-detail-list .track-list-container { padding: 7px 0 0; }
.playlist-detail-list .track-row { margin: 2px 0; border-radius: 10px; }

@media (max-width: 768px) {
  .playlist-detail-shell { width: calc(100% - 32px); padding-top: 18px; }
  .playlist-detail-header { grid-template-columns: 58px minmax(0,1fr); gap: 14px; padding: 14px 0 22px; }
  .playlist-detail-icon { width: 54px; height: 54px; }
  .playlist-detail-icon > span { width: 3.2em; height: 3.2em; font-size: .84rem; }
  .playlist-detail-copy h1 { min-height: 32px; font-size: 29px; }
  .playlist-detail-copy p { font-size: 12px; }
  .playlist-detail-actions { grid-column: 1 / -1; justify-content: stretch; }
  .playlist-detail-actions .library-primary-btn { width: 100%; }
  .playlist-detail-list-head { padding-left: 60px; grid-template-columns: 1fr 34px; }
  .playlist-detail-list-head span:nth-child(2) { display: none; }
}

.main-content::-webkit-scrollbar { width: 5px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 3px; }
.main-content::-webkit-scrollbar-thumb:hover { background: rgba(180, 94, 255, 0.12); }

/* 页面切换动画 */
.page {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.page.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   Hero 大横幅 — 玻璃面板
   ============================================ */
.hero-section { padding: 30px 30px 18px; }

.hero-card {
  --hero-accent-rgb: 98, 241, 243;
  --hero-accent-soft-rgb: 98, 241, 243;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-layer-3);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-highlight);
  padding: 28px 52px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  box-shadow: var(--glass-shadow-deep), var(--glass-shadow-inner);
  transition: var(--transition);
}

.hero-card #heroElectricBorderMount {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
  border-radius: inherit;
}

.hero-card #heroElectricBorderMount .electric-border {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
}

@media (min-width: 769px) {
  .hero-card {
    min-height: 332px;
    max-height: 350px;
  }
}

/* ========================================================================
   Native macOS mini player
   This must live after the BubbleMenu migration rules above.  Those rules
   intentionally hide the legacy player bar on the website, while this is a
   separate, native-sized Tauri window that reuses its reliable media controls.
   ======================================================================== */
body.native-mini-mode {
  display: block;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent !important;
}

html.native-mini-mode {
  background: transparent !important;
}

html.native-mini-mode,
html.native-mini-mode body {
  background-color: transparent !important;
}

/* Hide every web-only root layer. Keep the audio element alive so playback
   continues while the native player is the only visible surface. */
body.native-mini-mode > :not(#playerBar):not(#audioPlayer):not(script):not(link) {
  display: none !important;
}

body.native-mini-mode::after {
  display: none;
}

/* The web app owns several full-window ambient backgrounds. The native
   mini player must be genuinely isolated, with only macOS behind its glass. */
body.native-mini-mode #softAuroraHost,
body.native-mini-mode #bgGradient,
body.native-mini-mode #libraryGradientWavesMount,
body.native-mini-mode #browsePrismMount,
body.native-mini-mode #page-album-favorites,
body.native-mini-mode #albumDriftWallMount {
  display: none !important;
}

body.native-mini-mode .player-bar {
  position: fixed !important;
  inset: 0 !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 16px 22px 14px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 28px !important;
  color: #20242b !important;
  background:
    linear-gradient(126deg, rgba(239, 246, 255, 0.92) 0%, rgba(209, 222, 239, 0.83) 47%, rgba(189, 204, 223, 0.88) 100%) !important;
  box-shadow:
    0 18px 42px rgba(10, 18, 31, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(70, 86, 108, 0.08) !important;
  backdrop-filter: blur(38px) saturate(1.35) !important;
  -webkit-backdrop-filter: blur(38px) saturate(1.35) !important;
  pointer-events: auto !important;
  isolation: isolate;
  animation: native-mini-material-in 220ms cubic-bezier(.2, .8, .2, 1) both;
}

body.native-mini-mode .native-mini-drag-region {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block !important;
  cursor: grab;
  -webkit-app-region: drag;
}

body.native-mini-mode #playerBar > .native-mini-drag-region {
  display: block !important;
}

body.native-mini-mode .native-mini-drag-region:active {
  cursor: grabbing;
}

body.native-mini-mode .player-bar::before {
  display: none;
}

body.native-mini-mode .player-bar::after {
  display: none;
}

/* Restore only the player nodes the mini player actually uses. */
body.native-mini-mode #playerBar > .player-left,
body.native-mini-mode #playerBar > .player-center,
body.native-mini-mode #playerBar > .player-right {
  position: relative;
  z-index: 2;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.native-mini-mode #playerBar > .player-left {
  position: absolute;
  top: 19px;
  left: 91px;
  right: 166px;
  display: flex !important;
  width: auto !important;
  height: 62px;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

/* Custom traffic lights replace the hidden native title bar in mini mode. */
.native-mini-traffic-lights {
  display: none;
}

body.native-mini-mode .native-mini-traffic-lights.is-visible {
  position: fixed;
  z-index: 20;
  top: 25px;
  left: 25px;
  display: flex;
  z-index: 4;
  align-items: center;
  gap: 8px;
}

body.native-mini-mode #playerBar > #nativeMiniTrafficLights.is-visible {
  display: flex !important;
}

body.native-mini-mode .native-mini-traffic-light {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.42), 0 1px 2px rgba(19, 30, 45, 0.22);
  transition: transform 120ms ease, filter 120ms ease;
}

body.native-mini-mode .native-mini-traffic-light:hover {
  filter: brightness(0.94);
  transform: scale(1.12);
}

body.native-mini-mode .native-mini-traffic-light:active {
  transform: scale(0.9);
}

body.native-mini-mode .native-mini-traffic-light.is-disabled {
  cursor: default;
  pointer-events: none;
  filter: saturate(0.36) brightness(1.04);
  opacity: 0.44;
}

body.native-mini-mode .native-mini-traffic-light.is-close { background: #ff5f57; }
body.native-mini-mode .native-mini-traffic-light.is-minimize { background: #febc2e; }
body.native-mini-mode .native-mini-traffic-light.is-restore { background: #28c840; }

body.native-mini-mode .player-nowplaying,
body.native-mini-mode .player-cover {
  width: 62px !important;
  height: 62px !important;
}

body.native-mini-mode .player-cover {
  display: block !important;
  border-radius: 12px !important;
  background: rgba(87, 104, 125, 0.22);
  box-shadow: 0 7px 18px rgba(39, 53, 70, 0.22) !important;
}

body.native-mini-mode .player-cover-shadow,
body.native-mini-mode .player-preview-badge,
body.native-mini-mode #playerMore,
body.native-mini-mode #playerBubbleMount,
body.native-mini-mode .player-collapse-btn,
body.native-mini-mode .player-collapsed-label,
body.native-mini-mode #volumeBtn,
body.native-mini-mode #volumeBar,
body.native-mini-mode #fullscreenBtn {
  display: none !important;
}

body.native-mini-mode .player-info {
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
}

/* Song actions stay accessible without adding a second toolbar. */
body.native-mini-mode #playerLike,
body.native-mini-mode #fullscreenBtn {
  display: inline-flex !important;
  visibility: visible !important;
  width: 32px !important;
  height: 32px !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: rgba(42, 49, 59, 0.68) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), 0 4px 10px rgba(58, 73, 96, 0.1) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13px !important;
}

body.native-mini-mode #playerLike {
  position: fixed;
  top: 24px;
  right: 124px;
}

body.native-mini-mode #playerLike.active {
  color: #c34b68 !important;
  text-shadow: none !important;
}

body.native-mini-mode #playerLike:hover,
body.native-mini-mode #fullscreenBtn:hover {
  color: #20242a !important;
  background: rgba(255, 255, 255, 0.34) !important;
  transform: scale(1.06);
}

body.native-mini-mode .player-title {
  color: #20242a !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  font-size: 19px !important;
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-shadow: none !important;
}

body.native-mini-mode .player-artist {
  margin-top: 4px;
  color: rgba(49, 56, 66, 0.67) !important;
  font-size: 14px !important;
  font-weight: 520;
  line-height: 1.25;
  letter-spacing: 0;
}

body.native-mini-mode .player-artist::after {
  content: attr(data-album);
}

body.native-mini-mode .player-artist[data-album]:not([data-album=""])::before {
  content: ' · ';
}

body.native-mini-mode #playerBar > .player-center {
  position: absolute;
  top: 91px;
  right: 22px;
  bottom: 13px;
  left: 22px;
  display: grid !important;
  width: auto !important;
  min-width: 0;
  max-width: none !important;
  grid-template-rows: 30px 1fr;
  gap: 7px;
}

body.native-mini-mode .progress-container {
  grid-row: 1;
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  align-items: start;
  gap: 8px;
}

body.native-mini-mode .time {
  display: block !important;
  min-width: 0 !important;
  padding-top: 11px;
  color: rgba(41, 48, 58, 0.68) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 12px !important;
  font-weight: 520;
  line-height: 1;
  text-align: left;
}

body.native-mini-mode #durationTime { text-align: right; }

body.native-mini-mode .progress-bar {
  display: flex !important;
  width: 100%;
  height: 20px !important;
  min-height: 20px !important;
  align-items: center;
  background: transparent !important;
  overflow: visible;
}

body.native-mini-mode .progress-bar .slider-root {
  padding: 7px 0 !important;
}

body.native-mini-mode .progress-bar .slider-track {
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(66, 78, 95, 0.12) !important;
  box-shadow: inset 0 1px 1px rgba(40, 54, 72, 0.05) !important;
}

body.native-mini-mode .progress-bar .slider-range {
  border-radius: inherit !important;
  background: linear-gradient(90deg, rgb(var(--mini-progress-rgb, 54, 83, 116)), rgb(var(--mini-progress-light-rgb, 104, 142, 178))) !important;
  box-shadow: 0 1px 3px rgba(var(--mini-progress-rgb, 54, 83, 116), 0.28) !important;
}

body.native-mini-mode .player-controls {
  grid-row: 2;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 5vw, 52px) !important;
  min-height: 39px;
}

body.native-mini-mode #shuffleBtn,
body.native-mini-mode #prevBtn,
body.native-mini-mode #playBtn,
body.native-mini-mode #nextBtn,
body.native-mini-mode #repeatBtn {
  display: inline-flex !important;
  visibility: visible !important;
  flex: 0 0 auto;
  border: 0 !important;
  background: transparent !important;
  color: #24282f !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

body.native-mini-mode .ctrl-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  font-size: 17px !important;
}

body.native-mini-mode .ctrl-play {
  width: 42px !important;
  height: 42px !important;
  font-size: 20px !important;
}

body.native-mini-mode .ctrl-btn:hover,
body.native-mini-mode .ctrl-play:hover {
  color: #171a1f !important;
  background: rgba(45, 59, 77, 0.1) !important;
  box-shadow: none !important;
  transform: scale(1.06);
}

body.native-mini-mode .ctrl-btn:active,
body.native-mini-mode .ctrl-play:active {
  transform: scale(0.93);
}

body.native-mini-mode #playerBar > .player-right {
  position: absolute;
  top: 17px;
  right: 18px;
  display: flex !important;
  width: 68px !important;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

body.native-mini-mode #fullscreenBtn { order: -1; }

/* The one small top-right control returns to the normal app window. */
body.native-mini-mode #nativeMiniBtn {
  display: inline-flex !important;
  width: 32px !important;
  height: 32px !important;
  color: rgba(42, 49, 59, 0.56) !important;
  font-size: 13px !important;
}

body.native-mini-mode #nativeMiniBtn:hover {
  color: #20242a !important;
  background: rgba(45, 59, 77, 0.1) !important;
}

/* The queue becomes a contained glass sheet inside the mini window. */
body.native-mini-mode > #queuePanel {
  display: none !important;
}

body.native-mini-mode > #queuePanel.show {
  position: fixed !important;
  inset: 7px !important;
  z-index: 1200;
  display: flex !important;
  width: auto !important;
  height: auto !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 30px !important;
  color: #20242b !important;
  background: rgba(227, 237, 249, 0.92) !important;
  box-shadow: 0 18px 42px rgba(10, 18, 31, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(38px) saturate(1.35) !important;
  -webkit-backdrop-filter: blur(38px) saturate(1.35) !important;
  transform: none !important;
}

body.native-mini-mode #queuePanel .queue-header {
  flex: 0 0 auto;
  color: #20242b;
}

body.native-mini-mode #queuePanel .queue-header h3,
body.native-mini-mode #queuePanel .queue-count,
body.native-mini-mode #queuePanel .row-title,
body.native-mini-mode #queuePanel .row-duration {
  color: #20242b !important;
}

body.native-mini-mode #queuePanel .row-artist,
body.native-mini-mode #queuePanel .empty-state {
  color: rgba(42, 49, 59, 0.62) !important;
}

body.native-mini-mode #queuePanel .queue-list {
  overflow-y: auto;
}

body.native-mini-mode #queuePanel .track-row:hover,
body.native-mini-mode #queuePanel .track-row.playing {
  background: rgba(255, 255, 255, 0.46) !important;
}

body.native-mini-mode .player-bar.is-collapsed .player-left,
body.native-mini-mode .player-bar.is-collapsed .player-center,
body.native-mini-mode .player-bar.is-collapsed .player-right {
  display: flex !important;
}

body.native-mini-mode .player-bar.is-collapsed .player-center {
  display: grid !important;
}

@keyframes native-mini-material-in {
  from { opacity: 0; transform: scale(0.975); filter: blur(4px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.native-mini-mode .player-bar { animation: none; }
}

.hero-card:hover {
  transform: scale(1.012);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 56px rgba(180, 94, 255, 0.08),
    0 0 4px rgba(180, 94, 255, 0.12),
    var(--glass-shadow-inner);
}

/* Original homepage glass depth and moving color bed. */
.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse at 25% 15%, rgba(180, 94, 255, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 72% 55%, rgba(0, 224, 255, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(255, 61, 161, 0.10) 0%, transparent 55%);
  pointer-events: none;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), rgba(180,94,255,.22), rgba(255,255,255,.08), transparent);
  pointer-events: none;
  opacity: .8;
}

.hero-info { position: relative; z-index: 1; flex: 1; }
.hero-card .hero-info,
.hero-card .hero-art { z-index: 3; }

.hero-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(180, 94, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(180, 94, 255, 0.18);
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  color: var(--neon-purple);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  position: relative;
  font-size: 38px; font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.6px;
  line-height: 1.15;
}

.hero-title:not(.has-shiny-text) {
  color: transparent;
}

.hero-title::before {
  content: attr(data-shiny-text);
  position: absolute;
  inset: 0 auto auto 0;
  color: #fff;
  pointer-events: none;
}
.hero-title.has-shiny-text::before { display: none; }

/* Keep the original text colors while separating key copy from the animated hero. */
.hero-title .shiny-text,
.hero-play-cyan .shiny-text {
  font-weight: 760;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.54));
}

.hero-play-cyan .shiny-text {
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.48));
}

.hero-artist {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2px;
}

.hero-album {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 22px;
}

.hero-play-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 28px;
  border-radius: 24px;
  border: none;
  background: var(--neon-purple);
  color: #fff;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  letter-spacing: -0.1px;
  box-shadow: 0 0 20px rgba(180, 94, 255, 0.3);
}

.hero-play-btn:hover {
  background: var(--neon-cyan);
  box-shadow: 0 0 36px rgba(0, 224, 255, 0.4);
  transform: scale(1.05);
}

.hero-play-btn:active {
  transform: scale(0.96);
}

.hero-art {
  position: relative; z-index: 1;
  width: 276px !important; height: 276px !important;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  border: 0;
  outline: 0;
  flex-shrink: 0;
}

.hero-art::after {
  display: none;
}

.hero-art #heroElasticMeshMount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 276px;
  max-height: 276px;
}
.hero-art-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  opacity: .86;
  filter: saturate(1.08) contrast(1.04);
}
.hero-art:has(#heroElasticMeshMount canvas) .hero-art-fallback {
  display: none;
}
.hero-art #heroElasticMeshMount { z-index: 1; }

/* ============================================
   Section 标题
   ============================================ */
.section { padding: 14px 30px 22px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 21px; font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-link {
  font-size: 13px;
  color: var(--neon-purple);
  cursor: pointer; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
  transition: var(--transition-fast);
}

.section-link:hover { color: var(--neon-cyan); }

/* 首页模块操作文字与标题保持同一套高对比白色层级。 */
#page-discover .section-link,
#page-discover .section-link:hover,
#page-discover .back-btn,
#page-discover .back-btn:hover {
  color: #fff;
}

/* ============================================
   横向滚动行
   ============================================ */
.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.scroll-row::-webkit-scrollbar { height: 0; }

.scroll-loading,
.loading {
  position: relative;
  min-height: 78px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  color: transparent !important;
  font-size: 0 !important;
  background: transparent !important;
}
.scroll-loading::before,
.loading::before {
  content: '';
  position: absolute;
  inset: 14px 0;
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(255,255,255,.045) 12%, rgba(255,255,255,.13) 33%, rgba(255,255,255,.045) 54%);
  background-size: 220% 100%;
  animation: content-skeleton 1.1s ease-in-out infinite;
}
#searchSourceLabel { display: none !important; }

@keyframes content-skeleton { to { background-position: -120% 0; } }
@keyframes content-reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.content-reveal > * { animation: content-reveal .36s cubic-bezier(.2,.9,.25,1.1) both; }
.content-reveal > *:nth-child(2) { animation-delay: 35ms; }
.content-reveal > *:nth-child(3) { animation-delay: 70ms; }
.content-reveal > *:nth-child(4) { animation-delay: 105ms; }
.content-reveal > *:nth-child(n+5) { animation-delay: 140ms; }
@media (prefers-reduced-motion: reduce) {
  .scroll-loading::before,
  .loading::before,
  .content-reveal > * { animation: none; }
}

/* ============================================
   歌曲卡片 — 液态玻璃
   ============================================ */
.am-card {
  flex-shrink: 0;
  width: 168px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: all 0.15s ease;
}

.am-card:hover { transform: scale(1.03); }

.am-card .am-artwork {
  width: 168px; height: 168px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 6px;
  transition: all 0.15s ease;
}

.am-card .am-artwork img {
  width: 100%; height: 100%; object-fit: cover;
}

.am-card .am-card-title {
  font-size: 13px; font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
  letter-spacing: -0.1px;
}

.am-card .am-card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 宽卡片 — 玻璃面板 */
.am-card.wide {
  width: 290px;
  position: relative;
  display: flex; align-items: center; gap: 14px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--glass-shadow-soft), var(--glass-shadow-inner);
  transition: all 0.15s ease;
}

.recent-section .am-card.wide {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.recent-section .am-card.wide:hover {
  border-color: transparent;
}

.am-card.wide:hover {
  border-color: var(--border-highlight);
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.am-card.wide .am-artwork {
  width: 84px; height: 84px;
  border-radius: 0; margin: 0; box-shadow: none;
  flex-shrink: 0;
}

/* 宽卡片边缘折射光 */
.am-card.wide::after {
  content: '';
  position: absolute;
  left: 84px; top: 15%; bottom: 15%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
}

.am-card.wide .am-card-info { flex: 1; min-width: 0; padding-right: 14px; }
.am-card.wide .am-card-title { font-size: 14px; }

/* ============================================
   歌曲列表 — 玻璃行
   ============================================ */
.track-list-container { padding: 0 30px; }

.track-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.track-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.track-row.playing {
  background: rgba(180, 94, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 2px 0 0 var(--neon-purple), 0 0 12px rgba(180, 94, 255, 0.06);
}

/* Browse results stay visually open; only the active row receives a surface. */
.browse-results-section > .section-header {
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: inset 0 1px rgba(255,255,255,.1);
}

.browse-results-section .section-title,
.browse-results-section .row-title {
  color: #fff !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #fff !important;
}

#searchResultTitle {
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

.browse-results-section .row-artist,
.browse-results-section .row-duration {
  color: rgba(255,255,255,.68) !important;
}

.browse-results-section .track-row.playing {
  background: transparent !important;
  box-shadow: none !important;
}

.browse-results-section .track-row.playing > .glass-surface-mount .glass-surface {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.16) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 8px 24px rgba(0,0,0,.16) !important;
}

.track-row .row-cover {
  width: 46px; height: 46px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}

.track-row .row-info { flex: 1; min-width: 0; }

.track-row .row-title {
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.1px;
}

.track-row .row-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.track-row .row-duration {
  font-size: 12px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.track-row .row-actions {
  display: flex; gap: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.track-row:hover .row-actions { opacity: 1; }

.track-row .row-action-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-fast);
  display: flex; align-items: center; justify-content: center;
}

.track-row .row-action-btn:hover {
  color: var(--neon-purple);
  background: rgba(180, 94, 255, 0.1);
}

.track-row .row-action-btn.liked { color: var(--neon-pink); }

/* ============================================
   专辑歌曲列表
   ============================================ */
.album-tracks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.album-tracks-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.album-play-all-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--neon-purple);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px rgba(180, 94, 255, 0.25);
}

.album-play-all-btn:hover {
  background: var(--neon-pink);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 61, 161, 0.35);
}

.album-play-all-btn:active {
  transform: scale(0.98);
}

.album-tracks-list {
  padding: 8px 0;
}

.album-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 8px;
  margin: 0 12px;
}

.album-track-row:hover {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.album-track-row.playing {
  background: rgba(180, 94, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.album-track-row.playing .album-track-title {
  color: var(--neon-purple);
}

.album-track-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.album-track-number {
  width: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

.album-track-info {
  flex: 1;
  min-width: 0;
}

.album-track-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}

.album-track-artist {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-track-right {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.album-track-row:hover .album-track-right {
  opacity: 1;
}

.album-track-duration {
  font-size: 14px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  min-width: 45px;
  text-align: right;
}

.album-track-more {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.15s ease;
  opacity: 0;
}

.album-track-row:hover .album-track-more {
  opacity: 1;
}

.album-track-more:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* 双曲指示器 */
.track-playing-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  padding: 0 4px;
}

.track-playing-indicator span {
  display: block;
  width: 3px;
  background: var(--neon-purple);
  border-radius: 2px;
  animation: equalizer 0.8s ease-in-out infinite;
}

.track-playing-indicator span:nth-child(1) { height: 6px; animation-delay: 0s; }
.track-playing-indicator span:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.track-playing-indicator span:nth-child(3) { height: 8px; animation-delay: 0.4s; }

@keyframes equalizer {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* 歌曲选项菜单 — 厚度玻璃 */
.track-options-menu {
  background: rgba(18, 18, 34, 0.9);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 6px;
  min-width: 180px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 1000;
  animation: menuFadeIn 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.track-options-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.track-options-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.track-options-item i {
  width: 18px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.track-options-item:hover i {
  color: var(--neon-purple);
}

.glass-surface-host.track-options-menu {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}
.glass-surface-host.track-options-menu > .glass-surface-mount .glass-surface {
  background: rgba(255, 255, 255, .13) !important;
  border: 0 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.26), 0 16px 48px rgba(0,0,0,.28) !important;
}
.glass-surface-host.track-options-menu .track-options-item { position: relative; z-index: 1; }

/* ============================================
   搜索页
   ============================================ */
.search-hero { padding: 30px 30px 18px; }

.search-hero h1 {
  font-size: 30px; font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-radius: 14px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow-soft), var(--glass-shadow-inner);
  transition: var(--transition-fast);
}

.search-box:focus-within {
  border-color: rgba(180, 94, 255, 0.3);
  box-shadow: 0 0 24px rgba(180, 94, 255, 0.12), var(--glass-shadow-inner);
}

.search-box i { color: var(--text-tertiary); font-size: 16px; }

.search-box input {
  flex: 1;
  border: none; outline: none; background: none;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  letter-spacing: -0.1px;
}

.search-box input::placeholder { color: var(--text-tertiary); }

.search-clear {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* 搜索自动补全下拉 */
.search-box { position: relative; }

.search-autocomplete {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 6px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), var(--glass-shadow-inner);
  overflow: hidden;
  z-index: 100;
  max-height: 360px;
  overflow-y: auto;
}

.auto-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s;
}

.auto-item:hover,
.auto-item.active {
  background: rgba(180, 94, 255, 0.1);
}

.auto-item-cover {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--glass-2);
  flex-shrink: 0;
}

.auto-item-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}

.auto-item-name {
  font-size: 14px; font-weight: 500;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.auto-item-artist {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.auto-item-icon {
  width: 40px; height: 40px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-2);
  color: var(--text-tertiary);
  font-size: 16px;
  flex-shrink: 0;
}

/* 建议标签 */
.suggestion-chips {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 0 30px 18px;
}

.suggestion-chip {
  padding: 9px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  color: var(--text);
  font-size: 13px; cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  box-shadow: var(--glass-shadow-soft);
}

.suggestion-chip:hover {
  border-color: rgba(180, 94, 255, 0.25);
  background: rgba(180, 94, 255, 0.1);
  box-shadow: 0 0 14px rgba(180, 94, 255, 0.12);
}

/* ============================================
   收藏 / 歌单 页面
   ============================================ */
.page-hero { padding: 30px; text-align: center; margin-bottom: 2px; }

.fav-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  margin-bottom: 18px;
  box-shadow:
    0 0 32px rgba(180, 94, 255, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.page-hero h1 {
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.4px;
}

.page-hero p { color: var(--text-secondary); margin-top: 4px; font-size: 14px; }

.btn-create {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 30px 20px;
  padding: 10px 22px;
  border-radius: 22px;
  border: 1px solid var(--border-highlight);
  background: var(--glass-layer-3);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  color: var(--neon-purple);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  box-shadow: var(--glass-shadow-soft);
}

.btn-create:hover {
  background: rgba(180, 94, 255, 0.12);
  border-color: rgba(180, 94, 255, 0.25);
  box-shadow: 0 0 20px rgba(180, 94, 255, 0.15);
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  padding: 0 30px;
}

.playlist-card {
  background: var(--glass-layer-3);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--glass-shadow-soft), var(--glass-shadow-inner);
}

.playlist-card:hover {
  border-color: var(--border-highlight);
  transform: scale(1.02);
  box-shadow:
    0 12px 40px rgba(180, 94, 255, 0.08),
    0 0 2px rgba(180, 94, 255, 0.08);
}

.playlist-card .pl-cover {
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  color: rgba(255,255,255,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.playlist-card .pl-name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.playlist-card .pl-count {
  font-size: 12px; color: var(--text-secondary); margin-top: 2px;
}

.playlist-card .pl-delete {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer; font-size: 13px;
  transition: var(--transition-fast);
  float: right; margin-top: 4px;
}

.playlist-card .pl-delete:hover { color: var(--neon-pink); }

/* 返回按钮 — 玻璃 */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  color: var(--neon-purple);
  font-size: 13px; cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  margin-bottom: 6px;
  box-shadow: var(--glass-shadow-soft);
}

.back-btn:hover {
  background: rgba(180, 94, 255, 0.1);
  border-color: rgba(180, 94, 255, 0.2);
}

/* 专辑详情 header */
.album-detail-header {
  padding: 24px 30px 0;
}

.album-detail-info {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: 16px;
}

.album-detail-cover {
  width: 200px;
  height: 200px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow:
    0 16px 48px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.album-detail-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
}

.album-detail-meta {
  flex: 1;
  min-width: 0;
}

.album-detail-type {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.album-detail-meta h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -0.4px;
}

.album-detail-meta p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 2px;
}

.album-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.album-fav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
}

.album-fav-btn:hover {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

.album-fav-btn.active {
  background: var(--neon-pink);
  color: #fff;
  border-color: transparent;
}

.empty-state {
  text-align: center;
  color: var(--text-tertiary);
  padding: 60px 20px;
  font-size: 14px;
}

/* ============================================
   播放器栏 — 中等厚度液态玻璃 + 折射
   ============================================ */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-height);
  /* 真正的液态玻璃 - 多层半透明叠加 */
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.08) 0%, 
      rgba(255, 255, 255, 0.02) 50%, 
      rgba(180, 94, 255, 0.04) 100%);
  backdrop-filter: blur(60px) saturate(2) brightness(1.08);
  -webkit-backdrop-filter: blur(60px) saturate(2) brightness(1.08);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 20px;
  z-index: 100;
  /* 玻璃阴影 */
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.25),
    /* 顶部高光 */
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    /* 底部环境光 */
    0 0 60px rgba(180, 94, 255, 0.08);
  transition: all 0.3s ease;
}

/* 播放器栏顶部液态玻璃折射高光 */
.player-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 20%, 
    rgba(255, 255, 255, 0.15) 50%, 
    rgba(255, 255, 255, 0.1) 80%, 
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* 播放器栏底部环境光 */
.player-bar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100%;
  background: linear-gradient(to top, 
    rgba(180, 94, 255, 0.03) 0%, 
    transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* 播放器栏顶部折射高光线 */
.player-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 5%,
    rgba(255, 255, 255, 0.06) 15%,
    rgba(180, 94, 255, 0.12) 30%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(180, 94, 255, 0.1) 70%,
    rgba(255, 255, 255, 0.04) 85%,
    transparent 95%
  );
  pointer-events: none;
}

.player-left {
  display: flex; align-items: center; gap: 14px;
  width: 280px; flex-shrink: 0;
}

.player-nowplaying {
  position: relative;
  width: 46px; height: 46px;
  flex-shrink: 0;
}

.player-cover {
  width: 46px; height: 46px;
  border-radius: 8px;
  object-fit: cover;
  position: relative; z-index: 1;
  box-shadow:
    0 2px 12px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.player-cover-shadow {
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  filter: blur(24px) saturate(3.5) brightness(1.3);
  opacity: 0.4;
  z-index: 0;
  transition: all 0.8s ease;
}

.player-info { flex: 1; min-width: 0; }

.player-title {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.1px;
}

.player-artist {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-like, .player-more {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer; font-size: 14px;
  transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}

.player-like:hover, .player-more:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: scale(1.1);
}

.player-like:active, .player-more:active {
  transform: scale(0.9);
  transition: transform 0.1s ease;
}

.player-like.active {
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 61, 161, 0.45);
}

.player-center {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 5px;
}

.player-controls {
  display: flex; align-items: center; gap: 22px;
}

.ctrl-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer; font-size: 14px;
  transition: all 0.12s ease;
  display: flex; align-items: center; justify-content: center;
}

.ctrl-btn:hover {
  color: var(--neon-purple);
  background: rgba(180, 94, 255, 0.08);
  text-shadow: 0 0 10px rgba(180, 94, 255, 0.3);
  transform: scale(1.12);
}

.ctrl-btn:active {
  transform: scale(0.88);
  transition: transform 0.1s ease;
}

.ctrl-play {
  width: 40px; height: 40px;
  background: var(--neon-purple);
  color: #fff;
  font-size: 14px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(180, 94, 255, 0.4);
  transition: all 0.15s ease;
}

.ctrl-play:hover {
  background: var(--neon-cyan);
  box-shadow: 0 0 36px rgba(0, 224, 255, 0.55);
  transform: scale(1.12);
  color: #fff;
}

.ctrl-play:active {
  transform: scale(0.94);
  transition: transform 0.1s ease;
}

.ctrl-btn.active {
  color: var(--neon-purple);
  text-shadow: 0 0 8px rgba(180, 94, 255, 0.3);
}

.progress-container {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 540px;
}

.time {
  font-size: 10px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  min-width: 32px; text-align: center;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-bar:hover { height: 6px; }

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(180, 94, 255, 0.3);
}

.progress-thumb {
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px rgba(180, 94, 255, 0.5), 0 2px 6px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.progress-bar:hover .progress-thumb { opacity: 1; }

.player-right {
  display: flex; align-items: center; gap: 8px;
  width: 280px; flex-shrink: 0;
  justify-content: flex-end;
}

.volume-bar {
  width: 84px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  cursor: pointer; position: relative;
}

.volume-bar:hover { height: 6px; }

.volume-fill {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  width: 70%;
}

.volume-thumb {
  position: absolute; top: 50%; left: 70%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.volume-bar:hover .volume-thumb { opacity: 1; }

/* ============================================
   侧边面板（队列 / 歌词） — 厚重液态玻璃
   ============================================ */
.queue-panel, .lyrics-panel {
  position: fixed;
  right: 0; top: 0; bottom: var(--player-height);
  width: 370px;
  background: var(--glass-layer-1);
  backdrop-filter: blur(var(--glass-blur-1)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur-1)) saturate(1.6);
  border-left: 1px solid var(--border-highlight);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.04, 0.12, 1), background-color 0.5s ease;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 40px rgba(0, 0, 0, 0.3);
}

/* 面板边缘折射条 */
.queue-panel::before, .lyrics-panel::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(180, 94, 255, 0.4) 0%,
    rgba(180, 94, 255, 0.15) 20%,
    rgba(0, 224, 255, 0.2) 50%,
    rgba(255, 61, 161, 0.1) 80%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0.5;
}

/* 面板顶部折射光 */
.queue-panel::after, .lyrics-panel::after {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
}

.queue-panel.show, .lyrics-panel.show { transform: translateX(0); }

.queue-header, .lyrics-header {
  display: flex; align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 8px;
}

.queue-header h3, .lyrics-header h3 { font-size: 16px; font-weight: 600; flex: 1; }

.queue-count { font-size: 13px; color: var(--text-secondary); }

.queue-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: pointer; font-size: 16px;
  transition: var(--transition-fast);
  display: flex; align-items: center; justify-content: center;
}

.queue-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.queue-list, .lyrics-content {
  flex: 1; overflow-y: auto;
  padding: 14px;
}

.lyrics-content {
  padding: 34px 24px;
  line-height: 2.6;
  font-size: 14px; text-align: center;
  color: var(--text-secondary);
  scroll-behavior: smooth;
}

.lyrics-content .lyric-line {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px 0;
  opacity: 0.42;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.lyrics-content .lyric-text { display: block; }

.lyrics-content .lyric-ttext {
  display: block;
  font-size: 0.85em;
  opacity: 0.55;
  color: var(--neon-cyan);
}

.lyrics-content .lyric-line.active .lyric-text {
  color: var(--neon-purple);
  font-size: 18px; font-weight: 700;
  opacity: 1;
  text-shadow: 0 0 18px var(--accent-glow), 0 0 4px var(--neon-purple);
  transform: scale(1.04);
}

.lyrics-content .lyric-line.active .lyric-ttext {
  font-size: 14px;
  opacity: 0.75;
  color: var(--neon-cyan);
}

.show-all-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.top-dock__client-entry .specular-button__label {
  position: absolute !important;
  top: 50%;
  left: 50%;
  z-index: 2;
  margin: 0;
  font-size: 11px;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.top-dock__client-content { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.top-dock__client-icon { color: inherit; font-size: 11px; flex: 0 0 16px; }
#topDockClientMount { display: flex; align-items: center; margin-left: auto; }
button.top-dock__client-entry {
  width: 132px !important;
  min-width: 132px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  margin-left: 0 !important;
}

.show-all-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--neon-purple);
  border-color: rgba(180, 94, 255, 0.2);
}

.lyrics-panel.expanded .lyrics-content {
  padding: 24px 24px;
  line-height: 2.2;
  font-size: 14px;
}

.lyrics-panel.expanded .lyrics-content .lyric-line.active {
  font-size: 14px;
}

/* ============================================
   Toast — 玻璃通知
   ============================================ */
.toast {
  position: fixed;
  bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  padding: 11px 24px;
  border-radius: 24px;
  font-size: 13px; font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: var(--transition-fast);
  pointer-events: none;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   弹窗 — 厚重玻璃
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  z-index: 150;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
  background: var(--glass-layer-1);
  backdrop-filter: blur(36px) saturate(1.6);
  -webkit-backdrop-filter: blur(36px) saturate(1.6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-highlight);
  padding: 30px;
  width: 420px;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 32px rgba(180, 94, 255, 0.06);
  transition: background-color 0.5s ease;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal h3 {
  font-size: 19px; font-weight: 700;
  margin-bottom: 22px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-size: 14px; outline: none;
  margin-bottom: 26px;
  font-family: inherit;
  transition: var(--transition-fast);
}

.modal input:focus {
  border-color: rgba(180, 94, 255, 0.3);
  box-shadow: 0 0 16px rgba(180, 94, 255, 0.1);
}

.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

.btn-cancel {
  padding: 11px 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-secondary);
  cursor: pointer; font-size: 14px;
  transition: var(--transition-fast);
  font-family: inherit;
}

.btn-cancel:hover { background: rgba(255,255,255,0.08); }

.btn-save {
  padding: 11px 26px;
  border-radius: 22px;
  border: none;
  background: var(--neon-purple);
  color: #fff;
  cursor: pointer; font-size: 14px; font-weight: 600;
  transition: var(--transition-fast);
  font-family: inherit;
  box-shadow: 0 0 18px rgba(180, 94, 255, 0.3);
}

.btn-save:hover {
  background: var(--neon-cyan);
  box-shadow: 0 0 28px rgba(0, 224, 255, 0.4);
}

.modal-lg { width: 500px; max-width: 90vw; }

/* 设置面板 */
.settings-section { margin-bottom: 22px; }

.settings-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.settings-label .label-hint {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 11px;
}

/* 音源选择标签 — 玻璃 */
.source-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.source-tabs::-webkit-scrollbar { display: none; }

.source-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
  font-family: inherit;
  box-shadow: var(--glass-shadow-soft);
}

.source-tab:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-color: var(--border-highlight);
}

.source-tab.active {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(180, 94, 255, 0.35);
}

.source-tab i { font-size: 12px; }

/* 设置弹窗中的音源标签 */
.settings-section .source-tab {
  flex: 1;
  padding: 13px 16px;
  border-radius: 13px;
  text-align: left;
  position: relative;
}

.settings-section .source-tab i { font-size: 18px; }

.settings-section .source-tab .source-badge {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 600;
  background: rgba(180, 94, 255, 0.12);
  color: var(--neon-purple);
}

.settings-section .source-tab.active .source-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.settings-section .source-tab.active {
  background: rgba(180, 94, 255, 0.12);
  border-color: rgba(180, 94, 255, 0.25);
  color: var(--neon-purple);
  box-shadow: 0 0 16px rgba(180, 94, 255, 0.15);
}

.settings-hint {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
  font-size: 12px;
}

.settings-hint a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: var(--transition-fast);
}

.settings-hint a:hover { text-decoration: underline; }

.hint-divider { color: var(--text-tertiary); }

.hint-status {
  color: var(--text-tertiary);
  font-size: 11px;
}

.hint-status.set { color: var(--neon-green); }

/* 预览标记 */
.track-preview-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(255, 171, 0, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffab00;
  margin-left: 4px;
  white-space: nowrap;
}

.player-preview-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 600;
  background: rgba(255, 171, 0, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffab00;
  display: inline-block;
  margin-top: 4px;
  animation: previewPulse 2s ease-in-out infinite;
}

@keyframes previewPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ====== 视图切换按钮 ====== */
.view-toggle {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.view-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--glass-layer-3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.view-btn:hover {
  border-color: var(--border-highlight);
  color: var(--text);
}

.view-btn.active {
  background: rgba(180, 94, 255, 0.12);
  border-color: rgba(180, 94, 255, 0.25);
  color: var(--neon-purple);
}

/* ====== Loading ====== */
@keyframes spin { to { transform: rotate(360deg); } }

.loading {
  display: block;
  min-height: 78px;
  padding: 0;
  color: transparent !important;
  gap: 0;
  font-size: 0 !important;
  background: transparent !important;
}

.loading i { animation: spin 1s linear infinite; }

/* ====== YouTube 隐藏播放器 ====== */
#ytPlayerContainer {
  position: fixed;
  bottom: 0; right: 0;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

#ytPlayer { width: 1px; height: 1px; }

/* ====== 本地音乐上传区 ====== */
.local-upload-area {
  margin: 0 30px 20px;
  padding: 40px;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s ease;
  background: var(--glass-layer-3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.local-upload-area:hover {
  border-color: rgba(180, 94, 255, 0.2);
  background: rgba(180, 94, 255, 0.05);
}

.local-upload-area i {
  font-size: 24px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.local-upload-area p {
  color: var(--text-secondary);
  font-size: 14px;
}

.local-upload-area .upload-link {
  color: var(--neon-purple);
  cursor: pointer;
}

.local-upload-area .upload-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* 存储信息栏 */
.storage-info {
  margin: 0 30px 16px;
  padding: 14px 18px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.storage-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-bottom: 2px;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.storage-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.storage-refresh {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.storage-refresh:hover {
  color: var(--neon-purple);
  background: rgba(180, 94, 255, 0.1);
}

/* ====== 专辑网格 ====== */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 20px;
  padding: 0 30px;
}

/* 专辑收藏卡片 */
.album-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--glass-layer-3);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.32, 0.04, 0.12, 1);
  overflow: hidden;
}

/* 玻璃边缘折射 */
.album-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.06) 0%,
    transparent 50%,
    rgba(180,94,255,0.04) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* 顶部高光线 */
.album-card::after {
  content: '';
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.12) 30%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.12) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 3;
}

.album-card:hover {
  transform: scale(1.04);
  border-color: var(--border-highlight);
  box-shadow:
    0 8px 32px rgba(180, 94, 255, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.2),
    var(--glass-shadow-soft);
}

.album-card-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
}

.album-card:hover .album-card-cover {
  box-shadow:
    0 6px 24px rgba(180, 94, 255, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

/* 封面玻璃镀层 */
.album-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.08) 0%,
    transparent 40%,
    rgba(0,0,0,0.1) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.album-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.album-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-artist {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-meta {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* 删除按钮 */
.album-card-delete {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.album-card:hover .album-card-delete {
  opacity: 1;
  transform: scale(1);
}

.album-card-delete:hover {
  background: rgba(255, 60, 60, 0.7);
  color: #fff;
  border-color: rgba(255,60,60,0.4);
}

/* ====== Cover Flow — 实体专辑封套 (Vinyl Sleeve 风格) ====== */
.cover-flow-container {
  position: relative;
  width: 100%;
  height: min(650px, calc(100dvh - 220px));
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 0 20px;
}

/* GridScan is the Cover Flow-only background. Keep every existing Cover Flow
   control above the shader and prevent the canvas from stealing drag input. */
#coverFlowGridScanMount {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #070511;
  pointer-events: none;
}
#coverFlowGridScanMount .gridscan,
#coverFlowGridScanMount canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
#coverFlowGridScanMount .gridscan { pointer-events: auto; }
#coverFlowGridScanMount canvas { opacity: .72; }
.cover-flow-container > .cover-flow-stage,
.cover-flow-container > .cover-flow-reflection,
.cover-flow-container > .cover-flow-info,
.cover-flow-container > .cover-flow-hint { z-index: 2; }

/* 3D 舞台 */
.cover-flow-stage {
  position: relative;
  width: 100%;
  height: 272px;
  transform-style: preserve-3d;
  margin-top: 0;
}

/* ====== 实体封套卡片 ====== */
.cf-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200px;
  height: 200px;
  margin-left: -100px;
  margin-top: -100px;
  transform-style: preserve-3d;
  cursor: pointer;
  will-change: transform, opacity;
}

/* ---- 正面封面 ---- */
.cf-front {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translateZ(8px);
  border: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* 提升图像清晰度：抗锯齿 + 高质量渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cf-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
  /* 高质量图像渲染，去除模糊优化 */
  image-rendering: auto;
  image-rendering: high-quality;
  image-rendering: -webkit-optimize-quality;
  -webkit-font-smoothing: antialiased;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* 防止 GPU 层亚像素模糊 */
  transform: translateZ(0);
  will-change: transform;
}

/* ---- 外封塑料高光 ---- */
.cf-glare {
  position: absolute;
  inset: 0;
  transform: translateZ(8.5px);
  pointer-events: none;
  z-index: 5;
  background:
    /* 对角大反光 */
    linear-gradient(
      140deg,
      rgba(255,255,255,0.1) 0%,
      rgba(255,255,255,0.02) 20%,
      transparent 40%,
      transparent 65%,
      rgba(255,255,255,0.03) 82%,
      rgba(255,255,255,0.06) 100%
    ),
    /* 底部暗角 */
    linear-gradient(
      to bottom,
      transparent 75%,
      rgba(0,0,0,0.06) 100%
    );
}

/* 居中专辑加强高光 */
.cf-item.cf-active .cf-glare {
  background:
    linear-gradient(
      140deg,
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0.04) 22%,
      transparent 42%,
      transparent 62%,
      rgba(255,255,255,0.04) 84%,
      rgba(255,255,255,0.08) 100%
    ),
    linear-gradient(
      to bottom,
      transparent 75%,
      rgba(0,0,0,0.04) 100%
    );
}

/* ---- 内页纸张边缘 ---- */
.cf-paper-edge {
  position: absolute;
  inset: 0;
  transform: translateZ(7px);
  pointer-events: none;
  z-index: 1;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(220,215,200,0.02) 3px,
      rgba(220,215,200,0.02) 4px
    );
}

/* ====== 专辑脊 (spine) — 侧面可见的厚度 ====== */
.cf-spine {
  position: absolute;
  background: 
    linear-gradient(
      to bottom,
      rgba(80,72,60,0.85) 0%,
      rgba(90,82,70,0.8) 15%,
      rgba(100,92,78,0.72) 50%,
      rgba(88,80,68,0.8) 85%,
      rgba(76,68,56,0.85) 100%
    );
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* 右侧脊 — 当专辑左旋时可见 */
.cf-spine-r {
  right: 0;
  top: 0;
  bottom: 0;
  width: 16px;
  border-radius: 0 2px 2px 0;
  transform: rotateY(-90deg);
  transform-origin: right center;
}

/* 左侧脊 — 当专辑右旋时可见 */
.cf-spine-l {
  left: 0;
  top: 0;
  bottom: 0;
  width: 16px;
  border-radius: 2px 0 0 2px;
  transform: rotateY(90deg);
  transform-origin: left center;
}

/* 顶脊 */
.cf-spine-t {
  left: 0;
  right: 0;
  top: 0;
  height: 16px;
  border-radius: 2px 2px 0 0;
  transform: rotateX(90deg);
  transform-origin: top center;
}

/* 底脊 */
.cf-spine-b {
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  border-radius: 0 0 2px 2px;
  transform: rotateX(-90deg);
  transform-origin: bottom center;
}

/* 脊上的专辑名文字 */
.cf-spine-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  font-size: 8px;
  font-weight: 600;
  color: rgba(200,195,180,0.5);
  white-space: nowrap;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 居中专辑脊加强 */
.cf-item.cf-active .cf-spine {
  background: 
    linear-gradient(
      to bottom,
      rgba(40,34,28,0.94) 0%,
      rgba(50,44,38,0.9) 15%,
      rgba(60,52,44,0.85) 50%,
      rgba(45,38,32,0.9) 85%,
      rgba(34,28,24,0.94) 100%
    );
}

/* ====== 倒影区域 ====== */
.cover-flow-reflection {
  position: relative;
  width: 100%;
  height: 138px;
  transform-style: preserve-3d;
  perspective: 1000px;
  margin-top: -5px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
}

.cf-reflection-item {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 200px;
  height: 200px;
  margin-left: -100px;
  border-radius: 2px;
  overflow: hidden;
  will-change: transform, opacity;
}

.cf-reflection-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleY(-1) translateZ(0);
  opacity: 0.5;
  image-rendering: auto;
  image-rendering: high-quality;
  image-rendering: -webkit-optimize-quality;
}

/* ====== 底部信息 ====== */
.cover-flow-info {
  text-align: center;
  padding: 12px 20px;
  z-index: 10;
  position: relative;
}

.cover-flow-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  letter-spacing: -0.2px;
}

.cover-flow-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .cover-flow-container {
    height: min(580px, calc(100dvh - 190px));
    min-height: 450px;
    padding: 0 8px;
  }
  .cover-flow-stage { height: 222px; }
  .cf-item,
  .cf-reflection-item {
    width: 168px;
    height: 168px;
    margin-left: -84px;
  }
  .cf-item { margin-top: -84px; }
  .cover-flow-reflection { height: 114px; }
}

/* ====== 点击提示 ====== */
.cover-flow-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px;
  border-radius: 20px;
  background: rgba(180, 94, 255, 0.15);
  border: 1px solid rgba(180, 94, 255, 0.2);
  color: rgba(180, 94, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 15;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 浅色主题 */
[data-theme="light"] .cf-front {
  box-shadow:
    0 2px 0 rgba(0,0,0,0.04),
    0 4px 0 rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .cf-spine {
  background: 
    linear-gradient(
      to bottom,
      rgba(140,130,115,0.9) 0%,
      rgba(155,145,130,0.85) 15%,
      rgba(170,158,142,0.78) 50%,
      rgba(150,140,125,0.85) 85%,
      rgba(135,125,110,0.9) 100%
    );
}

[data-theme="light"] .cf-spine-text {
  color: rgba(80,72,60,0.5);
}

[data-theme="light"] .cf-paper-edge {
  border-color: rgba(180,170,155,0.15);
}

[data-theme="light"] .cover-flow-hint {
  background: rgba(180, 94, 255, 0.1);
  border-color: rgba(180, 94, 255, 0.15);
}

/* ====== Apple Music 全屏播放器 — 液态玻璃 ====== */
.amp-fullscreen-player {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  /* Keep the old page out of sight while the WebGL texture is loading. */
  isolation: isolate;
  overflow: hidden;
  background: rgb(var(--amp-accent-dark-rgb, 12, 10, 28));
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  /* Safari GPU 合成 — 防止方块闪烁 */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  will-change: transform, opacity;
  transition: transform 0.45s cubic-bezier(0.32, 0.04, 0.12, 1),
              opacity   0.45s cubic-bezier(0.32, 0.04, 0.12, 1);
}

.amp-fullscreen-player.show {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
}

.amp-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
}

.amp-header-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.amp-header-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(var(--amp-accent-rgb, 255, 255, 255), 0.3);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(var(--amp-accent-rgb, 0, 0, 0), 0.25);
}

.amp-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.amp-header-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.amp-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 16px 8px;
}

/* 专辑封面容器 */
.amp-artwork-wrapper {
  width: min(220px, 50vw);
  aspect-ratio: 1;
  margin-bottom: 6px;
  perspective: 800px;
  position: relative;
}

/* 音波频谱 Canvas — 固定定位，JS 动态对齐封面，不影响布局 */

.amp-artwork {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(180, 94, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.5s ease;
}

.amp-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 专辑封面玻璃镀层 */
.amp-artwork::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 35%,
    transparent 65%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

/* ═══════════════════════════════════════════════
   全屏歌词 — Apple Music 风格增强版
   ═══════════════════════════════════════════════ */

/* ── 呼吸发光动画 — 仅放大，不加阴影 ── */
@keyframes lyricScaleBreathe {
  0%, 100% { transform: scale(1.06); }
  50% { transform: scale(1.10); }
}

/* 封面和歌词的显示/隐藏切换 */
.amp-artwork-wrapper.hidden,
.amp-lyrics-view.hidden {
  display: none;
}

/* 歌词视图：替换封面的 flex 子元素，原生滚动 */
.amp-lyrics-view {
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.amp-lyrics-view::-webkit-scrollbar { display: none; }

/* 让歌词行本身可以点击/交互 */
.amp-lyrics-line {
  pointer-events: auto;
}

/* 歌词舞台：flex 列，元素自然排列 */
.amp-lyrics-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}

/* 上下留白 spacer — JS 动态设置高度 */
.amp-lyrics-spacer {
  flex-shrink: 0;
  width: 100%;
}

.amp-lyrics-empty {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  padding: 48px 24px;
  opacity: 0.7;
}

/* ═════════ 歌词行 ═════ */

/* ── 基准行（隐藏）── */
.amp-lyrics-line {
  display: none;
  position: relative;
  text-align: center;
  cursor: default;
  max-width: 88%;
}

.amp-lyrics-line .lyric-text {
  display: block;
}

/* ── 距离 2 行及以上：隐藏 ── */
.amp-lyrics-line.far-2 {
  display: none;
}

/* ── 距离 1 行：邻近 ── */
.amp-lyrics-line.near {
  display: block;
  opacity: 0.45;
  font-size: 14px;
  font-weight: 450;
  padding: 4px 24px;
  color: rgba(255,255,255,0.5);
  transition: all 0.4s ease;
}

/* ═════ 当前行 — 主角：完全可见 ═════ */
.amp-lyrics-line.active {
  display: block;
  opacity: 1;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.2px;
  padding: 12px 32px;
  transform: scale(1.04);
  position: relative;
  line-height: 1.4;
  transition: all 0.4s ease;
}

/* 当前行文字主题色渐变填充 — 用 background-position 实现丝滑过渡 */
.amp-lyrics-line.active .lyric-text {
  background: linear-gradient(
    to right,
    var(--amp-accent, #b45eff) 50%,
    #ffffff 50%
  );
  background-size: 200% 100%;
  background-position: calc((100 - var(--lyric-progress, 0)) * 1%) 0;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background-position 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  text-shadow: 0 0 30px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.5);
}

/* 活跃行左侧指示点 — 干净小点 */
.amp-lyrics-line.active::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amp-accent, #b45eff);
}

/* 翻译行 */
.amp-lyrics-line .lyric-ttext {
  display: block;
  font-size: 0.55em;
  font-weight: 400;
  color: inherit;
  opacity: 0.65;
  margin-top: 4px;
  letter-spacing: 0.25px;
}

.amp-lyrics-line.active .lyric-ttext {
  opacity: 0.52;
  font-size: 0.40em;
  margin-top: 6px;
}

/* 歌曲信息区 */
.amp-info-section {
  width: 100%;
  max-width: 380px;
}

.amp-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.amp-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.amp-like-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.amp-like-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
  color: #fff;
}

.amp-like-btn.active {
  background: rgba(255, 61, 161, 0.2);
  border-color: rgba(255, 61, 161, 0.4);
  color: var(--neon-pink);
  text-shadow: 0 0 16px rgba(255, 61, 161, 0.5);
  box-shadow: 0 0 16px rgba(255, 61, 161, 0.25);
}

.amp-artist {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2px;
}

.amp-album {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-top: 4px;
  transition: color 0.15s ease;
}

.amp-album:hover {
  color: var(--neon-purple);
}

/* 全屏进度条 */
.amp-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.amp-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
  font-weight: 500;
}

.amp-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.amp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amp-accent, var(--neon-purple)), var(--amp-accent-light, var(--neon-cyan)));
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.4);
}

.amp-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.amp-progress-bar:active .amp-progress-thumb,
.amp-progress-bar:hover .amp-progress-thumb {
  opacity: 1;
}

/* 全屏播放控件 */
.amp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2px;
}

.amp-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.amp-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(var(--amp-accent-rgb, 180, 94, 255), 0.4);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 4px 16px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.3);
}

.amp-ctrl-btn.active {
  background: rgba(var(--amp-accent-rgb, 180, 94, 255), 0.2);
  border-color: rgba(var(--amp-accent-rgb, 180, 94, 255), 0.4);
  color: var(--amp-accent, var(--neon-purple));
  box-shadow: 0 0 14px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.3);
}

.amp-ctrl-btn.active:hover {
  background: rgba(var(--amp-accent-rgb, 180, 94, 255), 0.3);
  box-shadow: 0 0 22px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.45);
}

.amp-play-btn {
  width: 52px;
  height: 52px;
  background: rgba(var(--amp-accent-rgb, 180, 94, 255), 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 32px;
  border-radius: 50%;
  box-shadow:
    0 0 24px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.3),
    0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
}

.amp-play-btn:hover {
  background: rgba(var(--amp-accent-rgb, 180, 94, 255), 0.55);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow:
    0 0 36px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.45),
    0 4px 24px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
  color: #fff;
}

/* 底部操作区 */
.amp-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.amp-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.amp-action-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* 极简模式：仅保留进度条 / 歌词 / 上下一首 */
.amp-header { justify-content: flex-start; padding: 16px 20px; }
.amp-header-center { display: none; }
#ampMoreBtn { display: none; }
.amp-like-btn { display: none; }
#ampShuffleBtn { display: none; }
/* .amp-play-btn 保留 */
#ampRepeatBtn { display: none; }
#ampQueueBtn { display: none; }
#ampAirplayBtn { display: none; }
#ampShareBtn { display: none; }
.amp-artist { margin-bottom: 28px; }
.amp-controls { gap: 40px; margin-bottom: 6px; }
.amp-song-info { text-align: center; }
#ampLyricsBtn { display: none; }
.amp-bottom-actions { display: none; }

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

/* ---- 移动端顶部栏（默认隐藏） ---- */
.mobile-topbar {
  display: none;
}

/* ---- 移动端 < 768px ---- */
@media (max-width: 768px) {
  /* 隐藏侧边栏 */
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.04, 0.12, 1);
    border-right: 1px solid var(--border-highlight);
    box-shadow: 4px 0 32px rgba(0,0,0,0.4);
  }
  .sidebar.show { transform: translateX(0); }

  /* 显示移动端顶部栏 */
  .mobile-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 50;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--glass-layer-1);
    backdrop-filter: blur(var(--glass-blur-1)) saturate(1.6);
    -webkit-backdrop-filter: blur(var(--glass-blur-1)) saturate(1.6);
    border-bottom: 1px solid var(--border-highlight);
  }
  .mobile-menu-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--glass-layer-3);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .mobile-page-title {
    font-size: 17px; font-weight: 700;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .mobile-topbar-spacer { display: none; }

  /* 主内容区占满宽度 */
  .main-content {
    flex: 1;
    height: auto;
    min-height: 0;
    overflow-y: auto;
  }

  /* Hero */
  .hero-section { padding: 16px; }
  .hero-card {
    flex-direction: column-reverse;
    padding: 24px 20px;
    gap: 16px;
  }
  .hero-info { text-align: center; }
  .hero-badge { display: inline-block; }
  .hero-title { font-size: 24px; }
  .hero-art {
    width: 220px !important; height: 220px !important;
    margin: 0 auto;
  }
  .hero-play-btn { margin: 0 auto; }

  /* Section */
  .section { padding: 14px 16px; }

  /* 歌曲卡片 */
  .am-card { width: 130px; }
  .am-card .am-artwork { width: 130px; height: 130px; }
  .am-card.wide { width: 220px; }
  .am-card.wide .am-artwork { width: 72px; height: 72px; }

  /* 专辑网格 */
  .album-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    padding: 0 16px;
  }
  .album-card { padding: 10px; border-radius: 12px; }
  .album-card-cover { border-radius: 8px; }
  .album-card-title { font-size: 12px; }
  .album-card-artist { font-size: 10px; }
  .album-card-delete { top: 14px; right: 14px; width: 22px; height: 22px; font-size: 10px; }

  /* 播放器栏 */
  .player-bar { padding: 0 12px; gap: 10px; }
  .player-left { width: auto; min-width: 0; flex-shrink: 1; }
  .player-right { width: auto; flex-shrink: 0; }
  .player-more { display: none; }
  .volume-bar { display: none; }
  .player-center { max-width: 200px; }

  /* 侧边面板占满屏幕 */
  .queue-panel, .lyrics-panel { width: 100%; }

  /* 专辑详情 */
  .album-detail-header { padding: 16px; }
  .album-detail-info { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .album-detail-cover { width: 180px; height: 180px; }
  .album-detail-actions { justify-content: center; }
  .album-tracks-header { padding: 16px 16px 12px; }
  .album-track-row { padding: 8px 12px; margin: 0 4px; }

  /* 移动端 song list 优化：减少右侧固定宽度，让歌名有足够空间 */
  .track-row { padding: 10px 12px; gap: 10px; }
  .track-row .row-cover { width: 40px; height: 40px; border-radius: 6px; }
  .track-row .row-title { font-size: 13px; }
  .track-row .row-artist { font-size: 11px; }
  .track-row .row-duration { display: none; }
  .track-row .row-actions { opacity: 1; gap: 0; }
  .track-row .row-actions.mobile { gap: 0; }
  .track-row .row-action-btn { width: 28px; height: 28px; font-size: 13px; }
}

/* ---- 超小屏幕 < 480px ---- */
@media (max-width: 480px) {
  .hero-title { font-size: 20px; }
  .hero-art { width: 178px !important; height: 178px !important; }
  .am-card { width: 110px; }
  .am-card .am-artwork { width: 110px; height: 110px; }
  .am-card .am-card-title { font-size: 12px; }
  .am-card .am-card-subtitle { font-size: 11px; }
  .scroll-row { gap: 12px; }
  .section-title { font-size: 18px; }
  .album-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    padding: 0 12px;
  }
  .player-left { gap: 8px; }
  .player-title { font-size: 12px; }
  .player-artist { font-size: 10px; }
  .player-controls { gap: 12px; }
}

/* ============================================
   浅色主题 — 白天液态玻璃
   ============================================ */
[data-theme="light"] {
  --bg: #f2f2f7;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #aeaeb2;

  /* 浅色玻璃层级 */
  --glass-layer-1: rgba(255, 255, 255, 0.72);
  --glass-layer-2: rgba(255, 255, 255, 0.78);
  --glass-layer-3: rgba(255, 255, 255, 0.58);
  --glass-layer-4: rgba(255, 255, 255, 0.66);

  /* 玻璃高光（浅色更强） */
  --glass-highlight: rgba(255, 255, 255, 0.25);
  --glass-highlight-strong: rgba(255, 255, 255, 0.4);
  --glass-highlight-edge: rgba(255, 255, 255, 0.3);

  --glass-shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.06);
  --glass-shadow-deep: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.4);

  --border: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(0, 0, 0, 0.12);
  --border-glow: rgba(180, 94, 255, 0.16);

  --neon-purple: #b45eff;
  --neon-pink: #ff3da1;
  --neon-cyan: #00b8d4;
  --neon-blue: #2979ff;
  --neon-green: #00c853;

  --accent: #b45eff;
  --accent-glow: rgba(180, 94, 255, 0.25);
  --accent-strong: rgba(180, 94, 255, 0.5);

  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(0, 0, 0, 0.07);

  /* 兼容旧变量 */
  --glass-sidebar-bg: var(--glass-layer-1);
  --glass-player-bg: var(--glass-layer-2);
  --glass-panel-bg: var(--glass-layer-1);
  --glass-card-bg: var(--glass-layer-3);
  --glass-card-hover: var(--glass-layer-4);
  --bg-glass: var(--glass-layer-3);
  --bg-glass-heavy: var(--glass-layer-1);
  --bg-card: var(--glass-layer-3);
}

/* 浅色主题噪声纹理减淡 */
[data-theme="light"] body::after {
  opacity: 0.015;
}

/* 浅色背景渐变 */
[data-theme="light"] .bg-gradient {
  background:
    radial-gradient(ellipse 800px 600px at 25% 15%, rgba(180, 94, 255, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at 75% 55%, rgba(0, 184, 212, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 600px 450px at 45% 80%, rgba(255, 61, 161, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 15% 75%, rgba(41, 121, 255, 0.02) 0%, transparent 70%);
}

[data-theme="light"] .hero-title {
  color: #1d1d1f;
}

[data-theme="light"] .hero-artist {
  color: #86868b;
}

[data-theme="light"] .hero-album {
  color: #aeaeb2;
}

/* 浅色专辑收藏卡片 */
[data-theme="light"] .album-card {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .album-card:hover {
  border-color: rgba(180, 94, 255, 0.25);
  box-shadow:
    0 8px 32px rgba(180, 94, 255, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .album-card-cover {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

[data-theme="light"] .album-card:hover .album-card-cover {
  box-shadow:
    0 6px 24px rgba(180, 94, 255, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

[data-theme="light"] .album-card::before {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.12) 0%,
    transparent 50%,
    rgba(180,94,255,0.02) 100%
  );
}

[data-theme="light"] .album-card::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.3) 30%,
    rgba(255,255,255,0.5) 50%,
    rgba(255,255,255,0.3) 70%,
    transparent 100%
  );
}

[data-theme="light"] .album-card-delete {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255,255,255,0.3);
}

[data-theme="light"] .album-card-delete:hover {
  background: rgba(255, 60, 60, 0.8);
}

/* 浅色音源标签 */
[data-theme="light"] .source-tab {
  background: var(--glass-layer-3);
  border-color: var(--border);
}

[data-theme="light"] .source-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--border-highlight);
  color: var(--text);
}

[data-theme="light"] .source-tab.active {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #fff;
  border-color: transparent;
}

/* 浅色设置弹窗音源标签 */
[data-theme="light"] .settings-section .source-tab {
  background: var(--glass-layer-3);
  border-color: var(--border);
}

[data-theme="light"] .settings-section .source-tab.active {
  background: rgba(180, 94, 255, 0.1);
  border-color: rgba(180, 94, 255, 0.2);
  color: var(--neon-purple);
}

/* 浅色 Toast */
[data-theme="light"] .toast {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* 浅色正在播放 */
[data-theme="light"] .track-row.playing {
  background: rgba(180, 94, 255, 0.08);
}

/* 浅色响应式 */
@media (max-width: 768px) {
  [data-theme="light"] .sidebar { border-right-color: var(--border-highlight); }
}

/* 页面滑动动画（专辑详情） */
.page-slide {
  display: none;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-slide.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* ====== 滚动条全局样式 ====== */
.queue-list::-webkit-scrollbar,
.lyrics-content::-webkit-scrollbar {
  width: 4px;
}

.queue-list::-webkit-scrollbar-track,
.lyrics-content::-webkit-scrollbar-track {
  background: transparent;
}

.queue-list::-webkit-scrollbar-thumb,
.lyrics-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════
   Apple Music 风格 — 歌手详情页
   ═══════════════════════════════════════════════ */

.am-artist-hero {
  position: relative;
  height: 340px;
  overflow: hidden;
}
.am-artist-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
}
.am-artist-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.5) 60%, var(--bg) 100%);
  z-index: 1;
}
.am-artist-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 24px 30px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.am-artist-avatar-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  margin-bottom: 12px;
  border: 2px solid rgba(255,255,255,0.15);
}
.am-artist-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.am-artist-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #b44dff, #ff2d95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: rgba(255,255,255,0.25);
}
.am-artist-name {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
  letter-spacing: -0.5px;
}
.am-artist-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 14px;
}
.am-artist-actions {
  display: flex;
  gap: 10px;
}
.am-artist-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: var(--neon-purple);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(180, 94, 255, 0.35);
}
.am-artist-play-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(180, 94, 255, 0.5);
}
.am-artist-body {
  padding: 0 16px 60px;
}
.am-artist-bio {
  padding: 16px;
  background: var(--glass-layer-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 8px 0;
  line-height: 1.7;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Artist page: Apple Music-like section flow on an official GlassSurface base. */
.am-artist-page-surface {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  overflow: hidden;
  background: #fff9ef;
}

.am-artist-page-surface > .glass-surface-mount {
  z-index: 0 !important;
}

.am-album-page-surface {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  overflow: hidden;
  background: #fff9ef;
  color: #342b24;
}

.am-album-page-surface > .glass-surface-mount {
  z-index: 0 !important;
}

.am-artist-page-surface > .glass-surface-mount .glass-surface--svg,
.am-artist-page-surface > .glass-surface-mount .glass-surface--fallback,
.am-album-page-surface > .glass-surface-mount .glass-surface--svg,
.am-album-page-surface > .glass-surface-mount .glass-surface--fallback {
  background: rgba(255, 249, 239, 0.92) !important;
  border: 0;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.92), 0 14px 44px rgba(92, 73, 49, 0.08);
}

.am-artist-page-surface .am-artist-hero,
.am-artist-page-surface .am-artist-body {
  position: relative;
  z-index: 1;
}

.am-artist-hero {
  height: 350px;
  background: rgba(255, 249, 239, 0.46);
  border-bottom: 1px solid rgba(93, 72, 47, 0.14);
}

.am-artist-bg {
  display: none;
}

.am-artist-overlay {
  display: none;
}

#backFromArtist {
  background: rgba(255, 253, 247, 0.68) !important;
  border-color: rgba(93, 72, 47, 0.18) !important;
  color: #443a31 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.94), 0 8px 20px rgba(87, 68, 43, 0.1);
}

.am-artist-content {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 22px 0 30px;
}

.am-artist-avatar-wrapper {
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(83, 63, 42, 0.16);
}

.am-artist-avatar-fallback {
  background: linear-gradient(135deg, #efe1c8, #c6d7c9);
  color: rgba(55, 75, 64, 0.45);
}

.am-artist-name {
  color: #352c25;
  font-size: 34px;
  letter-spacing: 0;
}

.am-artist-meta {
  color: #594a3b;
}

.am-artist-play-btn {
  padding: 9px 18px;
  border-radius: 8px;
  background: #345e53;
  color: #fffdf8;
  box-shadow: 0 8px 18px rgba(52, 94, 83, 0.2);
}

.am-artist-play-btn:hover {
  background: #294b42;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(52, 94, 83, 0.25);
}

/* The global glass button treatment is intentionally overridden on this page. */
.am-artist-page-surface .am-artist-play-btn,
.am-artist-page-surface .am-artist-play-btn:hover,
.am-artist-page-surface .am-artist-play-btn:focus-visible {
  background: #345e53 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #fffdf8 !important;
  box-shadow: 0 8px 18px rgba(52, 94, 83, 0.2) !important;
}

.am-artist-page-surface .am-artist-play-btn:hover {
  background: #294b42 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(52, 94, 83, 0.25) !important;
}

.am-artist-body {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 30px 0 72px;
}

.am-artist-section {
  padding: 30px 0;
  border-top: 1px solid rgba(93, 72, 47, 0.14);
}

.am-artist-featured-section {
  border-top: 0;
  padding-top: 0;
}

.am-artist-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.am-artist-kicker {
  display: block;
  color: #6b7c70;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 5px;
}

.am-artist-section-title {
  margin: 0;
  color: #352c25;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.am-artist-section-note {
  color: #594a3b;
  font-size: 13px;
  white-space: nowrap;
}

.am-artist-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.am-artist-featured-grid .am-card {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(93, 72, 47, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.4);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.76);
}

.am-artist-featured-grid .am-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 253, 247, 0.72);
  border-color: rgba(52, 94, 83, 0.3);
}

.am-artist-featured-grid .am-artwork {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 5px;
  margin-bottom: 10px;
}

.am-artist-featured-grid .am-card-title {
  color: #40352c;
  font-size: 14px;
}

.am-artist-featured-grid .am-card-subtitle {
  color: #5f5041;
}

.am-artist-list {
  padding: 0;
}

.am-artist-list .track-row {
  padding: 10px 4px;
  border-radius: 0;
  border-bottom: 1px solid rgba(93, 72, 47, 0.1);
}

.am-artist-list .track-row:hover {
  background: rgba(255, 255, 255, 0.38);
}

.am-artist-list .track-row.playing {
  background: rgba(198, 215, 201, 0.34);
  box-shadow: inset 2px 0 0 #345e53;
}

.am-artist-list .row-cover {
  width: 44px;
  height: 44px;
  border-radius: 5px;
}

.am-artist-list .row-title {
  color: #40352c;
}

.am-artist-list .row-artist,
.am-artist-list .row-duration {
  color: #5f5041;
}

.am-artist-bio {
  padding: 0 0 0 16px;
  margin: 0;
  border: 0;
  border-left: 2px solid rgba(52, 94, 83, 0.38);
  border-radius: 0;
  background: transparent;
  color: #4d4034;
}

/* Album details reuse the same cream GlassSurface so navigation feels continuous. */
.am-album-page-surface > .album-detail-header,
.am-album-page-surface > .track-list-container {
  position: relative;
  z-index: 1;
}

.am-album-page-surface .album-detail-header {
  padding: 24px 30px 0;
}

.am-album-page-surface .back-btn {
  background: rgba(255, 253, 247, 0.86) !important;
  border-color: rgba(93, 72, 47, 0.2) !important;
  color: #443a31 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.94), 0 8px 20px rgba(87, 68, 43, 0.1) !important;
}

.am-album-page-surface.am-album-page-surface .back-btn {
  background: rgba(255, 253, 247, 0.92) !important;
  color: #443a31 !important;
}

.am-album-page-surface .album-detail-cover {
  box-shadow: 0 16px 42px rgba(83, 63, 42, 0.2), inset 0 1px rgba(255, 255, 255, 0.72);
}

.am-album-page-surface .album-detail-type {
  color: #637568;
}

.am-album-page-surface .album-detail-meta h1 {
  color: #342b24;
}

.am-album-page-surface .album-detail-meta p,
.am-album-page-surface .album-tracks-count {
  color: #594a3b;
}

.am-album-page-surface #albumPlayAllBtn {
  display: inline-flex !important;
  align-items: center;
  padding: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
  box-shadow: none !important;
}

.am-album-page-surface.am-album-page-surface #albumPlayAllBtn,
.am-album-page-surface.am-album-page-surface .album-play-all-btn {
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
}

.am-album-page-surface .album-play-specular {
  min-width: 142px;
}

.am-album-page-surface .album-track-row {
  border-bottom: 1px solid rgba(93, 72, 47, 0.12);
  border-radius: 0;
  margin: 0 30px;
}

.am-album-page-surface .album-track-row:hover {
  background: rgba(255, 255, 255, 0.56);
}

.am-album-page-surface .album-track-row.playing {
  background: rgba(198, 215, 201, 0.34);
  box-shadow: inset 2px 0 0 #345e53;
}

.am-album-page-surface .album-track-title {
  color: #40352c !important;
}

.am-album-page-surface .album-track-row.playing .album-track-title {
  color: #345e53 !important;
}

.am-album-page-surface .album-track-artist,
.am-album-page-surface .album-track-duration,
.am-album-page-surface .album-track-number {
  color: #5f5041 !important;
}

.am-album-page-surface .album-track-more {
  color: #5f5041 !important;
}

/* Final cream-page geometry and readability pass. */
.am-artist-page-surface,
.am-album-page-surface {
  width: 100%;
  min-height: calc(100% + var(--dock-safe-area) + 16px);
  margin-bottom: calc(-1 * var(--dock-safe-area) - 16px);
  box-sizing: border-box;
  overflow: visible;
  background: #fff9ef;
}

/* The detail pages own the entire scroll viewport, including the main-content
   padding and scrollbar track. This prevents the dark shell from peeking out. */
body:has(.am-artist-page-surface.active) .main-content,
body:has(.am-album-page-surface.active) .main-content {
  background: #fff9ef;
}
body:has(.am-album-page-surface.active) .main-content {
  background: transparent !important;
}

/* GlassSurface's SVG map intentionally leaves a 2px inset. Extend the
   detail-page layer slightly so that inset cannot reveal the shell beneath. */
.am-artist-page-surface > .glass-surface-mount,
.am-album-page-surface > .glass-surface-mount {
  inset: -2px !important;
}
.am-artist-page-surface > .glass-surface-mount > .glass-surface,
.am-album-page-surface > .glass-surface-mount > .glass-surface {
  inset: 0 !important;
}

.am-artist-page-surface .am-artist-bg {
  display: block;
  opacity: 0.24;
  filter: saturate(0.78) contrast(0.92) blur(1px);
  transform: scale(1.04);
  background-position: center 22%;
  pointer-events: none;
}

.am-artist-page-surface .am-artist-overlay {
  display: block;
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.28) 0%, rgba(255, 249, 239, 0.7) 68%, rgba(255, 249, 239, 0.98) 100%);
  pointer-events: none;
}

.am-artist-page-surface .am-artist-bio-section {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 26px 0 0;
  border-top: 0;
}

.am-artist-page-surface .am-artist-body {
  padding-top: 26px;
}

.am-artist-page-surface .am-artist-bio {
  padding: 16px 18px;
  border: 1px solid rgba(93, 72, 47, 0.14);
  border-left: 3px solid rgba(52, 94, 83, 0.5);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.7);
  color: #40352c;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
}

.am-artist-bio-summary,
.am-artist-bio-content p {
  margin: 0;
  color: #40352c;
  font-size: 14px;
  line-height: 1.8;
}

.am-artist-bio-details {
  margin-top: 12px;
}

.am-artist-bio-details summary {
  width: fit-content;
  color: #345e53;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style-position: inside;
}

.am-artist-bio-details summary:hover {
  color: #294b42;
}

.am-artist-bio-content {
  max-width: 860px;
  padding-top: 10px;
}

.am-artist-bio-content p + p {
  margin-top: 10px;
}

/* Selected rows receive the official GlassSurface material. */
.am-artist-page-surface .am-artist-list .track-row.playing,
.am-album-page-surface .album-track-row.playing {
  background: transparent !important;
  box-shadow: none !important;
}

.am-artist-list .track-row > .glass-surface-mount,
.am-album-page-surface .album-track-row > .glass-surface-mount {
  opacity: 0;
  transition: opacity 180ms ease;
}

.am-artist-list .track-row.playing > .glass-surface-mount,
.am-album-page-surface .album-track-row.playing > .glass-surface-mount {
  opacity: 1;
}

.glass-surface--selection.glass-surface--svg,
.glass-surface--selection.glass-surface--fallback {
  background: rgba(255, 253, 247, 0.76) !important;
  border: 0 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 8px 24px rgba(92, 73, 49, 0.08) !important;
}

.am-artist-page-surface .am-artist-list .track-row.playing > :not(.glass-surface-mount),
.am-album-page-surface .album-track-row.playing > :not(.glass-surface-mount) {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .am-artist-page-surface .am-artist-bio-section {
    width: calc(100% - 32px);
  }
}

.am-album-page-surface #albumTrackList {
  padding-bottom: 72px;
}

.am-album-page-surface #albumTrackList .track-row {
  border-bottom: 1px solid rgba(93, 72, 47, 0.12);
  border-radius: 0;
  color: #40352c;
}

.am-album-page-surface #albumTrackList .track-row:hover {
  background: rgba(255, 255, 255, 0.56);
}

.am-album-page-surface #albumTrackList .row-artist,
.am-album-page-surface #albumTrackList .row-duration {
  color: #5f5041;
}

@media (max-width: 768px) {
  .am-artist-hero { height: 312px; }
  .am-artist-content,
  .am-artist-body { width: calc(100% - 32px); }
  .am-artist-content { padding-bottom: 24px; }
  .am-artist-avatar-wrapper { width: 88px; height: 88px; }
  .am-artist-name { font-size: 28px; }
  .am-artist-body { padding: 22px 0 52px; }
  .am-artist-section { padding: 24px 0; }
  .am-artist-section-header { align-items: start; }
  .am-artist-section-note { white-space: normal; text-align: right; }
  .am-artist-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Mobile shell: the legacy body flex row must not make the top bar a side rail. */
@media (max-width: 768px) {
  body {
    display: block;
    min-height: 100dvh;
  }

  .mobile-topbar {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    height: 56px;
    box-sizing: border-box;
    flex: none;
  }

  .main-content {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .am-artist-page-surface,
  .am-album-page-surface {
    width: 100%;
    min-width: 0;
  }
}

/* The artist photo is a real hero layer, softened only for cream-surface legibility. */
.am-artist-page-surface .am-artist-bg {
  display: block !important;
}

/* The biography is a transparent GlassSurface panel, while its photo remains raw. */
.am-artist-page-surface .am-artist-bio {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}
.am-artist-page-surface .am-artist-bio > .glass-surface-mount {
  inset: 0 !important;
  z-index: 0 !important;
}
.am-artist-page-surface .am-artist-bio > :not(.glass-surface-mount) {
  position: relative;
  z-index: 1;
}

/* Artist track rows match the album detail page's neutral GlassSurface selection. */
.am-artist-page-surface .am-artist-list .track-row.playing {
  background: transparent !important;
  box-shadow: none !important;
}
.am-artist-page-surface .am-artist-list .track-row.playing > .glass-surface-mount .glass-surface {
  background: rgba(255, 255, 255, .14) !important;
  border: 0 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.28), 0 10px 30px rgba(0,0,0,.2) !important;
}
.am-artist-page-surface .am-artist-list .row-title {
  color: #ffffff !important;
}
.am-artist-page-surface .am-artist-list .row-artist,
.am-artist-page-surface .am-artist-list .row-duration {
  color: var(--artist-muted-color, rgba(255,255,255,.72)) !important;
}

/* Song rows stay compact after selection; playback never inserts a second
   disclosure row beneath the selected item. */
.song-row {
  position: relative;
  isolation: isolate;
}
.song-row > .glass-surface-mount {
  z-index: 0 !important;
  pointer-events: none;
}
.song-row > :not(.glass-surface-mount) {
  position: relative;
  z-index: 1;
}
.track-row.song-row,
.album-track-row.song-row {
  flex-wrap: nowrap !important;
}
.fav-track-row.song-row,
.local-track-row.song-row {
  grid-template-rows: auto !important;
}
.song-row-expand {
  display: none !important;
}
.song-row-expand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Artist GlassSurface follows the avatar palette; the hero photo remains a raw image layer. */
.am-artist-page-surface {
  background:
    radial-gradient(ellipse 820px 560px at 18% 12%, rgba(var(--artist-secondary-rgb, 72, 82, 108), .42), transparent 72%),
    linear-gradient(135deg, rgba(var(--artist-primary-rgb, 28, 30, 42), .96), rgba(var(--artist-tertiary-rgb, 12, 13, 20), .94)) !important;
  color: var(--artist-text-color, #ffffff);
}
.am-artist-page-surface > .glass-surface-mount .glass-surface--svg,
.am-artist-page-surface > .glass-surface-mount .glass-surface--fallback {
  background: linear-gradient(135deg, rgba(var(--artist-primary-rgb, 28, 30, 42), .74), rgba(var(--artist-secondary-rgb, 72, 82, 108), .48)) !important;
  border: 0 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.26), 0 14px 44px rgba(0,0,0,.12) !important;
}
body:has(.am-artist-page-surface.active) .main-content {
  background:
    radial-gradient(ellipse 900px 620px at 18% 12%, rgba(var(--artist-secondary-rgb, 72, 82, 108), .34), transparent 72%),
    linear-gradient(135deg, rgba(var(--artist-primary-rgb, 28, 30, 42), .96), rgba(var(--artist-tertiary-rgb, 12, 13, 20), .94)) !important;
}
.am-artist-page-surface .am-artist-bg {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  mix-blend-mode: normal !important;
}
.am-artist-page-surface .am-artist-overlay {
  display: none !important;
}
.am-artist-page-surface .am-artist-name,
.am-artist-page-surface .am-artist-section-title,
.am-artist-page-surface .am-artist-bio-summary,
.am-artist-page-surface .am-artist-bio-content p {
  color: var(--artist-text-color, #ffffff) !important;
}
.am-artist-page-surface .am-artist-meta,
.am-artist-page-surface .am-artist-section-note,
.am-artist-page-surface .am-artist-kicker {
  color: var(--artist-muted-color, rgba(255,255,255,.72)) !important;
}
.am-artist-page-surface .am-artist-section,
.am-artist-page-surface .am-artist-bio {
  border-color: var(--artist-line-color, rgba(255,255,255,.16)) !important;
}

/* 登录按钮 */
.login-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 16px;
  background: transparent; border: none;
  color: var(--text-secondary); font-size: 13px;
  cursor: pointer; border-radius: 8px;
  transition: all 0.12s ease;
}
.login-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

/* ====== 紧凑玻璃工作区 ======
   保留现有材质，只收紧固定导航和播放控制的占位。 */
:root {
  --sidebar-width: 200px;
  --player-height: 58px;
}

.sidebar {
  padding: 12px 10px 7px;
}

.logo {
  gap: 8px;
  padding: 9px 9px 3px;
  margin-bottom: 10px;
}

.logo svg { width: 24px; height: 24px; }
.logo-text { font-size: 15px; }

.search-mini {
  margin: 0 2px 12px;
  padding: 7px 10px;
}
.search-mini input { font-size: 12px; }

.nav-item {
  gap: 7px;
  padding: 8px 10px;
  font-size: 12.5px;
}

.sidebar-divider { margin: 8px 8px; }
.sidebar-footer { padding-top: 7px; gap: 6px; }
.settings-gear, .theme-toggle-btn { width: 32px; height: 32px; }

.now-playing-mini {
  gap: 8px;
  padding: 7px;
  border-radius: 10px;
}
.mini-cover-img { width: 34px; height: 34px; border-radius: 7px; }
.mini-title { font-size: 11px; }
.mini-artist { font-size: 10px; }
.mini-play { width: 26px; height: 26px; font-size: 10px; }

.main-content { padding-bottom: 10px; }

/* ============================================
   Music library pages
   Compact, scan-first layouts for favorites, local files, playlists and albums.
   ============================================ */
.library-page {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 28px clamp(20px, 3.2vw, 48px) 72px;
}

.library-header {
  min-height: 112px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.library-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.library-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  font-size: 25px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.28);
}

/* Official GlassIcons treatment for library page identities. Keep the
   surrounding title block transparent and let the dark icon prism carry the
   contrast against both dark and album-colored backgrounds. */
.library-icon {
  background: transparent !important;
  box-shadow: none;
}
.library-icon > span {
  display: block;
  width: 3.2em;
  height: 3.2em;
  font-size: 1rem;
  pointer-events: auto;
}
.library-glass-icon { pointer-events: auto !important; cursor: default; }
.library-icon:hover .library-glass-icon .icon-btn__back,
.library-glass-icon:hover .icon-btn__back,
.library-glass-icon:focus-visible .icon-btn__back {
  transform: rotate(25deg) translate3d(-.5em, -.5em, .5em);
}
.library-icon:hover .library-glass-icon .icon-btn__front,
.library-glass-icon:hover .icon-btn__front,
.library-glass-icon:focus-visible .icon-btn__front {
  transform: translate3d(0, 0, 2em);
}
.library-glass-icon .icon-btn__back {
  background: linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,255,255,.07)) !important;
  box-shadow: .45em -.45em .8em rgba(0, 0, 0, .38);
}
.library-glass-icon .icon-btn__front {
  background: rgba(10, 12, 22, .52);
  box-shadow: 0 0 0 .1em rgba(255, 255, 255, .2) inset, inset 0 -10px 18px rgba(0, 0, 0, .16);
  backdrop-filter: blur(.85em) saturate(1.35);
  -webkit-backdrop-filter: blur(.85em) saturate(1.35);
}
.library-glass-icon .icon-btn__icon { color: rgba(255, 255, 255, .92); }

.library-icon--pink { background: linear-gradient(145deg, #ff4d7d, #c32767); }
.library-icon--cyan { background: linear-gradient(145deg, #2ccfd1, #207f9c); }
.library-icon--violet { background: linear-gradient(145deg, #9b72ff, #6846c4); }
.library-icon--orange { background: linear-gradient(145deg, #ff9f43, #d85537); }

.library-heading h1 {
  min-height: 38px;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}

.library-heading p {
  margin-top: 7px;
  color: rgba(244, 244, 250, 0.66);
  font-size: 14px;
}

.library-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.library-count {
  color: rgba(244, 244, 250, 0.58);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

button.library-primary-btn {
  min-height: 40px;
  padding: 0 18px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0 !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.93) !important;
  color: #15131d !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22) !important;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), background-color 180ms ease !important;
}

button.library-primary-btn:hover {
  background: #fff !important;
  transform: translateY(-1px);
}

button.library-primary-btn:disabled {
  opacity: 0.42;
  cursor: default;
  transform: none;
}

button.library-primary-btn::after { display: none !important; }

.library-workspace {
  padding-top: 30px;
}

.library-workspace--list {
  --library-row-columns: minmax(0, 1fr) 68px 40px;
}

.workspace-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.workspace-title-row h2,
.local-intro h2 {
  color: #f8f7fb;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.library-list-head {
  display: grid;
  grid-template-columns: var(--library-row-columns);
  align-items: center;
  gap: 12px;
  padding: 0 12px 9px 76px;
  color: rgba(244, 244, 250, 0.48);
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.library-workspace .track-list-container {
  padding: 7px 0 0;
}

.fav-track-row,
.local-track-row {
  min-height: 64px;
  display: grid;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.fav-track-row { grid-template-columns: 28px 48px minmax(0, 1fr) 68px 40px; }
.local-track-row { grid-template-columns: 28px 40px minmax(0, 1fr) 68px 40px; }

.fav-track-row:hover,
.local-track-row:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.fav-track-index,
.local-track-index {
  color: rgba(244, 244, 250, 0.45);
  font-size: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.fav-track-cover,
.local-track-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.48);
}

.fav-track-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.local-track-icon { width: 40px; height: 40px; color: #6ed4dc; font-size: 14px; }

.fav-track-copy,
.local-track-copy { min-width: 0; }
.fav-track-title,
.local-track-copy .track-title {
  overflow: hidden;
  color: #f8f7fb;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-track-artist,
.local-track-copy .track-artist {
  overflow: hidden;
  margin-top: 2px;
  color: rgba(244, 244, 250, 0.58);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-track-duration,
.local-track-row .track-duration {
  color: rgba(244, 244, 250, 0.5);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

button.fav-remove-btn,
button.track-delete,
button.pl-delete {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  display: grid;
  place-items: center;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: rgba(244, 244, 250, 0.46) !important;
  box-shadow: none !important;
  cursor: pointer;
}
button.fav-remove-btn { color: #ff5b89 !important; }
button.fav-remove-btn:hover,
button.track-delete:hover,
button.pl-delete:hover { background: rgba(255, 255, 255, 0.08) !important; color: #fff !important; }
button.fav-remove-btn::after,
button.track-delete::after,
button.pl-delete::after { display: none !important; }

.local-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1.28fr);
  grid-template-areas: "intro upload" "storage upload";
  align-items: end;
  gap: 18px 28px;
  margin-top: 30px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(13, 15, 25, 0.55);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.local-intro { grid-area: intro; align-self: start; }
.local-intro p { max-width: 42ch; margin-top: 8px; color: rgba(244, 244, 250, 0.58); font-size: 13px; line-height: 1.55; }
.local-workspace .storage-info { grid-area: storage; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }
.local-workspace .local-upload-area {
  grid-area: upload;
  min-height: 164px;
  margin: 0;
  padding: 28px;
  display: grid;
  place-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}
.local-workspace .local-upload-area:hover { border-color: rgba(111, 219, 221, 0.65); background: rgba(83, 203, 205, 0.07); }
.local-workspace .local-upload-area i { color: #6ed4dc; font-size: 22px; }
.local-workspace .upload-link { color: #8ce8e8; font-weight: 650; }

/* Upload area uses the real GlassSurface mount; keep the host transparent so
   the material, not a second opaque panel, defines its appearance. */
.glass-surface-host.local-upload-area,
.glass-surface-host.local-upload-area:hover {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.glass-surface-host.local-upload-area > .glass-surface-mount .glass-surface {
  border-radius: 14px;
  background: rgba(28, 30, 42, .66) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 14px 32px rgba(0,0,0,.2) !important;
}
.glass-surface-host.local-upload-area:hover > .glass-surface-mount .glass-surface {
  background: rgba(38, 42, 58, .76) !important;
}

.playlist-grid,
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: clamp(16px, 2vw, 26px);
  padding: 0;
}

.playlist-card,
.album-card {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}

.playlist-card::before,
.playlist-card::after,
.album-card::before,
.album-card::after { display: none; }

.playlist-card:hover,
.album-card:hover {
  transform: translateY(-4px);
  border: 0;
  box-shadow: none;
}

.playlist-card .pl-cover,
.album-card-cover {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 0 11px;
  border-radius: 12px;
  overflow: hidden;
  object-fit: cover;
  background: linear-gradient(145deg, #393146, #1b1824);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.48);
  transition: box-shadow 220ms ease;
}
.playlist-card .pl-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.playlist-card:hover .pl-cover,
.album-card:hover .album-card-cover { box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38); }

.playlist-card .pl-copy,
.album-card-info { min-width: 0; display: grid; gap: 3px; padding: 0 2px; }
.playlist-card .pl-name,
.album-card-title { color: #f8f7fb; font-size: 14px; font-weight: 650; line-height: 1.3; }
.playlist-card .pl-count,
.album-card-artist,
.album-card-meta { margin: 0; color: rgba(244, 244, 250, 0.56); font-size: 12px; line-height: 1.35; }
.album-card-meta { color: rgba(244, 244, 250, 0.4); }

button.pl-delete,
button.album-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  float: none;
  opacity: 0;
  transform: translateY(-3px);
  background: rgba(10, 10, 14, 0.68) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 160ms ease, transform 160ms ease !important;
}
.playlist-card:hover button.pl-delete,
.album-card:hover button.album-card-delete,
button.pl-delete:focus-visible,
button.album-card-delete:focus-visible { opacity: 1; transform: translateY(0); }

.library-page .view-toggle {
  margin: 0;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}
.library-page .view-btn { border-radius: 8px !important; }

.library-page .empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: rgba(244, 244, 250, 0.5);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}
.library-page .empty-state i { font-size: 28px; color: rgba(244, 244, 250, 0.56); }
.library-page .empty-state p { color: rgba(250, 249, 253, 0.92); font-size: 15px; font-weight: 650; }
.library-page .empty-state span { max-width: 34ch; color: rgba(244, 244, 250, 0.68); font-size: 12px; line-height: 1.5; }

.library-page.active > .library-header,
.library-page.active > .library-workspace,
.library-page.active > .local-workspace {
  animation: library-enter 420ms cubic-bezier(.16,1,.3,1) both;
}
.library-page.active > .library-workspace,
.library-page.active > .local-workspace { animation-delay: 45ms; }
@keyframes library-enter {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (max-width: 768px) {
  .library-page { padding: 18px 16px 56px; }
  .library-header { min-height: 96px; align-items: center; gap: 16px; padding: 8px 0 18px; }
  .library-heading { gap: 12px; }
  .library-icon { width: 48px; height: 48px; flex-basis: 48px; border-radius: 12px; font-size: 19px; }
  .library-heading h1 { min-height: 30px; font-size: 28px; }
  .library-heading p { font-size: 12px; }
  .library-header .library-count { display: none; }
  button.library-primary-btn { min-height: 38px; padding: 0 13px !important; font-size: 12px; }
  .library-workspace { padding-top: 22px; }
  .library-list-head { padding-left: 64px; }
  .fav-track-row { grid-template-columns: 22px 42px minmax(0, 1fr) 34px; padding: 7px 4px; }
  .local-track-row { grid-template-columns: 22px 36px minmax(0, 1fr) 34px; padding: 7px 4px; }
  .fav-track-cover { width: 42px; height: 42px; }
  .local-track-icon { width: 36px; height: 36px; }
  .fav-track-duration,
  .local-track-row .track-duration,
  .library-list-head span:nth-child(2) { display: none; }
  .library-list-head { grid-template-columns: 1fr 34px; }
  .local-workspace { grid-template-columns: 1fr; grid-template-areas: "intro" "upload" "storage"; padding: 18px; }
  .local-workspace .local-upload-area { min-height: 142px; }
  .playlist-grid,
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  button.pl-delete,
  button.album-card-delete { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .library-page.active > .library-header,
  .library-page.active > .library-workspace,
  .library-page.active > .local-workspace { animation: none; }
}

.player-bar {
  padding: 0 14px;
  gap: 12px;
}
.player-left { width: 240px; gap: 9px; }
.player-nowplaying, .player-cover { width: 38px; height: 38px; }
.player-cover { border-radius: 7px; }
.player-like, .player-more { width: 28px; height: 28px; font-size: 12px; }
.player-center { gap: 3px; }
.player-controls { gap: 14px; }
.ctrl-btn { width: 28px; height: 28px; font-size: 12px; }
.ctrl-play { width: 34px; height: 34px; }
.player-right { width: 200px; }
.volume-bar { width: 64px; }

@media (max-width: 1100px) and (min-width: 769px) {
  .player-left { width: 200px; }
  .player-right { width: 150px; }
  .player-bar { padding: 0 10px; gap: 8px; }
  .player-controls { gap: 10px; }
}

@media (max-width: 768px) {
  .sidebar { width: 200px; padding: 12px 10px 7px; }
  .player-bar { padding: 0 10px; gap: 8px; }
  .player-center { max-width: 170px; }
  .player-controls { gap: 8px; }
  .ctrl-btn { width: 26px; height: 26px; }
  .ctrl-play { width: 32px; height: 32px; }
  #playerDownload { display: none; }
}

/* ====== 可折叠固定面板 ====== */
.sidebar-collapse-btn,
.player-collapse-btn {
  width: 25px !important;
  min-width: 25px !important;
  height: 25px !important;
  min-height: 25px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50% !important;
  background: rgba(255,255,255,.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
  z-index: 3;
}
.sidebar-collapse-btn:hover,
.player-collapse-btn:hover {
  color: var(--text);
  background: rgba(180,94,255,.18);
  transform: scale(1.08);
}
.sidebar-collapse-btn {
  position: absolute;
  top: 10px;
  right: 9px;
  z-index: 4 !important;
}
.sidebar.is-collapsed {
  width: 56px;
  padding-left: 7px;
  padding-right: 7px;
}
.sidebar.is-collapsed .logo {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  margin-top: 5px;
}
.sidebar.is-collapsed .logo-text,
.sidebar.is-collapsed .search-mini input,
.sidebar.is-collapsed .nav-item span,
.sidebar.is-collapsed .now-playing-mini {
  display: none;
}
.sidebar.is-collapsed .search-mini {
  width: 32px;
  height: 30px;
  justify-content: center;
  margin: 0 auto 12px;
  padding: 0;
}
.sidebar.is-collapsed .nav-item {
  justify-content: center;
  padding: 9px 0;
}
.sidebar.is-collapsed .nav-item:hover svg { transform: none; }
.sidebar.is-collapsed .sidebar-divider { margin-left: 2px; margin-right: 2px; }
.sidebar.is-collapsed .sidebar-footer { align-items: center; }
.sidebar.is-collapsed .settings-gear,
.sidebar.is-collapsed .theme-toggle-btn { align-self: center; }
.sidebar.is-collapsed .sidebar-collapse-btn { right: 4px; }

.player-collapse-btn { position: relative !important; flex: 0 0 auto; z-index: 4 !important; }
.player-collapsed-label {
  display: none;
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
}
.player-bar.is-collapsed {
  height: 34px;
  padding: 0 8px;
  gap: 7px;
}
.player-bar.is-collapsed .player-left,
.player-bar.is-collapsed .player-center,
.player-bar.is-collapsed .player-right { display: none; }
.player-bar.is-collapsed .player-collapsed-label { display: inline; }
.player-is-collapsed { --player-height: 34px; }
.player-is-collapsed .main-content { height: calc(100vh - var(--player-height)); }

@media (max-width: 768px) {
  .sidebar-collapse-btn { display: none; }
  .player-collapse-btn { width: 23px; height: 23px; }
  .player-bar.is-collapsed { height: 32px; }
}

/* BubbleMenu 取代旧侧边栏视觉，只保留旧节点供现有功能代码兼容。 */
.sidebar {
  position: fixed;
  inset: 0 auto auto 0;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  pointer-events: none;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.sidebar::before,
.sidebar::after,
.sidebar > :not(#bubbleMenuMount) { display: none !important; }
#bubbleMenuMount { display: block; pointer-events: auto; }

/* 播放栏同样迁移为底部 BubbleMenu，旧控制节点只保留给播放器逻辑调用。 */
:root { --player-height: 0px; }
body.player-is-collapsed { --player-height: 0px; }
.player-bar {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}
.player-bar > :not(#playerBubbleMount):not(.glass-surface-mount) { display: none !important; }
.player-bar > .glass-surface-mount { display: none !important; }
#playerBubbleMount { display: block; pointer-events: auto; }

/* Final native mini-player contract. Keep this after the BubbleMenu migration
   rules so legacy hidden-player styles cannot leak into the native window. */
html.native-mini-mode,
html.native-mini-mode body {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

body.native-mini-mode > #playerBar {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 17px 28px 15px !important;
  overflow: hidden !important;
  isolation: isolate;
  border: 0 !important;
  border-radius: 30px !important;
  background: linear-gradient(112deg, rgba(201, 213, 228, .82), rgba(219, 222, 205, .76)) !important;
  background-image: none !important;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(34px) saturate(1.35) !important;
  -webkit-backdrop-filter: blur(34px) saturate(1.35) !important;
  pointer-events: auto !important;
}

body.native-mini-mode #playerBar::before,
body.native-mini-mode #playerBar::after {
  display: none !important;
  content: none !important;
}

body.native-mini-mode #playerBar > .native-mini-drag-region {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  background: transparent !important;
  border: 0 !important;
  cursor: grab;
  -webkit-app-region: drag;
}

body.native-mini-mode #playerBar > .player-left,
body.native-mini-mode #playerBar > .player-center,
body.native-mini-mode #playerBar > .player-right {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 3 !important;
}

body.native-mini-mode #playerBar > .player-center { display: grid !important; }

body.native-mini-mode #playerBar > #nativeMiniTrafficLights,
body.native-mini-mode #playerBar > #nativeMiniTrafficLights.is-visible {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: absolute !important;
  top: 14px !important;
  left: 20px !important;
  z-index: 8 !important;
}

body.native-mini-mode .native-mini-traffic-light {
  flex: 0 0 12px !important;
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  min-height: 12px !important;
}

body.native-mini-mode .native-mini-traffic-light.is-disabled {
  pointer-events: none !important;
}

body.native-mini-mode #playerBar > .player-left {
  top: 17px !important;
  left: 70px !important;
  right: 142px !important;
  height: 60px !important;
  z-index: 3 !important;
}

body.native-mini-mode #playerBar > .player-center {
  top: 86px !important;
  right: 20px !important;
  bottom: 12px !important;
  left: 20px !important;
  z-index: 3 !important;
}

body.native-mini-mode #playerBar > .player-right {
  top: 10px !important;
  right: 14px !important;
  z-index: 8 !important;
}

body.native-mini-mode #playerBar .ctrl-btn,
body.native-mini-mode #playerBar .ctrl-play,
body.native-mini-mode #playerBar #playerLike,
body.native-mini-mode #playerBar #fullscreenBtn,
body.native-mini-mode #playerBar #nativeMiniBtn {
  position: relative;
  z-index: 4;
}

body.native-mini-mode #playerDownload,
body.native-mini-mode #playerMore,
body.native-mini-mode #volumeBtn,
body.native-mini-mode #volumeBar {
  display: none !important;
}

/* 进度条只保留 ElasticSlider 的真实轨道，外层仅作为 GlassSurface 容器。 */
.amp-progress-bar,
.progress-bar,
.volume-bar {
  height: 16px !important;
  min-height: 16px;
  display: flex;
  align-items: center;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.amp-progress-bar > #ampProgressSliderMount,
.progress-bar > #progressSliderMount,
.volume-bar > #volumeSliderMount {
  width: 100%;
  height: 100%;
}

.amp-progress-bar .player-elastic-slider,
.progress-bar .player-elastic-slider,
.volume-bar .player-elastic-slider,
.amp-progress-bar .slider-container,
.progress-bar .slider-container,
.volume-bar .slider-container {
  width: 100%;
  height: 100%;
  gap: 0;
}

.amp-progress-bar .slider-wrapper,
.progress-bar .slider-wrapper,
.volume-bar .slider-wrapper {
  width: 100%;
  height: 100%;
  gap: 0;
}

.amp-progress-bar .slider-root,
.progress-bar .slider-root,
.volume-bar .slider-root {
  max-width: none;
  padding: 5px 0;
}

/* 常驻播放条不需要悬停位移；全屏条在独立规则中保留受控放大。 */
.progress-bar .slider-wrapper {
  opacity: 1 !important;
  transform: none !important;
}

.amp-progress-bar .slider-track,
.progress-bar .slider-track {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.amp-progress-bar .slider-range,
.progress-bar .slider-range {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

/* 正在播放页只保留歌曲信息与可拖动进度，不再显示播放、暂停或切歌控制。 */
.amp-fullscreen-player .amp-controls {
  display: none !important;
}

.amp-fullscreen-player .amp-progress {
  width: min(320px, calc(100vw - 132px));
  margin: 12px auto 0;
  gap: 8px;
}

.amp-fullscreen-player .amp-info-section {
  max-width: 680px;
}

.amp-fullscreen-player .amp-progress-bar {
  border-radius: 999px;
  height: 6px !important;
  min-height: 6px;
  overflow: hidden;
}

.amp-fullscreen-player .amp-progress-bar .value-indicator {
  display: none;
}

.amp-fullscreen-player .amp-progress-bar .slider-track-wrapper {
  height: 2px !important;
  min-height: 2px;
}

.amp-fullscreen-player .amp-progress-bar .slider-track {
  height: 2px !important;
  border-radius: 999px;
  background: rgba(var(--amp-accent-dark-rgb, 18, 18, 34), 0.42);
}

.amp-fullscreen-player .amp-progress-bar .slider-range {
  background: linear-gradient(
    90deg,
    var(--amp-accent, #b45eff),
    var(--amp-accent-light, #8ee7ff)
  );
  box-shadow: 0 0 10px rgba(var(--amp-accent-rgb, 180, 94, 255), 0.45);
}

/* 全屏进度条复用音量胶囊：GlassSurface 外壳 + 单条 ElasticSlider。 */
.amp-fullscreen-player .amp-progress-bar .slider-container {
  width: 100%;
  height: 100%;
  gap: 0;
}

.amp-fullscreen-player .amp-progress-bar .slider-wrapper {
  width: 100%;
  height: 100%;
  gap: 0;
  transform-origin: center;
}

/* 反馈只发生在玻璃胶囊内部，避免放大后的滑块侵占歌曲信息或时间标签。 */
.amp-fullscreen-player .amp-progress-bar .slider-wrapper:hover,
.amp-fullscreen-player .amp-progress-bar .slider-wrapper:active {
  transform: scale(1.04) !important;
}

.amp-fullscreen-player .amp-progress-bar .slider-wrapper:hover .slider-track-wrapper,
.amp-fullscreen-player .amp-progress-bar .slider-wrapper:active .slider-track-wrapper {
  height: 3px !important;
  min-height: 3px;
}

.amp-fullscreen-player .amp-progress-bar .slider-root {
  height: 100%;
  max-width: none;
  padding: 0;
  align-items: center;
}

.amp-fullscreen-player .amp-progress-bar .glass-surface--svg,
.amp-fullscreen-player .amp-progress-bar .glass-surface--fallback {
  background: linear-gradient(
    110deg,
    rgba(var(--amp-accent-rgb, 180, 94, 255), 0.18),
    rgba(var(--amp-accent-light-rgb, 142, 231, 255), 0.08)
  ) !important;
  backdrop-filter: blur(8px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.3) !important;
  border-color: rgba(var(--amp-accent-light-rgb, 142, 231, 255), 0.24) !important;
  box-shadow: 0 0 1px rgba(var(--amp-accent-light-rgb, 142, 231, 255), 0.28) inset !important;
}

/* Apple Music 风格双栏全屏布局：左侧播放信息，右侧常驻歌词。 */
.amp-fullscreen-player .amp-content {
  width: min(1180px, calc(100vw - 96px));
  margin: 0 auto;
  padding: 28px 0 44px;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(380px, 1.1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.amp-fullscreen-player .amp-player-column {
  min-width: 0;
  width: 100%;
  max-width: 520px;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.amp-fullscreen-player .amp-artwork-wrapper {
  width: min(440px, 34vw);
  margin-bottom: 28px;
}

.amp-fullscreen-player .amp-info-section {
  width: 100%;
  max-width: 480px;
}

.amp-fullscreen-player .amp-lyrics-column {
  width: 100%;
  height: min(70vh, 680px);
  min-height: 320px;
  min-width: 0;
  overflow: hidden;
}

.amp-fullscreen-player .amp-lyrics-view,
.amp-fullscreen-player .amp-lyrics-view.hidden {
  display: block !important;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border-left: 1px solid rgba(var(--amp-accent-rgb, 180, 94, 255), 0.22);
  padding-left: 28px;
  box-sizing: border-box;
}

.amp-fullscreen-player .amp-lyrics-stage {
  height: 100%;
  align-items: flex-start;
  padding-right: 18px;
  box-sizing: border-box;
}

.amp-fullscreen-player .amp-lyrics-line {
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.amp-fullscreen-player .amp-lyrics-line.active {
  font-size: 22px;
  padding-left: 18px;
  padding-right: 8px;
}

.amp-fullscreen-player .amp-lyrics-line.near {
  padding-left: 18px;
  padding-right: 8px;
}

@media (max-width: 768px) {
  .amp-fullscreen-player .amp-content {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 12px 0 28px;
    overflow-y: auto;
    align-content: start;
  }

  .amp-fullscreen-player .amp-player-column {
    max-width: 100%;
    justify-self: stretch;
  }

  .amp-fullscreen-player .amp-artwork-wrapper {
    width: min(300px, 72vw);
    margin-bottom: 18px;
  }

  .amp-fullscreen-player .amp-lyrics-column {
    height: 38vh;
    min-height: 220px;
  }

  .amp-fullscreen-player .amp-lyrics-view,
  .amp-fullscreen-player .amp-lyrics-view.hidden {
    border-left: 0;
    border-top: 1px solid rgba(var(--amp-accent-rgb, 180, 94, 255), 0.22);
    padding: 18px 0 0;
  }

  .amp-fullscreen-player .amp-lyrics-stage {
    padding-right: 0;
  }
}

/* 全屏播放器最终几何约束：避免旧的单栏规则把封面撑出视口。 */
.amp-fullscreen-player.show {
  overflow: hidden;
}

.amp-fullscreen-player .amp-content {
  flex: 1 1 auto !important;
  width: min(1120px, calc(100vw - 80px)) !important;
  height: calc(100vh - 58px) !important;
  max-height: calc(100vh - 58px) !important;
  min-height: 0 !important;
  padding: 24px 0 32px !important;
  grid-template-columns: minmax(300px, 400px) minmax(360px, 520px) !important;
  gap: clamp(36px, 6vw, 78px) !important;
  align-items: center !important;
  box-sizing: border-box;
  overflow: hidden !important;
}

.amp-fullscreen-player .amp-player-column {
  width: 100% !important;
  max-width: 400px !important;
  min-height: 0 !important;
  justify-self: end !important;
  overflow: visible !important;
}

.amp-fullscreen-player .amp-artwork-wrapper {
  width: min(300px, 26vw) !important;
  height: min(300px, 26vw) !important;
  max-width: 300px !important;
  max-height: 300px !important;
  margin: 0 auto 14px !important;
  flex: 0 0 auto !important;
}

.amp-fullscreen-player .amp-artwork {
  width: 100% !important;
  height: 100% !important;
}

.amp-fullscreen-player .amp-info-section {
  width: 100% !important;
  max-width: 400px !important;
  min-height: 0 !important;
}

.amp-fullscreen-player .amp-progress {
  width: min(280px, 100%) !important;
  margin-top: 8px !important;
  gap: 6px !important;
}

.amp-fullscreen-player .amp-lyrics-column {
  width: 100% !important;
  height: min(66vh, 600px) !important;
  min-height: 260px !important;
  max-height: 600px !important;
  overflow: hidden !important;
  justify-self: start !important;
}

.amp-fullscreen-player .amp-lyrics-view,
.amp-fullscreen-player .amp-lyrics-view.hidden {
  display: block !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  .amp-fullscreen-player .amp-content {
    width: calc(100vw - 32px) !important;
    height: calc(100dvh - 58px) !important;
    max-height: none !important;
    padding: 12px 0 24px !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    overflow-y: auto !important;
  }

  .amp-fullscreen-player .amp-player-column,
  .amp-fullscreen-player .amp-info-section {
    max-width: 100% !important;
  }

  .amp-fullscreen-player .amp-artwork-wrapper {
    width: min(240px, 62vw) !important;
    height: min(240px, 62vw) !important;
    max-width: 240px !important;
    max-height: 240px !important;
  }

  .amp-fullscreen-player .amp-lyrics-column {
    height: 36vh !important;
    min-height: 210px !important;
    max-height: none !important;
  }
}

/* 官方 GridDistortion 全屏背景，内容层保持在其上方。 */
#ampGridDistortionMount {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: rgb(var(--amp-accent-dark-rgb, 12, 10, 28));
}

#ampGridDistortionMount .distortion-container,
#ampGridDistortionMount canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Apple Music 式完整歌词列表：远行仍可见，只降低层级。 */
.amp-fullscreen-player .amp-lyrics-line,
.amp-fullscreen-player .amp-lyrics-line.far-2 {
  display: block;
  width: 100%;
  max-width: 100%;
  opacity: 0.34;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.5;
  padding: 7px 18px;
  text-align: left;
  transform: none;
  transition: opacity 0.35s ease, color 0.35s ease, transform 0.35s ease, font-size 0.35s ease;
}

.amp-fullscreen-player .amp-lyrics-line.near {
  display: block;
  opacity: 0.58;
  font-size: 17px;
  padding: 8px 18px;
}

.amp-fullscreen-player .amp-lyrics-line.active {
  display: block;
  opacity: 1;
  font-size: 22px;
  padding: 12px 18px;
  transform: scale(1.01);
}

/* Apple Music-like lyric hierarchy: bright, weight-led, and free of markers. */
.amp-fullscreen-player .amp-lyrics-view {
  scroll-behavior: smooth;
}

.amp-fullscreen-player .amp-lyrics-line,
.amp-fullscreen-player .amp-lyrics-line.far-2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: 0;
  transition: opacity 420ms cubic-bezier(.22, 1, .36, 1), color 420ms cubic-bezier(.22, 1, .36, 1), transform 420ms cubic-bezier(.22, 1, .36, 1), font-size 420ms cubic-bezier(.22, 1, .36, 1);
}

.amp-fullscreen-player .amp-lyrics-line.near {
  color: rgba(255,255,255,.96);
  opacity: .9;
  font-weight: 680;
}

.amp-fullscreen-player .amp-lyrics-line,
.amp-fullscreen-player .amp-lyrics-line.far-2 {
  color: rgba(255,255,255,.88);
  opacity: .66;
  font-weight: 620;
}

.amp-fullscreen-player .amp-lyrics-line.active {
  color: #fff;
  font-weight: 750;
  letter-spacing: 0;
  text-shadow: 0 1px 18px rgba(255,255,255,.16), 0 0 24px rgba(var(--amp-accent-rgb, 180, 94, 255), .32);
  transform: scale(1.018);
}

.amp-fullscreen-player .amp-lyrics-line.active::before {
  content: none;
  display: none;
}

.amp-fullscreen-player .amp-lyrics-line.active .lyric-text {
  background: linear-gradient(
    90deg,
    var(--amp-accent, #b45eff) 0%,
    color-mix(in srgb, var(--amp-accent, #b45eff) 48%, white) 46%,
    rgba(255,255,255,.99) 52%,
    #fff 100%
  );
  background-size: 200% 100%;
  background-position: calc((100 - var(--lyric-progress, 0)) * 1%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position var(--lyric-transition-ms, 220ms) linear;
  text-shadow: 0 0 18px rgba(var(--amp-accent-rgb, 180, 94, 255), .38);
}

.amp-fullscreen-player .amp-lyrics-intro-wait {
  display: inline-flex;
  position: absolute;
  left: 18px;
  top: 16px;
  transform: none;
  gap: 6px;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease;
}

.amp-fullscreen-player .amp-lyrics-stage.is-waiting-for-first-line .amp-lyrics-intro-wait {
  opacity: 1;
}

.amp-fullscreen-player .amp-lyrics-intro-wait i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amp-accent-light, #8ee7ff);
  box-shadow: 0 0 8px rgba(var(--amp-accent-light-rgb, 142, 231, 255), .7);
  animation: amp-lyric-wait 1.05s cubic-bezier(.37, 0, .63, 1) infinite;
}

.amp-fullscreen-player .amp-lyrics-intro-wait i:nth-child(2) { animation-delay: .14s; }
.amp-fullscreen-player .amp-lyrics-intro-wait i:nth-child(3) { animation-delay: .28s; }

@keyframes amp-lyric-wait {
  0%, 60%, 100% { opacity: .28; transform: scale(.72); }
  30% { opacity: 1; transform: scale(1); }
}

/* ============================================
   Browse workspace — discovery-first layout
   ============================================ */
.browse-page {
  position: relative;
  min-height: 100%;
  background: transparent;
}

#homeFloatingLinesMount {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 360ms ease, visibility 0s linear 360ms;
  background: #050914;
}

#homeFloatingLinesMount .floating-lines-container,
#homeFloatingLinesMount canvas {
  width: 100%;
  height: 100%;
}

body:has(#page-discover.active) #homeFloatingLinesMount {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

body:not(:has(#page-discover.active)) #homeFloatingLinesMount {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s;
}

body:has(#page-discover.active) #bgGradient,
body:has(#page-discover.active) #softAuroraHost {
  opacity: 0 !important;
  visibility: hidden !important;
}

#browsePrismMount {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #07111f;
  opacity: 0;
  visibility: hidden;
  transition: opacity 360ms ease, visibility 0s linear 360ms;
}

#browsePrismMount .prism-container,
#browsePrismMount canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

body:has(#page-search.active) #browsePrismMount {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.browse-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 42px 0 92px;
}

.browse-header {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(360px, 1.2fr);
  align-items: end;
  gap: 42px;
  padding-bottom: 28px;
}

.browse-eyebrow,
.browse-kicker {
  display: block;
  color: #b8a3ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.browse-heading h1 {
  margin: 8px 0 8px;
  color: #fbf8ff;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.browse-heading p {
  max-width: 360px;
  color: rgba(239, 236, 250, .66);
  font-size: 14px;
  line-height: 1.7;
}

.browse-search-box {
  min-height: 58px;
  border-radius: 16px;
  padding: 12px 18px;
  background: rgba(21, 20, 39, .72);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 18px 46px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.08);
}

.browse-search-box input {
  font-size: 16px;
  color: #fff;
}

.browse-search-box > i { color: #b8a3ff; }

.browse-modebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

.browse-source-tabs {
  padding: 0;
  gap: 8px;
}

.browse-source-tabs .source-tab {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.045);
}

.browse-source-tabs .source-tab.active {
  background: rgba(184,163,255,.18);
  border-color: rgba(184,163,255,.34);
  color: #f7f3ff;
  box-shadow: inset 0 1px rgba(255,255,255,.16);
}

.browse-mode-note,
.browse-section-meta {
  color: rgba(239,236,250,.48);
  font-size: 12px;
  white-space: nowrap;
}

.browse-section {
  padding: 32px 0 0;
}

.browse-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.browse-section-head h2 {
  margin: 6px 0 0;
  color: #f5f1fb;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
}

.browse-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.browse-quick-card {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-shadow: inset 0 1px rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.14);
  transition: transform .22s ease, border-color .22s ease, filter .22s ease;
}

.browse-quick-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.3);
  filter: saturate(1.12) brightness(1.05);
}

.browse-quick-hot { background: linear-gradient(135deg, rgba(213,65,111,.8), rgba(105,45,164,.68)); }
.browse-quick-new { background: linear-gradient(135deg, rgba(20,148,161,.8), rgba(42,84,160,.76)); }
.browse-quick-chinese { background: linear-gradient(135deg, rgba(93,72,179,.82), rgba(180,79,151,.72)); }
.browse-quick-focus { background: linear-gradient(135deg, rgba(38,94,103,.82), rgba(28,43,79,.84)); }

.browse-quick-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.17);
  color: #fff;
  font-size: 15px;
}

.browse-quick-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.browse-quick-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-quick-copy small {
  overflow: hidden;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-quick-arrow {
  align-self: flex-start;
  color: rgba(255,255,255,.64);
  font-size: 11px;
}

.browse-suggestion-chips {
  padding: 0;
  gap: 8px;
}

.browse-suggestion-chips .suggestion-chip {
  padding: 8px 13px;
  border-radius: 9px;
  color: rgba(248,245,255,.82);
  background: rgba(255,255,255,.045);
}

.browse-results-section {
  padding-bottom: 40px;
}

.browse-results-list {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: rgba(12,12,28,.34);
  box-shadow: inset 0 1px rgba(255,255,255,.05);
  overflow: hidden;
}

.browse-results-list-head,
.browse-results-list .browse-result-row {
  display: grid;
  grid-template-columns: 28px 48px minmax(180px, 1.3fr) minmax(150px, .9fr) 56px 72px;
  align-items: center;
  column-gap: 14px;
}

.browse-results-list-head {
  min-height: 38px;
  padding: 0 18px;
  color: rgba(239,236,250,.44);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  font-size: 11px;
  font-weight: 650;
}

.browse-results-list .browse-result-row {
  min-height: 70px;
  margin: 0;
  padding: 10px 18px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.browse-results-list .browse-result-row:hover {
  background: rgba(255,255,255,.055);
}

.browse-results-list .browse-result-row .row-cover {
  width: 48px;
  height: 48px;
  margin: 0;
}

.browse-result-index,
.browse-result-album {
  overflow: hidden;
  color: rgba(239,236,250,.56);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-result-index {
  color: rgba(239,236,250,.38);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.browse-results-list .row-info { min-width: 0; }
.browse-results-list .row-title { font-size: 14px; font-weight: 620; }
.browse-results-list .row-artist { margin-top: 3px; }
.browse-results-list .row-actions { justify-self: end; opacity: .72; }
.browse-results-list .browse-result-row:hover .row-actions { opacity: 1; }
.browse-results-list .row-duration { text-align: right; }

@media (max-width: 768px) {
  .browse-results-list-head,
  .browse-results-list .browse-result-row {
    grid-template-columns: 40px minmax(0, 1fr) 58px;
    column-gap: 11px;
  }
  .browse-results-list-head { padding: 0 12px; }
  .browse-results-list-head span:nth-child(1),
  .browse-results-list-head span:nth-child(4),
  .browse-results-list-head span:nth-child(5) { display: none; }
  .browse-results-list .browse-result-row { min-height: 64px; padding: 8px 12px; }
  .browse-results-list .browse-result-index,
  .browse-results-list .browse-result-album,
  .browse-results-list .row-duration { display: none; }
  .browse-results-list .browse-result-row .row-cover { width: 40px; height: 40px; }
  .browse-results-list .row-actions { opacity: 1; }
}

@media (max-width: 900px) {
  .browse-header { grid-template-columns: 1fr; gap: 22px; }
  .browse-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .browse-shell { width: calc(100% - 32px); padding: 28px 0 72px; }
  .browse-heading h1 { font-size: 34px; }
  .browse-heading p { font-size: 13px; }
  .browse-modebar { align-items: flex-start; flex-direction: column; }
  .browse-source-tabs { width: 100%; overflow-x: auto; }
  .browse-source-tabs .source-tab { flex: 0 0 auto; }
  .browse-mode-note { align-self: flex-end; }
  .browse-section-head { align-items: flex-start; }
  .browse-section-meta { white-space: normal; text-align: right; }
  .browse-quick-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Artist + album detail layouts
   Stable reading order: identity, action, then content.
   ============================================ */
.am-artist-page-surface .am-artist-hero {
  height: 390px;
  min-height: 390px;
}

.am-artist-page-surface .am-artist-content {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  grid-template-areas: "avatar copy actions";
  align-items: end;
  gap: 22px;
  padding: 24px 0 34px;
}

.am-artist-page-surface .am-artist-avatar-wrapper {
  grid-area: avatar;
  width: 128px;
  height: 128px;
  margin: 0;
}

.am-artist-copy {
  grid-area: copy;
  min-width: 0;
  align-self: end;
}

.am-artist-page-surface .am-artist-name {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  text-wrap: balance;
}

.am-artist-page-surface .am-artist-meta {
  margin: 10px 0 0;
  font-size: 14px;
  color: #594a3b;
}

.am-artist-page-surface .am-artist-actions {
  grid-area: actions;
  margin: 0;
  align-self: end;
}

.am-artist-page-surface .am-artist-play-btn {
  min-width: 112px;
  min-height: 42px;
  padding: 0 20px;
  justify-content: center;
}

.am-artist-page-surface .am-artist-bio-section {
  padding-top: 28px;
  padding-bottom: 24px;
}

.am-artist-page-surface .am-artist-section-header {
  margin-bottom: 18px;
}

.am-artist-page-surface .am-artist-section-title {
  font-size: 24px;
}

.am-artist-page-surface .am-artist-featured-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.am-artist-page-surface .am-artist-featured-grid .am-card {
  padding: 8px;
  border-radius: 10px;
}

.am-artist-page-surface .am-artist-featured-grid .am-card-title {
  font-size: 13px;
}

.am-artist-page-surface .am-artist-featured-grid .am-card-subtitle {
  font-size: 11px;
}

.am-artist-page-surface .am-artist-list .track-row {
  min-height: 64px;
  padding: 9px 8px;
}

.am-artist-page-surface .am-artist-list .row-cover {
  width: 48px;
  height: 48px;
}

.am-album-page-surface .album-detail-header {
  width: min(1160px, calc(100% - 64px));
  margin: 0 auto;
  padding: 26px 0 0;
}

.am-album-page-surface .album-detail-info {
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  margin-top: 22px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(93, 72, 47, 0.14);
}

.am-album-page-surface .album-detail-cover {
  width: clamp(220px, 24vw, 286px);
  height: clamp(220px, 24vw, 286px);
  flex: 0 0 auto;
  border-radius: 10px;
}

.am-album-page-surface .album-detail-meta {
  max-width: 620px;
}

.am-album-page-surface .album-detail-type {
  margin-bottom: 9px;
  color: #637568;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.am-album-page-surface .album-detail-meta h1 {
  min-height: 44px;
  margin-bottom: 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  text-wrap: balance;
}

.am-album-page-surface .album-detail-meta p {
  font-size: 14px;
  line-height: 1.5;
}

.am-album-page-surface .album-detail-actions {
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.am-album-page-surface .album-play-all-btn,
.am-album-page-surface #albumPlayAllBtn {
  min-height: 42px;
  padding: 0 19px;
  border-radius: 9px;
  font-size: 13px;
}

.am-album-page-surface .album-fav-btn {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  border-color: rgba(93, 72, 47, 0.2);
  color: #594a3b;
}

.am-album-page-surface #albumTrackList {
  width: min(1160px, calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

.am-album-page-surface .album-tracks-header {
  padding: 0 8px 12px;
  border-bottom-color: rgba(93, 72, 47, 0.14);
}

.am-album-page-surface .album-tracks-count {
  color: #594a3b;
  font-size: 13px;
}

.am-album-page-surface .album-tracks-list {
  padding-top: 5px;
}

.am-album-page-surface .album-track-row {
  min-height: 62px;
  margin: 0;
  padding: 8px;
}

.am-album-page-surface .album-track-number {
  width: 32px;
}

.am-album-page-surface .album-track-title {
  font-size: 14px;
  font-weight: 650;
}

.am-album-page-surface .album-track-artist,
.am-album-page-surface .album-track-duration {
  font-size: 12px;
}

@media (max-width: 768px) {
  .am-artist-page-surface .am-artist-hero {
    height: 330px;
    min-height: 330px;
  }

  .am-artist-page-surface .am-artist-content {
    width: calc(100% - 32px);
    grid-template-columns: 78px minmax(0, 1fr);
    grid-template-areas: "avatar copy" "actions actions";
    gap: 14px;
    padding-bottom: 22px;
  }

  .am-artist-page-surface .am-artist-avatar-wrapper {
    width: 78px;
    height: 78px;
  }

  .am-artist-page-surface .am-artist-name {
    font-size: 29px;
  }

  .am-artist-page-surface .am-artist-meta {
    margin-top: 6px;
    font-size: 12px;
  }

  .am-artist-page-surface .am-artist-actions {
    width: 100%;
  }

  .am-artist-page-surface .am-artist-play-btn {
    width: 100%;
  }

  .am-artist-page-surface .am-artist-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .am-album-page-surface .album-detail-header,
  .am-album-page-surface #albumTrackList {
    width: calc(100% - 32px);
  }

  .am-album-page-surface .album-detail-info {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding-bottom: 24px;
  }

  .am-album-page-surface .album-detail-cover {
    width: min(72vw, 260px);
    height: min(72vw, 260px);
    align-self: center;
  }

  .am-album-page-surface .album-detail-meta {
    max-width: none;
    text-align: left;
  }

  .am-album-page-surface .album-detail-meta h1 {
    font-size: 30px;
  }

  .am-album-page-surface .album-detail-actions {
    margin-top: 16px;
  }

  .am-album-page-surface .album-tracks-header {
    align-items: center;
  }

  .am-album-page-surface .album-track-row {
    padding: 8px 2px;
  }

  .am-album-page-surface .album-track-duration {
    display: none;
  }
}

/* Final album palette pass: cover colors drive the page GlassSurface. */
.am-album-page-surface {
  background-color: #0c0d14 !important;
  background:
    radial-gradient(ellipse 820px 560px at 18% 12%, rgba(var(--album-secondary-rgb, 72, 82, 108), .42), transparent 72%),
    linear-gradient(135deg, rgba(var(--album-primary-rgb, 28, 30, 42), .96), rgba(var(--album-tertiary-rgb, 12, 13, 20), .94));
  color: var(--album-text-color, #f7f5fb);
}
.am-album-page-surface > .glass-surface-mount .glass-surface--svg,
.am-album-page-surface > .glass-surface-mount .glass-surface--fallback {
  background: linear-gradient(135deg, rgba(var(--album-primary-rgb, 28, 30, 42), .74), rgba(var(--album-secondary-rgb, 72, 82, 108), .48)) !important;
  border: 0 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.42), 0 14px 44px rgba(0,0,0,.1) !important;
}
.am-album-page-surface .album-detail-meta h1,
.am-album-page-surface .album-detail-meta p,
.am-album-page-surface .album-tracks-count,
.am-album-page-surface .album-track-title { color: var(--album-text-color, #f7f5fb) !important; }
.am-album-page-surface .album-detail-type,
.am-album-page-surface .album-track-artist,
.am-album-page-surface .album-track-duration,
.am-album-page-surface .album-track-number,
.am-album-page-surface .album-track-more { color: var(--album-muted-color, rgba(247,245,251,.68)) !important; }
.am-album-page-surface .album-detail-info,
.am-album-page-surface .album-tracks-header,
.am-album-page-surface .album-track-row { border-color: var(--album-line-color, rgba(255,255,255,.16)) !important; }
.am-album-page-surface .back-btn,
.am-album-page-surface .album-fav-btn {
  background: rgba(var(--album-primary-rgb, 28,30,42), .72) !important;
  color: var(--album-text-color, #f7f5fb) !important;
  border-color: rgba(var(--album-secondary-rgb, 72,82,108), .46) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 10px 26px rgba(0,0,0,.2) !important;
}
.am-album-page-surface #albumTrackList .track-row:hover,
.am-album-page-surface .album-track-row:hover {
  background: rgba(var(--album-secondary-rgb, 72,82,108), .26) !important;
}
body:has(.am-album-page-surface.active) .main-content {
  background:
    radial-gradient(ellipse 900px 620px at 18% 12%, rgba(var(--album-secondary-rgb, 72,82,108), .34), transparent 72%),
    linear-gradient(135deg, rgba(var(--album-primary-rgb, 28,30,42), .96), rgba(var(--album-tertiary-rgb, 12,13,20), .94)) !important;
}
.am-album-page-surface .glass-surface--selection.glass-surface--svg,
.am-album-page-surface .glass-surface--selection.glass-surface--fallback,
.am-album-page-surface .album-track-row.playing > .glass-surface-mount .glass-surface {
  background: rgba(255, 255, 255, .14) !important;
  border: 0 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.28), 0 10px 30px rgba(0,0,0,.2) !important;
}

/* Album tracks use neutral, readable controls on every extracted palette. */
.am-album-page-surface .album-track-title,
.am-album-page-surface .album-track-row.playing .album-track-title {
  color: #ffffff !important;
}
.am-album-page-surface .track-playing-indicator span {
  background: rgba(255, 255, 255, .78) !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, .16);
}
.am-album-page-surface .album-track-more,
.am-album-page-surface .track-options-item i {
  color: rgba(255, 255, 255, .72) !important;
}
.am-album-page-surface .track-options-item:hover i,
.am-album-page-surface .album-track-more:hover {
  color: rgba(255, 255, 255, .92) !important;
}
.track-options-menu .track-options-item i {
  color: rgba(255, 255, 255, .72) !important;
  opacity: .9;
}
.track-options-menu .track-options-item:hover i {
  color: rgba(255, 255, 255, .92) !important;
}

/* The album action uses the same specular control as the home hero action. */
.am-album-page-surface #albumPlayAllBtn.album-play-all-mount {
  display: inline-flex !important;
  align-items: center;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.am-album-page-surface #albumPlayAllBtn .specular-button.album-play-specular {
  min-width: 142px;
  min-height: 42px;
  padding: 14px 24px;
  border: 0;
  border-radius: 18px;
  color: #e8ffff;
  background: linear-gradient(135deg, rgba(var(--album-secondary-rgb, 72, 82, 108), .34), rgba(var(--album-primary-rgb, 28, 30, 42), .16)) !important;
  box-shadow: 0 8px 20px rgba(var(--album-primary-rgb, 28, 30, 42), .2);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

/* DriftWall is the album library background; Cover Flow has its own untouched stage. */
#page-album-favorites {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - var(--player-height) - var(--dock-safe-area));
  background: #05030c !important;
  color: #f7f5fb;
}
#page-album-favorites > #albumDriftWallMount {
  background: #05030c;
  min-height: 100%;
}
#page-album-favorites > #albumDriftWallMount {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 100%;
  overflow: hidden;
  pointer-events: auto;
}
#page-album-favorites > #albumDriftWallMount .drift-wall {
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: #05030c;
  -webkit-mask-image: none;
  mask-image: none;
}
#page-album-favorites > .library-header,
#page-album-favorites > .library-workspace {
  position: relative;
  z-index: 2;
}
/* Cover Flow deliberately keeps its existing stage/background. */
#page-album-favorites.cover-flow-active > #albumDriftWallMount {
  display: none;
}
body:has(#page-album-favorites.active) .main-content {
  background: #05030c !important;
}
/* The album library owns its background. Do not let the app shell's older
   aurora/gradient layers show through the moving cover wall. */
body:has(#page-album-favorites.active) #bgGradient,
body:has(#page-album-favorites.active) #softAuroraHost,
body:has(#page-album-favorites.active) #libraryGradientWavesMount {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Album detail owns the viewport width. Keep the palette layer flush with
   the page edge so the underlying shell cannot peek through on the right. */
.am-album-page-surface {
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
  margin-right: 0;
}
.am-album-page-surface > .glass-surface-mount {
  inset: -2px 0 !important;
  max-width: 100%;
}
body:has(.am-album-page-surface.active) .main-content {
  overflow-x: clip;
}

/* A compact, invisible trigger keeps search results streaming as the reader
   approaches the end of the current source page. */
.search-results-sentinel {
  min-height: 1px;
  width: 100%;
}

/* Final mobile scroll contract.
   The app shell stays viewport-locked while .main-content is the single
   touch scroll container. Keeping this at the end prevents legacy media
   rules from disabling vertical gestures. */
@media (max-width: 768px) {
  html,
  body {
    min-height: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .main-content {
    display: block;
    width: 100%;
    height: 100dvh !important;
    min-height: 100dvh;
    max-height: none;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
    padding-top: 56px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .page {
    min-height: calc(100dvh - 56px);
  }

  .scroll-row,
  .browse-results-list {
    overflow-x: auto;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
}

/* Native mini-player wins over responsive and legacy player rules. */
html.native-mini-mode,
html.native-mini-mode body {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  overflow: hidden !important;
}
body.native-mini-mode > #playerBar {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 14px 20px 13px !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 26px !important;
  background: linear-gradient(112deg, rgba(222, 231, 241, .88), rgba(231, 232, 216, .82)) !important;
  background-image: none !important;
  box-shadow: 0 22px 46px rgba(22, 30, 40, .22) !important;
  backdrop-filter: blur(30px) saturate(1.18) !important;
  -webkit-backdrop-filter: blur(30px) saturate(1.18) !important;
  pointer-events: auto !important;
}
body.native-mini-mode #playerBar::before,
body.native-mini-mode #playerBar::after { display: none !important; content: none !important; }
body.native-mini-mode #playerBar > .glass-surface-mount,
body.native-mini-mode #playerBar .glass-surface-mount,
body.native-mini-mode #playerBar .glass-surface { display: none !important; }
body.native-mini-mode #playerBar > .native-mini-drag-region {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  background: transparent !important;
  cursor: grab;
  -webkit-app-region: drag;
}
body.native-mini-mode #playerBar > .player-left,
body.native-mini-mode #playerBar > .player-center,
body.native-mini-mode #playerBar > .player-right {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 3 !important;
}
body.native-mini-mode #playerBar > .player-center { display: grid !important; }
body.native-mini-mode #playerBar > #nativeMiniTrafficLights,
body.native-mini-mode #playerBar > #nativeMiniTrafficLights.is-visible {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: absolute !important;
  top: 17px !important;
  left: 28px !important;
  z-index: 8 !important;
}
body.native-mini-mode #playerBar > .player-left { top: 21px !important; left: 84px !important; right: 154px !important; height: 78px !important; }
body.native-mini-mode #playerBar > .player-center { top: 108px !important; right: 30px !important; bottom: 14px !important; left: 30px !important; }
body.native-mini-mode #playerBar > .player-right { top: 18px !important; right: 22px !important; z-index: 8 !important; width: 166px !important; justify-content: flex-end !important; gap: 7px !important; }
body.native-mini-mode .player-nowplaying,
body.native-mini-mode .player-cover { width: 82px !important; height: 82px !important; }
body.native-mini-mode .player-cover { border-radius: 12px !important; box-shadow: 0 7px 18px rgba(36, 46, 60, .2) !important; }
body.native-mini-mode .player-title { color: #16191e !important; font-size: 22px !important; font-weight: 700 !important; line-height: 1.1 !important; }
body.native-mini-mode .player-artist { color: rgba(45, 51, 59, .72) !important; font-size: 17px !important; margin-top: 6px !important; }
body.native-mini-mode .progress-container { grid-template-columns: 38px minmax(0, 1fr) 48px !important; gap: 10px !important; }
body.native-mini-mode .progress-bar .slider-track { height: 7px !important; background: rgba(80, 91, 105, .22) !important; }
body.native-mini-mode .player-controls { gap: clamp(42px, 8vw, 116px) !important; min-height: 50px !important; }
body.native-mini-mode .ctrl-btn { width: 40px !important; height: 40px !important; color: #262a2f !important; font-size: 22px !important; }
body.native-mini-mode .ctrl-play { width: 50px !important; height: 50px !important; font-size: 28px !important; }
body.native-mini-mode #playerBar .ctrl-btn,
body.native-mini-mode #playerBar .ctrl-play,
body.native-mini-mode #playerBar #playerLike,
body.native-mini-mode #playerBar #fullscreenBtn,
body.native-mini-mode #playerBar #nativeMiniBtn { position: relative; z-index: 4; }
body.native-mini-mode #playerDownload,
body.native-mini-mode #volumeBar { display: none !important; }
body.native-mini-mode #playerMore,
body.native-mini-mode #volumeBtn {
  display: inline-flex !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 4 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  color: #353a3e !important;
  background: rgba(255,255,255,.52) !important;
  border: 1px solid rgba(255,255,255,.44) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.64), 0 4px 10px rgba(56,64,74,.08) !important;
}

/* Mobile web contract: one vertical scroller, compact content geometry and
   touch-first rendering. Kept last so older desktop-era media rules cannot
   reintroduce side-rail or fixed-height behavior on iOS/Android. */
@media (max-width: 768px) {
  :root {
    --mobile-top-space: calc(82px + env(safe-area-inset-top));
    --mobile-bottom-space: calc(76px + env(safe-area-inset-bottom));
  }

  html,
  body {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 100%;
    overflow: hidden !important;
    overscroll-behavior-x: none;
  }

  body {
    display: block !important;
    touch-action: manipulation;
  }

  .main-content {
    box-sizing: border-box;
    width: 100vw !important;
    min-width: 0 !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: var(--mobile-top-space) 0 var(--mobile-bottom-space) !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    scroll-behavior: auto;
    scroll-padding: var(--mobile-top-space) 0 var(--mobile-bottom-space);
    overscroll-behavior-y: contain;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  .page,
  .page.active {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    min-height: calc(100dvh - var(--mobile-top-space));
    margin: 0 !important;
    padding-bottom: 120px;
  }

  .top-dock {
    height: calc(30px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    padding-inline: 12px;
    background: rgba(7, 7, 17, .82);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
  }

  .mobile-topbar {
    inset: calc(32px + env(safe-area-inset-top)) auto auto 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }

  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    pointer-events: auto;
    touch-action: manipulation;
  }

  .mobile-page-title,
  .mobile-topbar-spacer { display: none !important; }

  .hero-section { padding: 12px 12px 4px !important; }
  .hero-card {
    min-height: 0;
    padding: 18px 16px 16px !important;
    gap: 9px !important;
    border-radius: 18px;
  }
  .hero-art {
    width: min(42vw, 164px) !important;
    height: min(42vw, 164px) !important;
  }
  .hero-title {
    max-width: 100%;
    margin-top: 5px;
    font-size: clamp(21px, 6.5vw, 26px) !important;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }
  .hero-artist { margin-top: 7px; font-size: 15px; }
  .hero-album { margin-top: 4px; font-size: 12px; }
  #heroPlaySpecularMount { margin-top: 11px; }
  .hero-play-cyan { min-height: 44px; padding-inline: 22px; }

  .section { padding: 15px 16px 10px !important; }
  .section-header { margin-bottom: 12px; gap: 10px; }
  .section-title { min-width: 0; font-size: 20px; }
  .section-link { flex: 0 0 auto; color: rgba(255,255,255,.92); }

  .scroll-row {
    width: 100%;
    gap: 12px;
    padding-bottom: 4px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    touch-action: pan-x !important;
    -webkit-overflow-scrolling: touch;
  }
  .scroll-row > * { scroll-snap-align: start; }
  .am-card,
  .am-card .am-artwork {
    width: 112px !important;
    min-width: 112px !important;
  }
  .am-card .am-artwork { height: 112px !important; }

  .browse-shell {
    box-sizing: border-box;
    width: 100% !important;
    padding: 18px 16px 28px !important;
  }
  .browse-header { gap: 16px; }
  .browse-heading h1 { font-size: 30px; }
  .browse-heading p { max-width: 34rem; font-size: 13px; line-height: 1.55; }
  .browse-search-box { min-height: 48px; }
  .browse-section { margin-top: 26px; }
  .browse-section-head { gap: 10px; }
  .browse-section-head h2 { font-size: 21px; }
  .browse-section-meta { max-width: 34%; font-size: 11px; }
  .browse-quick-grid { gap: 10px; }
  .browse-quick-grid .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-block: 8px;
  }
  .browse-quick-grid .magic-bento-card {
    min-height: 142px;
    padding: 13px;
    border-radius: 16px;
  }
  .browse-quick-grid .magic-bento-card__description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .browse-results-list,
  .track-list-container { width: 100%; min-width: 0; }

  .library-page { padding-inline: 16px !important; }
  .library-header {
    min-height: 86px;
    padding: 14px 0 16px !important;
    gap: 12px;
  }
  .library-heading { min-width: 0; gap: 12px; }
  .library-heading h1 { font-size: 27px; line-height: 1.1; }
  .library-heading p { margin-top: 5px; font-size: 12px; }
  .library-icon { width: 52px; height: 52px; flex: 0 0 52px; }
  .library-header-actions { flex: 0 0 auto; }
  .library-primary-btn { min-height: 42px; padding-inline: 14px; }
  .library-workspace,
  .local-workspace { width: 100%; min-width: 0; padding-top: 14px !important; }

  .track-row,
  .album-track-row,
  .fav-track-row,
  .local-track-row,
  .browse-result-row {
    max-width: 100%;
    contain: layout paint;
  }
  .row-title,
  .row-artist,
  .album-track-title,
  .album-track-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .am-artist-page-surface .am-artist-hero { height: 280px; min-height: 280px; }
  .am-artist-page-surface .am-artist-content { padding-top: 18px; }
  .am-artist-page-surface .am-artist-featured-grid { gap: 10px; }
  .am-album-page-surface .album-detail-header,
  .am-album-page-surface #albumTrackList { width: calc(100% - 32px); }
  .am-album-page-surface .album-detail-cover {
    width: min(62vw, 230px);
    height: min(62vw, 230px);
  }
  .am-album-page-surface .album-detail-meta h1 { font-size: 27px; }

  .amp-fullscreen-player {
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .amp-fullscreen-player .amp-content {
    width: calc(100vw - 28px) !important;
    height: calc(100dvh - 52px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    padding: 4px 0 18px !important;
    gap: 14px !important;
    overscroll-behavior-y: contain;
  }
  .amp-fullscreen-player .amp-artwork-wrapper {
    width: min(52vw, 206px) !important;
    height: min(52vw, 206px) !important;
    margin-bottom: 9px !important;
  }
  .amp-fullscreen-player .amp-song-title { font-size: 20px; }
  .amp-fullscreen-player .amp-song-info { margin-bottom: 9px; }
  .amp-fullscreen-player .amp-lyrics-column {
    height: 42dvh !important;
    min-height: 240px !important;
  }
  .amp-fullscreen-player .amp-lyrics-line { font-size: 19px; line-height: 1.28; }
  .amp-fullscreen-player .amp-lyrics-line.active { font-size: 21px; }

  #homeFloatingLinesMount canvas,
  #browsePrismMount canvas,
  #softAuroraHost canvas { image-rendering: auto; }
  #browseSplashCursorMount { display: none !important; }
}

@media (max-width: 374px) {
  :root { --mobile-top-space: calc(78px + env(safe-area-inset-top)); }
  .hero-section { padding-inline: 10px !important; }
  .hero-card { padding: 15px 13px 14px !important; }
  .hero-art { width: 142px !important; height: 142px !important; }
  .section { padding-inline: 14px !important; }
  .library-page { padding-inline: 12px !important; }
  .library-heading p { display: none; }
  .library-primary-btn { padding-inline: 11px; font-size: 12px; }
  .amp-fullscreen-player .amp-artwork-wrapper {
    width: 174px !important;
    height: 174px !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .hero-card:hover,
  .am-card:hover,
  .track-row:hover,
  .album-track-row:hover,
  .magic-bento-card:hover,
  .icon-btn:hover { transform: none !important; }

  .hero-card,
  .am-card,
  .track-row,
  .album-track-row,
  button { -webkit-tap-highlight-color: transparent; }

  .tilted-card-inner { transform: none !important; transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
