/* Apple Design System - CloudTone Music */

:root {
  /* System Typography */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Apple Light Theme Color Palette */
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-solid: #ffffff;
  --surface-soft: rgba(240, 240, 245, 0.65);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --surface-active: rgba(0, 0, 0, 0.07);

  --text: #1d1d1f;
  --text-secondary: #86868b;
  --muted: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-bright: rgba(255, 255, 255, 0.5);

  /* Apple Music Red Accent System */
  --accent: #fc3c44;
  --accent-deep: #fa233b;
  --accent-hover: #e02027;
  --accent-gradient: linear-gradient(135deg, #fc3c44 0%, #fa233b 50%, #d62447 100%);
  --accent-soft: rgba(252, 60, 68, 0.12);
  --accent-glow: rgba(252, 60, 68, 0.35);

  --glow-x: 50vw;
  --glow-y: 40vh;

  /* Depth & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);

  /* Material Blur */
  --glass-blur: blur(20px) saturate(180%);
  --glass-blur-thick: blur(30px) saturate(190%);

  /* Apple Fluid Easing */
  --ease-spring: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-active: cubic-bezier(0.4, 0, 0.2, 1);

  --mobile-player-height: 64px;
  --mobile-player-side-gap: 12px;
  --mobile-player-bottom-gap: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: rgba(28, 28, 32, 0.75);
    --surface-solid: #1c1c1e;
    --surface-soft: rgba(44, 44, 48, 0.6);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-active: rgba(255, 255, 255, 0.12);

    --text: #f5f5f7;
    --text-secondary: #8e8e93;
    --muted: #8e8e93;
    --line: rgba(255, 255, 255, 0.12);
    --line-bright: rgba(255, 255, 255, 0.15);

    --accent-soft: rgba(252, 60, 68, 0.22);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  }
}

/* Reduced Motion & Transparency Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --surface: var(--surface-solid);
    --glass-blur: none;
    --glass-blur-thick: none;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-system);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lyrics-open {
  overflow: hidden;
}

/* Instant Response & Fluid Physics for Interactive Elements */
::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html, body, .sidebar, .content, .lyrics, .fullscreen-lyrics {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease-spring), opacity 0.2s var(--ease-spring), background-color 0.2s var(--ease-spring), border-color 0.2s var(--ease-spring);
}

/* Instant Micro-Feedback on Pointer Down */
button:active,
.scene-card:active,
.song-row:active,
.nav-item:active,
.rank-item:active {
  transform: scale(0.965);
  transition-duration: 0.08s;
}

/* Background Cursor Glow */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle 380px at var(--glow-x) var(--glow-y),
    rgba(252, 60, 68, 0.08),
    rgba(250, 35, 59, 0.03) 40%,
    transparent 70%
  );
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  display: block;
}

.brand-mark svg,
.nav-icon,
.search-icon,
.search-clear svg,
.transport-buttons svg,
.player-queue-btn svg,
.fullscreen-close-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.brand-mark .fill,
.transport-buttons .fill {
  fill: currentColor;
  stroke: none;
}

/* App Shell Layout */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 92px;
  min-height: 100vh;
}

/* Sidebar (macOS Apple Music Style Translucent Glass) */
.sidebar {
  grid-row: 1 / 3;
  padding: 24px 16px 116px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 28px;
  padding: 0 4px;
}

.brand,
.mobile-brand {
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s var(--ease-spring), opacity 0.15s var(--ease-spring);
}

.brand:hover,
.mobile-brand:hover {
  opacity: 0.88;
}

.brand:active,
.mobile-brand:active {
  transform: scale(0.96);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  background: var(--accent-gradient);
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.nav-section,
.rank-list {
  display: grid;
  gap: 4px;
}

.nav-item,
.rank-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: all 0.18s var(--ease-spring);
}

.nav-item:hover,
.rank-item:hover {
  background: var(--surface-hover);
}

.nav-item.active,
.rank-item.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav-icon {
  width: 19px;
  height: 19px;
  margin-right: 12px;
  flex: 0 0 auto;
}

.side-block {
  margin-top: 32px;
}

.side-block h2 {
  margin: 0 0 10px;
  padding-left: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rank-item {
  justify-content: space-between;
}

.rank-item span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Main Content View */
.content {
  min-width: 0;
  max-width: 100vw;
  padding: 22px 36px 124px;
  overflow: auto;
  overflow-x: hidden;
}

/* Topbar & Search Component */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  min-width: 0;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 320px;
  max-width: 100%;
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9999px; /* iOS Pill Shape */
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  transition: width 0.25s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
}

.search:hover {
  border-color: var(--line-bright);
}

.topbar-hot-searches {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.topbar-hot-searches .hot-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.topbar-hot-searches .tag-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.topbar-hot-searches .tag-row button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--text);
  background: var(--surface-solid);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  transition: all 0.15s var(--ease-spring);
}

.topbar-hot-searches .tag-row button:hover {
  border-color: rgba(252, 60, 68, 0.3);
  color: var(--accent);
  background: var(--accent-soft);
}

.search:focus-within {
  width: 380px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration,
.search input::-webkit-search-results-button,
.search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none !important;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 0.75;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.search-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 9999px;
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 2px 6px var(--accent-glow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s var(--ease-spring);
}

.search-submit-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 3px 10px var(--accent-glow);
}

.search-submit-btn:active {
  transform: scale(0.94);
}

.search-submit-btn[hidden] {
  display: none !important;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(142, 142, 147, 0.28);
  flex-shrink: 0;
  transition: background-color 0.15s var(--ease-spring), transform 0.15s var(--ease-spring);
}

.search-clear svg {
  width: 9px;
  height: 9px;
  stroke: #ffffff;
  stroke-width: 2.8;
}

.search-clear:hover {
  background: rgba(142, 142, 147, 0.45);
  transform: scale(1.08);
}

.search-clear:active {
  transform: scale(0.92);
}

.search-clear svg {
  width: 12px;
  height: 12px;
}

.quality {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.quality select {
  height: 34px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--text);
  background: var(--surface-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2086868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s var(--ease-spring);
}

.quality select:focus {
  border-color: var(--accent);
}

/* Hero Banner (Apple Music Curated Feature Card) */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 200px;
  margin-bottom: 26px;
  padding: 30px;
  border-radius: 18px; /* Continuous Squircle */
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(250, 35, 59, 0.92) 0%, rgba(140, 20, 40, 0.95) 100%),
    url("https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?auto=format&fit=crop&w=1600&q=80") center/cover;
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-copy,
.primary-action,
.hero-eq {
  position: relative;
  z-index: 1;
}

.hero p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em; /* Apple Display Negative Tracking */
}

.hero span {
  display: block;
  max-width: 480px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.4;
}

.hero-eq {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 52px;
  margin-left: auto;
}

.hero-eq span {
  width: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  animation: eqPulse 1.4s var(--ease-spring) infinite alternate;
}

.hero-eq span:nth-child(1) { height: 20px; }
.hero-eq span:nth-child(2) { height: 42px; animation-delay: -0.2s; }
.hero-eq span:nth-child(3) { height: 28px; animation-delay: -0.4s; }
.hero-eq span:nth-child(4) { height: 48px; animation-delay: -0.6s; }
.hero-eq span:nth-child(5) { height: 32px; animation-delay: -0.8s; }

@keyframes eqPulse {
  0% { transform: scaleY(0.4); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}

.primary-action {
  height: 40px;
  padding: 0 22px;
  border-radius: 9999px;
  color: var(--accent);
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.primary-action:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

/* Discover Section - Apple Music Featured Cards (精致唱片卡片) */
.scene-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.big-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-spring), border-color 0.22s ease;
  cursor: pointer;
  text-align: left;
  outline: none;
}

.big-card:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 60, 68, 0.35);
  box-shadow: var(--shadow-md);
}

.big-card:active {
  transform: scale(0.98);
}

.big-card-cover {
  position: relative;
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.big-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease-spring);
}

.big-card:hover .big-card-cover img {
  transform: scale(1.08);
}

.big-card-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 12px var(--accent-glow);
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.2s var(--ease-spring);
}

.big-card:hover .big-card-play-btn {
  opacity: 1;
  transform: scale(1);
}

.big-card-play-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.big-card-info {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.big-card-tag {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.big-card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
}

.big-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hot Searches & Tabs */
.hot-searches {
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  min-width: 0;
  max-width: 100%;
}

.breadcrumb-link {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  background: transparent;
  border: 0;
  flex-shrink: 0;
  transition: color 0.18s var(--ease-spring), opacity 0.18s var(--ease-spring);
}

.breadcrumb-link:hover {
  color: var(--accent);
  opacity: 0.9;
}

.breadcrumb-sep {
  color: var(--muted);
  font-weight: 400;
  font-size: 16px;
  user-select: none;
  opacity: 0.7;
  flex-shrink: 0;
}

.breadcrumb-current {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--text);
  background: var(--surface-solid);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s var(--ease-spring);
}

/* Apple Music PC / Desktop Refined Compact Chart Cards */
.chart-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 14px;
  padding: 4px 4px 14px 4px;
  margin-bottom: 22px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  user-select: none;
}

.chart-tabs::-webkit-scrollbar {
  display: none !important;
  width: 0;
  height: 0;
}

.chart-tabs.is-dragging {
  cursor: grabbing !important;
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
}

.chart-tabs.is-dragging .chart-card {
  transition: none !important;
}

.chart-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 136px !important;
  min-width: 136px !important;
  max-width: 136px !important;
  flex: 0 0 136px !important;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-spring), border-color 0.22s ease;
  cursor: pointer;
  user-select: none;
  outline: none;
  text-align: left;
  scroll-snap-align: start;
}

.chart-card:hover {
  transform: translateY(-3px);
  border-color: rgba(252, 60, 68, 0.35);
  box-shadow: var(--shadow-md);
}

.chart-card:active {
  transform: scale(0.97);
}

.chart-card.active {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-soft), var(--shadow-sm);
}

.chart-card-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-soft);
}

.chart-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease-spring);
}

.chart-card:hover .chart-card-cover {
  transform: scale(1.05);
}

.chart-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s var(--ease-spring);
}

.chart-card:hover .chart-card-overlay {
  opacity: 1;
}

.chart-card-play-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 14px var(--accent-glow);
  transform: scale(0.85);
  transition: transform 0.2s var(--ease-spring);
}

.chart-card:hover .chart-card-play-btn {
  transform: scale(1);
}

.chart-card-play-btn:hover {
  transform: scale(1.1) !important;
}

.chart-card-play-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.chart-card-active-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 9999px;
  color: #ffffff;
  background: var(--accent-gradient);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px var(--accent-glow);
}

.chart-card-info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chart-card-tag {
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chart-card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-card-sub {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-tab-cover-placeholder svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.chart-tab-item.active .chart-tab-cover-placeholder {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tag-row button:hover {
  border-color: rgba(252, 60, 68, 0.3);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Workspace Grid Layout */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
}

.song-panel {
  padding: 20px 12px;
}

.lyric-panel {
  padding: 20px;
}

.song-panel .section-heading {
  padding: 0 12px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-all-btn,
.play-all-btn span {
  color: #ffffff !important;
}

.play-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  border-radius: 9999px;
  color: #ffffff !important;
  background: var(--accent-gradient);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-spring);
}

.play-all-btn .btn-icon {
  width: 12px;
  height: 12px;
  fill: #ffffff !important;
  color: #ffffff !important;
  stroke: none;
}

.play-all-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.ghost-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 9999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 600;
}

.ghost-btn:hover {
  background: rgba(252, 60, 68, 0.2);
}

/* Artist Classification Category Filter Tabs */
.artists-category-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 12px 8px;
  margin-bottom: 0;
}

.artist-cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--muted);
  background: var(--surface-solid);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease-spring), background-color 0.2s var(--ease-spring), border-color 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-spring);
}

.artist-cat-btn:hover {
  color: var(--text);
  border-color: var(--line-bright);
  background: var(--surface-hover);
}

.artist-cat-btn.active {
  color: #ffffff;
  border-color: transparent;
  background: var(--accent-gradient);
  font-weight: 600;
  box-shadow: 0 3px 10px var(--accent-glow);
}

/* PC Artist Grid - 6 to 10 Per Row */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 20px 12px;
  padding: 12px 6px 20px;
  min-height: 280px;
}

.artists-grid[hidden],
.artists-category-tabs[hidden] {
  display: none !important;
}

/* Responsive Grid Column Breakpoints */
@media (max-width: 1680px) {
  .artists-grid {
    grid-template-columns: repeat(9, 1fr);
  }
}

@media (max-width: 1520px) {
  .artists-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 1360px) {
  .artists-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (max-width: 1200px) {
  .artists-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 960px) {
  .artists-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px 10px;
  }
}

@media (max-width: 680px) {
  .artists-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 8px;
    padding: 8px 4px;
  }
}

@media (max-width: 480px) {
  .artists-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 6px;
  }
}

@media (min-width: 961px) {
  .artists-grid {
    --artist-cover-max: 112px;
  }

  .artist-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .artist-avatar-wrapper {
    width: min(100%, var(--artist-cover-max));
    height: auto;
    padding-top: 0;
    aspect-ratio: 1 / 1;
  }
}

/* Artist Card Design (Apple Music Circular Avatar Style) */
.artist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: transform 0.22s var(--ease-spring), background-color 0.2s ease, box-shadow 0.22s var(--ease-spring);
}

.artist-card:hover {
  background: var(--surface-hover);
  transform: translateY(-4px);
}

.artist-card:active {
  transform: scale(0.95);
}

.artist-avatar-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 绝对标准的正方形 1:1 容器 */
  height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.25s var(--ease-spring), transform 0.25s var(--ease-spring);
  flex-shrink: 0;
}

.artist-card:hover .artist-avatar-wrapper {
  box-shadow: 0 8px 24px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.artist-avatar-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  transition: transform 0.35s var(--ease-spring);
}

.artist-card:hover .artist-avatar-img {
  transform: scale(1.08);
}

.artist-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  border-radius: 16px;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s var(--ease-spring);
}

.artist-card:hover .artist-card-overlay {
  opacity: 1;
}

.artist-play-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 3px 10px var(--accent-glow);
  transform: scale(0.85);
  transition: transform 0.2s var(--ease-spring);
}

.artist-card:hover .artist-play-btn {
  transform: scale(1);
}

.artist-play-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.artist-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Song Table (macOS List Style) */
.song-table-header {
  display: grid;
  grid-template-columns: 32px 44px minmax(160px, 1fr) minmax(100px, 0.6fr) 104px;
  align-items: center;
  gap: 12px;
  padding: 0 12px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.song-table-header .col-num {
  text-align: center;
}

.song-table-header .col-action {
  text-align: right;
}

.song-table {
  display: grid;
  gap: 2px;
}

.song-row {
  display: grid;
  grid-template-columns: 32px 44px minmax(160px, 1fr) minmax(100px, 0.6fr) 104px;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 12px;
  border-radius: 10px;
  transition: background-color 0.15s var(--ease-spring);
}

.song-row:hover {
  background: var(--surface-hover);
}

.song-row.playing {
  background: var(--accent-soft);
}

.song-row.playing .song-name {
  color: var(--accent);
  font-weight: 700;
}

.song-index {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.song-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.song-main {
  min-width: 0;
}

.song-name,
.song-artist,
.song-album {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-name {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.song-artist,
.song-album {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.song-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.song-action,
.song-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.18s var(--ease-spring);
}

.song-action {
  color: var(--accent);
  background: var(--accent-soft);
  opacity: 0.95;
}

.song-row:hover .song-action {
  opacity: 1;
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.song-action-secondary {
  color: var(--text-secondary);
  background: var(--surface-soft);
  opacity: 0.9;
}

.song-action-secondary:hover {
  opacity: 1;
  color: var(--accent);
  background: var(--accent-soft);
}

.action-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
  stroke: currentColor;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  color: var(--muted);
  opacity: 0.6;
}

.empty-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 320px;
  line-height: 1.5;
}

.empty-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 18px;
  border-radius: 9999px;
  color: #fff;
  background: var(--accent-gradient);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease-spring);
}

.empty-reload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(252, 60, 68, 0.35);
}

.empty-reload-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.pager button {
  height: 32px;
  padding: 0 16px;
  border-radius: 9999px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 500;
}

.pager button:hover:not(:disabled) {
  color: #fff;
  background: var(--accent);
}

.pager button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pager span {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Sidebar Now Playing - Apple Music Big Album Card (封面大卡片) */
.lyric-panel {
  position: sticky;
  top: 24px;
}

.now-art-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  --beat: 0;
  --beat-soft: 0;
}

.now-art-glow {
  position: absolute;
  inset: 12px;
  border-radius: 24px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  opacity: calc(0.45 + var(--beat-soft) * 0.45);
  filter: blur(28px) saturate(190%);
  transform: scale(calc(0.96 + var(--beat) * 0.04));
  transition: opacity 0.3s var(--ease-spring), transform 0.3s var(--ease-spring);
}

.now-art-glow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-art-card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 20px; /* Apple Music Continuous Squircle */
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.16), 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--line-bright);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.now-art-card img#coverArt {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease-spring);
}

.now-art-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.now-art-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.22), 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(252, 60, 68, 0.4);
}

.now-art-card:hover img#coverArt {
  transform: scale(1.05);
}

.now-art-card.is-playing {
  transform: scale(1.01);
  box-shadow: 0 24px 50px rgba(252, 60, 68, 0.25), 0 6px 18px rgba(0, 0, 0, 0.12);
}

.now-art-card.is-playing:hover {
  transform: translateY(-4px) scale(1.03);
}

/* Big Card Overlay Play Trigger */
.cover-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s var(--ease-spring);
}

.now-art-card:hover .cover-card-overlay {
  opacity: 1;
}

.cover-play-trigger {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 8px 24px var(--accent-glow);
  transform: scale(0.85);
  transition: transform 0.25s var(--ease-spring);
}

.now-art-card:hover .cover-play-trigger {
  transform: scale(1);
}

.cover-play-trigger:hover {
  transform: scale(1.12) !important;
}

.cover-play-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: badgePulse 1.5s infinite alternate;
}

@keyframes badgePulse {
  0% { opacity: 0.5; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.now-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.now-meta > div {
  min-width: 0;
  flex: 1;
}

.now-meta h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lyric-fullscreen-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 9999px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.lyric-fullscreen-btn:hover {
  color: #fff;
  background: var(--accent);
}

.lyrics {
  position: relative;
  height: 260px;
  overflow: auto;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
  scroll-behavior: smooth;
}

.lyric-line {
  min-height: 28px;
  transition: color 0.2s var(--ease-spring), font-weight 0.2s var(--ease-spring), transform 0.2s var(--ease-spring);
}

.lyric-line.active {
  color: var(--accent);
  font-weight: 700;
  transform: scale(1.02);
}

/* Apple Music Immersive Fullscreen Lyrics Mode (Apple Dual-Canvas Layout) */
.lyric-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
  color: #ffffff;
  background: #09090b;
  animation: fadeInLyric 0.35s var(--ease-spring);
  overflow: hidden;
}

@keyframes fadeInLyric {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.lyric-fullscreen-bg {
  position: absolute;
  inset: -30px;
  overflow: hidden;
  opacity: 0.55;
  pointer-events: none;
}

.lyric-fullscreen-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(80px) saturate(180%);
  transform: scale(1.15);
}

.lyric-fullscreen-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
}

.fullscreen-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 9999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
  transition: all 0.2s var(--ease-spring);
}

.fullscreen-close-btn span {
  display: inline-block;
  line-height: 1;
  margin-top: 1px;
}

.fullscreen-close-btn svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex-shrink: 0;
}

.lyric-fullscreen-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.fullscreen-track-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.fullscreen-art-container {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.fullscreen-art-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fullscreen-meta h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #ffffff;
}

.fullscreen-meta p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  font-weight: 500;
}

.fullscreen-lyrics {
  height: 100%;
  max-height: 72vh;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10vh 0 18vh;
  text-align: left;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.fullscreen-lyrics .lyric-line {
  min-height: 52px;
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(20px, 2.6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.5;
  transition: color 0.3s var(--ease-spring), transform 0.3s var(--ease-spring), opacity 0.3s var(--ease-spring);
  transform-origin: left center;
}

.fullscreen-lyrics .lyric-line.active {
  color: #ffffff;
  font-weight: 800;
  transform: scale(1.06);
  opacity: 1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 900px) {
  .lyric-fullscreen {
    padding: 24px 20px;
  }

  .lyric-fullscreen-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .fullscreen-track-info {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .fullscreen-art-container {
    width: 80px;
    height: 80px;
    border-radius: 12px;
  }

  .fullscreen-meta h2 {
    font-size: 20px;
  }

  .fullscreen-meta p {
    font-size: 14px;
  }

  .fullscreen-lyrics {
    text-align: center;
  }

  .fullscreen-lyrics .lyric-line {
    transform-origin: center center;
  }
}

/* Floating Apple Music Player Bar */
.player {
  --beat: 0;
  --beat-soft: 0;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 2fr) minmax(200px, 1fr);
  align-items: center;
  gap: 28px;
  height: 84px;
  padding: 10px 32px;
  border-top: 1px solid var(--line-bright);
  background: var(--surface);
  backdrop-filter: var(--glass-blur-thick);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

.player-ripple {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse 80% 180% at 50% 100%,
    rgba(252, 60, 68, calc(0.04 + var(--beat-soft) * 0.12)),
    transparent 60%
  );
  transition: opacity 0.2s var(--ease-spring);
}

.mobile-player-progress-bar {
  display: none;
}

.player.is-playing .player-ripple {
  opacity: 1;
}

.player-song {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  margin-left: -4px;
  border-radius: 12px;
  transition: background-color 0.15s var(--ease-spring), transform 0.15s var(--ease-spring);
}

.player-song:hover {
  background: var(--surface-hover);
}

.player-song:active {
  transform: scale(0.97);
}

.play-visual {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.play-visual img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.player-song strong,
.player-song span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.player-song-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-song strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-quality-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line-bright);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  white-space: nowrap;
  vertical-align: middle;
  opacity: 0.85;
  transition: all 0.2s var(--ease-spring);
}

.player-song span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

/* Player Controls & Transport */
.transport {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.transport-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
}

.transport-buttons button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text);
  transition: all 0.15s var(--ease-spring);
}

.transport-buttons button:not(.play-btn):hover {
  background: var(--surface-hover);
  color: var(--accent);
}

.transport-buttons .play-btn {
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.transport-buttons .play-btn:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 18px var(--accent-glow);
  opacity: 0.95;
}

.transport-buttons svg {
  width: 16px;
  height: 16px;
}

.transport-buttons .play-btn svg {
  width: 18px;
  height: 18px;
}

/* Custom Apple Smooth Filled Sliders */
.progress-row,
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.progress-row span,
.volume-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.progress-row span {
  width: 36px;
  flex: 0 0 36px;
  text-align: center;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  flex: 1;
  height: 4px;
  border-radius: 9999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--progress-percent, 0%),
    rgba(0, 0, 0, 0.08) var(--progress-percent, 0%),
    rgba(0, 0, 0, 0.08) 100%
  );
  outline: none;
  cursor: pointer;
  transition: height 0.15s var(--ease-spring);
}

@media (prefers-color-scheme: dark) {
  input[type="range"] {
    background: linear-gradient(
      to right,
      var(--accent) 0%,
      var(--accent) var(--progress-percent, 0%),
      rgba(255, 255, 255, 0.15) var(--progress-percent, 0%),
      rgba(255, 255, 255, 0.15) 100%
    );
  }
}

input[type="range"]:hover {
  height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: width 0.15s var(--ease-spring), height 0.15s var(--ease-spring), opacity 0.15s var(--ease-spring);
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  opacity: 1;
}

.player-controls-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 180px;
}

/* Apple Music Player Queue Drawer (Up Next Popover) */
.player-queue-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: 8px;
  border-radius: 50%;
  color: var(--text-secondary);
  background: var(--surface-soft);
  flex-shrink: 0;
  transition: all 0.15s var(--ease-spring);
}

.player-queue-btn:hover,
.player-queue-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.player-queue-btn svg {
  width: 16px;
  height: 16px;
}

.queue-drawer {
  position: absolute;
  right: 24px;
  bottom: 96px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  max-height: 480px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
  animation: popoverFadeIn 0.25s var(--ease-spring);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.queue-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.queue-drawer-header strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.queue-clear-btn {
  padding: 2px 8px;
  border-radius: 9999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s var(--ease-spring);
}

.queue-clear-btn:hover {
  color: #ffffff;
  background: var(--accent);
}

.queue-drawer-list {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  max-height: 380px;
  padding-right: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.queue-drawer-list::-webkit-scrollbar {
  display: none;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s var(--ease-spring), transform 0.15s var(--ease-spring);
}

.queue-item:hover {
  background: var(--surface-hover);
}

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

.queue-item.playing {
  background: var(--accent-soft);
}

.queue-item.playing .queue-item-name {
  color: var(--accent);
  font-weight: 700;
}

.queue-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

.queue-item-name,
.queue-item-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.queue-item-artist {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.queue-item-playing-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 6px;
}

.queue-item-remove-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0;
  transition: all 0.15s var(--ease-spring);
}

.queue-item:hover .queue-item-remove-btn {
  opacity: 1;
}

.queue-item-remove-btn:hover {
  color: #ffffff;
  background: var(--accent);
}

.queue-item-remove-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.2;
}

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

.mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.mobile-brand .brand-mark svg {
  width: 18px;
  height: 18px;
}

.mobile-brand strong {
  font-size: 16px;
  font-weight: 700;
}

/* Responsive Apple Layout Adaptations */
@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  .sidebar {
    display: none;
  }

  .mobile-brand {
    display: flex;
  }

  .artists-category-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 4px 8px;
    margin-bottom: 0;
  }

  .artist-cat-btn {
    width: 100%;
    padding: 0 8px;
  }

  /* 响应式排行榜大卡片横向无缝滑动 (iOS Horizontal Scroll Track) */
  .chart-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 12px;
    padding: 6px 4px 14px 4px;
    margin-bottom: 16px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    overscroll-behavior-x: contain;
    user-select: none;
    will-change: scroll-position;
  }

  .chart-tabs[hidden] {
    display: none !important;
  }

  .chart-tabs::-webkit-scrollbar {
    display: none !important;
    width: 0;
    height: 0;
  }

  .chart-card {
    width: 146px !important;
    min-width: 146px !important;
    max-width: 146px !important;
    flex: 0 0 146px !important;
    scroll-snap-align: none !important;
    transform: translateZ(0);
    will-change: transform;
  }

  /* 移动端 Apple iOS 动态无限滚动加载样式 */
  .pager {
    display: none !important; /* 移动端隐藏传统分页按钮 */
  }

  .mobile-scroll-loading,
  .mobile-scroll-ended {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
  }

  .mobile-scroll-ended {
    opacity: 0.75;
    letter-spacing: 0.02em;
  }

  .mobile-scroll-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--line-bright);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

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

  .content {
    padding: calc(14px + var(--safe-top)) 14px calc(var(--mobile-player-height) + var(--mobile-player-bottom-gap) + var(--safe-bottom) + 28px);
  }

  .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
  }

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

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .mobile-brand .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .mobile-brand strong {
    font-size: 15px;
    font-weight: 700;
  }

  .search,
  .search:focus-within {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 34px;
  }

  .search input {
    font-size: 14px; /* Apple iOS 现代精致字号 */
    padding-left: 28px;
    text-overflow: ellipsis;
  }

  .search input::placeholder {
    font-size: 13px;
    opacity: 0.7;
  }

  .search-submit-btn {
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
  }

  .search-icon {
    width: 14px;
    height: 14px;
    left: 10px;
  }

  .quality {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 0;
    flex-shrink: 0;
  }

  .quality select {
    height: 34px;
    font-size: 12px;
    padding: 0 22px 0 10px;
    background-position: right 6px center;
  }

  .topbar-hot-searches {
    display: none !important;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-height: auto;
    padding: 22px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    font-size: 22px;
    line-height: 1.25;
  }

  .hero span {
    font-size: 13px;
    margin-top: 6px;
  }

  .hero-eq {
    display: none;
  }

  .primary-action {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    align-self: flex-start;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .scene-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .scene-card {
    padding: 12px;
    min-height: 80px;
  }

  .scene-card strong {
    font-size: 14px;
  }

  .song-panel {
    padding: 14px 8px;
  }

  .song-panel .section-heading {
    padding: 0 4px;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }

  .song-panel .section-heading h2 {
    flex: 1;
    min-width: 0;
    font-size: 17px;
  }

  .breadcrumb {
    font-size: 17px;
  }

  .breadcrumb-link {
    font-size: 17px;
  }

  .breadcrumb-current {
    font-size: 17px;
  }

  .song-panel .heading-actions {
    flex-shrink: 0;
  }

  .song-row {
    grid-template-columns: 24px 40px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 0 4px;
  }

  .song-album {
    display: none;
  }

  .song-actions-cell {
    gap: 2px;
  }

  .song-action,
  .song-action-secondary,
  .song-action-secondary[data-play-mv] {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
    flex-shrink: 0;
    background: transparent !important; /* 彻底去除多余红粉圆盘底框 */
    border: none !important;
    box-shadow: none !important;
    color: var(--text-secondary); /* Apple 扁平简约中性色调 */
    transition: all 0.15s ease;
  }

  .song-actions-cell .action-text {
    display: none; /* 移动端隐藏文字 */
  }

  .action-icon {
    width: 21px;
    height: 21px;
  }

  /* 主播放按钮与MV按钮使用 Apple 纯粹鲜明品牌红 */
  .song-action,
  .song-action-secondary.action-mv {
    color: var(--accent);
    opacity: 0.9;
  }

  .song-action-secondary {
    color: var(--text-secondary);
    opacity: 0.85;
  }

  /* Apple 触控交互态：极轻微微透光晕与平滑微缩放 */
  .song-action:hover,
  .song-action:active,
  .song-action-secondary:hover,
  .song-action-secondary:active,
  .song-action-secondary[data-play-mv]:hover,
  .song-action-secondary[data-play-mv]:active {
    opacity: 1;
    color: var(--accent);
    background: rgba(252, 60, 68, 0.08) !important;
    transform: scale(1.12);
  }

  .lyric-panel {
    display: none; /* 移动端隐藏右侧模块化歌词面板 */
  }

  /* 移动端 Apple iOS 经典悬浮播放胶囊 (Floating Mini Player Pill) */
  .player-song-title-row {
    gap: 5px;
  }

  .player-quality-badge {
    height: 13px;
    padding: 0 3px;
    font-size: 8px;
    border-radius: 2.5px;
  }

  .player {
    position: fixed;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: var(--mobile-player-height);
    margin: 0 var(--mobile-player-side-gap) calc(var(--mobile-player-bottom-gap) + var(--safe-bottom));
    padding: 6px 12px;
    border-radius: 9999px; /* iOS Floating Pill */
    border: 1px solid var(--line-bright);
    background: var(--surface);
    backdrop-filter: var(--glass-blur-thick);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  }

  /* 移动端悬浮胶囊底部进度条组件 */
  .mobile-player-progress-bar {
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    touch-action: none;
  }

  .mobile-progress-track {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.16);
    overflow: hidden;
    transition: all 0.2s var(--ease-spring);
    pointer-events: none;
  }

  .mobile-progress-fill {
    height: 100%;
    width: var(--mobile-progress-percent, 0%);
    background: var(--accent-gradient, linear-gradient(90deg, #ff416c, #ff4b2b));
    border-radius: 9999px;
    box-shadow: 0 0 8px var(--accent-glow);
    transition: width 0.1s linear;
  }

  .mobile-player-progress-bar input[type="range"] {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 20px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
    -webkit-appearance: none;
    appearance: none;
  }

  .mobile-player-progress-bar:hover .mobile-progress-track,
  .mobile-player-progress-bar:active .mobile-progress-track,
  .mobile-player-progress-bar.is-dragging .mobile-progress-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.28);
  }

  /* 拖拽时间气泡 Tooltip */
  .mobile-progress-tooltip {
    position: absolute;
    bottom: 22px;
    left: var(--mobile-progress-percent, 0%);
    transform: translateX(-50%);
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .mobile-player-progress-bar.is-dragging .mobile-progress-tooltip,
  .mobile-player-progress-bar:active .mobile-progress-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
  }

  .player-song {
    flex: 1;
    min-width: 0;
    padding: 0;
    margin: 0;
  }

  .play-visual {
    width: 44px;
    height: 44px;
  }

  @keyframes recordSpin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  .play-visual img {
    width: 44px;
    height: 44px;
    border-radius: 50%; /* iOS Pill Mini Player Circular Artwork */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    animation: recordSpin 16s linear infinite;
    animation-play-state: paused; /* 默认暂停静止 */
    transition: box-shadow 0.3s ease;
    will-change: transform;
  }

  /* 移动端播放时封面顺滑360度唱片旋转 */
  .player.is-playing .play-visual img {
    animation-play-state: running;
    box-shadow: 0 4px 16px rgba(252, 60, 68, 0.32);
  }

  .transport {
    width: auto;
    flex-direction: row;
    gap: 0;
  }

  .transport-buttons {
    gap: 6px;
  }

  .transport-buttons button {
    width: 32px;
    height: 32px;
  }

  .transport-buttons .play-btn {
    width: 36px;
    height: 36px;
  }

  .progress-row {
    display: none; /* 移动端悬浮胶囊隐藏冗余进度数字，保持极简视觉 */
  }

  .volume-row {
    display: none;
  }

  .player-controls-right {
    margin-left: 0;
  }

  .queue-drawer {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: calc(var(--mobile-player-height) + var(--mobile-player-bottom-gap) + var(--safe-bottom) + 12px);
  }
}

@media (max-width: 640px) {
  .scene-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .quality span {
    display: none;
  }
}

/* Apple Music MV Badge & Video Player Modal */
.song-mv-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 16px;
  padding: 0 5px;
  margin-left: 6px;
  border: 1px solid rgba(252, 60, 68, 0.32);
  border-radius: 4px;
  color: var(--accent);
  background: rgba(252, 60, 68, 0.08);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
  transition: all 0.18s var(--ease-spring);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.song-mv-badge .mv-badge-svg {
  width: 9px;
  height: 9px;
  stroke: currentColor;
  fill: none;
}

/* 扩展触控防误触高敏热区 */
.song-mv-badge::before {
  content: "";
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: -8px;
  right: -8px;
  z-index: 1;
}

.song-mv-badge:hover,
.song-mv-badge:active {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.song-action-secondary[data-play-mv] {
  position: relative;
  z-index: 2;
  color: var(--accent);
  touch-action: manipulation;
}

.now-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.now-mv-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  border-radius: 9999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.18s var(--ease-spring);
}

.now-mv-btn:hover {
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Fullscreen Immersive MV Modal */
.mv-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 24px 36px;
  background: #000000;
  animation: mvModalFadeIn 0.3s var(--ease-spring);
  overflow: hidden;
}

@keyframes mvModalFadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.mv-modal-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(252, 60, 68, 0.15), transparent 70%);
  pointer-events: none;
}

body.mv-open {
  overflow: hidden !important;
}

.mv-modal-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.mv-modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mv-modal-badge {
  padding: 2px 8px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent-gradient);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.mv-modal-title-group strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv-modal-artist {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.mv-control-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.mv-control-item:hover {
  border-color: rgba(252, 60, 68, 0.5);
  background: rgba(255, 255, 255, 0.18);
}

.mv-control-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  white-space: nowrap;
}

.mv-control-item select {
  height: 100%;
  padding: 0 18px 0 2px;
  border: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center;
  appearance: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.mv-control-item select option {
  background: #1c1c1e;
  color: #ffffff;
}

.mv-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 9999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s var(--ease-spring);
}

.mv-close-btn:hover {
  background: var(--accent);
}

.mv-close-btn svg {
  width: 14px;
  height: 14px;
}

.mv-modal-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.mv-video-wrapper {
  position: relative;
  width: 100%;
  max-height: 80vh;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(252, 60, 68, 0.2);
}

.mv-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}

.mv-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.mv-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: mvSpin 0.8s linear infinite;
}

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

.mv-error {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: #ffffff;
  z-index: 5;
  animation: mvErrorFade 0.25s var(--ease-spring);
}

@keyframes mvErrorFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.mv-error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.mv-error-icon svg {
  width: 26px;
  height: 26px;
}

.mv-error-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.mv-error-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
  line-height: 1.5;
}

.mv-error-btn {
  margin-top: 8px;
  height: 38px;
  padding: 0 20px;
  border-radius: 9999px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(252, 60, 68, 0.35);
  transition: all 0.2s var(--ease-spring);
}

.mv-error-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(252, 60, 68, 0.5);
}

/* Custom MV Video Player Controls */
.mv-video-wrapper {
  cursor: pointer;
  user-select: none;
}

.mv-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 56px 20px 16px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.72) 35%,
    rgba(0, 0, 0, 0.42) 65%,
    rgba(0, 0, 0, 0.15) 88%,
    transparent 100%
  );
  border-top: none;
  box-shadow: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s var(--ease-spring), transform 0.28s var(--ease-spring);
  pointer-events: none;
}

.mv-video-wrapper:hover .mv-controls,
.mv-video-wrapper.show-controls .mv-controls,
.mv-controls.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mv-controls.hide-controls {
  opacity: 0 !important;
  transform: translateY(8px) !important;
  pointer-events: none !important;
}

/* Progress bar */
.mv-progress-bar {
  position: relative;
  width: 100%;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.mv-progress-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  transition: height 0.15s ease;
}

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

.mv-progress-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  width: 0%;
  transition: width 0.2s linear;
}

.mv-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent-gradient);
  width: 0%;
  border-radius: 4px;
}

.mv-progress-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.4);
  opacity: 0;
  transition: transform 0.18s var(--ease-spring), opacity 0.18s ease;
}

.mv-progress-bar:hover .mv-progress-fill::after,
.mv-progress-bar:active .mv-progress-fill::after {
  opacity: 1;
  transform: translateY(-50%) scale(1.25);
}

.mv-progress-bar input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

.mv-progress-tooltip {
  position: absolute;
  bottom: 22px;
  left: 0;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.mv-progress-bar:hover .mv-progress-tooltip {
  opacity: 1;
}

/* Controls Bar */
.mv-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  white-space: nowrap;
}

.mv-controls-left,
.mv-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.mv-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

.mv-btn svg {
  width: 18px;
  height: 18px;
}

.mv-play-btn {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  border: none;
  box-shadow: 0 4px 14px var(--accent-glow);
  color: #ffffff;
}

.mv-play-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.mv-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px var(--accent-glow);
}

/* Volume Slider Box */
.mv-volume-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mv-volume-slider-box {
  position: relative;
  width: 90px;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.mv-volume-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  transition: height 0.15s ease;
}

.mv-volume-slider-box:hover .mv-volume-track {
  height: 6px;
}

.mv-volume-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  width: 80%;
  transition: width 0.05s linear;
}

.mv-volume-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: transform 0.18s var(--ease-spring), opacity 0.18s ease;
}

.mv-volume-slider-box:hover .mv-volume-fill::after,
.mv-volume-slider-box:active .mv-volume-fill::after {
  opacity: 1;
  transform: translateY(-50%) scale(1.2);
}

.mv-btn:active,
.apple-dropdown-btn:active,
.mv-close-btn:active {
  transform: scale(0.92) !important;
  transition: transform 0.08s var(--ease-spring) !important;
}

.mv-volume-slider-box input[type="range"].mv-volume-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

/* Time display */
.mv-time-display {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mv-time-sep {
  opacity: 0.5;
}

/* Apple Design Custom Dropdown Popover */
.apple-dropdown {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.apple-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s var(--ease-spring);
  user-select: none;
  white-space: nowrap;
}

.apple-dropdown-btn:hover,
.apple-dropdown-btn.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(252, 60, 68, 0.6);
}

.apple-dropdown-btn:active {
  transform: scale(0.96);
}

.apple-dropdown-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.apple-dropdown-value {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.apple-dropdown-chevron {
  width: 12px;
  height: 12px;
  stroke: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s var(--ease-spring);
}

.apple-dropdown-btn.active .apple-dropdown-chevron {
  transform: rotate(180deg);
}

/* Apple Popover Menu Container */
.apple-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 135px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(26, 26, 30, 0.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: scale(0.94) translateY(6px);
  transform-origin: bottom right;
  transition: opacity 0.2s var(--ease-spring), transform 0.2s var(--ease-spring);
  pointer-events: none;
}

.apple-dropdown-menu:not([hidden]) {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Menu items */
.apple-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.apple-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.apple-dropdown-item.active {
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.apple-item-check {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.apple-dropdown-item.active .apple-item-check {
  opacity: 1;
}

/* Fullscreen mode support */
.mv-video-wrapper.is-fullscreen,
.mv-video-wrapper:fullscreen,
.mv-video-wrapper:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  max-width: 100vw !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #000000 !important;
}

.mv-video-wrapper:fullscreen video,
.mv-video-wrapper:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive Overrides for MV Player */
@media (max-width: 960px) {
  .mv-modal {
    padding: 12px 10px;
  }
  .mv-modal-header {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }
  .mv-modal-title-group {
    flex: 1 1 100%;
  }
  .mv-modal-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
  }
  .mv-close-btn {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }
  .mv-video-wrapper {
    max-height: calc(100vh - 110px);
  }
  .mv-controls {
    padding: 32px 10px 10px;
    gap: 6px;
  }
  .mv-controls-bar {
    gap: 6px;
  }
  .mv-controls-left,
  .mv-controls-right {
    gap: 5px;
  }
  .mv-volume-slider-box {
    display: none !important;
  }
  .apple-dropdown-label {
    display: none !important;
  }
  .apple-dropdown-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
    gap: 3px;
  }
  .mv-btn {
    width: 32px;
    height: 32px;
  }
  .mv-play-btn {
    width: 36px;
    height: 36px;
  }
  .mv-time-display {
    font-size: 11px;
    margin-left: 2px;
  }
}

@media (max-width: 480px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand quality"
      "search search";
    align-items: center;
    gap: 10px 8px;
  }

  .topbar-left {
    display: contents;
  }

  .mobile-brand {
    grid-area: brand;
  }

  .search,
  .search:focus-within {
    grid-area: search;
    width: 100%;
    height: 38px;
    padding: 0 12px;
  }

  .search input {
    padding-left: 0;
  }

  .search-icon {
    position: static;
  }

  .quality {
    grid-area: quality;
    justify-self: end;
  }

  .quality select {
    width: 116px;
    height: 32px;
  }

  .artists-category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 0 2px 8px;
  }

  .artist-cat-btn {
    padding: 0 6px;
    font-size: 12px;
  }

  .artists-grid {
    gap: 10px 6px;
    padding: 6px 2px 8px;
  }

  .artist-card {
    padding: 6px 3px 8px;
  }

  .artist-name {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .artist-sub {
    font-size: 10px;
  }

  .mv-controls {
    padding: 24px 8px 8px;
  }
  .apple-dropdown-btn {
    padding: 0 6px;
  }
  .mv-time-display {
    font-size: 10px;
  }
}
