/* uTubeDJ Pro — CSS Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #080a0f;
  --panel-bg: #11141d;
  --panel-card: #171b26;
  --panel-border: rgba(255, 255, 255, 0.08);

  --text-main: #f1f5f9;
  --text-dim: #94a3b8;
  --text-muted: #64748b;

  --accent-amber: #ff9f0a;
  --accent-amber-glow: rgba(255, 159, 10, 0.45);
  --accent-cyan: #00e5ff;
  --accent-green: #30d158;
  --accent-red: #ff453a;

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-panel: 14px;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
}

/* Brand Title & Logo */
.brand-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-align: center;
}

.brand-title .logo-accent {
  color: var(--accent-amber);
}

.brand-title.master-logo {
  margin-bottom: 2px;
}

/* Symmetrical 3-Column Grid Layout (Fits 100vh) */
.mixer-grid {
  display: grid;
  grid-template-columns: 1fr 320px 1fr;
  gap: 10px;
  height: 100vh;
  padding: 10px;
}

/* Deck Panel */
.deck-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-panel);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.deck-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

/* Player / Video Container */
.deck-player-wrapper {
  width: 100%;
  height: 290px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.deck-video-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Middle Deck Layout (Pads + Jog Wheel & Pitch Fader) */
.deck-mid-grid {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 20px;
  align-items: center;
  flex: 1;
}

/* Left Pads Column */
.pads-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pad-group-title {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

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

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

.pad-btn {
  background: #191d2a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.4rem 0.2rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.pad-btn:hover {
  background: #23293c;
  border-color: var(--accent-amber);
}

.pad-btn.active {
  background: rgba(255, 159, 10, 0.25);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(255, 159, 10, 0.4);
}

.pad-btn.cue-assigned {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Jog Wheel & Vertical Pitch Fader Group */
.jog-and-pitch-group {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 210px;
  flex-shrink: 0;
}

/* Desplazamiento leve hacia la izquierda en Deck A y derecha en Deck B */
#deck-panel-A .jog-and-pitch-group {
  margin-right: 12px;
}

#deck-panel-B .jog-and-pitch-group {
  margin-left: -6px;
}

.jog-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.jog-wheel {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e2333 0%, #0c0e14 80%);
  border: 5px solid #272d42;
  box-shadow: 
    0 0 20px rgba(0, 0, 0, 0.9),
    inset 0 0 12px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.1s linear;
}

.jog-inner-display {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #080a0f;
  border: 3px solid #323a54;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.95);
}

.jog-bpm {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.jog-sub {
  font-size: 0.7rem;
  color: var(--accent-amber);
  margin-top: 2px;
  font-weight: 800;
}

.jog-dots {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.jog-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-amber);
}

/* Vertical Pitch Fader Styling */
.pitch-vertical-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 185px;
}

.vertical-pitch-fader {
  writing-mode: bt-lr;
  appearance: slider-vertical;
  width: 16px;
  height: 150px;
  accent-color: var(--accent-amber);
  cursor: pointer;
}

/* Transport Buttons (CUE, PLAY, SYNC) */
.transport-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-transport {
  flex: 1;
  background: #191d2a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.55rem 0.4rem;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-transport:hover {
  background: #242a3e;
}

.btn-transport.btn-play {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(255, 159, 10, 0.3);
}

.btn-transport.btn-play.playing {
  background: var(--accent-amber);
  color: #000;
  box-shadow: 0 0 20px rgba(255, 159, 10, 0.6);
}

/* Bottom Deck Mixer Strip (3 Secciones Centradas con Línea Vertical) */
.deck-mixer-bottom {
  display: flex;
  background: #0e111a;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: auto;
}

.knobs-row-split {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.knob-group {
  display: flex;
  flex: 1;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.knob-group.last {
  border-right: none;
  padding-right: 0;
}

/* Rotary Knob CSS Styling (Sin salto de linea a 125% zoom) */
.rotary-knob-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.knob-body {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #31384e 0%, #151824 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.knob-body:hover {
  border-color: var(--accent-amber);
}

.knob-pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 12px;
  background: var(--accent-amber);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--accent-amber-glow);
}

.knob-label {
  font-size: 0.60rem;
  font-weight: 900;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: center;
}

/* Segmented Vertical LED VU Meter en Master (Ampliados 240px) */
.vu-meter-vertical {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  background: #07090e;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 240px;
  width: 18px;
}

.led-seg {
  width: 100%;
  height: 4px;
  background: #181d28;
  border-radius: 1px;
}

.led-seg.on.green { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.led-seg.on.amber { background: var(--accent-amber); box-shadow: 0 0 6px var(--accent-amber); }
.led-seg.on.red { background: var(--accent-red); box-shadow: 0 0 6px var(--accent-red); }

/* Master Center Panel */
.master-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-panel);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.master-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

/* Master Top Knobs */
.master-top-knobs-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 100%;
  padding: 10px 0;
}

.master-center-content {
  display: flex;
  width: 100%;
  justify-content: space-around;
  align-items: center;
  flex: 1;
}

.scale-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 240px;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 800;
  text-align: center;
}

.faders-pair {
  display: flex;
  gap: 20px;
  align-items: center;
}

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

.vertical-fader {
  writing-mode: bt-lr;
  appearance: slider-vertical;
  width: 22px;
  height: 230px;
  accent-color: var(--accent-amber);
  cursor: pointer;
}

.crossfader-panel {
  width: 100%;
  background: #090b10;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crossfader-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--text-dim);
}

.crossfader-input {
  width: 100%;
  height: 24px;
  accent-color: var(--accent-amber);
  cursor: pointer;
}
