/* ===== Local Embedded Apple PingFang SC Fonts ===== */
@font-face {
  font-family: 'PingFang SC';
  src: url('fonts/PingFang-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PingFang SC';
  src: url('fonts/PingFang-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PingFang SC';
  src: url('fonts/PingFang-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PingFang SC';
  src: url('fonts/PingFang-Bold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ===== Apple Music CSS Design System v2.0 ===== */
/* Dark Theme (Default) */
:root {
  --am-primary-color: #fa586a;
  --am-primary-hover: #e03f52;
  --am-primary-soft: rgba(250, 88, 106, 0.12);

  --am-bg: #000000;
  --am-sidebar-bg: rgba(22, 22, 22, 0.8);
  --am-header-bg: rgba(18, 18, 18, 0.8);
  --am-panel-bg: rgba(28, 28, 28, 0.9);
  --am-card-bg: rgba(255, 255, 255, 0.04);
  --am-lcd-bg: rgba(0, 0, 0, 0.45);
  --am-surface: rgba(255, 255, 255, 0.05);
  --am-surface-hover: rgba(255, 255, 255, 0.08);

  --am-text-primary: #ffffff;
  --am-text-secondary: rgba(255, 255, 255, 0.65);
  --am-text-tertiary: rgba(255, 255, 255, 0.4);
  --am-text-quaternary: rgba(255, 255, 255, 0.25);

  --am-border: rgba(255, 255, 255, 0.08);
  --am-border-heavy: rgba(255, 255, 255, 0.14);
  --am-border-focus: rgba(250, 88, 106, 0.5);

  --am-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --am-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --am-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --am-shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);

  --am-radius-sm: 6px;
  --am-radius-md: 10px;
  --am-radius-lg: 14px;
  --am-radius-xl: 20px;
  --am-radius-full: 9999px;

  --am-blur: blur(40px) saturate(180%);
  --am-blur-heavy: blur(60px) saturate(200%);

  --am-font: 'PingFang SC', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Inter", sans-serif;
  --am-font-mono: "SF Mono", "Fira Code", "Cascadia Code", monospace;



  --am-transition-fast: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --am-transition-normal: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --am-transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --am-transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  --am-z-sidebar: 10;
  --am-z-header: 9;
  --am-z-drawer: 110;
  --am-z-overlay: 109;
  --am-z-fullscreen: 100;
  --am-z-context: 1000;
  --am-z-toast: 1100;
}

/* Light Theme */
[data-theme="light"] {
  --am-bg: #f5f5f7;
  --am-sidebar-bg: rgba(255, 255, 255, 0.85);
  --am-header-bg: rgba(255, 255, 255, 0.85);
  --am-panel-bg: rgba(255, 255, 255, 0.95);
  --am-card-bg: rgba(0, 0, 0, 0.03);
  --am-lcd-bg: rgba(255, 255, 255, 0.8);
  --am-surface: rgba(0, 0, 0, 0.04);
  --am-surface-hover: rgba(0, 0, 0, 0.07);

  --am-text-primary: #1d1d1f;
  --am-text-secondary: rgba(0, 0, 0, 0.6);
  --am-text-tertiary: rgba(0, 0, 0, 0.4);
  --am-text-quaternary: rgba(0, 0, 0, 0.2);

  --am-border: rgba(0, 0, 0, 0.08);
  --am-border-heavy: rgba(0, 0, 0, 0.12);

  --am-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --am-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --am-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
  --am-shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.2);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  height: 100%;
  overflow: hidden;
  background-color: var(--am-bg);
  color: var(--am-text-primary);
  font-family: var(--am-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--am-transition-slow), color var(--am-transition-slow);
}

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: transform var(--am-transition-fast), opacity var(--am-transition-fast), background var(--am-transition-fast), color var(--am-transition-fast);
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(0.95);
}

button:focus-visible {
  outline: 2px solid var(--am-border-focus);
  outline-offset: 2px;
}

input {
  border: none;
  outline: none;
  font-family: inherit;
  background: none;
  color: inherit;
}

input:focus-visible {
  outline: 2px solid var(--am-border-focus);
  outline-offset: 2px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity var(--am-transition-fast);
}

a:hover {
  opacity: 0.8;
}

img {
  display: block;
  max-width: 100%;
}

/* Selection */
::selection {
  background: var(--am-primary-color);
  color: #fff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--am-text-quaternary);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--am-text-tertiary);
}

/* ===== Backgrounds ===== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 10% 20%, rgba(250, 88, 106, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 153, 102, 0.04) 0%, transparent 40%),
    var(--am-bg);
  transition: background var(--am-transition-slow);
}

[data-theme="light"] #bg-canvas {
  background:
    radial-gradient(circle at 10% 20%, rgba(250, 88, 106, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 153, 102, 0.03) 0%, transparent 40%),
    var(--am-bg);
}

.dynamic-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
  filter: blur(100px) saturate(1.8) brightness(0.4);
  transform: scale(1.15);
  background-size: cover;
  background-position: center;
  transition: background-image 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.5s ease-in-out;
}

.dynamic-ambient-bg.loaded {
  opacity: 0.5;
}

[data-theme="light"] .dynamic-ambient-bg.loaded {
  opacity: 0.25;
  filter: blur(120px) saturate(1.5) brightness(0.7);
}

/* ===== App Layout Container ===== */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ===== Sidebar (Left Panel) ===== */
.sidebar {
  width: 260px;
  min-width: 260px;
  height: 100%;
  background: var(--am-sidebar-bg);
  backdrop-filter: var(--am-blur);
  -webkit-backdrop-filter: var(--am-blur);
  border-right: 1px solid var(--am-border);
  display: flex;
  flex-direction: column;
  z-index: var(--am-z-sidebar);
  transition: transform var(--am-transition-normal), background var(--am-transition-slow);
}

.sidebar-header {
  padding: 28px 20px 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-md);
  padding: 9px 14px;
  transition: background var(--am-transition-fast), border-color var(--am-transition-fast), box-shadow var(--am-transition-fast);
}

.search-box:focus-within {
  background: var(--am-surface-hover);
  border-color: var(--am-border-focus);
  box-shadow: 0 0 0 3px rgba(250, 88, 106, 0.15);
}

.search-box svg {
  color: var(--am-text-tertiary);
  flex-shrink: 0;
}

.search-box input {
  font-size: 14px;
  width: 100%;
  font-weight: 500;
}

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

/* Navigation items */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 20px;
}

.nav-section {
  margin-bottom: 28px;
}

.nav-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--am-text-tertiary);
  padding: 0 14px;
  margin-bottom: 10px;
  letter-spacing: 0.8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: var(--am-radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--am-text-secondary);
  cursor: pointer;
  transition: background var(--am-transition-fast), color var(--am-transition-fast), transform var(--am-transition-fast);
  margin-bottom: 2px;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--am-primary-color);
  opacity: 0;
  transition: opacity var(--am-transition-fast);
  border-radius: inherit;
}

.nav-item:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
}

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

.nav-item.active {
  background: var(--am-primary-soft);
  color: var(--am-primary-color);
}

.nav-item.active::before {
  opacity: 0.08;
}

.nav-item svg {
  flex-shrink: 0;
  transition: transform var(--am-transition-fast);
}

.nav-item:hover svg {
  transform: scale(1.08);
}

/* Playing indicator in nav */
.nav-item.playing-indicator {
  position: relative;
}

.nav-item.playing-indicator::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--am-primary-color);
  border-radius: 2px;
  animation: playingPulse 2s ease-in-out infinite;
}

@keyframes playingPulse {

  0%,
  100% {
    opacity: 1;
    height: 16px;
  }

  50% {
    opacity: 0.6;
    height: 12px;
  }
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--am-border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--am-text-tertiary);
  font-weight: 500;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--am-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid var(--am-border);
  transition: background var(--am-transition-fast), border-color var(--am-transition-fast);
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: var(--am-z-toast);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--am-surface);
  backdrop-filter: var(--am-blur);
  -webkit-backdrop-filter: var(--am-blur);
  border: 1px solid var(--am-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--am-transition-fast), transform var(--am-transition-spring), box-shadow var(--am-transition-fast);
  box-shadow: var(--am-shadow-sm);
}

.theme-toggle:hover {
  background: var(--am-surface-hover);
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--am-shadow-md);
}

.theme-toggle:active {
  transform: scale(0.9) rotate(-15deg);
}

.theme-toggle svg {
  transition: transform var(--am-transition-normal);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

/* ===== Right container (Header + Main scroll) ===== */
.main-container {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ===== Top Header (Player Bar) ===== */
.player-bar {
  height: 72px;
  min-height: 72px;
  background: var(--am-header-bg);
  backdrop-filter: var(--am-blur);
  -webkit-backdrop-filter: var(--am-blur);
  border-bottom: 1px solid var(--am-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: var(--am-z-header);
  transition: background var(--am-transition-slow);
}

.player-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 240px;
}

.nav-arrows {
  display: flex;
  gap: 8px;
}

.btn-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--am-text-secondary);
  transition: background var(--am-transition-fast), color var(--am-transition-fast), transform var(--am-transition-fast);
}

.btn-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.btn-arrow:not(:disabled):hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
  transform: scale(1.05);
}

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

.btn-play {
  width: 40px;
  height: 40px;
  background: var(--am-text-primary);
  color: var(--am-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--am-transition-spring), background var(--am-transition-fast), box-shadow var(--am-transition-fast);
  box-shadow: var(--am-shadow-sm);
}

.btn-play svg {
  margin-left: 2px;
}

.btn-play:hover {
  transform: scale(1.08);
  box-shadow: var(--am-shadow-md);
}

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

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--am-text-secondary);
  transition: color var(--am-transition-fast), background var(--am-transition-fast), transform var(--am-transition-fast);
}

.btn-icon:hover {
  color: var(--am-text-primary);
  background: var(--am-surface-hover);
  transform: scale(1.05);
}

.btn-icon:active {
  transform: scale(0.92);
}

.btn-icon.active {
  color: var(--am-primary-color);
  background: var(--am-primary-soft);
}

/* LCD Display (Center Player Area) */
.player-bar-center {
  flex: 1;
  max-width: 560px;
  min-width: 280px;
  padding: 0 20px;
  cursor: pointer;
}

.lcd-display {
  display: flex;
  align-items: center;
  background: var(--am-lcd-bg);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-lg);
  padding: 7px 14px;
  height: 56px;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.15), var(--am-shadow-sm);
  position: relative;
  overflow: hidden;
  transition: border-color var(--am-transition-fast), background var(--am-transition-fast), box-shadow var(--am-transition-fast);
}

.lcd-display:hover {
  border-color: var(--am-border-heavy);
  background: var(--am-surface);
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.1), var(--am-shadow-md);
}

[data-theme="light"] .lcd-display {
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.06), var(--am-shadow-sm);
}

.lcd-art {
  width: 42px;
  height: 42px;
  border-radius: var(--am-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--am-transition-fast);
}

.lcd-art.playing {
  animation: artPulse 3s ease-in-out infinite;
}

@keyframes artPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.lcd-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 0.4s ease;
}

.lcd-placeholder-art {
  font-size: 18px;
  color: var(--am-text-tertiary);
  font-weight: bold;
}

.lcd-meta-group {
  flex: 1;
  margin-left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.lcd-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  margin-bottom: 4px;
}

.lcd-title {
  color: var(--am-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--am-transition-fast);
}

.lcd-dot {
  color: var(--am-text-quaternary);
  font-size: 8px;
}

.lcd-artist {
  color: var(--am-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lcd-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lcd-time {
  font-size: 10px;
  color: var(--am-text-tertiary);
  font-variant-numeric: tabular-nums;
  width: 28px;
  font-weight: 500;
}

.lcd-progress-bar-container {
  flex: 1;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.lcd-progress-track {
  width: 100%;
  height: 4px;
  background: var(--am-text-quaternary);
  border-radius: 4px;
  position: relative;
  transition: height var(--am-transition-fast);
}

.lcd-progress-fill {
  height: 100%;
  background: var(--am-text-primary);
  border-radius: 4px;
  width: 0%;
  transition: background var(--am-transition-fast);
}

.lcd-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  background: var(--am-text-primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--am-transition-fast), transform var(--am-transition-spring);
  box-shadow: var(--am-shadow-sm);
}

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

.lcd-progress-bar-container:hover .lcd-progress-fill {
  background: var(--am-primary-color);
}

.lcd-progress-bar-container:hover .lcd-progress-thumb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.progress-tooltip {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--am-panel-bg);
  color: var(--am-text-primary);
  padding: 4px 8px;
  border-radius: var(--am-radius-sm);
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--am-transition-fast);
  white-space: nowrap;
  box-shadow: var(--am-shadow-sm);
  backdrop-filter: var(--am-blur);
  -webkit-backdrop-filter: var(--am-blur);
  border: 1px solid var(--am-border);
}

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

.lcd-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--am-radius-sm);
  background: var(--am-surface);
  font-size: 10px;
  font-weight: 700;
  color: var(--am-text-secondary);
  border: 1px solid var(--am-border);
  margin-left: 12px;
  transition: background var(--am-transition-fast);
}

.player-bar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 240px;
}

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

.volume-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-bar {
  width: 80px;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.volume-track {
  width: 100%;
  height: 4px;
  background: var(--am-text-quaternary);
  border-radius: 4px;
  transition: height var(--am-transition-fast);
}

.volume-fill {
  height: 100%;
  background: var(--am-text-secondary);
  border-radius: 4px;
  transition: background var(--am-transition-fast);
}

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

.volume-bar:hover .volume-fill {
  background: var(--am-text-primary);
}

.divider {
  width: 1px;
  height: 24px;
  background: var(--am-border);
  margin: 0 8px;
}

.btn-icon-toggle {
  width: 34px;
  height: 34px;
  border-radius: var(--am-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--am-text-secondary);
  border: 1px solid transparent;
  transition: color var(--am-transition-fast), background var(--am-transition-fast), border-color var(--am-transition-fast), transform var(--am-transition-fast);
}

.btn-icon-toggle:hover {
  color: var(--am-text-primary);
  background: var(--am-surface-hover);
  transform: scale(1.05);
}

.btn-icon-toggle:active {
  transform: scale(0.92);
}

.btn-icon-toggle.active {
  color: var(--am-primary-color);
  background: var(--am-primary-soft);
  border-color: rgba(250, 88, 106, 0.2);
}

/* ===== Main Scroll Content Area ===== */
.main-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.content-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 36px 44px 140px;
  scroll-behavior: smooth;
}

.view {
  display: none;
  opacity: 0;
}

.view.active {
  display: block;
  animation: viewFadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 28px;
  color: var(--am-text-primary);
  line-height: 1.1;
}

/* ===== Hero Recommended Section ===== */
.hero-section {
  margin-bottom: 48px;
}

.hero-card {
  position: relative;
  height: 300px;
  border-radius: var(--am-radius-xl);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-lg);
  transition: transform var(--am-transition-normal), box-shadow var(--am-transition-normal);
}

.hero-card:hover {
  transform: scale(1.005) translateY(-2px);
  box-shadow: var(--am-shadow-xl);
}

.hero-card:active {
  transform: scale(0.998);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(30px) saturate(1.4) brightness(0.5);
  transform: scale(1.1);
  transition: filter var(--am-transition-slow);
}

[data-theme="light"] .hero-bg {
  filter: blur(30px) saturate(1.2) brightness(0.7);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--am-bg) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

[data-theme="light"] .hero-bg::after {
  background: linear-gradient(to top, var(--am-bg) 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
}

.hero-cover {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  height: 200px;
  border-radius: var(--am-radius-lg);
  object-fit: cover;
  box-shadow: var(--am-shadow-xl);
  z-index: 2;
  animation: heroCoverIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heroCoverIn {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.8) rotate(-5deg);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) scale(1) rotate(0);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 40px 44px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 60%;
}

.hero-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--am-primary-color);
  letter-spacing: 1.8px;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.2px;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--am-text-secondary);
  margin-bottom: 24px;
  font-weight: 500;
}

.btn-play-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--am-primary-color);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--am-radius-full);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(250, 88, 106, 0.4);
  transition: background var(--am-transition-fast), transform var(--am-transition-spring), box-shadow var(--am-transition-fast);
  width: fit-content;
}

.btn-play-hero:hover {
  background: var(--am-primary-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(250, 88, 106, 0.5);
}

.btn-play-hero:active {
  transform: translateY(0) scale(0.98);
}

/* ===== Card Layouts (Albums, Playlists) ===== */
.section {
  margin-bottom: 48px;
}

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

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.see-all {
  font-size: 14px;
  color: var(--am-primary-color);
  font-weight: 600;
  transition: opacity var(--am-transition-fast);
}

.see-all:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.card-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.card-row::-webkit-scrollbar {
  height: 0px;
}

.card {
  width: 170px;
  flex-shrink: 0;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform var(--am-transition-fast);
}

.card:hover {
  transform: translateY(-2px);
}

.card-art {
  width: 170px;
  height: 170px;
  border-radius: var(--am-radius-lg);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--am-surface), var(--am-card-bg));
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--am-transition-normal), box-shadow var(--am-transition-normal);
  margin-bottom: 12px;
}

.card:hover .card-art {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--am-shadow-lg);
}

.card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform var(--am-transition-normal);
}

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

.card-icon {
  font-size: 44px;
  font-weight: 700;
  color: var(--am-text-quaternary);
  z-index: 0;
  transition: transform var(--am-transition-normal);
}

.card:hover .card-icon {
  transform: scale(1.1);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--am-transition-fast);
  z-index: 3;
}

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

.btn-play-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--am-primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform var(--am-transition-spring), box-shadow var(--am-transition-fast);
}

.btn-play-round svg {
  margin-left: 2px;
}

.card:hover .btn-play-round {
  transform: scale(1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.btn-play-round:hover {
  transform: scale(1.08) !important;
}

.btn-more {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--am-transition-fast), background var(--am-transition-fast), transform var(--am-transition-fast);
  z-index: 4;
}

.card:hover .btn-more {
  opacity: 1;
}

.btn-more:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--am-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 8px;
  line-height: 1.4;
  display: block;
  transition: color var(--am-transition-fast);
}

.card-subtitle {
  font-size: 12px;
  color: var(--am-text-tertiary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Grids for browse & artists */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 28px;
}

.album-grid .card {
  width: 100%;
}

.album-grid .card-art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 32px;
}

.artist-card {
  text-align: center;
  cursor: pointer;
  transition: transform var(--am-transition-fast);
}

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

.artist-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--am-surface), var(--am-card-bg));
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-md);
  transition: transform var(--am-transition-normal), box-shadow var(--am-transition-normal);
  color: var(--am-text-secondary);
}

.artist-card:hover .artist-avatar {
  transform: scale(1.06);
  box-shadow: var(--am-shadow-lg);
}

/* Artist Avatar with loaded image */
.artist-avatar {
  position: relative;
  overflow: hidden;
}

.artist-avatar .avatar-letter {
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1;
}

.artist-avatar .avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s ease, transform 0.6s ease;
  z-index: 2;
}

.artist-avatar .avatar-img.loaded {
  opacity: 1;
  transform: scale(1);
}

.artist-avatar .avatar-img.loaded~.avatar-letter {
  opacity: 0;
  transform: scale(0.8);
}

.artist-name {
  font-size: 14px;
  font-weight: 600;
  transition: color var(--am-transition-fast);
}

.artist-card:hover .artist-name {
  color: var(--am-primary-color);
}

.artist-count {
  font-size: 12px;
  color: var(--am-text-tertiary);
  margin-top: 4px;
}

/* ===== Table List structure (Songs) ===== */
.songs-table-header {
  display: grid;
  grid-template-columns: 48px 1.5fr 1fr 84px;
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--am-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--am-border);
  margin-bottom: 8px;
}

.song-row {
  display: grid;
  grid-template-columns: 48px 1.5fr 1fr 84px;
  padding: 11px 18px;
  border-radius: var(--am-radius-md);
  cursor: pointer;
  align-items: center;
  transition: background var(--am-transition-fast), transform var(--am-transition-fast);
  position: relative;
}

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

.song-row:active {
  transform: scale(0.995);
}

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

.song-row.playing .song-title {
  color: var(--am-primary-color);
  font-weight: 700;
}

.song-num {
  font-size: 13px;
  color: var(--am-text-tertiary);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  transition: color var(--am-transition-fast);
}

.song-row:hover .song-num {
  color: transparent;
  position: relative;
}

.song-row:hover .song-num::after {
  content: '▶';
  color: var(--am-primary-color);
  font-size: 11px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.song-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 20px;
}

.song-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--am-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--am-transition-fast);
}

.song-artist {
  font-size: 13px;
  color: var(--am-text-tertiary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-album {
  font-size: 14px;
  color: var(--am-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-duration {
  font-size: 13px;
  color: var(--am-text-tertiary);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* EQ animation for playing song */
.song-row.playing .song-num {
  color: transparent;
  position: relative;
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.eq-bars span {
  width: 3px;
  background: var(--am-primary-color);
  border-radius: 1px;
  animation: eqBounce 0.8s ease-in-out infinite;
}

.eq-bars span:nth-child(1) {
  height: 60%;
  animation-delay: 0s;
}

.eq-bars span:nth-child(2) {
  height: 100%;
  animation-delay: 0.15s;
}

.eq-bars span:nth-child(3) {
  height: 40%;
  animation-delay: 0.3s;
}

@keyframes eqBounce {

  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(0.3);
  }
}

/* Download Button inside Row */
.btn-download {
  display: none;
  padding: 4px;
  color: var(--am-text-tertiary);
  transition: color var(--am-transition-fast), transform var(--am-transition-fast);
}

.song-row:hover .btn-download {
  display: inline-block;
}

.song-row:hover .dur-text {
  display: none;
}

.btn-download:hover {
  color: var(--am-primary-color);
  transform: scale(1.1);
}

/* ===== Album Detail View ===== */
.album-detail-header {
  display: flex;
  gap: 36px;
  margin-bottom: 40px;
  padding: 8px 0;
}

.album-detail-art {
  width: 220px;
  height: 220px;
  border-radius: var(--am-radius-xl);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--am-surface), var(--am-card-bg));
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: var(--am-text-secondary);
  overflow: hidden;
  transition: transform var(--am-transition-normal), box-shadow var(--am-transition-normal);
}

.album-detail-art:hover {
  transform: scale(1.02);
}

.album-letter {
  font-weight: 800;
}

.album-detail-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.album-detail-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--am-primary-color);
  letter-spacing: 1.8px;
  margin-bottom: 8px;
}

.album-detail-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.12;
  margin-bottom: 10px;
}

.album-detail-meta {
  font-size: 14px;
  color: var(--am-text-tertiary);
  margin-bottom: 24px;
  font-weight: 500;
}

.album-detail-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.btn-play-album {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--am-primary-color);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--am-radius-full);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(250, 88, 106, 0.35);
  transition: background var(--am-transition-fast), transform var(--am-transition-spring), box-shadow var(--am-transition-fast);
}

.btn-play-album:hover {
  background: var(--am-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(250, 88, 106, 0.45);
}

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

.btn-download-album {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  color: var(--am-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--am-transition-fast), color var(--am-transition-fast), transform var(--am-transition-fast);
}

.btn-download-album:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
  transform: scale(1.08);
}

/* ===== Drawer Overlay Panel (Lyrics Drawer) ===== */
.drawer-panel {
  position: fixed;
  top: 72px;
  right: -380px;
  bottom: 0;
  width: 380px;
  background: var(--am-panel-bg);
  backdrop-filter: var(--am-blur-heavy);
  -webkit-backdrop-filter: var(--am-blur-heavy);
  border-left: 1px solid var(--am-border);
  z-index: var(--am-z-drawer);
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), background var(--am-transition-slow);
}

.drawer-panel.open {
  transform: translateX(-380px);
}

.drawer-header {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--am-border);
}

.drawer-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--am-text-primary);
}

.drawer-close {
  font-size: 16px;
  color: var(--am-text-tertiary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--am-transition-fast), color var(--am-transition-fast), transform var(--am-transition-fast);
}

.drawer-close:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
  transform: scale(1.1);
}

.fsp-lyrics-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 36px 28px;
  scroll-behavior: smooth;
}

/* 侧边栏歌词容器适配官方 AMLL LyricPlayer */
#fsp-lyrics-scroll {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

#fsp-lyrics-scroll .amll-lyric-player {
  --amll-lp-font-size: 20px;
  --amll-lp-line-width-aspect: 0.95;
}

.lyrics-placeholder {
  text-align: center;
  padding: 80px 0;
  color: var(--am-text-tertiary);
  font-size: 14px;
  font-weight: 500;
}

/* Apple Style Synced Lyrics lines */
.fsp-lyrics-line {
  font-size: 18px;
  color: var(--am-text-tertiary);
  padding: 14px 0;
  line-height: 1.5;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.4s, transform 0.4s, text-shadow 0.4s, font-size 0.4s;
  transform-origin: left center;
}

.fsp-lyrics-line:hover {
  color: var(--am-text-secondary);
}

.fsp-lyrics-line.active {
  color: var(--am-text-primary);
  font-size: 24px;
  transform: scale(1.02);
  text-shadow: 0 0 30px rgba(250, 88, 106, 0.5);
}

[data-theme="light"] .fsp-lyrics-line.active {
  text-shadow: 0 0 20px rgba(250, 88, 106, 0.3);
}

/* ===== Fullscreen mobile overlay & Sub-overlays ===== */
.fullscreen-player {
  position: fixed;
  inset: 0;
  z-index: var(--am-z-fullscreen);
  background: var(--am-bg);
  backdrop-filter: var(--am-blur-heavy);
  -webkit-backdrop-filter: var(--am-blur-heavy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 36px 28px;
}

.fullscreen-player.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fsp-close {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 22px;
  color: var(--am-text-tertiary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--am-transition-fast), color var(--am-transition-fast), transform var(--am-transition-fast);
}

.fsp-close:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
  transform: scale(1.1);
}

.fsp-content {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .fsp-content {
    max-width: 440px;
    gap: 32px;
  }
}

.fsp-art {
  width: 260px;
  height: 260px;
  border-radius: var(--am-radius-xl);
  overflow: hidden;
  box-shadow: var(--am-shadow-xl);
  background: var(--am-surface);
  transition: transform var(--am-transition-normal), box-shadow var(--am-transition-normal);
}

.fsp-art.playing {
  animation: fspArtFloat 6s ease-in-out infinite;
}

@keyframes fspArtFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.02);
  }
}

@media (min-width: 768px) {
  .fsp-art {
    width: 340px;
    height: 340px;
    border-radius: var(--am-radius-xl);
  }
}

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

.fsp-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

@media (min-width: 768px) {
  .fsp-title {
    font-size: 26px;
  }
}

.fsp-artist {
  font-size: 15px;
  color: var(--am-text-tertiary);
  font-weight: 500;
}

.fsp-progress {
  width: 100%;
}

.fsp-progress-bar {
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.fsp-progress-track {
  width: 100%;
  height: 5px;
  background: var(--am-text-quaternary);
  border-radius: 4px;
  position: relative;
  transition: height var(--am-transition-fast);
}

.fsp-progress-bar:hover .fsp-progress-track {
  height: 7px;
}

.fsp-progress-fill {
  height: 100%;
  background: var(--am-primary-color);
  border-radius: 4px;
  width: 0%;
}

.fsp-times {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--am-text-tertiary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.fsp-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.fsp-btn {
  color: var(--am-text-secondary);
  transition: color var(--am-transition-fast), transform var(--am-transition-spring);
}

.fsp-btn:hover {
  color: var(--am-text-primary);
  transform: scale(1.1);
}

.fsp-btn:active {
  transform: scale(0.9);
}

.fsp-btn.active {
  color: var(--am-primary-color);
}

.fsp-play {
  width: 60px;
  height: 60px;
  background: var(--am-text-primary);
  color: var(--am-bg) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--am-shadow-md);
  transition: transform var(--am-transition-spring), box-shadow var(--am-transition-fast);
}

.fsp-play svg {
  margin-left: 2px;
}

.fsp-play:hover {
  transform: scale(1.08);
  box-shadow: var(--am-shadow-lg);
}

.fsp-play:active {
  transform: scale(0.95);
}

.fsp-extras {
  display: flex;
  gap: 16px;
}

.fsp-btn-sm {
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  padding: 8px 18px;
  border-radius: var(--am-radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--am-text-secondary);
  transition: background var(--am-transition-fast), color var(--am-transition-fast), transform var(--am-transition-fast);
}

.fsp-btn-sm:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
  transform: scale(1.05);
}

.fsp-btn-sm:active {
  transform: scale(0.95);
}

/* Mobile Sub-overlays drawers (lyrics, queue, comments) */
.fsp-lyrics-mobile-drawer {
  position: absolute;
  inset: 0;
  background: var(--am-bg);
  z-index: 105;
  padding: 28px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fsp-lyrics-mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fsp-queue {
  position: fixed;
  top: 72px;
  right: -380px;
  bottom: 0;
  width: 380px;
  background: var(--am-panel-bg);
  backdrop-filter: var(--am-blur-heavy);
  -webkit-backdrop-filter: var(--am-blur-heavy);
  border-left: 1px solid var(--am-border);
  z-index: var(--am-z-drawer);
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), background var(--am-transition-slow);
}

.fsp-queue.open {
  transform: translateX(-380px);
}

.fsp-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.fsp-queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--am-radius-md);
  margin-bottom: 4px;
  cursor: pointer;
  transition: background var(--am-transition-fast), transform var(--am-transition-fast);
}

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

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

.fsp-queue-item.active {
  background: var(--am-primary-soft);
  border: 1px solid rgba(250, 88, 106, 0.15);
}

.fsp-queue-item.active .q-title {
  color: var(--am-primary-color);
}

.q-art {
  width: 36px;
  height: 36px;
  border-radius: var(--am-radius-sm);
  background: var(--am-primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

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

.q-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--am-transition-fast);
}

.q-artist {
  font-size: 12px;
  color: var(--am-text-tertiary);
  margin-top: 2px;
}

.q-drag-handle {
  display: none;
  color: var(--am-text-quaternary);
  cursor: grab;
}

.fsp-queue-item:hover .q-drag-handle {
  display: block;
}

/* Keyboard shortcuts overlay styling */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--am-blur);
  -webkit-backdrop-filter: var(--am-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.shortcuts-overlay.hidden {
  display: none;
}

.shortcuts-card {
  background: var(--am-panel-bg);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-xl);
  padding: 28px;
  width: 90%;
  max-width: 400px;
  box-shadow: var(--am-shadow-xl);
}

.shortcuts-card h3 {
  margin-bottom: 20px;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--am-border);
}

.shortcut-row:last-child {
  border-bottom: none;
}

.shortcut-desc {
  font-size: 13px;
  color: var(--am-text-secondary);
  font-weight: 500;
}

.shortcut-key {
  background: var(--am-surface);
  padding: 4px 10px;
  border-radius: var(--am-radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--am-font-mono);
  border: 1px solid var(--am-border);
}

/* ===== Context Menu ===== */
.context-menu {
  position: fixed;
  background: var(--am-panel-bg);
  backdrop-filter: var(--am-blur-heavy);
  -webkit-backdrop-filter: var(--am-blur-heavy);
  border: 1px solid var(--am-border-heavy);
  border-radius: var(--am-radius-md);
  padding: 6px;
  min-width: 180px;
  box-shadow: var(--am-shadow-xl);
  z-index: var(--am-z-context);
  animation: contextMenuIn 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes contextMenuIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.context-menu-item {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--am-text-secondary);
  cursor: pointer;
  border-radius: var(--am-radius-sm);
  transition: background var(--am-transition-fast), color var(--am-transition-fast);
}

.context-menu-item:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
}

.context-menu-divider {
  height: 1px;
  background: var(--am-border);
  margin: 4px 8px;
}

/* ===== Global Utility/Animation classes ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--am-z-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--am-radius-md);
  color: var(--am-text-secondary);
  transition: background var(--am-transition-fast), color var(--am-transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
}

/* ===== Toast Notifications ===== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--am-panel-bg);
  backdrop-filter: var(--am-blur);
  -webkit-backdrop-filter: var(--am-blur);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-full);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--am-text-primary);
  box-shadow: var(--am-shadow-lg);
  z-index: var(--am-z-toast);
  opacity: 0;
  transition: opacity var(--am-transition-fast), transform var(--am-transition-fast);
  pointer-events: none;
}

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

/* ===== Responsive Styles (Media Queries) ===== */

/* Desktop view: sidebar and content side by side */

/* Tablet view */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
    min-width: 220px;
  }

  .songs-table-header,
  .song-row {
    grid-template-columns: 40px 1fr 64px;
  }

  .song-album,
  .hide-mobile {
    display: none;
  }

  .drawer-panel {
    z-index: var(--am-z-drawer);
  }

  .content-scroll {
    padding: 28px 32px 140px;
  }

  .hero-card {
    height: 260px;
  }

  .hero-cover {
    width: 170px;
    height: 170px;
    right: 40px;
  }

  .card {
    width: 150px;
  }

  .card-art {
    width: 150px;
    height: 150px;
  }

  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
  }

  .artist-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 24px;
  }

  .artist-avatar {
    width: 110px;
    height: 110px;
  }
}

/* Mobile Layout (< 768px) */
@media (max-width: 767px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-280px);
    z-index: var(--am-z-drawer);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
    z-index: var(--am-z-overlay);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .player-bar {
    height: 64px;
    min-height: 64px;
    padding: 0 16px;
  }

  .nav-arrows {
    display: none;
  }

  .player-bar-left {
    min-width: auto;
    gap: 12px;
  }

  .player-controls {
    display: none;
  }

  .player-bar-right {
    min-width: auto;
  }

  .volume-container,
  .divider,
  .btn-icon-toggle {
    display: none;
  }

  .player-bar-center {
    padding: 0;
    flex: 1;
    margin: 0 12px;
  }

  .lcd-display {
    border-radius: var(--am-radius-md);
    height: 50px;
    padding: 6px 10px;
  }

  .lcd-art {
    width: 36px;
    height: 36px;
  }

  .lcd-badge {
    display: none;
  }

  .lcd-progress-wrapper {
    display: none;
  }

  .content-scroll {
    padding: 20px 20px 140px;
  }

  .view-title {
    font-size: 30px;
    margin-bottom: 20px;
  }

  .hero-card {
    height: 200px;
    border-radius: var(--am-radius-lg);
  }

  .hero-cover {
    display: none !important;
  }

  .hero-content {
    max-width: 100%;
    padding: 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .card-row {
    gap: 14px;
  }

  .card {
    width: 130px;
  }

  .card-art {
    width: 130px;
    height: 130px;
    border-radius: var(--am-radius-md);
  }

  .card-title {
    font-size: 12px;
  }

  .card-subtitle {
    font-size: 11px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
  }

  .artist-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
  }

  .artist-avatar {
    width: 90px;
    height: 90px;
    font-size: 30px;
  }

  .album-detail-header {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
  }

  .album-detail-art {
    width: 160px;
    height: 160px;
  }

  .album-detail-title {
    font-size: 26px;
  }

  .album-detail-actions {
    justify-content: center;
  }

  /* Drawer panels behave as fullscreen overlaps on mobile */
  .drawer-panel,
  .fsp-queue {
    width: 100%;
    right: -100%;
    top: 0;
    padding: 28px;
  }

  .drawer-panel.open,
  .fsp-queue.open {
    transform: translateX(-100%);
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  .fsp-art {
    width: 220px;
    height: 220px;
  }

  .fsp-title {
    font-size: 20px;
  }

  .fsp-controls {
    gap: 20px;
  }

  .fsp-play {
    width: 52px;
    height: 52px;
  }

  .songs-table-header,
  .song-row {
    grid-template-columns: 36px 1fr 56px;
    padding: 10px 12px;
  }

  .song-title {
    font-size: 14px;
  }

  .song-artist {
    font-size: 12px;
  }
}

/* Small Mobile (< 400px) */
@media (max-width: 399px) {
  .card {
    width: 110px;
  }

  .card-art {
    width: 110px;
    height: 110px;
  }

  .hero-card {
    height: 180px;
  }

  .hero-title {
    font-size: 24px;
  }

  .view-title {
    font-size: 26px;
  }

  .fsp-art {
    width: 180px;
    height: 180px;
  }
}

/* ===== Print Styles ===== */
@media print {

  .sidebar,
  .player-bar,
  .theme-toggle,
  .fullscreen-player,
  .drawer-panel,
  .fsp-queue {
    display: none !important;
  }

  .main-container {
    width: 100%;
  }

  .content-scroll {
    overflow: visible;
    padding: 20px;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-card:hover {
    transform: none;
  }

  .card:hover .card-art {
    transform: none;
  }

  .fsp-art.playing {
    animation: none;
  }

  .lcd-art.playing {
    animation: none;
  }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
  :root {
    --am-border: rgba(255, 255, 255, 0.2);
    --am-border-heavy: rgba(255, 255, 255, 0.3);
    --am-text-tertiary: rgba(255, 255, 255, 0.6);
  }

  [data-theme="light"] {
    --am-border: rgba(0, 0, 0, 0.2);
    --am-border-heavy: rgba(0, 0, 0, 0.3);
    --am-text-tertiary: rgba(0, 0, 0, 0.6);
  }
}

/* ===== AMLL-Page Official Full-Stage Player Layout & Visual System ===== */
:root {
  --amll-glow-color: rgba(250, 88, 106, 0.65);
  --amll-glass-bg: rgba(255, 255, 255, 0.08);
  --amll-glass-border: rgba(255, 255, 255, 0.12);
}

.amll-stage-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12, 12, 16, 0.45);
  backdrop-filter: blur(60px) saturate(1.8);
  -webkit-backdrop-filter: blur(60px) saturate(1.8);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.5s ease;
  overflow: hidden;
  isolation: isolate;
}

.amll-stage-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===== AMLL Full-Stage Dynamic Album Background ===== */
.amll-stage-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.amll-stage-bg canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.amll-stage-ambient-fallback {
  position: absolute;
  inset: -15%;
  width: 130%;
  height: 130%;
  background-size: cover;
  background-position: center;
  filter: blur(75px) saturate(2.2) brightness(0.65);
  transform: translate3d(0, 0, 0);
  opacity: 0;
  transition: background-image 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s ease-in-out;
  z-index: 1;
  animation: amllAmbientFloat 22s ease-in-out infinite alternate;
}

.amll-stage-ambient-fallback.loaded {
  opacity: 0.9;
}

@keyframes amllAmbientFloat {
  0% {
    transform: scale(1.05) translate(0%, 0%) rotate(0deg);
  }

  50% {
    transform: scale(1.18) translate(-2.5%, 1.5%) rotate(1.5deg);
  }

  100% {
    transform: scale(1.1) translate(2%, -1.5%) rotate(-1deg);
  }
}

.amll-stage-bg-dimmer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 40% 40%, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  z-index: 2;
}

.amll-stage-topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 36px;
  z-index: 10;
}

.amll-stage-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
}

.amll-stage-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--amll-glass-bg);
  border: 1px solid var(--amll-glass-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.amll-stage-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

/* Full Stage Split Layout (Desktop: Left Media Info / Right Huge Lyrics) */
.amll-stage-layout {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 38% 62%;
  height: calc(100vh - 160px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px;
  gap: 40px;
  z-index: 10;
}

@media (max-width: 900px) {
  .amll-stage-layout {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .amll-stage-left {
    display: none; // Auto switch to lyrics-first on mobile
  }
}

/* Left Stage: Album Cover & Media Controller Capsule */
.amll-stage-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

.amll-stage-cover-wrap {
  width: 320px;
  height: 320px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-bottom: 28px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(255, 255, 255, 0.05);
}

.amll-stage-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.amll-stage-meta {
  margin-bottom: 24px;
}

.amll-stage-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.amll-stage-artist {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

/* Right Stage: 官方 AMLL LyricPlayer 专属舞台视窗 */
.amll-stage-right {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.amll-stage-right .amll-lyric-player {
  width: 100%;
  height: 100%;
  --amll-lp-font-size: min(max(3.8vh, 26px), 48px);
  --amll-lp-line-width-aspect: 0.92;
  --amll-lp-line-padding-x: 1.2em;
}

.amll-lyric-player [class*="lyricLineWrapper"],
.amll-lyric-player .lyric_player_lyricLineWrapper {
  cursor: pointer !important;
  user-select: none;
}

.amll-stage-empty {
  text-align: center;
  padding: 120px 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
  font-weight: 600;
}

/* Floating Glassmorphic Control Bar at Stage Bottom */
.amll-stage-controls-wrapper {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 90%;
  max-width: 600px;
  z-index: 100;
}

/* Source Indicator & Switcher (Bottom-Right Corner) */
.amll-stage-corner-sources {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Lyric Source Indicator & Switcher */
.amll-stage-source-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.amll-stage-source-label,
.lyric-source-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.drawer-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
}

.amll-source-btn {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.amll-source-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.lyric-source-menu-wrap {
  position: relative;
}

.lyric-source-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: rgba(20, 20, 25, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
}

/* 播放页菜单位于右下角，向上展开 */
#amll-lyric-source-menu,
#amll-cover-source-menu {
  top: auto;
  bottom: calc(100% + 8px);
}

.lyric-source-menu.hidden {
  display: none;
}

.lyric-source-item {
  text-align: left;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lyric-source-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lyric-source-item.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
}

.amll-stage-progress {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.amll-stage-progress-bar-container {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: height 0.2s ease;
}

.amll-stage-progress-bar-container:hover {
  height: 8px;
}

.amll-stage-progress-fill {
  width: 0%;
  height: 100%;
  background: #ffffff;
  border-radius: 3px;
  position: relative;
}

.amll-stage-progress-fill::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.amll-stage-progress-bar-container:hover .amll-stage-progress-fill::after {
  opacity: 1;
}

.amll-stage-controls {
  background: rgba(20, 20, 25, 0.65);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 28px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.amll-stage-volume-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.amll-stage-volume-bar {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
}

.amll-stage-volume-fill {
  width: 70%;
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
}

.amll-ctrl-btn {
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.amll-ctrl-btn.active {
  color: var(--theme-color, #fa586a);
}

.amll-ctrl-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.amll-ctrl-btn.play-btn {
  width: 48px;
  height: 48px;
  background: #ffffff;
  color: #000000 !important;
  border-radius: 50%;
}

/* ==========================================================================
/* ==========================================================================
   Dual-Host AI Radio System (双人音乐电台演播室视觉系统)
   ========================================================================== */

/* --- 侧边栏双人电台徽标 --- */
.nav-badge-radio {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fa586a 0%, #a855f7 100%);
  color: #ffffff;
  letter-spacing: 0.6px;
  box-shadow: 0 0 10px rgba(250, 88, 106, 0.45);
  animation: radio-pulse-badge 2s infinite ease-in-out;
}

@keyframes radio-pulse-badge {

  0%,
  100% {
    opacity: 0.88;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 14px rgba(250, 88, 106, 0.75);
  }
}

/* --- 主视图：电台控制台 (Radio Dashboard) --- */
.radio-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 0 60px;
}

/* Hero Section */
.radio-hero-card {
  position: relative;
  border-radius: 20px;
  padding: 34px 32px;
  background: var(--am-panel-bg);
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.radio-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--am-primary-color);
  margin-bottom: 14px;
}

.radio-radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fa586a;
  box-shadow: 0 0 8px #fa586a;
  animation: radar-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radar-ping {

  75%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.radio-hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--am-text-primary);
  margin: 0 0 12px;
}

.radio-hero-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--am-text-secondary);
  max-width: 780px;
  margin: 0 0 20px;
}

.radio-hero-desc strong {
  color: var(--am-text-primary);
  font-weight: 600;
}

/* 主播阵容档案卡片 */
.radio-hosts-row {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.radio-host-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  transition: all 0.25s ease;
}

.radio-host-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.host-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.host-male .host-avatar {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.host-female .host-avatar {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35);
}

.host-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.host-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--am-text-primary);
}

.host-voice {
  font-size: 11px;
  color: var(--am-text-secondary);
}

/* 开启电台大按钮 */
.radio-start-action {
  display: flex;
  align-items: center;
}

.btn-start-radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fa586a 0%, #ff4b2b 100%);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(250, 88, 106, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-start-radio:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 26px rgba(250, 88, 106, 0.5);
}

/* 剧场对话节目单卡片 */
.radio-section {
  margin-bottom: 32px;
}

.radio-theatre-card {
  border-radius: 18px;
  padding: 24px;
  background: var(--am-panel-bg);
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-md);
  min-height: 180px;
}

.radio-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--am-text-secondary);
  font-size: 13px;
}

/* 歌单选择网格 */
.radio-playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.radio-pl-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--am-panel-bg);
  border: 1px solid var(--am-border);
  cursor: pointer;
  transition: all 0.22s ease;
}

.radio-pl-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.radio-pl-card.active {
  border-color: var(--am-primary-color);
  background: var(--am-surface);
  box-shadow: 0 4px 16px rgba(250, 88, 106, 0.15);
}

.radio-pl-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.radio-pl-icon {
  font-size: 16px;
}

.radio-pl-count {
  font-size: 9px;
  font-weight: 700;
  opacity: 0.9;
}

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

.radio-pl-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--am-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-pl-desc {
  font-size: 11px;
  color: var(--am-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ========================================================
   常驻双人电台 HUD (悬浮胶囊 & 剧场面板)
   ======================================================== */
.ai-radio-hud {
  position: fixed;
  right: 24px;
  top: 84px;
  z-index: 1000;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

/* 折叠后的悬浮胶囊 */
.radio-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 28px;
  background: rgba(28, 28, 30, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-capsule:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(250, 88, 106, 0.45);
  box-shadow: 0 10px 32px rgba(250, 88, 106, 0.25);
}

.radio-capsule-avatars {
  display: flex;
  align-items: center;
}

.cap-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  border: 1.5px solid rgba(28, 28, 30, 0.9);
}

.cap-avatar.male {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  z-index: 2;
}

.cap-avatar.female {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  margin-left: -7px;
  z-index: 1;
}

.radio-capsule-info {
  display: flex;
  flex-direction: column;
}

.radio-capsule-tag {
  font-size: 10px;
  font-weight: 800;
  color: #fa586a;
  letter-spacing: 0.3px;
}

.radio-capsule-song {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 动感微型声波 */
.radio-capsule-wave,
.radio-audio-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.radio-capsule-wave span,
.radio-audio-wave span {
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: #fa586a;
  transition: height 0.2s ease;
}

.radio-capsule-wave.active span,
.radio-audio-wave.active span {
  animation: wave-bar 0.9s ease-in-out infinite alternate;
}

.radio-capsule-wave.active span:nth-child(1),
.radio-audio-wave.active span:nth-child(1) {
  animation-delay: 0.1s;
  height: 12px;
}

.radio-capsule-wave.active span:nth-child(2),
.radio-audio-wave.active span:nth-child(2) {
  animation-delay: 0.3s;
  height: 8px;
}

.radio-capsule-wave.active span:nth-child(3),
.radio-audio-wave.active span:nth-child(3) {
  animation-delay: 0.2s;
  height: 14px;
}

.radio-capsule-wave.active span:nth-child(4),
.radio-audio-wave.active span:nth-child(4) {
  animation-delay: 0.4s;
  height: 10px;
}

@keyframes wave-bar {
  0% {
    height: 3px;
  }

  100% {
    height: 14px;
  }
}

/* 展开状态控制 */
.ai-radio-hud.minimized .radio-hud-panel {
  display: none;
}

.ai-radio-hud:not(.minimized) .radio-capsule {
  display: none;
}

/* 展开后的剧场面板 */
.radio-hud-panel {
  width: 380px;
  max-height: 580px;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: rgba(22, 22, 24, 0.92);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: panel-appear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panel-appear {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 演播室头部 */
.radio-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.radio-hud-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radio-live-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.4px;
}

.radio-live-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fa586a;
  box-shadow: 0 0 6px #fa586a;
}

/* 广播开关 */
.radio-switch-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-switch-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.radio-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.radio-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s;
  border-radius: 18px;
}

.radio-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

.radio-switch input:checked+.radio-slider {
  background-color: #fa586a;
}

.radio-switch input:checked+.radio-slider:before {
  transform: translateX(14px);
}

/* 窗口动作按钮 */
.radio-window-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-act-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 5px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.radio-act-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* 歌曲状态条 */
.radio-current-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.radio-disc-icon {
  font-size: 16px;
}

.radio-current-meta {
  flex: 1;
  min-width: 0;
}

.radio-song-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-song-artist {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 剧场对话流区域 */
.radio-hud-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 240px;
}

.radio-show-banner {
  margin-bottom: 14px;
}

.radio-show-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #fa586a;
}

.radio-show-theme {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

.radio-meta-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.radio-meta-pill {
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 8px;
  border-radius: 8px;
}

.radio-creation-box {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #fa586a;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.radio-creation-box strong {
  color: #fa586a;
}

/* 时间轴解说窗口流水线 */
.radio-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.radio-timeline-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.radio-timeline-block.round-active {
  background: rgba(250, 88, 106, 0.08);
  border-color: rgba(250, 88, 106, 0.4);
  box-shadow: 0 4px 20px rgba(250, 88, 106, 0.15);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.timeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fa586a;
  box-shadow: 0 0 6px #fa586a;
}

.timeline-time {
  font-weight: 700;
  color: #fff;
  font-family: monospace, sans-serif;
  letter-spacing: 0.5px;
}

.timeline-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(250, 88, 106, 0.15);
  color: #ff758c;
  border: 1px solid rgba(250, 88, 106, 0.25);
}

.timeline-tag.intro {
  color: #fa586a;
  background: rgba(250, 88, 106, 0.15);
}

.timeline-tag.interlude {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
}

.timeline-tag.outro {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.15);
}

.timeline-bubbles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-music-pause {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  margin-top: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.act-badge.bridge {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.act-badge.outro {
  background: rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.act-tip {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}

/* 双人对话气泡流 */
.radio-dialogue-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-speaker-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  opacity: 0.75;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-speaker-bubble.speaking {
  opacity: 1;
  transform: scale(1.015);
}

/* 男主播：居左 (白桦 / 蓝青调) */
.radio-speaker-bubble.speaker-male {
  flex-direction: row;
}

/* 女主播：居右 (茉莉 / 粉樱调) */
.radio-speaker-bubble.speaker-female {
  flex-direction: row-reverse;
}

.radio-avatar-frame {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.radio-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.speaker-male .radio-avatar {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.speaker-female .radio-avatar {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

/* 主播说话呼吸光环 */
.radio-speaker-bubble.speaking .radio-avatar-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid;
  animation: pulse-ring 1.4s ease-out infinite;
}

.speaker-male.speaking .radio-avatar-pulse {
  border-color: #38bdf8;
}

.speaker-female.speaking .radio-avatar-pulse {
  border-color: #f43f5e;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.radio-bubble-card {
  max-width: 82%;
  display: flex;
  flex-direction: column;
}

.speaker-female .radio-bubble-card {
  align-items: flex-end;
}

.radio-bubble-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
}

.speaker-male .radio-bubble-meta {
  color: #38bdf8;
}

.speaker-female .radio-bubble-meta {
  color: #fb7185;
}

.radio-voice-chip {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 400;
  opacity: 0.8;
}

.radio-trigger-chip {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
}

.radio-bubble-speech {
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: 14px;
  word-break: break-word;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.speaker-male .radio-bubble-speech {
  border-top-left-radius: 4px;
}

.speaker-female .radio-bubble-speech {
  border-top-right-radius: 4px;
  text-align: left;
}

.radio-speaker-bubble.speaking .radio-bubble-speech {
  border-color: #fa586a;
  background: rgba(250, 88, 106, 0.12);
  box-shadow: 0 4px 14px rgba(250, 88, 106, 0.2);
}

/* 状态与占位 */
.radio-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
  text-align: center;
}

.radio-radar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(250, 88, 106, 0.2);
  border-top-color: #fa586a;
  animation: spin 0.9s linear infinite;
  margin-bottom: 14px;
}

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

.radio-loading-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.radio-loading-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.radio-placeholder-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 10px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  gap: 8px;
}

.radio-empty-icon {
  font-size: 28px;
}

.radio-empty-txt {
  font-size: 12px;
}

.radio-error-box {
  padding: 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  text-align: center;
}

.radio-error-title {
  font-size: 13px;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 6px;
}

.radio-error-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.radio-btn-retry {
  background: #f87171;
  border: none;
  color: #fff;
  border-radius: 12px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* 演播室底部栏 */
.radio-hud-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.radio-status-tip {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.radio-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

.radio-vol-slider {
  width: 65px;
  height: 4px;
  accent-color: #fa586a;
  cursor: pointer;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .ai-radio-hud {
    right: 14px;
    top: auto;
    bottom: 90px;
  }

  .radio-hud-panel {
    width: calc(100vw - 28px);
    max-width: 360px;
    max-height: 450px;
  }

  .radio-hero-card {
    padding: 24px 20px;
  }

  .radio-hero-title {
    font-size: 26px;
  }
}