/* ==========================================================================
   AURA Desktop 3-Pane Responsive Layout & Audiophile Console
   Matches AURA Desktop Architecture: Obsidian Glass • Purple Neon • Hi-Res
   ========================================================================== */

/* Show desktop layout and adjust viewport on larger displays */
@media (min-width: 992px) {
  body {
    display: block !important;
    overflow: hidden !important;
    padding: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100vw !important;
  }

  /* Hide mobile phone frame in desktop mode */
  .app-viewport {
    display: none !important;
  }

  .desktop-layout {
    display: grid !important;
  }
}

/* Base Desktop Container */
.desktop-layout {
  display: none; /* activated on desktop via media query or .desktop-mode */
  grid-template-columns: 240px 1fr 370px;
  grid-template-rows: 1fr 88px;
  grid-template-areas:
    "sidebar main right"
    "bottom bottom bottom";
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  background: var(--bg-amoled);
  color: var(--text-primary);
  overflow: hidden;
  position: relative;
  user-select: none;
}

/* Custom Frameless Window Drag Region */
.desktop-drag-region {
  -webkit-app-region: drag;
  app-region: drag;
}
.desktop-no-drag {
  -webkit-app-region: no-drag;
  app-region: no-drag;
}

/* ================= 1. LEFT SIDEBAR ================= */
.desktop-sidebar {
  grid-area: sidebar;
  background: rgba(10, 10, 14, 0.96);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px 16px;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 30;
}
.desktop-sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 24px 8px;
  cursor: pointer;
}
.sidebar-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 14px var(--accent-glow);
}
.sidebar-brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 2px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-brand-text p {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* Navigation Groups */
.sidebar-group {
  margin-bottom: 22px;
}
.sidebar-group-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 0 10px 8px 10px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.sidebar-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  transition: stroke 0.2s;
}
.sidebar-item:hover {
  color: var(--text-primary);
  background: var(--surface-pill);
}
.sidebar-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.24), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.15);
}
.sidebar-item.active svg {
  stroke: var(--accent-primary);
}
.sidebar-badge-pill {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Sidebar Footer / User Profile */
.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-user-card:hover {
  background: var(--surface-3);
}
.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}
.sidebar-user-meta h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.sidebar-user-meta p {
  font-size: 0.68rem;
  color: var(--accent-secondary);
}

/* ================= 2. MAIN CENTER CONTENT ================= */
.desktop-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 40% 10%, rgba(35, 18, 55, 0.45) 0%, transparent 60%),
              var(--bg-amoled);
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.desktop-main::-webkit-scrollbar {
  width: 6px;
}
.desktop-main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Top Header Bar */
.desktop-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(7, 7, 9, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 25;
}
.desktop-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  transition: all 0.2s ease;
}
.desktop-search-bar:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 16px var(--accent-glow);
  background: var(--surface-3);
}
.desktop-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-sans);
}
.desktop-search-bar input::placeholder {
  color: var(--text-muted);
}
.desktop-search-shortcut {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--surface-pill);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.desktop-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.header-icon-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}
.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-primary);
}

/* Frameless Window Control Buttons */
.desktop-window-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border-subtle);
}
.window-ctrl-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.window-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.window-ctrl-btn.btn-close:hover {
  background: #e11d48;
  color: white;
}

/* Main Content Body */
.desktop-body {
  padding: 24px 32px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Hero Landscape Banner */
.desktop-hero-banner {
  position: relative;
  width: 100%;
  height: 230px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.desktop-hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?w=1400&auto=format&fit=crop&q=80') center/cover no-repeat;
  filter: brightness(0.65) saturate(1.2);
  transform: scale(1.02);
  transition: transform 0.6s ease;
}
.desktop-hero-banner:hover .desktop-hero-bg {
  transform: scale(1.05);
}
.desktop-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 7, 9, 0.92) 0%, rgba(7, 7, 9, 0.5) 50%, rgba(7, 7, 9, 0.2) 100%),
              radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.35) 0%, transparent 60%);
}
.desktop-hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.desktop-hero-greeting p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.desktop-hero-greeting h2 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.desktop-hero-greeting span {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  display: block;
  margin-top: 4px;
}
.desktop-hero-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
  line-height: 1.2;
}
.desktop-hero-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.desktop-hero-carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
  cursor: pointer;
}
.hero-dot.active {
  width: 24px;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}
.desktop-hero-subquote {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}
.desktop-hero-nav-btns {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  pointer-events: none;
  z-index: 3;
}
.hero-nav-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.6);
  border: 1px solid var(--border-subtle);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}
.hero-nav-arrow:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* Category Filter Chips */
.desktop-filter-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.desktop-filter-chips::-webkit-scrollbar {
  display: none;
}
.filter-chip-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-chip-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}
.filter-chip-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* Section Common Headers */
.desktop-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.desktop-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}
.desktop-section-title span {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.desktop-see-all {
  background: none;
  border: none;
  color: var(--accent-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}
.desktop-see-all:hover {
  color: #ffffff;
}

/* Made for You Cards Grid */
.desktop-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}
.desktop-media-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: var(--radius-md);
  padding: 10px;
  background: rgba(20, 20, 28, 0.4);
  border: 1px solid transparent;
  transition: all 0.25s ease;
  position: relative;
}
.desktop-media-card:hover {
  background: var(--surface-2);
  border-color: var(--border-subtle);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}
.card-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.card-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.desktop-media-card:hover .card-art-img {
  transform: scale(1.06);
}
.card-play-hover-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
  cursor: pointer;
}
.desktop-media-card:hover .card-play-hover-btn {
  opacity: 1;
  transform: translateY(0);
}
.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.card-subtitle {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Recently Played 2-Column List */
.desktop-recent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
}
.desktop-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(20, 20, 28, 0.5);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  cursor: pointer;
}
.desktop-track-row:hover {
  background: var(--surface-2);
  border-color: rgba(139, 92, 246, 0.3);
}
.desktop-track-row.active-track {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-primary);
}
.track-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.track-row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.track-row-info {
  min-width: 0;
}
.track-row-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.track-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.row-action-btn:hover {
  color: var(--text-primary);
  background: var(--surface-pill);
}
.row-action-btn.is-liked {
  color: var(--accent-primary);
}

/* ================= 3. RIGHT CONTEXT PANEL ================= */
.desktop-right-panel {
  grid-area: right;
  background: rgba(10, 10, 14, 0.96);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 20px 16px 20px;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 30;
}
.desktop-right-panel::-webkit-scrollbar {
  display: none;
}

/* Segmented Top Tabs */
.panel-tab-bar {
  display: flex;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}
.panel-tab-btn {
  flex: 1;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.panel-tab-btn.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Panel Tab Content Containers */
.panel-tab-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-tab-content.hidden {
  display: none !important;
}

/* Right Panel Album Artwork Section */
.panel-artwork-box {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.75), 0 0 24px var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.panel-artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Panel Track Metadata */
.panel-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-meta-text h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.panel-meta-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 3px;
}
.panel-meta-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Scrubber Timeline */
.panel-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-scrubber-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: height 0.15s;
}
.panel-scrubber-slider:hover {
  height: 6px;
}
.panel-scrubber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px var(--accent-glow);
  cursor: pointer;
}
.panel-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Transport Controls in Right Panel */
.panel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}
.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 6px;
  border-radius: 50%;
}
.ctrl-btn:hover {
  color: var(--text-primary);
}
.ctrl-btn.active {
  color: var(--accent-primary);
}
.ctrl-btn-play-lg {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px var(--accent-glow);
  cursor: pointer;
  transition: all 0.2s ease;
}
.ctrl-btn-play-lg:hover {
  transform: scale(1.06);
  background: var(--accent-secondary);
}

/* Authentic Audiophile Source Badge */
.audiophile-source-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 181, 103, 0.08);
  border: 1px solid rgba(229, 181, 103, 0.25);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin-top: 4px;
}
.hires-logo-box {
  background: #000;
  border: 1px solid var(--gold-audiophile);
  color: var(--gold-audiophile);
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  line-height: 1;
}
.source-badge-text {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--gold-audiophile);
  font-weight: 600;
}

/* Audio FX Widget Card */
.panel-audio-fx-card {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.audio-fx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.audio-fx-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}
.audio-fx-nav-arrows {
  display: flex;
  gap: 4px;
}
.fx-arrow-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.8rem;
}
.fx-arrow-btn:hover {
  color: var(--text-primary);
}

.audio-fx-canvas-wrap {
  width: 100%;
  height: 48px;
  background: rgba(10, 10, 14, 0.7);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}
#desktopFxCanvas {
  width: 100%;
  height: 100%;
}

.audio-fx-modes {
  display: flex;
  gap: 6px;
}
.fx-mode-pill {
  flex: 1;
  padding: 5px 8px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.fx-mode-pill:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}
.fx-mode-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.audio-fx-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fx-preset-select {
  flex: 1;
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.76rem;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
}
.fx-reset-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}
.fx-reset-btn:hover {
  background: var(--surface-pill);
  color: var(--text-primary);
}

/* Queue Tab List in Right Panel */
.panel-queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.panel-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.2s;
}
.panel-queue-item:hover {
  background: var(--surface-3);
}
.panel-queue-item.active {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.15);
}

/* Lyrics Tab Stream in Right Panel */
.panel-lyrics-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 4px;
  max-height: 480px;
  overflow-y: auto;
  text-align: center;
}
.panel-lyric-line {
  font-size: 1rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
  line-height: 1.4;
}
.panel-lyric-line.active {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 20px var(--accent-glow);
}

/* ================= 4. BOTTOM PERSISTENT PLAYER BAR ================= */
.desktop-bottom-player {
  grid-area: bottom;
  background: rgba(10, 10, 14, 0.98);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 40;
}

/* Left: Now Playing Metadata */
.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 280px;
  min-width: 0;
}
.player-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}
.player-info {
  min-width: 0;
}
.player-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.player-left-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}

/* Center: Transport & Scrubber Bar */
.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 620px;
}
.player-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.player-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.15s;
}
.player-ctrl-btn:hover {
  color: var(--text-primary);
}
.player-ctrl-btn.active {
  color: var(--accent-primary);
}
.player-btn-play-main {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px var(--accent-glow);
  cursor: pointer;
  transition: all 0.2s;
}
.player-btn-play-main:hover {
  transform: scale(1.06);
  background: var(--accent-secondary);
}

.player-scrubber-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.player-time {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  width: 32px;
}
.player-time.right {
  text-align: right;
}
.player-timeline-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.player-timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
}

/* Right: Utilities & Output Controls */
.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 280px;
}
.player-util-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.player-util-btn:hover {
  color: var(--text-primary);
  background: var(--surface-pill);
}
.player-util-btn.active {
  color: var(--accent-primary);
}

.volume-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.volume-slider {
  width: 85px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

/* ================= 5. OUTPUT DEVICE & DAC POPUP ================= */
.device-picker-popover {
  position: absolute;
  bottom: 96px;
  right: 60px;
  width: 280px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-glow);
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
  backdrop-filter: blur(20px);
}
.device-picker-popover.open {
  display: flex;
}
.device-picker-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.device-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.device-item-row:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}
.device-item-row.active {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* Universal Dialog Overlays on Desktop */
.aura-dialog-overlay {
  z-index: 99999 !important;
  position: fixed !important;
}

/* Sidebar Playlists Styling */
.sidebar-playlists-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-playlists-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.sidebar-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.sidebar-playlist-item.active {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border-left: 2px solid var(--accent-primary);
}
.sidebar-playlist-thumb {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-playlist-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

