/* ==========================================================================
   LYRIA COMMAND STUDIO — High-Tech Dark Glassmorphism Audio Console (v3.0)
   ========================================================================== */

:root {
  --bg-void: #0b0f19;
  --bg-deep: #0e1422;
  --bg-glass: rgba(15, 23, 42, 0.76);
  --bg-glass-strong: rgba(12, 18, 32, 0.92);
  --bg-control: rgba(11, 15, 25, 0.84);

  --border-glass: rgba(148, 163, 184, 0.16);
  --border-cyan-dim: rgba(0, 210, 255, 0.28);
  --border-cyan-bright: rgba(0, 210, 255, 0.65);

  --accent-neon: #00d2ff;
  --accent-cyan: #38bdf8;
  --accent-ice: #67e8f9;
  --neon-gradient: linear-gradient(90deg, #00d2ff 0%, #38bdf8 55%, #67e8f9 100%);

  --text-white: #ffffff;
  --text-secondary: #94a3b8;

  --state-online: #00d2ff;
  --state-warn: #f59e0b;
  --state-danger: #f87171;

  --radius-card: 14px;
  --radius-control: 10px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  --font-sans: 'Public Sans', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

::selection {
  background: rgba(0, 210, 255, 0.28);
  color: var(--text-white);
}

html {
  color-scheme: dark;
  background-color: var(--bg-void);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, 0.35) rgba(11, 15, 25, 0.9);
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(11, 15, 25, 0.85);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.32);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-neon);
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  background-color: var(--bg-void);
  background-image:
    radial-gradient(circle at 50% 45%, rgba(0, 210, 255, 0.09) 0%, transparent 58%),
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(0, 210, 255, 0.05) 0%, transparent 42%);
  color: var(--text-white);
  min-height: 100vh;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent-neon);
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent-neon);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Command Shell & Header Bar
   ========================================================================== */

.command-shell {
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.glass-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.25s var(--ease-out-expo), background-color 0.25s var(--ease-out-expo);
}

.glass-panel:hover {
  border-color: var(--border-cyan-dim);
}

.command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  gap: 12px;
  flex-shrink: 0;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
  white-space: nowrap;
}

.brand-glyph {
  color: var(--accent-neon);
  flex-shrink: 0;
}

.brand-accent {
  color: var(--accent-neon);
}

.header-divider {
  width: 1px;
  height: 18px;
  background: var(--border-glass);
}

.engine-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.telemetry-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.telemetry-key {
  color: var(--text-secondary);
}

.telemetry-val {
  color: var(--accent-neon);
  font-weight: 600;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  background: rgba(0, 210, 255, 0.09);
  border: 1px solid var(--border-cyan-dim);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-neon);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-neon);
}

/* ==========================================================================
   3-Column Modular Command Grid
   ========================================================================== */

.command-grid {
  display: grid;
  grid-template-columns: 336px minmax(420px, 1fr) 346px;
  gap: 12px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  min-width: 0;
}

.command-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.module-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.module-header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-white);
  white-space: nowrap;
}

.mono-badge {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-neon);
  background: rgba(0, 210, 255, 0.09);
  border: 1px solid var(--border-cyan-dim);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.mono-unit {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Left Column: Telemetry KPIs, Top Tracks, Genre Matrix & AI Composer
   ========================================================================== */

.stats-card {
  flex: 0 0 auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.kpi-cell {
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-control);
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kpi-icon {
  color: var(--accent-neon);
  opacity: 0.8;
  flex-shrink: 0;
}

.kpi-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-neon);
}

.kpi-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.subsection-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.subsection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subsection-bar h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
}

.top-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-track-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo);
  min-width: 0;
}

.top-track-row:hover {
  border-color: var(--border-cyan-bright);
  background: rgba(0, 210, 255, 0.07);
}

.top-track-rank {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-neon);
}

.top-track-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-track-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
}

.genre-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.genre-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.genre-row-head {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 12px;
}

.genre-name {
  color: var(--text-white);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.genre-pct {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--accent-neon);
  flex-shrink: 0;
}

.genre-bar-track {
  height: 4px;
  background: rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.genre-bar-fill {
  height: 100%;
  background: var(--neon-gradient);
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease-out-expo);
}

/* AI Composer Module */
.composer-module {
  flex: 1;
  min-height: 0;
}

.composer-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-height: 0;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.field-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-white);
}

.btn-inline-options {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-inline-options:hover {
  color: var(--accent-neon);
  border-color: var(--border-cyan-dim);
}

.preset-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 6px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip svg {
  color: var(--accent-neon);
  flex-shrink: 0;
}

.chip:hover {
  color: var(--text-white);
  border-color: var(--border-cyan-dim);
}

.chip.active {
  background: rgba(0, 210, 255, 0.14);
  border-color: var(--accent-neon);
  color: var(--text-white);
}

/* Segmented Model Control in Header */
.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-control);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.segment {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 8px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.2s var(--ease-out-expo);
}

.segment strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.segment:hover strong {
  color: var(--text-white);
}

.segment.active {
  background: var(--accent-neon);
  border-color: var(--accent-neon);
}

.segment.active strong {
  color: var(--bg-void);
}

.char-counter {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
}

textarea#prompt-input {
  width: 100%;
  flex: 1;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-control);
  color: var(--text-white);
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.42;
  resize: none;
  min-height: 58px;
  transition: border-color 0.2s;
}

textarea#prompt-input::placeholder {
  color: var(--text-secondary);
}

textarea#prompt-input:focus {
  border-color: var(--accent-neon);
  outline: none;
}

/* Collapsible Advanced Parameters */
.accordion-content {
  display: none;
  padding: 8px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  flex-direction: column;
  gap: 6px;
}

.accordion-content.show {
  display: flex;
}

.advanced-inputs-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.input-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.file-input,
.text-input {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-family: var(--font-sans);
}

.text-input {
  color: var(--text-white);
}

/* Synthesis Progress Bar */
.synthesis-progress {
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid var(--accent-neon);
  border-radius: var(--radius-control);
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.synthesis-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-ring {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-neon);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

.synthesis-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.synthesis-copy strong {
  font-size: 12px;
  color: var(--text-white);
}

.synthesis-copy span {
  font-size: 12px;
  color: var(--text-secondary);
}

.timer-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-neon);
}

.progress-meter {
  height: 4px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.meter-bar {
  height: 100%;
  width: 0%;
  background: var(--neon-gradient);
  transition: width 0.35s linear;
}

/* Synthesize Action Button */
.btn-synthesize {
  width: 100%;
  padding: 8px 12px;
  background: var(--accent-neon);
  color: var(--bg-void);
  border: 1px solid var(--accent-ice);
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out-expo), background-color 0.2s;
  flex-shrink: 0;
}

.btn-synthesize:hover:not(:disabled) {
  background: var(--accent-ice);
  transform: translateY(-1px);
}

.btn-synthesize:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(11, 15, 25, 0.22);
  color: var(--bg-void);
}

/* ==========================================================================
   Center Stage: Interactive 3D Audio Sphere & Floating Transport Dock
   ========================================================================== */

.center-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.visualizer-deck {
  flex: 1;
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-color: var(--border-cyan-dim);
  background:
    radial-gradient(circle at 50% 46%, rgba(0, 210, 255, 0.16) 0%, rgba(14, 21, 38, 0.85) 62%, rgba(11, 15, 25, 0.95) 100%);
}

.deck-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 210, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 210, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0.9) 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0.9) 20%, transparent 80%);
}

.visualizer-hud-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 2;
  min-width: 0;
  flex-shrink: 0;
}

.hud-track-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.hud-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.signal-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bg-void);
  background: var(--accent-neon);
  padding: 2px 9px;
  border-radius: var(--radius-sm);
}

.hud-meta-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
}

.hud-track-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
  overflow-wrap: anywhere;
  line-height: 1.22;
}

.viz-mode-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-control);
  padding: 3px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-glass);
  flex-wrap: wrap;
}

.viz-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
}

.viz-mode-btn:hover {
  color: var(--text-white);
}

.viz-mode-btn.active {
  background: rgba(0, 210, 255, 0.16);
  border-color: var(--accent-neon);
  color: var(--accent-neon);
}

/* 3D Sphere Stage */
.sphere-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-control);
  cursor: grab;
  z-index: 1;
}

.sphere-canvas-wrap:active {
  cursor: grabbing;
}

#audio-sphere-canvas {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  display: block;
}

.hud-corner {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.hud-bottom-left {
  bottom: 6px;
  left: 8px;
  display: flex;
  gap: 8px;
}

.hud-metric {
  display: flex;
  flex-direction: column;
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-cyan-dim);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}

.hud-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.hud-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-neon);
}

.hud-bottom-right {
  bottom: 6px;
  right: 8px;
}

.hud-coords {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-glass);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

/* Lyrics Overlay Drawer */
.lyrics-drawer {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-cyan-dim);
  border-radius: var(--radius-control);
  padding: 8px 12px;
  max-height: 110px;
  overflow-y: auto;
  z-index: 3;
}

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

.lyrics-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-neon);
}

.lyrics-content {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.4;
}

/* Floating Transport Dock */
.floating-transport-dock {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-cyan-dim);
  border-radius: var(--radius-card);
  padding: 11px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  z-index: 2;
  flex-shrink: 0;
}

.scrubber-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-readout {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-neon);
  min-width: 42px;
}

.time-readout:last-child {
  text-align: right;
  color: var(--text-secondary);
}

.scrubber-track-wrap {
  position: relative;
  flex: 1;
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  min-width: 0;
}

.scrubber-fill-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--neon-gradient);
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.scrub-range {
  position: relative;
  width: 100%;
  height: 18px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.scrub-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-white);
  border: 2px solid var(--accent-neon);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out-expo);
}

.scrub-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.scrub-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-white);
  border: 2px solid var(--accent-neon);
  cursor: pointer;
}

.transport-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.transport-side-group,
.transport-main-group,
.transport-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-transport,
.btn-transport-aux {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  color: var(--text-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
}

.btn-transport-aux {
  width: 33px;
  height: 33px;
  color: var(--text-secondary);
}

.btn-transport:hover,
.btn-transport-aux:hover {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  transform: translateY(-1px);
}

.btn-transport-aux.active {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  background: rgba(0, 210, 255, 0.14);
}

.btn-play-neon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-neon);
  border: 1px solid var(--accent-ice);
  color: var(--bg-void);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out-expo), background-color 0.2s;
}

.btn-play-neon:hover {
  background: var(--accent-ice);
  transform: scale(1.06);
}

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

.volume-slider-wrap {
  position: relative;
  width: 68px;
  height: 5px;
  background: rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
}

.volume-fill-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 85%;
  background: var(--neon-gradient);
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.volume-range {
  position: relative;
  width: 100%;
  height: 16px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-white);
  border: 2px solid var(--accent-neon);
  cursor: pointer;
}

.btn-download-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid var(--border-cyan-dim);
  border-radius: var(--radius-pill);
  color: var(--accent-neon);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease-out-expo);
}

.btn-download-line:hover {
  background: var(--accent-neon);
  color: var(--bg-void);
}

/* ==========================================================================
   Right Column: Circular Graphic Equalizer & Minimalist Active Queue
   ========================================================================== */

.eq-module {
  flex: 0 0 auto;
}

.eq-preset-pills {
  display: flex;
  gap: 4px;
}

.eq-pill {
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.eq-pill:hover {
  color: var(--text-white);
}

.eq-pill.active {
  color: var(--bg-void);
  background: var(--accent-neon);
  border-color: var(--accent-neon);
}

.circular-eq-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#circular-eq-canvas {
  width: 186px;
  height: 186px;
  display: block;
  cursor: pointer;
}

.circular-eq-center {
  position: absolute;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eq-center-profile {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.eq-center-db {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-neon);
}

.eq-bands-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-glass);
}

.eq-band-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}

.band-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.band-freq {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.band-gain {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-neon);
}

.band-slider-wrap {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
}

.band-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: var(--neon-gradient);
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.band-slider {
  position: relative;
  width: 100%;
  height: 14px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.band-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-white);
  border: 2px solid var(--accent-neon);
  cursor: pointer;
}

.band-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-white);
  border: 2px solid var(--accent-neon);
  cursor: pointer;
}

/* Active Playlist Queue */
.playlist-module {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

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

.btn-icon-line {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-line:hover {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
}

.queue-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.queue-filter-bar input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 13px;
}

.queue-filter-bar input::placeholder {
  color: var(--text-secondary);
}

.queue-filter-bar input:focus {
  outline: none;
}

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

/* Focus-driven row elevation and peripheral dimming */
.songs-list:hover .song-item:not(:hover):not(.active) {
  opacity: 0.62;
}

.song-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  min-width: 0;
  flex-shrink: 0;
}

.song-item:hover {
  border-color: var(--border-cyan-bright);
  transform: translateX(2px);
}

.song-item.active {
  background: rgba(0, 210, 255, 0.11);
  border-color: var(--accent-neon);
}

.song-index-slot {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.song-item.active .song-index-slot {
  color: var(--accent-neon);
  font-weight: 700;
}

.song-item-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.song-item-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-item.active .song-item-info h4 {
  color: var(--accent-neon);
}

.song-item-meta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-item-play,
.btn-item-dl {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-item-play:hover,
.btn-item-dl:hover,
.song-item.active .btn-item-play {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
}

.empty-state {
  padding: 18px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   User Authentication & Access Control Modals (Cyan Command Theme)
   ========================================================================== */

.auth-state-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-auth-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid var(--border-cyan-dim);
  border-radius: var(--radius-pill);
  color: var(--accent-neon);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease-out-expo);
}

.btn-auth-trigger:hover {
  background: var(--accent-neon);
  color: var(--bg-void);
  border-color: var(--accent-neon);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  font-size: 13px;
}

.user-avatar-icon {
  color: var(--accent-neon);
  flex-shrink: 0;
}

.user-email {
  color: var(--text-white);
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-badge {
  font-family: var(--font-mono);
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid var(--border-cyan-dim);
  color: var(--accent-neon);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.btn-logout {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}

.btn-logout:hover {
  color: var(--state-danger);
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 25, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.auth-modal-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  border-color: var(--border-cyan-dim);
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--bg-glass-strong);
}

.btn-close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.btn-close-modal:hover {
  color: var(--text-white);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-white);
}

.auth-modal-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-tabs {
  display: flex;
  background: var(--bg-control);
  padding: 4px;
  border-radius: var(--radius-control);
  margin-bottom: 20px;
  border: 1px solid var(--border-glass);
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.auth-tab.active {
  background: rgba(0, 210, 255, 0.14);
  color: var(--accent-neon);
  border-color: var(--accent-neon);
}

.auth-alert {
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-alert.success {
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--border-cyan-bright);
  color: var(--accent-neon);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input {
  background: var(--bg-control);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-control);
  color: var(--text-white);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
}

.form-group input:focus {
  border-color: var(--accent-neon);
  outline: none;
}

.invite-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

.invite-hint strong {
  color: var(--accent-neon);
  font-family: var(--font-mono);
}

.auth-submit-btn {
  margin-top: 6px;
}

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

/* ==========================================================================
   Responsive Adaptation (Desktop Locked 100vh Cockpit, Tablet, Mobile 390)
   ========================================================================== */

@media (min-width: 1081px) {
  .command-shell {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }

  .command-grid {
    height: 100%;
    overflow: hidden;
  }

  .command-col {
    height: 100%;
    overflow: hidden;
  }
}

@media (max-width: 1440px) {
  .engine-tag,
  .header-divider {
    display: none;
  }
}

@media (max-width: 1260px) {
  .command-grid {
    grid-template-columns: 308px minmax(360px, 1fr) 318px;
  }
}

@media (max-width: 1080px) {
  .command-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .center-stage {
    order: -1;
    min-height: 560px;
  }

  .songs-list {
    max-height: 320px;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .command-shell {
    padding: 8px;
    gap: 10px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .command-header {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .telemetry-strip {
    width: 100%;
    gap: 6px;
  }

  .telemetry-pill {
    padding: 4px 7px;
  }

  .module-card,
  .visualizer-deck {
    padding: 12px;
    max-width: 100%;
    overflow: hidden;
  }

  .visualizer-hud-top {
    flex-direction: column;
    align-items: stretch;
  }

  .viz-mode-switch {
    width: 100%;
    justify-content: space-between;
  }

  .viz-mode-btn {
    flex: 1;
    justify-content: center;
    padding: 6px 6px;
  }

  .hud-track-title {
    font-size: 18px;
  }

  .center-stage {
    min-height: 460px;
  }

  .sphere-canvas-wrap {
    min-height: 250px;
  }

  .preset-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-inputs-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .eq-bands-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-transport-dock {
    padding: 10px 12px;
  }

  .transport-controls-row {
    justify-content: center;
  }

  .hud-bottom-left,
  .hud-bottom-right {
    display: none;
  }
}

/* Botón de Autenticación con Google (Firebase Auth) */
.btn-google-auth {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  margin-bottom: 10px;
}

.btn-google-auth:hover {
  background: rgba(0, 210, 255, 0.14);
  border-color: #00d2ff;
  transform: translateY(-1px);
}

.btn-google-auth:disabled {
  opacity: 0.6;
  cursor: wait;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px 0;
  color: var(--text-secondary);
  font-size: 11.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
}
