/* BasMedia Web - Ultra Modern 2026 Glassmorphism Stylesheet */

:root {
  --bg-canvas: #090d16;
  --glass-surface: rgba(15, 23, 42, 0.72);
  --glass-card: rgba(18, 26, 47, 0.75);
  --glass-card-hover: rgba(28, 40, 70, 0.85);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hover: rgba(56, 189, 248, 0.45);
  --ink: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-purple: #818cf8;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --accent-soft: rgba(56, 189, 248, 0.12);
  --tile: 280px;
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --dock-bg: rgba(13, 18, 30, 0.86);
  --dock-border: rgba(255, 255, 255, 0.12);
}

:root[data-theme="light"] {
  --bg-canvas: #f1f5f9;
  --glass-surface: rgba(255, 255, 255, 0.82);
  --glass-card: rgba(255, 255, 255, 0.75);
  --glass-card-hover: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.07);
  --glass-border-hover: rgba(37, 99, 235, 0.45);
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-purple: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
  --accent-soft: rgba(37, 99, 235, 0.09);
  --glass-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --dock-bg: rgba(255, 255, 255, 0.88);
  --dock-border: rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-canvas);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  overflow-x: hidden;
  position: relative;
}

button, select, input { font: inherit; }

/* Ambient Glass Glow Orbs in Background */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(140px);
  opacity: 0.35;
  transition: opacity 0.5s ease;
}

.glow-1 {
  width: 550px;
  height: 550px;
  top: -150px;
  right: -100px;
  background: radial-gradient(circle, #38bdf8 0%, rgba(56, 189, 248, 0) 70%);
}

.glow-2 {
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: 100px;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
}

:root[data-theme="light"] .ambient-glow {
  opacity: 0.18;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Glass Panels */
.glass-panel {
  background: var(--glass-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-btn {
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-btn:hover {
  background: var(--glass-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}

.glass-glow-btn {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
  transition: all 0.2s ease;
}

.glass-glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
}

/* Sidebar */
.sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  border-right: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  padding: 5px;
  background: var(--accent-gradient);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
}

.brand strong {
  display: block;
  font: 700 19px 'Space Grotesk', sans-serif;
  letter-spacing: -0.4px;
  color: var(--ink);
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.folder-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.folder-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.folder-icon::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -2px;
  width: 8px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.folder-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.glass-input {
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  border-radius: 8px;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.15s ease;
}

.glass-input:focus {
  border-color: var(--accent);
}

.folder-location select {
  min-width: 0;
  flex: 1;
  padding: 7px 10px;
  font-size: 11px;
  cursor: pointer;
}

.local-only-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  opacity: 0.85;
}

.sidebar-section {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

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

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.badge-count {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--glass-border);
}

.library-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.library-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
}

.library-item:hover,
.library-item.active {
  background: var(--glass-card);
  border-color: var(--glass-border-hover);
  transform: translateX(2px);
}

.library-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.library-item-icon {
  color: var(--accent);
  font-size: 14px;
  display: grid;
  place-items: center;
}

.library-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-type {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.library-empty {
  padding: 14px 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Main Content & Topbar */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px 36px 16px;
  border-bottom: 1px solid var(--glass-border);
}

.topbar h1 {
  margin: 4px 0 0;
  font: 700 32px 'Space Grotesk', sans-serif;
  letter-spacing: -0.8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
}

.icon-button span {
  font-size: 11px;
  font-weight: 700;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 36px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.filter-wrap,
.sort-wrap,
.details-toggle,
.size-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar select {
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
}

.glass-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 6px 12px;
  flex: 1;
  min-width: 200px;
  max-width: 420px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.glass-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.search-icon {
  font-size: 13px;
  color: var(--muted);
}

.search-input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  width: 100%;
}

.glass-pill {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}

.details-toggle {
  margin-left: auto;
}

.details-toggle input,
.size-control input {
  accent-color: var(--accent);
}

.size-control input {
  width: 90px;
}

.size-control output {
  min-width: 25px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

/* The Visual Wall */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tile), var(--tile)));
  grid-auto-rows: var(--tile);
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  padding: 16px 36px 110px;
}

.tile {
  position: relative;
  overflow: hidden;
  background: var(--glass-card);
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  border-color: var(--glass-border-hover);
}

.tile img,
.tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
}

.tile img.contain {
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.tile img.no-upscale {
  position: absolute;
  inset: 0;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
}

.tile iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.tile-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(10, 14, 24, 0.95));
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  border-radius: 0 0 13px 13px;
}

.show-details .tile-label,
.tile:hover .tile-label {
  opacity: 1;
}

.tile-label strong,
.tile-label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-label strong {
  font-size: 13px;
  font-weight: 600;
}

.tile-label small {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 10px;
}

/* Audio & Text Tiles */
.audio-tile,
.text-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 18px;
  text-align: center;
}

.audio-tile {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
  color: var(--accent);
  position: relative;
}

.audio-cover-tile {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.audio-tile-play-badge {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.5);
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tile:hover .audio-tile-play-badge {
  transform: scale(1.15);
  opacity: 1;
}

.text-tile {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  text-align: left;
}

:root[data-theme="light"] .text-tile {
  background: rgba(255, 255, 255, 0.8);
  color: #1e293b;
}

.text-tile span {
  font-size: 26px;
  color: var(--accent);
}

.text-tile pre {
  margin: 0;
  max-height: calc(100% - 40px);
  overflow: hidden;
  font: 11px/1.5 monospace;
  white-space: pre-wrap;
  color: inherit;
}

/* Empty View */
.empty-view {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: calc(100vh - 230px);
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 72px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 0.8;
}

.empty-view h2 {
  margin: 14px 0 0;
  font: 700 26px 'Space Grotesk', sans-serif;
  color: var(--ink);
}

.empty-view p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.text-button {
  margin-top: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* Drag & Drop Overlay */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  place-items: center;
  pointer-events: none;
}

.drop-overlay.active {
  display: grid;
}

.drop-box {
  background: var(--glass-surface);
  border: 2px dashed var(--accent);
  border-radius: 20px;
  padding: 50px 60px;
  text-align: center;
  max-width: 520px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.drop-icon {
  font-size: 68px;
  margin-bottom: 16px;
}

.drop-box h3 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--ink);
}

.drop-box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Fullscreen Media Viewer */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 40px;
  background: rgba(6, 9, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.viewer.open {
  display: grid;
  place-items: center;
}

.viewer-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.viewer-stage img,
.viewer-stage video {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--glass-border);
}

.viewer-stage iframe {
  width: 85vw;
  height: 85vh;
  border: 0;
  background: #ffffff;
  border-radius: 12px;
}

.viewer-stage pre {
  width: 80vw;
  max-height: 80vh;
  margin: 0;
  padding: 28px;
  overflow: auto;
  background: rgba(15, 23, 42, 0.95);
  color: #f1f5f9;
  font: 13px/1.6 monospace;
  white-space: pre-wrap;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

/* Viewer Controls */
.glass-ctrl {
  position: absolute;
  z-index: 102;
  border: 1px solid var(--glass-border);
  background: var(--glass-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.glass-ctrl:hover {
  background: var(--accent-gradient);
  border-color: var(--accent);
  transform: scale(1.08);
}

.viewer-close {
  top: 18px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}

.viewer-minimize {
  top: 18px;
  right: 78px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.viewer-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 34px;
  display: grid;
  place-items: center;
  line-height: 1;
}

.viewer-nav:hover {
  transform: translateY(-50%) scale(1.1);
}

.viewer-nav.prev { left: 24px; }
.viewer-nav.next { right: 24px; }

/* Audio Viewer Card inside Modal (BasHouse 2-Column Spacious Layout) */
.audio-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 32px;
  width: min(1180px, 96vw);
  height: min(860px, 88vh);
  max-height: 88vh;
  padding: 32px;
  background: var(--glass-surface);
  color: var(--ink);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  overflow: hidden;
}

/* Left Column: Spacious Lyrics & Metadata (BasHouse Style) */
.audio-viewer-lyrics-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.audio-viewer-header h2 {
  margin: 0 0 6px;
  font: 700 28px 'Space Grotesk', sans-serif;
  letter-spacing: -0.6px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-viewer-header p {
  margin: 2px 0 4px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
}

.audio-viewer-header small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.lyrics-container {
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  overflow-y: auto;
  border-radius: 16px;
  padding: 20px 22px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
}

.lyrics-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.lyrics-section-title {
  font: 700 18px 'Space Grotesk', sans-serif;
  color: var(--ink);
}

.lyrics-source-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--glass-border);
  letter-spacing: 0.3px;
}

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

.lyrics-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  transition: all 0.15s ease;
}

.lyrics-action-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.lyrics-action-btn.btn-save-mp3 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.25) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.lyrics-action-btn.btn-save-mp3:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.lyrics-content {
  flex: 1;
  overflow-y: auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
  padding-right: 6px;
}

.lyric-line {
  padding: 8px 12px;
  border-radius: 8px;
  opacity: 0.65;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: text;
}

.lyric-line:hover {
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.lyric-line.active {
  color: #ffffff;
  background: var(--accent-soft);
  opacity: 1;
  font-weight: 700;
  transform: translateX(8px);
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
  font-size: 18px;
  border-left: 3px solid var(--accent);
}

.lyric-line.passed {
  opacity: 0.45;
}

/* Right Column: Library Queue & Album Art */
.audio-viewer-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.audio-viewer-queue-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  padding: 14px;
}

.queue-header {
  font: 700 13px 'Space Grotesk', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.audio-viewer-queue {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.queue-item:hover,
.queue-item.active {
  background: var(--glass-card);
  border-color: var(--glass-border-hover);
}

.queue-item.active {
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
}

.queue-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.queue-item-dur {
  font-size: 10px;
  color: var(--muted);
}

.audio-viewer-art-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.audio-cover {
  width: 240px;
  height: 240px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 80px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
}

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

.audio-visualizer-canvas {
  width: 240px;
  height: 48px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
}

.lyrics-manual-search {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.lyrics-search-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-card);
  color: var(--ink);
  font-size: 13px;
  outline: none;
}

.lyrics-search-input:focus {
  border-color: var(--accent);
}

.lyrics-search-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.lyrics-search-btn:hover {
  transform: scale(1.05);
}

/* Persistent Glass Dock Player */
.glass-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 36px));
  height: 76px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  padding: 10px 22px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.dock-player.active {
  display: flex;
}

.dock-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 230px;
  min-width: 0;
  flex-shrink: 0;
}

.dock-track-info.clickable {
  cursor: pointer;
  border-radius: 12px;
  padding: 4px 6px;
  transition: all 0.15s ease;
}

.dock-track-info.clickable:hover {
  background: var(--glass-card-hover);
  transform: translateX(2px);
}

.dock-cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

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

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

.dock-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-artist {
  display: block;
  font-size: 11px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.dock-controls {
  flex: 1;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.dock-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dock-btn {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: grid;
  place-items: center;
}

.dock-btn:hover {
  color: var(--accent);
  transform: scale(1.15);
}

.dock-btn.active {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}

.dock-btn-main {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
}

.dock-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.dock-time {
  font-size: 11px;
  color: var(--muted);
  min-width: 30px;
  text-align: center;
}

.dock-progress {
  flex: 1;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

.dock-extras {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 210px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.dock-visualizer {
  border-radius: 6px;
  background: transparent;
}

.dock-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-vol-icon {
  font-size: 13px;
  color: var(--muted);
}

.dock-volume {
  width: 65px;
  accent-color: var(--accent);
  cursor: pointer;
}

.dock-lyrics-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--accent-gradient);
  color: #ffffff !important;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dock-lyrics-pill:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

.dock-btn-close {
  color: var(--muted);
  font-size: 12px;
}

/* Easter Egg Footer */
.easter-egg-footer-text {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

#easter-egg-heart {
  display: inline-block;
  color: #ff4b4b;
  cursor: pointer;
  transition: transform 0.2s ease;
  user-select: none;
  animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

.easter-egg-spin {
  animation: spin-heart 2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes spin-heart {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Compact desktop & Windows 125%-150% scaling (Rule 20) */
@media (min-width: 769px) and (max-width: 1500px), (min-width: 769px) and (max-height: 820px) {
  .sidebar {
    width: 240px;
    padding: 16px 14px;
  }
  .topbar {
    padding: 16px 26px 12px;
  }
  .topbar h1 {
    font-size: 26px;
  }
  .toolbar {
    padding: 10px 26px;
    gap: 10px;
  }
  .wall {
    padding: 12px 26px 95px;
    gap: 10px;
  }
  .audio-viewer {
    padding: 24px;
    gap: 24px;
  }
  .audio-cover {
    width: 200px;
    height: 200px;
  }
  .glass-dock {
    height: 64px;
    padding: 8px 16px;
    bottom: 12px;
  }
}

/* Mobiel & Tablet (Rule 20) */
@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--glass-border);
  }
  .library-list {
    max-height: 180px;
  }
  .topbar {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .top-actions {
    align-self: flex-end;
  }
  .toolbar {
    padding: 12px 16px;
  }
  .search-wrap {
    max-width: 100%;
    order: 3;
    width: 100%;
  }
  .details-toggle {
    margin-left: 0;
  }
  .wall {
    padding: 10px 16px 150px;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: 140px;
    gap: 8px;
  }
  .audio-viewer {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 92vh;
    padding: 18px;
    gap: 16px;
    overflow-y: auto;
  }
  .audio-viewer-lyrics-col {
    width: 100%;
    height: auto;
    max-height: 420px;
  }
  .audio-viewer-side-col {
    width: 100%;
    height: auto;
  }
  .audio-cover {
    width: 150px;
    height: 150px;
  }
  .glass-dock {
    flex-wrap: wrap;
    height: auto;
    padding: 10px;
    bottom: 8px;
    gap: 8px;
    border-radius: 14px;
  }
  .dock-track-info {
    width: 100%;
  }
  .dock-controls {
    max-width: 100%;
    width: 100%;
  }
  .dock-extras {
    display: none;
  }
}
