/* ===== 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 Engine 样式 */
#fsp-lyrics-scroll .amll-stage-wrapper {
  padding: 20px 0;
}
#fsp-lyrics-scroll .amll-stage-line {
  font-size: 18px;
  margin-bottom: 20px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
#fsp-lyrics-scroll .amll-stage-line:hover {
  color: rgba(255, 255, 255, 0.75);
}
#fsp-lyrics-scroll .amll-stage-line.active {
  font-size: 22px !important;
  font-weight: 700;
  transform: scale(1.03) translateX(4px) !important;
}
#fsp-lyrics-scroll .amll-stage-line.active:not(:has(.amll-stage-word)) {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 35px var(--amll-glow-color, rgba(250, 88, 106, 0.65)) !important;
}
#fsp-lyrics-scroll .amll-stage-word {
  display: inline-block;
  opacity: 0.35;
  color: rgba(255, 255, 255, 0.45);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, text-shadow 0.15s ease;
}
#fsp-lyrics-scroll .amll-stage-line.active .amll-stage-word.active-word {
  opacity: 1 !important;
  color: #ffffff !important;
  transform: translateY(-1px) scale(1.05);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 30px var(--amll-glow-color, #fa586a) !important;
}
#fsp-lyrics-scroll .amll-stage-line.passed {
  opacity: 0.35;
}
#fsp-lyrics-scroll .amll-stage-line.far {
  opacity: 0.15;
}

.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);
  }
}

/* ===== AI Recommendation Section ===== */
.ai-recommend-section {
  margin-bottom: 32px;
}

.ai-input-area {
  margin-bottom: 16px;
}

.ai-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--am-card-bg);
  border: 1px solid var(--am-border-heavy);
  border-radius: var(--am-radius-lg);
  padding: 12px 16px;
  transition: border-color var(--am-transition-fast), box-shadow var(--am-transition-fast);
}

.ai-input-wrapper:focus-within {
  border-color: var(--am-primary-color);
  box-shadow: 0 0 0 3px var(--am-primary-soft);
}

.ai-sparkle {
  color: var(--am-primary-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ai-query-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--am-text-primary);
  font-family: var(--am-font);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  min-height: 24px;
  max-height: 120px;
}

.ai-query-input::placeholder {
  color: var(--am-text-tertiary);
}

.ai-recommend-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--am-primary-color);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--am-transition-fast), transform var(--am-transition-fast);
}

.ai-recommend-btn:hover {
  background: var(--am-primary-hover);
  transform: scale(1.05);
}

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

.ai-recommend-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.ai-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-tag {
  padding: 6px 14px;
  border-radius: var(--am-radius-full);
  border: 1px solid var(--am-border-heavy);
  background: var(--am-surface);
  color: var(--am-text-secondary);
  font-size: 12px;
  font-family: var(--am-font);
  cursor: pointer;
  transition: all var(--am-transition-fast);
  white-space: nowrap;
}

.ai-tag:hover {
  border-color: var(--am-primary-color);
  color: var(--am-primary-color);
  background: var(--am-primary-soft);
}

.ai-tag:active {
  transform: scale(0.95);
}

/* ===== AI Result Area ===== */
.ai-result-area {
  margin-top: 20px;
}

.ai-streaming-status {
  margin-bottom: 16px;
}

.ai-status-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--am-text-secondary);
  font-size: 13px;
  padding: 12px 16px;
  background: var(--am-surface);
  border-radius: var(--am-radius-md);
}

.ai-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--am-border-heavy);
  border-top-color: var(--am-primary-color);
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}

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

.ai-status-error {
  color: #ff453a;
  font-size: 13px;
  padding: 12px 16px;
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.2);
  border-radius: var(--am-radius-md);
}

.ai-streaming-text {
  color: var(--am-text-secondary);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 16px;
  background: var(--am-surface);
  border-radius: var(--am-radius-md);
  white-space: pre-wrap;
}

/* ===== AI Recommendation Header ===== */
.ai-recommend-header {
  margin-bottom: 16px;
}

.ai-rec-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--am-text-primary);
  margin-bottom: 6px;
  font-family: var(--am-font);
}

.ai-rec-desc {
  font-size: 13px;
  color: var(--am-text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.ai-rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-meta-tag {
  padding: 4px 10px;
  border-radius: var(--am-radius-full);
  background: var(--am-primary-soft);
  color: var(--am-primary-color);
  font-size: 11px;
  font-weight: 500;
}

/* ===== AI Playlist Song Items ===== */
.ai-playlist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-song-item {
  display: grid;
  grid-template-columns: 32px 1fr 1.2fr 80px 32px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--am-radius-md);
  cursor: pointer;
  transition: background var(--am-transition-fast);
}

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

.ai-song-rank {
  font-size: 14px;
  font-weight: 500;
  color: var(--am-text-tertiary);
  text-align: center;
}

.ai-song-info {
  min-width: 0;
}

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

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

.ai-song-reason {
  font-size: 12px;
  color: var(--am-text-tertiary);
  line-height: 1.4;
}

.ai-song-score {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-score-bar {
  flex: 1;
  height: 4px;
  background: var(--am-surface);
  border-radius: 2px;
  overflow: hidden;
}

.ai-score-fill {
  height: 100%;
  background: var(--am-primary-color);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.ai-score-text {
  font-size: 11px;
  color: var(--am-text-tertiary);
  min-width: 32px;
  text-align: right;
}

.ai-song-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--am-text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--am-transition-fast);
}

.ai-song-item:hover .ai-song-play {
  opacity: 1;
}

.ai-song-play:hover {
  background: var(--am-primary-color);
  color: #fff;
}

/* ===== AI Playlist Actions ===== */
.ai-playlist-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--am-border);
}

.ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--am-radius-full);
  border: none;
  font-size: 13px;
  font-family: var(--am-font);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--am-transition-fast);
}

.ai-action-play {
  background: var(--am-primary-color);
  color: #fff;
}

.ai-action-play:hover {
  background: var(--am-primary-hover);
}

.ai-action-save {
  background: var(--am-surface);
  color: var(--am-text-primary);
  border: 1px solid var(--am-border-heavy);
}

.ai-action-save:hover {
  background: var(--am-surface-hover);
  border-color: var(--am-text-tertiary);
}

.ai-action-share {
  background: var(--am-surface);
  color: var(--am-text-secondary);
  border: 1px solid var(--am-border);
}

.ai-action-share:hover {
  background: var(--am-surface-hover);
  color: var(--am-text-primary);
}

/* ===== Mobile Responsive ===== */
/* ===== AI Standalone Page ===== */
.ai-recommend-standalone {
  max-width: 700px;
}

.ai-standalone-hero {
  text-align: center;
  padding: 40px 20px 32px;
}

.ai-hero-icon {
  color: var(--am-primary-color);
  margin-bottom: 16px;
  opacity: 0.8;
}

.ai-standalone-hero h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--am-text-primary);
  margin-bottom: 8px;
}

.ai-standalone-hero p {
  font-size: 14px;
  color: var(--am-text-secondary);
  line-height: 1.5;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 767px) {
  .ai-song-item {
    grid-template-columns: 28px 1fr 60px 28px;
  }

  .ai-song-reason {
    display: none;
  }

  .ai-quick-tags {
    gap: 6px;
  }

  .ai-tag {
    font-size: 11px;
    padding: 5px 10px;
  }

  .ai-playlist-actions {
    flex-wrap: wrap;
  }

  .ai-action-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .ai-standalone-hero {
    padding: 24px 16px 20px;
  }

  .ai-standalone-hero h2 {
    font-size: 20px;
  }
}

/* ===== 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(0, 0, 0, 0.75);
  backdrop-filter: blur(80px) saturate(1.8);
  -webkit-backdrop-filter: blur(80px) 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;
}

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

.amll-stage-topbar {
  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 {
  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: 2;
}

@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), 0 0 40px var(--amll-glow-color);
  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: Huge AMLL Word-by-word Lyrics Viewport */
.amll-stage-right {
  position: relative;
  height: 100%;
  overflow-y: auto;
  padding: 60px 20px 200px 0;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.amll-stage-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.amll-stage-line {
  font-family: var(--am-font);
  font-size: 26px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transform-origin: left center;
  transition: color 0.45s cubic-bezier(0.25, 1, 0.5, 1), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.45s ease, filter 0.45s ease, text-shadow 0.45s ease;
  user-select: none;
  word-break: break-word;
}


.amll-stage-line:hover {
  color: rgba(255, 255, 255, 0.75);
  transform: translateX(8px);
}

.amll-stage-line.passed {
  opacity: 0.3;
  filter: blur(1px);
}

.amll-stage-line.far {
  opacity: 0.12;
  filter: blur(2.5px);
}

/* Apple Music Full Stage Highlighting (38px ~ 44px Super Bold) */
.amll-stage-line.active {
  font-size: 38px !important;
  font-weight: 800 !important;
  opacity: 1 !important;
  filter: blur(0px) !important;
  transform: scale(1.05) translateX(6px) !important;
}

.amll-stage-line.active:not(:has(.amll-stage-word)) {
  color: #ffffff !important;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.9), 0 0 70px var(--amll-glow-color, rgba(250, 88, 106, 0.65)) !important;
}

/* Word-by-word Character Flowing Effect */
.amll-stage-word {
  display: inline-block;
  padding: 0;
  margin: 0;
  opacity: 0.32;
  color: rgba(255, 255, 255, 0.4);
  white-space: pre-wrap;
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease, text-shadow 0.15s ease;
}

.amll-stage-line.active .amll-stage-word {
  opacity: 0.35;
  color: rgba(255, 255, 255, 0.45);
}

.amll-stage-line.active .amll-stage-word.active-word {
  opacity: 1 !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.08) !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 45px var(--amll-glow-color, #fa586a) !important;
}


.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;
}

.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%;
}

/* ==========================================================================
   AI Companion (AI 伴听) - Apple Music Aesthetics & Glassmorphic Floating HUD
   ========================================================================== */

/* --- Sidebar Nav Badge --- */
.nav-badge-ai {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fa586a 0%, #ff4b2b 100%);
  color: #ffffff;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(250, 88, 106, 0.4);
  animation: pulse-live 2s infinite ease-in-out;
}

@keyframes pulse-live {
  0%, 100% { opacity: 0.85; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); box-shadow: 0 0 14px rgba(250, 88, 106, 0.7); }
}

/* --- View: AI Companion Dashboard --- */
.companion-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 0 60px;
}

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

.companion-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: 16px;
}

.companion-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--am-primary-color);
}

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

.companion-hero-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--am-text-secondary);
  max-width: 680px;
  margin: 0 0 26px;
}

.companion-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  margin-bottom: 24px;
}

.companion-style-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.companion-opt-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--am-text-secondary);
}

.companion-style-chips {
  display: flex;
  gap: 8px;
}

.companion-style-chip {
  padding: 7px 15px;
  border-radius: 20px;
  background: var(--am-surface-hover);
  border: 1px solid var(--am-border);
  color: var(--am-text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.companion-style-chip:hover {
  color: var(--am-text-primary);
  border-color: var(--am-border-heavy);
}

.companion-style-chip.active {
  background: var(--am-primary-color);
  border-color: var(--am-primary-color);
  color: #ffffff;
}

/* Switch */
.companion-toggle-group {
  display: flex;
  align-items: center;
}

.companion-switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.companion-switch-label input {
  display: none;
}

.companion-slider {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--am-border-heavy);
  border-radius: 20px;
  transition: background 0.3s;
}

.companion-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.companion-switch-label input:checked + .companion-slider {
  background: var(--am-primary-color);
}

.companion-switch-label input:checked + .companion-slider::before {
  transform: translateX(18px);
}

.companion-switch-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--am-text-primary);
}

/* Big Start Button */
.companion-start-action {
  display: flex;
  align-items: center;
}

.btn-start-companion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 30px;
  background: var(--am-primary-color);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--am-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-start-companion:hover {
  transform: translateY(-1px);
  box-shadow: var(--am-shadow-md);
}

.btn-start-companion:active {
  transform: translateY(0);
}

/* Playlists Grid */
.companion-playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.companion-playlist-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--am-card-bg);
  border: 1px solid var(--am-border);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.companion-playlist-card:hover {
  background: var(--am-surface-hover);
  border-color: var(--am-border-heavy);
  transform: translateY(-1px);
}

.companion-playlist-card.active {
  background: var(--am-surface);
  border-color: var(--am-primary-color);
}

.companion-pl-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: var(--am-shadow-sm);
}

.companion-pl-icon {
  font-size: 22px;
  color: #ffffff;
}

.companion-pl-badge {
  position: absolute;
  bottom: 3px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 4px;
  border-radius: 4px;
}

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

.companion-pl-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--am-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.companion-pl-desc {
  font-size: 12px;
  color: var(--am-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.companion-pl-select-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--am-border-heavy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s;
}

.companion-playlist-card.active .companion-pl-select-mark {
  background: var(--am-primary-color);
  border-color: var(--am-primary-color);
  color: #ffffff;
}


/* ==========================================================================
   AI Floating HUD (毛玻璃悬浮解说窗口)
   ========================================================================== */
.ai-floating-hud {
  position: fixed;
  top: 76px;
  right: 28px;
  z-index: 10005;
  display: none;
  font-family: inherit;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.ai-floating-hud.visible {
  display: block;
}

/* --- 折叠状态：药丸胶囊 --- */
.hud-capsule {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 30px;
  background: var(--am-panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--am-border-heavy);
  box-shadow: var(--am-shadow-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-capsule:hover {
  transform: scale(1.04);
  border-color: var(--am-primary-color);
}

.hud-capsule-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--am-primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

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

.hud-capsule-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--am-primary-color);
  letter-spacing: 0.5px;
}

.hud-capsule-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--am-text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-capsule-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.hud-capsule-wave span {
  width: 2.5px;
  height: 4px;
  background: var(--am-primary-color);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.hud-capsule-wave.active span {
  animation: hud-wave 1s infinite ease-in-out alternate;
}

.hud-capsule-wave.active span:nth-child(1) { animation-delay: 0.1s; height: 12px; }
.hud-capsule-wave.active span:nth-child(2) { animation-delay: 0.3s; height: 16px; }
.hud-capsule-wave.active span:nth-child(3) { animation-delay: 0.2s; height: 8px; }
.hud-capsule-wave.active span:nth-child(4) { animation-delay: 0.4s; height: 14px; }

/* --- 展开状态：完整解说面板 --- */
.hud-panel {
  width: 360px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: var(--am-panel-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-xl);
  overflow: hidden;
  transition: all 0.25s ease;
}

/* 最小化切换 */
.ai-floating-hud.minimized .hud-panel {
  display: none;
}
.ai-floating-hud.minimized .hud-capsule {
  display: flex;
}

/* 头部 */
.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  cursor: move;
  border-bottom: 1px solid var(--am-border);
}

.hud-live-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--am-primary-color);
  letter-spacing: 0.4px;
}

.hud-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--am-primary-color);
}

.hud-window-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-act-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--am-surface-hover);
  border: none;
  color: var(--am-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* 当前歌曲展示条 */
.hud-song-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--am-surface);
  border-bottom: 1px solid var(--am-border);
}

.hud-song-art-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--am-primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hud-song-icon {
  color: #ffffff;
  font-size: 16px;
}

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

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

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

/* 声波 */
.hud-audio-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
}

.hud-audio-wave span {
  width: 2.5px;
  height: 4px;
  background: var(--am-primary-color);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.hud-audio-wave.active span {
  animation: hud-wave 0.8s infinite ease-in-out alternate;
}
.hud-audio-wave.loading span {
  animation: hud-wave-loading 1.2s infinite ease-in-out;
}

.hud-audio-wave.active span:nth-child(1) { animation-delay: 0.1s; }
.hud-audio-wave.active span:nth-child(2) { animation-delay: 0.25s; }
.hud-audio-wave.active span:nth-child(3) { animation-delay: 0.15s; }
.hud-audio-wave.active span:nth-child(4) { animation-delay: 0.35s; }
.hud-audio-wave.active span:nth-child(5) { animation-delay: 0.05s; }

@keyframes hud-wave {
  0% { height: 4px; }
  100% { height: 16px; }
}

@keyframes hud-wave-loading {
  0%, 100% { height: 4px; opacity: 0.3; }
  50% { height: 12px; opacity: 1; }
}

/* 主体解说内容 */
.hud-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hud-commentary-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--am-text-primary);
  letter-spacing: -0.2px;
}

.hud-highlights-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hud-badge-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--am-primary-soft);
  border: 1px solid var(--am-border-focus);
  color: var(--am-primary-color);
}

.hud-commentary-content {
  font-size: 13px;
  line-height: 1.65;
  color: var(--am-text-primary);
  background: var(--am-lcd-bg);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--am-border);
}

.hud-commentary-paragraph {
  margin: 0;
  text-align: justify;
}

/* 流式文字稿：打字光标 */
.hud-commentary-paragraph.streaming .streaming-caret {
  display: inline-block;
  width: 2px;
  height: 14px;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--am-primary-color);
  animation: hud-caret-blink 0.9s step-end infinite;
}

@keyframes hud-caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Loading 占位 */
.hud-loading-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.hud-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--am-primary-soft);
  border-top-color: var(--am-primary-color);
  border-radius: 50%;
  animation: hud-spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.hud-loading-text {
  display: flex;
  flex-direction: column;
}

.hud-loading-text span {
  font-size: 12px;
  font-weight: 600;
  color: var(--am-text-primary);
}

.hud-loading-text small {
  font-size: 10px;
  color: var(--am-text-secondary);
  margin-top: 2px;
}

/* 智谱参考来源 */
.hud-search-sources {
  font-size: 11px;
  background: var(--am-surface);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--am-border);
}

.hud-sources-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--am-text-secondary);
  margin-bottom: 6px;
}

.hud-sources-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-source-item {
  color: var(--am-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: help;
}

/* 底部操作栏 */
.hud-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--am-border);
  background: var(--am-surface);
}

/* 模型选择下拉框 */
.hud-model-select {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  color: var(--am-text-primary);
  outline: none;
  cursor: pointer;
  max-width: 126px;
  flex-shrink: 1;
}
.hud-model-select:hover {
  border-color: var(--am-border-heavy);
}
.hud-model-select:focus {
  border-color: var(--am-border-focus);
}
.hud-model-select option {
  background: var(--am-panel-bg);
  color: var(--am-text-primary);
}

.hud-voice-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--am-primary-color);
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(250, 88, 106, 0.4);
}

.hud-voice-toggle:hover {
  background: var(--am-primary-hover);
  transform: scale(1.02);
}

.hud-voice-toggle .icon-pause {
  display: none;
}
.hud-voice-toggle.playing .icon-play {
  display: none;
}
.hud-voice-toggle.playing .icon-pause {
  display: block;
}

.hud-volume-box {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--am-text-secondary);
}

.hud-volume-slider {
  width: 70px;
  height: 4px;
  -webkit-appearance: none;
  background: var(--am-border-heavy);
  border-radius: 2px;
  outline: none;
}

.hud-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--am-text-primary);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .ai-floating-hud {
    right: 14px;
    top: auto;
    bottom: 90px;
  }
  .hud-panel {
    width: calc(100vw - 28px);
    max-width: 360px;
    max-height: 440px;
  }
  .companion-hero-card {
    padding: 24px 20px;
  }
  .companion-hero-title {
    font-size: 26px;
  }
}




