/* VevoStudio — BUTTM Modern Broadcast Studio Theme */
:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #12141d;
  --bg-surface: #181b26;
  --bg-elevated: #202433;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #00f0ff;
  --accent-cyan: #00f0ff;
  --accent-red: #ff0055;
  --accent-green: #00e676;
  --accent-orange: #ff9100;
  --accent-purple: #9d00ff;
  --text-main: #f0f3fa;
  --text-muted: #838c9e;
  --text-dim: #545b6b;
  --led-green: #00ff66;
  --led-yellow: #ffdd00;
  --led-red: #ff1744;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-mono: "SF Mono", Menlo, Consolas, Monaco, monospace;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at 50% 0%, #151928 0%, var(--bg-primary) 70%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}

/* Master Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1540px;
  margin: 0 auto;
  padding: 12px 18px;
  gap: 12px;
}

/* Header & Broadcaster Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-onair {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.badge-onair.live {
  background: rgba(255, 0, 85, 0.16);
  border-color: var(--accent-red);
  color: #ff4d88;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.badge-onair.live .live-dot {
  background: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
  animation: pulse-dot 1.2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.stream-stats-bar {
  display: flex;
  align-items: center;
  gap: 18px;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  font-size: 11px;
}

.stat-pill .label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 9px;
  font-weight: 600;
}

.stat-pill .value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-golive {
  background: linear-gradient(135deg, var(--accent-cyan), #0077ff);
  color: #040810;
  border: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.35);
  transition: all 0.2s ease;
}

.btn-golive:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.5);
}

.btn-golive.is-live {
  background: linear-gradient(135deg, var(--accent-red), #d50000);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 0, 85, 0.5);
}

.btn-rec {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-rec:hover {
  border-color: var(--accent-red);
}

.btn-rec.is-recording {
  background: rgba(255, 0, 85, 0.2);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Main Studio Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 320px 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

/* Decks */
.deck-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.deck-badge {
  font-size: 13px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.deck-badge.deck-a { color: var(--accent-cyan); border-color: rgba(0, 240, 255, 0.3); }
.deck-badge.deck-b { color: var(--accent-purple); border-color: rgba(157, 0, 255, 0.3); }

.deck-track-info {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.deck-title {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.deck-time-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Waveform Canvas / Progress Bar */
.waveform-container {
  height: 64px;
  background: #0d0f17;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 14px;
}

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

.waveform-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
  pointer-events: none;
}

/* Deck Controls */
.deck-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-cue, .btn-play {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-cue:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.btn-play:hover {
  background: var(--bg-elevated);
}

.btn-play.playing {
  background: rgba(0, 230, 118, 0.18);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.pitch-section {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.pitch-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.pitch-slider {
  flex: 1;
  accent-color: var(--accent-cyan);
}

.pitch-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  min-width: 44px;
  text-align: right;
  color: var(--accent-cyan);
}

/* Center Mixer Section */
.mixer-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.mixer-header {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Stereo VU Meters */
.vu-meter-box {
  width: 100%;
  background: #090a10;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.vu-ch-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  width: 14px;
}

.vu-bar-track {
  flex: 1;
  height: 12px;
  background: #141724;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.vu-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--led-green) 70%, var(--led-yellow) 88%, var(--led-red) 100%);
  transition: width 0.05s linear;
}

.vu-bar-peak {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  opacity: 0.9;
}

.clip-badge {
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 3px;
  background: #2a1118;
  color: #662233;
}

.clip-badge.active {
  background: var(--led-red);
  color: #ffffff;
  box-shadow: 0 0 10px var(--led-red);
}

/* Faders */
.crossfader-box {
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.crossfader-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.crossfader-slider {
  width: 100%;
  accent-color: var(--accent-cyan);
}

/* Mic & Talkover Strip */
.mic-strip {
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.ducking-indicator {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

.ducking-indicator.active {
  background: rgba(255, 145, 0, 0.2);
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
}

/* Lower Section: Tabs (AutoDJ Cloud, Pro Audio DSP, Serato Sync, Soundboard) */
.lower-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-cyan);
}

.tab-pane {
  display: none;
  flex: 1;
}

.tab-pane.active {
  display: block;
}

/* 10-Band EQ Controls */
.eq-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  padding: 10px 0;
}

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

.eq-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 90px;
  accent-color: var(--accent-cyan);
}

.eq-freq-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.eq-val-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-cyan);
}

/* Soundboard Pads */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pad-btn {
  height: 60px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, box-shadow 0.1s ease;
}

.pad-btn:active, .pad-btn.triggered {
  transform: scale(0.96);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

/* AutoDJ Library Table */
.autodj-table-wrap {
  max-height: 180px;
  overflow-y: auto;
}

.autodj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.autodj-table th {
  text-align: left;
  padding: 8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.autodj-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-table-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
}

.btn-table-action:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
