:root {
  --bg-deep: #07090f;
  --bg-panel: #0e1320;
  --bg-panel-2: #141b2d;
  --bg-lcd: #050811;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.16);
  --text-main: #eef3ff;
  --text-dim: #8a97b3;
  --cyan: #00e5ff;
  --cyan-glow: rgba(0, 229, 255, 0.35);
  --magenta: #e040fb;
  --magenta-glow: rgba(224, 64, 251, 0.35);
  --gold: #facc15;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f97316;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

input[type="text"] {
  user-select: text;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 0%, #101935 0%, #07090f 55%, #04050a 100%);
  color: var(--text-main);
  min-height: 100vh;
}

.console-shell {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  padding: 6px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
}

/* ================= TOP HEADER ================= */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 6px 10px;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(22, 30, 48, 0.94), rgba(11, 15, 26, 0.96));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 1;
}

.header-dj-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35), 0 0 18px rgba(224, 64, 251, 0.25);
}

.brand-titles {
  min-width: 0;
}

.brand-titles h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--cyan), #ffffff 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-pro {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #05070e;
  font-weight: 900;
  letter-spacing: 1px;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  font-weight: 600;
}

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

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--border-bright);
}

/* Live Mix MP3 Record Button */
.btn-rec {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Orbitron", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-rec:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

.btn-rec .rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.btn-rec.recording {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border-color: #fecaca;
  color: #fff;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.65);
}

.btn-rec.recording .rec-dot {
  background: #fff;
  animation: pulse 0.6s infinite alternate;
}

.btn-rec:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Luce Maker Badge */
.maker-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(250, 204, 21, 0.22);
  transition: all 0.2s ease;
}

.maker-link:hover {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.6);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.2);
  transform: translateY(-1px);
}

.maker-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.9px;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.2;
}

.luce-logo {
  height: 26px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.25));
}

/* ================= MAIN 3-COLUMN DJ GRID ================= */
.dj-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(248px, 286px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.dj-grid > * {
  min-width: 0;
}

/* ================= DECK PANELS ================= */
.deck {
  position: relative;
  background: linear-gradient(180deg, #111829 0%, #0b0f1b 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 35px rgba(0, 0, 0, 0.5);
}

.deck-a {
  border-top: 2px solid var(--cyan);
}

.deck-b {
  border-top: 2px solid var(--magenta);
}

.deck.drag-over .drop-overlay {
  opacity: 1;
  pointer-events: auto;
}

.drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(7, 11, 22, 0.88);
  border: 2px dashed var(--cyan);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cyan);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.deck-b .drop-overlay {
  border-color: var(--magenta);
  color: var(--magenta);
}

/* Loader Bar */
.loader-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
}

.deck-tag {
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.tag-a {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.45);
}

.tag-b {
  background: rgba(224, 64, 251, 0.15);
  color: var(--magenta);
  border: 1px solid rgba(224, 64, 251, 0.45);
}

.yt-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #060912;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.yt-input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
}

.yt-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.78rem;
  padding: 7px 10px;
  min-width: 0;
}

.yt-input::placeholder {
  color: #5b6782;
}

.btn-load {
  border: none;
  padding: 7px 11px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: filter 0.15s ease;
  white-space: nowrap;
}

.btn-load:hover {
  filter: brightness(1.15);
}

.btn-load:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-load-a {
  background: var(--cyan);
  color: #031117;
}

.btn-load-b {
  background: var(--magenta);
  color: #16031c;
}

.btn-load-playlist {
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #050811;
  border-radius: 7px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-left: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 9px;
  cursor: pointer;
  font-size: 0.78rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-file {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-file:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-bright);
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #0d1324;
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  max-height: 290px;
  overflow-y: auto;
  padding: 6px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.search-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-item img {
  width: 54px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Track LCD Display */
.track-lcd {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-lcd);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 9px 12px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.75);
}

.lcd-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.track-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.source-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ef4444;
  color: #fff;
  flex-shrink: 0;
}

.source-badge.local {
  background: #3b82f6;
}

.track-title {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f8fafc;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.time-elapsed {
  color: #fff;
  font-weight: 700;
}

.time-sep {
  color: #475569;
}

.time-remain {
  color: var(--text-dim);
}

.loading-status {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--gold);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

.bpm-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 112px;
}

.bpm-value {
  font-family: "Orbitron", monospace;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow);
}

.deck-b .bpm-value {
  color: var(--magenta);
  text-shadow: 0 0 12px var(--magenta-glow);
}

.bpm-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
}

.bpm-label {
  color: var(--text-dim);
  font-weight: 700;
}

.pitch-readout {
  color: var(--gold);
  font-weight: 700;
}

.bpm-tools {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}

/* Interactive Waveform */
.waveform-wrap {
  position: relative;
  height: 76px;
  background: #04070f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  color: #475569;
  pointer-events: none;
}

/* Deck Body: Jog Wheel + Pitch Slider */
.deck-body {
  display: grid;
  grid-template-columns: 1fr 94px;
  gap: 12px;
  align-items: center;
}

.deck-body-b {
  grid-template-columns: 94px 1fr;
}

.platter-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Pioneer CDJ / XDJ-1000 Style Vinyl Jog Wheel Platter */
.jog-wheel {
  position: relative;
  width: 226px;
  height: 226px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      #1a1f2c 0deg 4deg,
      #090c14 4deg 10deg
    );
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.85),
    inset 0 2px 5px rgba(255, 255, 255, 0.16),
    inset 0 -5px 12px rgba(0, 0, 0, 0.9);
  border: 2px solid #232a3b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.jog-wheel:active {
  cursor: grabbing;
}

/* Iconic Pioneer Bright Chrome / Neon Outer Platter Ring */
.jog-ring {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 3px solid rgba(226, 232, 240, 0.78);
  box-shadow:
    0 0 14px rgba(0, 229, 255, 0.3),
    inset 0 0 12px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.jog-b .jog-ring {
  box-shadow:
    0 0 14px rgba(224, 64, 251, 0.3),
    inset 0 0 12px rgba(0, 0, 0, 0.85);
}

.jog-wheel.playing .jog-ring {
  border-color: var(--cyan);
  box-shadow: 0 0 24px var(--cyan-glow), inset 0 0 12px var(--cyan-glow);
}

.jog-b.playing .jog-ring {
  border-color: var(--magenta);
  box-shadow: 0 0 24px var(--magenta-glow), inset 0 0 12px var(--magenta-glow);
}

/* Glossy Black Vinyl Disc with Concentric Grooves + Centered DJ SM Logo */
.jog-platter {
  position: relative;
  width: 192px;
  height: 192px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle at center,
      #090b12 0px,
      #090b12 3px,
      #141926 4px,
      #090b12 5px
    );
  border: 2px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.jog-logo {
  width: 68%;
  height: 68%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 229, 255, 0.35);
  opacity: 0.96;
  pointer-events: none;
}

.jog-marker {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 22px;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 0 12px var(--cyan), 0 0 4px #ffffff;
}

.jog-b .jog-marker {
  background: #ffffff;
  box-shadow: 0 0 12px var(--magenta), 0 0 4px #ffffff;
}

.jog-center-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #e2e8f0 0%, #334155 70%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Transport Buttons */
.transport-row {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.btn-transport {
  font-family: "Orbitron", sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  background: linear-gradient(180deg, #1d263b, #111726);
  color: var(--text-main);
  cursor: pointer;
  letter-spacing: 0.6px;
  transition: all 0.14s ease;
  min-width: 72px;
}

.btn-transport:hover {
  filter: brightness(1.15);
}

.btn-play.active {
  background: linear-gradient(180deg, #22c55e, #15803d);
  border-color: #86efac;
  color: #03150a;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
}

.btn-cue {
  border-color: rgba(249, 115, 22, 0.55);
  color: #fdba74;
}

.btn-cue:active {
  background: var(--orange);
  color: #160900;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.55);
}

.btn-sync {
  border-color: rgba(0, 229, 255, 0.5);
  color: var(--cyan);
}

.deck-b .btn-sync {
  border-color: rgba(224, 64, 251, 0.5);
  color: var(--magenta);
}

.btn-sync.synced {
  background: var(--cyan);
  color: #031318;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.deck-b .btn-sync.synced {
  background: var(--magenta);
  color: #17031c;
  box-shadow: 0 0 16px var(--magenta-glow);
}

/* Pitch Column */
.pitch-col {
  background: rgba(5, 8, 17, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 256px;
}

.pitch-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.pitch-slider-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.pitch-mark {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
}

.pitch-slider {
  writing-mode: vertical-lr;
  direction: ltr;
  appearance: slider-vertical;
  width: 24px;
  height: 138px;
  accent-color: var(--cyan);
  cursor: pointer;
}

.deck-b .pitch-slider {
  accent-color: var(--magenta);
}

.pitch-bend-row {
  display: flex;
  gap: 4px;
}

.mini-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.mini-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Performance Pads */
.pads-section {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  background: rgba(5, 8, 17, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 10px;
}

.pad-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pad-group-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.pad-group-label small {
  font-weight: 500;
  opacity: 0.7;
}

.pad-row {
  display: flex;
  gap: 5px;
}

.pad-btn {
  flex: 1;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  background: linear-gradient(180deg, #1b2439, #101625);
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}

.pad-btn:hover {
  filter: brightness(1.18);
}

.deck-a .cue-pad.set {
  background: rgba(0, 229, 255, 0.25);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.deck-b .cue-pad.set {
  background: rgba(224, 64, 251, 0.25);
  border-color: var(--magenta);
  color: var(--magenta);
  box-shadow: 0 0 10px rgba(224, 64, 251, 0.3);
}

.loop-pad.active {
  background: var(--gold);
  border-color: #fef08a;
  color: #1c1300;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.loop-exit {
  font-size: 0.62rem;
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* AI-Free Real-Time DSP Isolator Bar */
.dsp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(5, 8, 17, 0.68);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 6px 10px;
}

.dsp-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--text-dim);
  white-space: nowrap;
}

.dsp-btns {
  display: flex;
  flex: 1;
  gap: 5px;
}

.dsp-btn {
  flex: 1;
  padding: 6px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  background: linear-gradient(180deg, #1b2439, #101625);
  color: #cbd5e1;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.dsp-btn:hover {
  filter: brightness(1.18);
  color: #fff;
}

.deck-a .dsp-btn.active {
  background: linear-gradient(180deg, #00e5ff, #0284c7);
  border-color: #67e8f9;
  color: #031218;
  box-shadow: 0 0 14px var(--cyan-glow);
}

.deck-b .dsp-btn.active {
  background: linear-gradient(180deg, #e040fb, #9333ea);
  border-color: #f0abfc;
  color: #16031c;
  box-shadow: 0 0 14px var(--magenta-glow);
}

.automix-status-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.18);
  border: 1px solid var(--gold);
  color: var(--gold);
  animation: pulse 1s infinite alternate;
}

.btn-mix-now {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(0, 229, 255, 0.6);
  background: rgba(0, 229, 255, 0.16);
  color: var(--cyan);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mix-now:hover {
  background: var(--cyan);
  color: #031318;
}

/* ================= CENTER MIXER ================= */
.mixer {
  background: linear-gradient(180deg, #131a2c 0%, #0a0e19 100%);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 35px rgba(0, 0, 0, 0.5);
}

/* Master Top */
.mixer-master {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(5, 8, 17, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 10px;
}

.master-knob-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.master-vu-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vu-pair {
  display: flex;
  gap: 5px;
}

.vu-bar {
  width: 10px;
  height: 58px;
  background: #060913;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  flex-direction: column-reverse;
  padding: 2px;
  gap: 2px;
}

.vu-channel {
  height: 82px;
  width: 9px;
}

.vu-seg {
  flex: 1;
  border-radius: 1.5px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.05s linear;
}

.vu-seg.on-green {
  background: #22c55e;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.7);
}

.vu-seg.on-amber {
  background: #facc15;
  box-shadow: 0 0 5px rgba(250, 204, 21, 0.7);
}

.vu-seg.on-red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.85);
}

.vu-caption {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  font-weight: 700;
}

/* Channel Strips */
.mixer-channels {
  display: grid;
  grid-template-columns: 1fr 74px 1fr;
  gap: 6px;
  align-items: stretch;
}

.ch-strip {
  background: rgba(5, 8, 17, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 7px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.ch-header {
  font-family: "Orbitron", sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.ch-a .ch-header { color: var(--cyan); }
.ch-b .ch-header { color: var(--magenta); }

.knob-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.knob-label {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-dim);
}

/* Custom Rotary Knob */
.knob {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #364158 0%, #161d2f 65%, #0b0f1b 100%);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}

.knob-sm {
  width: 30px;
  height: 30px;
}

.knob-filter {
  border-color: rgba(56, 189, 248, 0.45);
}

.knob-dial {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}

.knob-dial::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--knob-color, #00e5ff);
  box-shadow: 0 0 6px var(--knob-color, #00e5ff);
}

/* Channel Faders */
.ch-faders-center {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(5, 8, 17, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 3px;
}

.fader-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ch-fader {
  writing-mode: vertical-lr;
  direction: rtl;
  appearance: slider-vertical;
  width: 22px;
  height: 118px;
  cursor: pointer;
}

.fader-a { accent-color: var(--cyan); }
.fader-b { accent-color: var(--magenta); }

.fader-tag {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
}

.tag-a-txt { color: var(--cyan); }
.tag-b-txt { color: var(--magenta); }

/* Live FX Rack */
.fx-rack {
  background: rgba(5, 8, 17, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fx-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.8px;
}

.fx-targets {
  display: flex;
  gap: 3px;
}

.fx-target-btn,
.fx-type-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.fx-target-btn.active {
  background: rgba(250, 204, 21, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

.fx-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.fx-type-btn.active {
  background: var(--gold);
  border-color: #fef08a;
  color: #1c1300;
}

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

.btn-fx-power {
  flex: 1;
  padding: 9px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-bright);
  background: linear-gradient(180deg, #1d263b, #111726);
  color: var(--text-dim);
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-fx-power.active {
  background: linear-gradient(180deg, #facc15, #ca8a04);
  border-color: #fef08a;
  color: #1c1300;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.5);
}

/* Crossfader */
.crossfader-box {
  background: rgba(5, 8, 17, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.xf-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.8px;
}

.xf-curve-select {
  background: #0d1324;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

.crossfader {
  width: 100%;
  height: 22px;
  accent-color: #ffffff;
  cursor: ew-resize;
}

.xf-ticks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Orbitron", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--text-dim);
}

.xf-center-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  cursor: pointer;
}

.xf-center-btn:hover {
  color: #fff;
}

.xf-autofade-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.btn-autofade {
  flex: 1;
  font-family: "Orbitron", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.16), rgba(224, 64, 251, 0.16));
  color: #eef3ff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-autofade:hover {
  filter: brightness(1.2);
  border-color: #fff;
}

.btn-autofade.active {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-color: #fff;
  color: #050811;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4), 0 0 14px rgba(224, 64, 251, 0.4);
}

/* ================= PLAYLIST & AUTO-DJ DOCK ================= */
.playlist-dock {
  background: linear-gradient(180deg, #101728 0%, #090d18 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

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

.playlist-title-group h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #e2e8f0;
}

.playlist-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  font-weight: 700;
}

.playlist-add-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 280px;
  max-width: 560px;
}

.playlist-yt-input {
  background: #060912;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
}

.autodj-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-autodj-start {
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid rgba(34, 197, 94, 0.55);
  background: linear-gradient(180deg, #16a34a, #15803d);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.btn-autodj-start:hover {
  filter: brightness(1.15);
}

.btn-autodj-start.running {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border-color: #fca5a5;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
}

.autodj-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  cursor: pointer;
}

.playlist-tracks {
  max-height: 195px;
  overflow-y: auto;
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.playlist-empty {
  padding: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.pl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  transition: background 0.12s ease;
}

.pl-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pl-row.playing-a {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.4);
}

.pl-row.playing-b {
  background: rgba(224, 64, 251, 0.12);
  border-color: rgba(224, 64, 251, 0.4);
}

.pl-idx {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  width: 24px;
  text-align: right;
}

.pl-title {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-dur {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.pl-actions {
  display: flex;
  gap: 4px;
}

.pl-btn-a {
  background: rgba(0, 229, 255, 0.18);
  border: 1px solid rgba(0, 229, 255, 0.5);
  color: var(--cyan);
}

.pl-btn-b {
  background: rgba(224, 64, 251, 0.18);
  border: 1px solid rgba(224, 64, 251, 0.5);
  color: var(--magenta);
}

/* ================= MODALS & TOASTS ================= */
.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 11, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 640px;
  background: #0f1628;
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-sm {
  max-width: 460px;
}

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

.modal-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
}

.btn-close:hover {
  color: #fff;
}

.modal-body {
  padding: 14px 16px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.8rem;
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: #1e293b;
  border: 1px solid #475569;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  margin-right: 4px;
}

.toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #11192e;
  border: 1px solid var(--cyan);
  color: #f8fafc;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  max-width: 360px;
}

.toast.error {
  border-color: var(--red);
  color: #fecaca;
}

/* Responsive & Huawei Tablet / Touch Ergonomics */
.jog-wheel,
.knob,
.ch-fader,
.pitch-slider,
.crossfader,
.waveform-wrap,
.fx-xy-pad,
.rgb-pad {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

/* Music-Synced Club LED Spectrum Lightbar */
.club-lightbar {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 5px;
  height: 10px;
  padding: 2px 6px;
  background: rgba(5, 8, 17, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}

.club-led {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: opacity 0.04s linear, transform 0.05s linear;
}

.btn-light-mode.active {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.55);
  color: var(--gold);
}

/* Traktor Style 8-Pad Colorful RGB Performance Matrix */
.traktor-pads {
  background: rgba(5, 8, 17, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pad-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.pad-mode-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: "Orbitron", sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.pad-mode-tab.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.rgb-pad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.rgb-pad {
  --pad-rgb: 0, 229, 255;
  min-height: 46px;
  border-radius: 8px;
  border: 1.5px solid rgba(var(--pad-rgb), 0.55);
  background: linear-gradient(180deg, rgba(var(--pad-rgb), 0.22), rgba(var(--pad-rgb), 0.08));
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 10px rgba(var(--pad-rgb), 0.14);
  transition: transform 0.07s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.rgb-pad span {
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.05;
}

.rgb-pad small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.54rem;
  font-weight: 700;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

.rgb-pad:active,
.rgb-pad.active,
.rgb-pad.set,
.rgb-pad.hit {
  background: rgba(var(--pad-rgb), 0.92);
  border-color: #ffffff;
  color: #050811;
  box-shadow: 0 0 18px rgba(var(--pad-rgb), 0.85), inset 0 0 8px rgba(255, 255, 255, 0.6);
  transform: scale(0.96);
}

/* 8 Distinct Traktor RGB Pad Colors */
.pad-c1 { --pad-rgb: 0, 229, 255; }   /* Electric Cyan */
.pad-c2 { --pad-rgb: 59, 130, 246; }  /* Neon Blue */
.pad-c3 { --pad-rgb: 168, 85, 247; }  /* Vivid Purple */
.pad-c4 { --pad-rgb: 236, 72, 153; }  /* Hot Magenta */
.pad-c5 { --pad-rgb: 239, 68, 68; }   /* Club Red */
.pad-c6 { --pad-rgb: 249, 115, 22; }  /* Neon Orange */
.pad-c7 { --pad-rgb: 250, 204, 21; }  /* Laser Gold */
.pad-c8 { --pad-rgb: 34, 197, 94; }   /* Acid Green */

/* Traktor 5-FX Grid + Touch X/Y FX Pad */
.fx-types-5 {
  grid-template-columns: repeat(5, 1fr);
}

.fx-types-5 .fx-type-btn {
  padding: 5px 2px;
  font-size: 0.56rem;
}

.fx-xy-pad {
  position: relative;
  height: 74px;
  border-radius: 8px;
  background: radial-gradient(circle at center, rgba(250, 204, 21, 0.12), #050811 85%);
  border: 1px solid rgba(250, 204, 21, 0.35);
  overflow: hidden;
  cursor: crosshair;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fx-xy-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 25% 25%;
  pointer-events: none;
}

.fx-xy-hint {
  font-family: "Orbitron", sans-serif;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(250, 204, 21, 0.55);
  pointer-events: none;
}

.fx-xy-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
  box-shadow: 0 0 16px var(--gold);
  transform: translate(-50%, -50%);
  left: 50%;
  top: 55%;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.1s ease;
}

.fx-xy-pad.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 22px rgba(250, 204, 21, 0.28);
}

.fx-xy-pad.active .fx-xy-cursor {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Tablet Connect Modal */
.tablet-connect-body {
  gap: 12px;
}

.tablet-step {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.lan-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #050811;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  padding: 10px 12px;
}

.lan-url-box code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cyan);
  user-select: all;
}

/* Split Cue & Headphone PFL Controls */
.split-cue-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.btn-split-cue {
  font-family: "Orbitron", sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-split-cue.active {
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  border-color: #e0f2fe;
  color: #03111a;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.65);
}

.split-cue-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.54rem;
  font-weight: 700;
  color: var(--text-dim);
}

.btn-pfl {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 5px;
  border-radius: 5px;
  border: 1px solid var(--border-bright);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-pfl.active {
  background: #38bdf8;
  border-color: #e0f2fe;
  color: #03111a;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

/* Traktor Kontrol F1 4x4 Remix Deck */
.btn-f1-toggle.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(224, 64, 251, 0.3));
  border-color: var(--orange);
  color: #fed7aa;
}

.f1-dock {
  background: linear-gradient(180deg, #121622 0%, #090c14 100%);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-top: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
}

.f1-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.f1-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.f1-badge {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--orange);
  color: #160900;
  letter-spacing: 0.8px;
}

.f1-brand h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
}

.f1-bpm-pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #fdba74;
}

.f1-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.btn-f1-act {
  font-family: "Orbitron", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: 7px;
  border: 1px solid rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-f1-act:hover {
  background: rgba(249, 115, 22, 0.28);
}

.btn-f1-act.armed {
  background: var(--orange);
  color: #160900;
  border-color: #fff;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.75);
  animation: pulse 0.7s infinite alternate;
}

.f1-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.f1-col {
  background: rgba(5, 8, 17, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.f1-col-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.f1-col-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.6px;
}

.f1-col-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.f1-vol-slider {
  flex: 1;
  height: 18px;
  accent-color: var(--orange);
  touch-action: none;
  cursor: pointer;
}

.f1-pad-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.f1-pad {
  --pad-rgb: 239, 68, 68;
  min-height: 52px;
  border-radius: 8px;
  border: 1.5px solid rgba(var(--pad-rgb), 0.6);
  background: radial-gradient(circle at center, rgba(var(--pad-rgb), 0.42), rgba(var(--pad-rgb), 0.14) 75%);
  color: #ffffff;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  touch-action: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 12px rgba(var(--pad-rgb), 0.18);
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.f1-pad strong {
  font-family: "Orbitron", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.15;
  word-break: break-word;
}

.f1-pad small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.54rem;
  opacity: 0.85;
}

.f1-pad.playing,
.f1-pad.hit {
  background: radial-gradient(circle at center, #ffffff 0%, rgba(var(--pad-rgb), 1) 65%);
  color: #050811;
  border-color: #ffffff;
  box-shadow: 0 0 22px rgba(var(--pad-rgb), 0.95), inset 0 0 10px #ffffff;
  transform: scale(0.97);
}

.f1-pad.armed-target {
  border: 2px dashed #facc15;
  animation: pulse 0.65s infinite alternate;
}

.f1-stop-btn {
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(249, 115, 22, 0.6);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.35), rgba(249, 115, 22, 0.15));
  color: #fed7aa;
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  cursor: pointer;
}

.f1-stop-btn:active {
  background: var(--orange);
  color: #160900;
}

.apk-server-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ================= 4-PAGE FULLSCREEN NAVIGATION ================= */
.page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(5, 8, 17, 0.72);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.page-tab {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 8px 13px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.page-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.page-tab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(224, 64, 251, 0.25));
  border-color: rgba(0, 229, 255, 0.65);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.28);
}

.page-view {
  display: none !important;
}

.page-view.active {
  display: flex !important;
  flex-direction: column;
}

.dj-grid.page-view.active {
  display: grid !important;
}

/* ================= PAGE 2: FULLSCREEN LIBRARY & PLAYLIST ================= */
.library-page {
  min-height: calc(100vh - 95px);
}

.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: calc(100vh - 105px);
}

.lib-pane {
  background: linear-gradient(180deg, #101728 0%, #090d18 100%);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--cyan);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lib-pane.playlist-dock {
  border-top-color: var(--magenta);
}

.lib-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.lib-pane-header h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
}

.lib-btn-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.lib-search-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lib-track-list {
  flex: 1;
  min-height: 360px;
  max-height: calc(100vh - 235px);
  overflow-y: auto;
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ================= PAGE 3: FULLSCREEN TRAKTOR F1 REMIX DECK ================= */
.f1-fullpage {
  min-height: calc(100vh - 95px);
}

.f1-dock-full {
  flex: 1;
  min-height: calc(100vh - 105px);
}

.f1-full-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  flex: 1;
}

.f1-columns-full .f1-pad {
  min-height: 82px;
}

.f1-columns-full .f1-pad strong {
  font-size: 0.74rem;
}

.f1-side-rack {
  background: rgba(5, 8, 17, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.f1-side-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}

.f1-side-sfx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  flex: 1;
}

.f1-side-tip {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  border-radius: 7px;
}

/* ================= PAGE 4: FL STUDIO DAW & TOUCH MIDI KEYBOARD ================= */
.studio-page {
  min-height: calc(100vh - 95px);
}

.studio-shell {
  background: linear-gradient(180deg, #111829 0%, #090d18 100%);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-badge {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--green);
  color: #03150a;
}

.studio-brand h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
}

.studio-transport,
.studio-export-btns {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.studio-bpm-box {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 4px 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.studio-bpm-box input {
  width: 52px;
  background: transparent;
  border: none;
  color: var(--cyan);
  font-family: "Orbitron", monospace;
  font-size: 0.82rem;
  font-weight: 800;
  outline: none;
  text-align: center;
}

.btn-studio-rec {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}

.btn-studio-rec.active {
  background: #ef4444;
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.7);
}

/* Backing MP3 Layer Bar */
.studio-backing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 9px;
  padding: 8px 12px;
}

.backing-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.backing-tag {
  font-family: "Orbitron", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--cyan);
  white-space: nowrap;
}

.backing-name {
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backing-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 6-Track 16-Step Sequencer */
.studio-sequencer {
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seq-row {
  display: grid;
  grid-template-columns: 165px 38px 66px repeat(16, 1fr);
  gap: 4px;
  align-items: center;
}

.seq-track-name {
  font-family: "Orbitron", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seq-mute-btn {
  padding: 5px 4px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
}

.seq-mute-btn.muted {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #fecaca;
}

.seq-step {
  height: 36px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.56rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.05s ease, background 0.08s ease;
}

.seq-step.beat-start {
  background: rgba(255, 255, 255, 0.09);
}

.seq-step.on {
  background: var(--step-color, #00e5ff);
  color: #050811;
  border-color: #ffffff;
  box-shadow: 0 0 10px var(--step-color, #00e5ff);
}

.seq-step.playing {
  outline: 2px solid #ffffff;
  transform: scale(1.06);
}

/* 2-Octave Touch MIDI Keyboard */
.midi-keyboard-wrap {
  background: #060913;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.midi-kb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
}

.midi-oct-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.midi-keys {
  position: relative;
  display: flex;
  height: 132px;
  width: 100%;
  touch-action: none;
  user-select: none;
}

.midi-key-white {
  position: relative;
  flex: 1;
  height: 100%;
  background: linear-gradient(180deg, #f8fafc 0%, #dbe4f0 100%);
  border: 1px solid #334155;
  border-radius: 0 0 7px 7px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  touch-action: none;
}

.midi-key-white.pressed {
  background: linear-gradient(180deg, var(--cyan), #0284c7);
  color: #031218;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.7);
}

.midi-key-black {
  position: absolute;
  top: 0;
  width: 4.5%;
  height: 60%;
  z-index: 5;
  background: linear-gradient(180deg, #1e293b 0%, #050811 100%);
  border: 1px solid #475569;
  border-radius: 0 0 6px 6px;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.54rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  cursor: pointer;
  touch-action: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

.midi-key-black.pressed {
  background: linear-gradient(180deg, var(--magenta), #9333ea);
  color: #fff;
  box-shadow: 0 0 14px var(--magenta);
}

/* Sound Library Modal & 32-Pad Full-Screen Launchpad */
.f1-columns-32 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
}

.f1-columns-32 .f1-col {
  padding: 8px 7px;
  gap: 6px;
}

.f1-columns-32 .f1-pad-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(58px, 1fr);
  gap: 6px;
  flex: 1;
}

.f1-columns-32 .f1-pad {
  min-height: 58px;
  height: 100%;
}

.sound-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 7px;
}

.sound-lib-cat {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--gold);
  margin: 8px 0 4px;
  letter-spacing: 0.6px;
}

.sound-lib-item {
  padding: 9px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.14s ease;
}

.sound-lib-item:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--cyan);
}

/* Huawei MatePad / Tablet Landscape (880px - 1440px): 100% Viewport Fit — Zero Overflow! */
@media (max-width: 1440px) {
  .brand-sub,
  .maker-label {
    display: none;
  }
  .top-bar {
    padding: 5px 8px;
    gap: 5px;
  }
  .brand-titles h1 {
    font-size: 0.78rem;
  }
  .page-tab {
    padding: 6px 8px;
    font-size: 0.6rem;
  }
  .btn-rec {
    padding: 5px 9px;
    font-size: 0.64rem;
  }
  .btn-ghost {
    padding: 5px 7px;
    font-size: 0.7rem;
  }
  .maker-link {
    padding: 4px 8px;
    flex-shrink: 0;
  }
  .luce-logo {
    height: 21px;
  }
}

@media (max-width: 1360px) and (min-width: 880px) {
  .console-shell {
    padding: 5px 7px 8px;
    gap: 6px;
  }
  .dj-grid {
    grid-template-columns: minmax(0, 1fr) 252px minmax(0, 1fr);
    gap: 7px;
  }
  .deck {
    padding: 8px;
    gap: 6px;
  }
  .jog-wheel {
    width: 192px;
    height: 192px;
  }
  .jog-platter {
    width: 162px;
    height: 162px;
  }
  .pitch-col {
    height: 220px;
  }
  .rgb-pad {
    min-height: 40px;
  }
  .f1-full-layout {
    grid-template-columns: 1fr;
  }
  .f1-side-rack {
    display: none;
  }
}

@media (max-width: 879px) {
  .dj-grid {
    grid-template-columns: 1fr;
  }
  .top-bar {
    flex-wrap: wrap;
    padding: 6px 8px;
  }
  .library-grid {
    grid-template-columns: 1fr;
  }
  .f1-columns-32 {
    grid-template-columns: repeat(2, 1fr);
  }
}
