/* ==========================================================================
   AURA — High-End Audiophile Music Player CSS Design System
   Aesthetic: AMOLED #000000 • Obsidian Glass • Dynamic Ambient Halos
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-amoled: #000000;
  --surface-1: #09090b;
  --surface-2: #121216;
  --surface-3: #1a1a22;
  --surface-glass: rgba(18, 18, 24, 0.72);
  --surface-glass-heavy: rgba(10, 10, 14, 0.88);
  --surface-pill: rgba(255, 255, 255, 0.06);
  --surface-pill-hover: rgba(255, 255, 255, 0.12);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(255, 255, 255, 0.22);

  --text-primary: #ffffff;
  --text-secondary: #9e9ea7;
  --text-muted: #5c5c66;

  /* Dynamic accent colors - updated dynamically from active track */
  --accent-primary: #e63946;
  --accent-glow: rgba(230, 57, 70, 0.45);
  --accent-secondary: #ffb703;
  --gold-audiophile: #e5b567;
  --gold-glow: rgba(229, 181, 103, 0.35);
  --cyan-dac: #00f5d4;
  --cyan-glow: rgba(0, 245, 212, 0.3);

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --nav-height: 64px;
  --miniplayer-height: 68px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-amoled);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  user-select: none;
}

/* Ambient dynamic background lighting */
.ambient-halo {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  transition: background 1.2s var(--ease-smooth), opacity 0.8s ease;
}

.ambient-halo-bottom {
  position: fixed;
  bottom: -25%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* Main Container Frame */
.app-viewport {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  max-height: 920px;
  background: var(--bg-amoled);
  border: 1px solid var(--border-subtle);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: max-width 0.4s var(--ease-spring), border-radius 0.4s var(--ease-spring);
}

/* Desktop wide console mode */
.app-viewport.desktop-mode {
  max-width: 1080px;
  max-height: 900px;
  border-radius: 28px;
}

/* Frame Header / Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 6px 22px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  z-index: 20;
}

.status-bar .device-clock {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 0.82rem;
}

.status-bar .audiophile-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 181, 103, 0.12);
  border: 1px solid rgba(229, 181, 103, 0.3);
  color: var(--gold-audiophile);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-bar .audiophile-badge-pill:hover {
  background: rgba(229, 181, 103, 0.22);
  border-color: var(--gold-audiophile);
}

.status-bar .audiophile-badge-pill .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-audiophile);
  box-shadow: 0 0 8px var(--gold-audiophile);
  animation: pulseLight 1.8s infinite;
}

@keyframes pulseLight {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.view-mode-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.view-mode-toggle:hover {
  color: var(--text-primary);
}

/* App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px 14px 22px;
  z-index: 15;
}

.brand-wrapper {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

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

.icon-btn {
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.icon-btn:hover {
  background: var(--surface-pill-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

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

/* Main Content Views Area */
.app-content {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + var(--miniplayer-height) + 16px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.app-content::-webkit-scrollbar {
  width: 4px;
}
.app-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.view-section {
  display: none;
  padding: 0 20px 20px 20px;
  animation: fadeInView 0.3s var(--ease-spring) forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   1. HOME SCREEN
   ========================================================================== */
.greeting-box {
  margin-bottom: 20px;
}

.greeting-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.greeting-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Search Preview Bar */
.search-trigger-bar {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 24px;
  transition: all 0.25s ease;
}

.search-trigger-bar:hover {
  border-color: var(--border-focus);
  background: rgba(25, 25, 32, 0.85);
}

.search-trigger-bar svg {
  color: var(--accent-primary);
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Recently Played Horizontal Carousel */
.carousel-container {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -20px 24px -20px;
  padding-left: 20px;
  padding-right: 20px;
  scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar {
  display: none;
}

.card-track {
  flex: 0 0 150px;
  cursor: pointer;
  group: hover;
  transition: transform 0.25s var(--ease-spring);
}

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

.card-cover-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.badge-source {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--gold-audiophile);
  padding: 3px 6px;
  border-radius: 6px;
}

.badge-source.youtube {
  color: #ff4d4d;
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.card-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Quick Library Grid */
.library-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.quick-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.quick-card:hover {
  background: var(--surface-pill-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.quick-card-icon {
  font-size: 1.3rem;
}

.quick-card-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-card-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Audiophile Hardware Banner */
.audiophile-banner {
  background: linear-gradient(135deg, rgba(229, 181, 103, 0.12) 0%, rgba(18, 18, 24, 0.8) 100%);
  border: 1px solid rgba(229, 181, 103, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.audiophile-banner:hover {
  border-color: var(--gold-audiophile);
}

.banner-content h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-audiophile);
  display: flex;
  align-items: center;
  gap: 6px;
}

.banner-content p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.3;
}

/* ==========================================================================
   2. SEARCH SCREEN
   ========================================================================== */
.search-input-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px 14px 44px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-glow);
}

.search-icon-inside {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Source & Quality Filter Pills */
.filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.filter-pills-row::-webkit-scrollbar { display: none; }

.filter-pill {
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: var(--text-primary);
  color: var(--bg-amoled);
  font-weight: 700;
  border-color: var(--text-primary);
}

/* Search Track List */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: transparent;
  transition: background 0.2s ease;
  cursor: pointer;
}

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

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

.track-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.track-info {
  min-width: 0;
}

.track-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta {
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.track-meta-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  background: rgba(229, 181, 103, 0.15);
  color: var(--gold-audiophile);
  padding: 1px 5px;
  border-radius: 4px;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   3. NOW PLAYING — THE HERO SCREEN (Full Overlay Modal)
   ========================================================================== */
.now-playing-modal {
  position: absolute;
  inset: 0;
  background: var(--bg-amoled);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-spring);
  overflow-y: auto;
  scrollbar-width: none;
}

.now-playing-modal::-webkit-scrollbar { display: none; }

.now-playing-modal.active {
  transform: translateY(0);
}

.np-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 8px 20px;
}

.np-swipe-pill {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  margin: 0 auto;
  cursor: pointer;
}

.np-header-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.np-artwork-section {
  padding: 16px 36px 20px 36px;
  display: flex;
  justify-content: center;
  position: relative;
}

.np-artwork-frame {
  position: relative;
  width: 270px;
  height: 270px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px var(--accent-glow), 0 0 1px rgba(255, 255, 255, 0.2);
  transition: box-shadow 0.8s ease;
}

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

/* Real-time spectrum canvas inside now-playing */
.np-visualizer-canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  pointer-events: none;
  opacity: 0.7;
}

#ytPlayerContainer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  background: #000;
}

#ytPlayerContainer.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

#ytPlayerContainer iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: inherit;
}

.np-track-details {
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.np-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.np-artist {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.np-favorite-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s var(--ease-spring);
}

.np-favorite-btn.active {
  color: #ff3366;
}

.np-favorite-btn:hover {
  transform: scale(1.15);
}

/* Audiophile High-Res Tag Banner */
.np-audio-tag-wrapper {
  padding: 0 28px;
  margin-bottom: 16px;
}

.np-audio-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(229, 181, 103, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-audiophile);
  cursor: pointer;
  transition: all 0.2s ease;
}

.np-audio-tag-pill:hover {
  border-color: var(--gold-audiophile);
  background: rgba(229, 181, 103, 0.15);
}

.np-audio-tag-pill .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-audiophile);
  box-shadow: 0 0 6px var(--gold-audiophile);
}

/* Seek Bar / Progress Section */
.np-timeline-section {
  padding: 0 28px;
  margin-bottom: 16px;
}

.np-seek-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  position: relative;
}

.np-seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-primary);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.np-seek-slider:hover::-webkit-slider-thumb {
  transform: scale(1.3);
  background: var(--accent-primary);
}

.np-timestamps {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Playback Hero Controls */
.np-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 24px;
  margin-bottom: 24px;
}

.np-btn-sm {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.np-btn-sm:hover {
  color: var(--text-primary);
}

.np-btn-sm.active {
  color: var(--accent-primary);
}

.np-btn-step {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring);
}

.np-btn-step:hover {
  transform: scale(1.15);
}

.np-btn-play-hero {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-amoled);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.35);
  transition: all 0.2s var(--ease-spring);
}

.np-btn-play-hero:hover {
  transform: scale(1.08);
  box-shadow: 0 0 45px rgba(255, 255, 255, 0.5);
}

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

/* Bottom Actions Toolbar */
.np-subactions-toolbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 28px 24px 28px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-glass);
}

.np-subaction-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s ease;
}

.np-subaction-item:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   4. MINI PLAYER
   ========================================================================== */
.mini-player-bar {
  position: absolute;
  bottom: var(--nav-height);
  left: 12px;
  right: 12px;
  height: var(--miniplayer-height);
  background: var(--surface-glass-heavy);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease;
}

.mini-player-bar:hover {
  border-color: var(--border-focus);
}

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

.mini-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.mini-info {
  min-width: 0;
}

.mini-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-artist {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mini-btn-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-amoled);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.mini-btn-play:hover {
  transform: scale(1.08);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR
   ========================================================================== */
.bottom-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 25;
  padding: 0 10px;
}

.nav-tab-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 6px 12px;
}

.nav-tab-btn.active {
  color: var(--text-primary);
}

.nav-tab-btn.active svg {
  color: var(--accent-primary);
}

/* ==========================================================================
   5. EQUALIZER & DSP STUDIO MODAL
   ========================================================================== */
.modal-drawer {
  position: absolute;
  inset: 0;
  background: var(--bg-amoled);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-spring);
  overflow-y: auto;
  padding: 16px 20px;
}

.modal-drawer.active {
  transform: translateY(0);
}

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

.drawer-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

/* Toggle Switch (Master EQ) */
.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

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

.slider-switch {
  position: absolute;
  inset: 0;
  background-color: var(--surface-3);
  border-radius: 34px;
  transition: .3s;
  border: 1px solid var(--border-subtle);
}

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

input:checked + .slider-switch {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

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

/* Preset Chips */
.presets-scroll-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.presets-scroll-row::-webkit-scrollbar { display: none; }

.preset-chip {
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.preset-chip.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Interactive EQ Spline Curve Screen */
.eq-visualizer-box {
  position: relative;
  width: 100%;
  height: 110px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.eq-curve-svg {
  width: 100%;
  height: 100%;
}

/* 10-Band Vertical Sliders Bank */
.eq-sliders-bank {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 180px;
  padding: 0 6px;
  margin-bottom: 24px;
}

.eq-slider-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
}

.eq-gain-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.eq-vertical-range {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  writing-mode: bt-lr;
  width: 22px;
  height: 120px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.eq-freq-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Preamp Slider */
.preamp-control-card {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.preamp-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.preamp-slider {
  width: 100%;
  accent-color: var(--gold-audiophile);
  cursor: pointer;
}

/* Audiophile DSP Toggles */
.dsp-toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.dsp-toggle-item {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dsp-item-label h5 {
  font-size: 0.82rem;
  font-weight: 600;
}

.dsp-item-label p {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   6. AUDIO DETAILS & BIT-PERFECT INSPECTOR MODAL
   ========================================================================== */
.audio-details-card {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.audio-detail-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.chain-flow-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

.chain-node {
  text-align: center;
}

.chain-node-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.chain-node-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold-audiophile);
  margin-top: 2px;
}

.chain-node-arrow {
  color: var(--text-muted);
}

.telemetry-table {
  width: 100%;
  border-collapse: collapse;
}

.telemetry-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.telemetry-table td {
  padding: 10px 0;
  font-size: 0.82rem;
}

.telemetry-table td:first-child {
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.telemetry-table td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.bit-perfect-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 245, 212, 0.15);
  border: 1px solid var(--cyan-dac);
  color: var(--cyan-dac);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ==========================================================================
   7. QUEUE & PLAYLIST DRAWERS
   ========================================================================== */
.queue-header-actions {
  display: flex;
  gap: 10px;
}

.btn-secondary-sm {
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-sm:hover {
  background: var(--surface-pill-hover);
  border-color: var(--border-focus);
}

.queue-drag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.queue-drag-item.playing {
  border-color: var(--accent-primary);
  background: rgba(230, 57, 70, 0.12);
}

.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  padding-right: 10px;
}

/* ==========================================================================
   8. SYNCED LYRICS DRAWER
   ========================================================================== */
.lyrics-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px 10px;
  text-align: center;
}

.lyric-line {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
  transition: all 0.3s ease;
  cursor: pointer;
}

.lyric-line.active {
  color: var(--text-primary);
  font-size: 1.45rem;
  text-shadow: 0 0 25px var(--accent-glow);
  transform: scale(1.05);
}

/* Local file drag-over overlay */
.file-drop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 2px dashed var(--cyan-dac);
  color: var(--cyan-dac);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.file-drop-overlay.active {
  display: flex;
}
