/* ==========================================================================
   THE ANOMALY — Official Brand Design Tokens & Custom Typography
   ========================================================================== */

@font-face {
  font-family: 'The Anomaly Engraved';
  src: url('assets/fonts/TheAnomalyEngraved-Regular.woff') format('woff'),
       url('assets/fonts/TheAnomalyEngraved-Regular.ttf') format('truetype'),
       url('the-anomaly-brand-kit/04_Custom_Fonts/TheAnomalyEngraved-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'The Anomaly Solid';
  src: url('assets/fonts/TheAnomalySolid-Regular.woff') format('woff'),
       url('assets/fonts/TheAnomalySolid-Regular.ttf') format('truetype'),
       url('the-anomaly-brand-kit/04_Custom_Fonts/TheAnomalySolid-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Official THE ANOMALY Surface Tokens */
  --anomaly-bg-void: #0B0C10;
  --anomaly-bg-slate: #17171A;
  --anomaly-bg-elevated: #1F2128;
  --anomaly-border-slate: #343942;
  --anomaly-bg-mist: #F4F7FA;
  --anomaly-ink: #0D0003;

  /* Official THE ANOMALY Spectrum Tokens */
  --anomaly-lime: #9AFD40;
  --anomaly-seafoam: #4BE285;
  --anomaly-teal: #22C8B6;
  --anomaly-cyan: #00E6F8;
  --anomaly-cerulean: #2391B4;
  --anomaly-cobalt: #3164B5;
  --anomaly-ultraviolet: #7525A8;
  --anomaly-plum: #501873;
  --anomaly-magenta: #EC33A2;
  --anomaly-ice: #CDFFFF;

  /* Official THE ANOMALY Gradients */
  --anomaly-grad-spectrum: linear-gradient(45deg, #EC33A2 0%, #7525A8 28%, #2391B4 56%, #4BE285 78%, #9AFD40 100%);
  --anomaly-grad-bioluminescent: linear-gradient(180deg, #22C8B6 0%, #4BE285 45%, #9AFD40 100%);
  --anomaly-grad-dimensional: linear-gradient(90deg, #2391B4 0%, #3164B5 48%, #7525A8 100%);
  --anomaly-grad-melt: linear-gradient(90deg, #501873 0%, #8628A4 45%, #EC33A2 100%);

  /* Semantic UI Mappings */
  --bg-deep: var(--anomaly-bg-void);
  --bg-surface: rgba(23, 23, 26, 0.84);
  --bg-surface-elevated: rgba(31, 33, 40, 0.90);
  --bg-hover: rgba(75, 226, 133, 0.08);
  --bg-active: rgba(34, 200, 182, 0.14);

  --border-subtle: rgba(52, 57, 66, 0.65);
  --border-highlight: rgba(75, 226, 133, 0.45);

  --text-primary: var(--anomaly-bg-mist);
  --text-secondary: #9CA6B8;
  --text-muted: #687385;

  --font-engraved: 'The Anomaly Engraved', Georgia, serif;
  --font-solid: 'The Anomaly Solid', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Ambient Background Atmosphere */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(115px);
  opacity: 0.24;
  transition: transform 0.15s ease-out, opacity 0.25s ease-out;
  will-change: transform, opacity;
}

.ambient-orb-primary {
  width: 52vw;
  height: 52vw;
  max-width: 720px;
  max-height: 720px;
  top: -18%;
  left: 6%;
  background: radial-gradient(circle, var(--anomaly-lime) 0%, var(--anomaly-seafoam) 40%, var(--anomaly-teal) 70%, transparent 80%);
}

.ambient-orb-secondary {
  width: 52vw;
  height: 52vw;
  max-width: 700px;
  max-height: 700px;
  bottom: -18%;
  right: 5%;
  background: radial-gradient(circle, var(--anomaly-magenta) 0%, var(--anomaly-ultraviolet) 48%, var(--anomaly-plum) 72%, transparent 82%);
}

.ambient-orb-tertiary {
  width: 40vw;
  height: 40vw;
  max-width: 560px;
  max-height: 560px;
  top: 28%;
  left: 34%;
  opacity: 0.15;
  background: radial-gradient(circle, var(--anomaly-cyan) 0%, var(--anomaly-cerulean) 55%, transparent 78%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(205, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(205, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.88) 25%, transparent 90%);
}

/* Main App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100dvh;
  max-width: 1920px;
  margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  gap: 12px;
}

/* Top Bar with Full-Spectrum Top Accent Border */
.top-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.top-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--anomaly-grad-spectrum);
  opacity: 0.85;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-heading {
  margin: 0;
  display: flex;
  align-items: center;
}

.brand-lockup-img {
  height: 42px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(75, 226, 133, 0.22));
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.status-dot.playing {
  background: var(--anomaly-lime);
  box-shadow: 0 0 10px var(--anomaly-lime);
}

.status-dot.paused {
  background: var(--anomaly-cyan);
  box-shadow: 0 0 8px rgba(0, 230, 248, 0.55);
}

/* Visualizer Mode Nav */
.viz-mode-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(11, 12, 16, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.viz-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.viz-mode-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.viz-mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.viz-mode-btn.active {
  color: var(--anomaly-ice);
  background: linear-gradient(135deg, rgba(236, 51, 162, 0.20) 0%, rgba(117, 37, 168, 0.24) 42%, rgba(34, 200, 182, 0.24) 80%, rgba(154, 253, 64, 0.20) 100%);
  box-shadow: inset 0 0 0 1px rgba(75, 226, 133, 0.45);
}

/* Header Right Telemetry */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(11, 12, 16, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.telemetry-rate {
  color: var(--anomaly-seafoam);
  font-weight: 500;
}

.telemetry-divider {
  width: 1px;
  height: 12px;
  background: var(--border-subtle);
}

.telemetry-db {
  min-width: 62px;
  text-align: right;
  color: var(--anomaly-ice);
}

.mobile-tracks-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(34, 200, 182, 0.14);
  border: 1px solid var(--border-highlight);
  border-radius: 8px;
  color: var(--anomaly-ice);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.mobile-tracks-toggle svg {
  width: 16px;
  height: 16px;
}

.mobile-track-badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(154, 253, 64, 0.18);
  color: var(--anomaly-lime);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* Main Workspace Split Grid */
.main-workspace {
  display: grid;
  grid-template-columns: 1fr 375px;
  gap: 12px;
  min-height: 0;
  position: relative;
}

/* Visualizer Stage */
.visualizer-stage {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: radial-gradient(ellipse at 50% 54%, rgba(31, 33, 40, 0.72) 0%, rgba(11, 12, 16, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stage-logo-watermark {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(310px, 42vw);
  height: min(310px, 42vw);
  opacity: 0.065;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s ease;
}

.stage-logo-watermark.dimmed {
  opacity: 0;
}

.stage-logo-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#visualizerCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.stage-hud-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  pointer-events: none;
}

.now-playing-card {
  max-width: 72%;
}

.track-index-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.track-Position-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--anomaly-lime);
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(154, 253, 64, 0.11);
  border: 1px solid rgba(154, 253, 64, 0.30);
}

.spec-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--anomaly-ice);
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(34, 200, 182, 0.14);
  border: 1px solid rgba(0, 230, 248, 0.28);
}

.spec-badge-subtle {
  color: var(--text-secondary);
  background: rgba(23, 23, 26, 0.72);
  border-color: var(--border-subtle);
}

.active-track-title {
  font-family: var(--font-solid);
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-track-artist {
  margin-top: 4px;
  font-size: clamp(0.86rem, 1.15vw, 0.98rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--anomaly-seafoam);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

/* Stereo Level Meters */
.level-meters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(11, 12, 16, 0.72);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.meter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meter-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
}

.meter-track {
  width: 86px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--anomaly-grad-spectrum);
  transition: width 0.05s linear;
}

/* Center Play Prompt Overlay */
.stage-play-overlay {
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.stage-play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.stage-play-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 23, 26, 0.85);
  border: 1.5px solid rgba(75, 226, 133, 0.55);
  box-shadow:
    0 0 0 8px rgba(75, 226, 133, 0.08),
    0 0 32px rgba(236, 51, 162, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stage-play-overlay:hover .stage-play-ring {
  transform: scale(1.06);
  border-color: var(--anomaly-lime);
  box-shadow:
    0 0 0 12px rgba(154, 253, 64, 0.14),
    0 0 42px rgba(0, 230, 248, 0.35),
    0 20px 48px rgba(0, 0, 0, 0.75);
}

.stage-play-ring svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  color: var(--anomaly-lime);
}

.stage-play-caption {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--anomaly-ice);
  background: rgba(11, 12, 16, 0.82);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.stage-hud-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  color: var(--text-muted);
}

/* Tracklist Sidebar Panel */
.tracklist-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tracklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.tracklist-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracklist-heading {
  font-family: var(--font-solid);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  background: var(--anomaly-grad-bioluminescent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.track-count-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(75, 226, 133, 0.15);
  border: 1px solid rgba(75, 226, 133, 0.30);
  color: var(--anomaly-lime);
}

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

.icon-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.25s ease;
}

.icon-action-btn:hover {
  color: var(--anomaly-lime);
  border-color: var(--border-highlight);
}

.icon-action-btn.spinning svg {
  animation: spin360 0.6s ease;
}

@keyframes spin360 {
  to {
    transform: rotate(360deg);
  }
}

.icon-action-btn svg {
  width: 15px;
  height: 15px;
}

/* Search Input */
.tracklist-search-wrap {
  position: relative;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.track-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(11, 12, 16, 0.65);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.track-search-input::placeholder {
  color: var(--text-muted);
}

.track-search-input:focus {
  border-color: var(--anomaly-seafoam);
  box-shadow: 0 0 0 2px rgba(75, 226, 133, 0.16);
}

/* Scrollable Track List */
.tracklist-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tracklist-scroll::-webkit-scrollbar {
  width: 6px;
}

.tracklist-scroll::-webkit-scrollbar-thumb {
  background: rgba(52, 57, 66, 0.75);
  border-radius: 99px;
}

.track-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

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

.track-item.active {
  background: linear-gradient(90deg, rgba(117, 37, 168, 0.22) 0%, rgba(34, 200, 182, 0.18) 100%);
  border-color: rgba(75, 226, 133, 0.40);
}

.track-item-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-item.active .track-item-num {
  color: var(--anomaly-lime);
}

/* Mini animated equalizer bars for active playing track */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.eq-bar {
  width: 2.5px;
  background: var(--anomaly-lime);
  border-radius: 2px;
  height: 4px;
}

.eq-bar:nth-child(2) {
  background: var(--anomaly-cyan);
}

.eq-bar:nth-child(3) {
  background: var(--anomaly-magenta);
}

.track-item.playing .eq-bar:nth-child(1) {
  animation: eqPulse 0.65s ease-in-out infinite alternate;
}
.track-item.playing .eq-bar:nth-child(2) {
  animation: eqPulse 0.45s ease-in-out 0.15s infinite alternate;
}
.track-item.playing .eq-bar:nth-child(3) {
  animation: eqPulse 0.55s ease-in-out 0.3s infinite alternate;
}

@keyframes eqPulse {
  0% {
    height: 3px;
  }
  100% {
    height: 13px;
  }
}

.track-item-main {
  min-width: 0;
}

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

.track-item.active .track-item-title {
  color: var(--anomaly-ice);
}

.track-item-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.track-item-duration {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.track-item-rate {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.tracklist-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.tracklist-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.footer-wordmark-img {
  height: 22px;
  width: auto;
  object-fit: contain;
  opacity: 0.86;
  display: block;
}

/* Bottom Transport Bar */
.transport-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 20px 14px;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

/* Interactive Waveform Seekbar Row */
.waveform-seek-row {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 12px;
}

.time-readout {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.time-readout-total {
  text-align: right;
}

.seek-waveform-container {
  position: relative;
  height: 42px;
  border-radius: 8px;
  background: rgba(11, 12, 16, 0.72);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  overflow: hidden;
  outline: none;
  touch-action: none;
}

.seek-waveform-container:focus-visible {
  border-color: var(--anomaly-lime);
}

#seekWaveformCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.seek-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: var(--anomaly-lime);
  box-shadow: 0 0 10px var(--anomaly-lime), 0 0 4px var(--anomaly-cyan);
  pointer-events: none;
  transform: translateX(-1px);
}

.seek-hover-tooltip {
  position: absolute;
  top: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(23, 23, 26, 0.95);
  border: 1px solid rgba(75, 226, 133, 0.5);
  color: var(--anomaly-ice);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.12s ease;
}

.seek-waveform-container:hover .seek-hover-tooltip {
  opacity: 1;
}

/* Main Transport Controls Row */
.transport-controls-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.transport-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transport-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.transport-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.transport-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.transport-icon-btn svg {
  width: 18px;
  height: 18px;
}

.transport-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.transport-icon-btn.active {
  color: var(--anomaly-lime);
  background: rgba(75, 226, 133, 0.12);
  border-color: rgba(75, 226, 133, 0.34);
}

.repeat-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--anomaly-lime);
}

.speed-pill-btn {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.speed-pill-btn:hover {
  color: var(--anomaly-ice);
  border-color: var(--border-highlight);
}

.transport-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.transport-btn svg {
  width: 20px;
  height: 20px;
}

.transport-btn:hover {
  background: rgba(75, 226, 133, 0.09);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

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

.play-pause-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--anomaly-grad-spectrum);
  color: var(--anomaly-bg-void);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 6px 24px rgba(75, 226, 133, 0.32),
    0 2px 14px rgba(236, 51, 162, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.play-pause-btn:hover {
  transform: scale(1.06);
  box-shadow:
    0 8px 32px rgba(154, 253, 64, 0.45),
    0 4px 20px rgba(236, 51, 162, 0.38);
}

.play-pause-btn:active {
  transform: scale(0.98);
}

.play-pause-btn svg {
  width: 24px;
  height: 24px;
}

.icon-play {
  margin-left: 2px;
}

/* Volume Control */
.volume-slider-wrap {
  width: 110px;
  display: flex;
  align-items: center;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--anomaly-ice);
  border: 2px solid var(--anomaly-seafoam);
  box-shadow: 0 0 8px rgba(154, 253, 64, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--anomaly-ice);
  border: 2px solid var(--anomaly-seafoam);
  cursor: pointer;
}

.volume-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  min-width: 34px;
  text-align: right;
}

/* Responsive Breakpoints for Tablets & Phones */
@media (max-width: 980px) {
  .telemetry-pill {
    display: none;
  }

  .mobile-tracks-toggle {
    display: inline-flex;
  }

  .main-workspace {
    grid-template-columns: 1fr;
  }

  .tracklist-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 100%);
    z-index: 25;
    transform: translateX(104%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.8);
  }

  .tracklist-panel.open {
    transform: translateX(0);
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .top-bar {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
  }

  .brand-lockup-img {
    height: 34px;
  }

  .viz-mode-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .viz-mode-btn {
    flex: 1;
    justify-content: center;
    padding: 6px 8px;
    font-size: 0.73rem;
  }

  .stage-hud-top {
    padding: 16px;
  }

  .now-playing-card {
    max-width: 100%;
  }

  .level-meters {
    display: none;
  }

  .stage-hud-bottom {
    padding: 10px 16px;
    font-size: 0.62rem;
  }

  .transport-bar {
    padding: 10px 14px 12px;
  }

  .transport-controls-row {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .transport-btn-seek,
  .volume-slider-wrap,
  .volume-pct,
  .keyboard-hint {
    display: none;
  }
}
