.studio-tab { max-width: 1200px; }
.studio-tab h1 { margin-bottom: 0.25rem; }
.studio-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.studio-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;
}

.on-air-badge {
  padding: 0.5rem 1.25rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; background: #222; color: #888; border: 1px solid var(--border);
}
.on-air-badge.live {
  background: var(--primary); color: #fff; border-color: var(--primary);
  animation: onAirPulse 1.5s ease infinite;
}
@keyframes onAirPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,20,60,0.5); }
  50% { box-shadow: 0 0 20px 4px rgba(220,20,60,0.3); }
}

.studio-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem;
}

.studio-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
}
.studio-panel h3 {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-muted); margin-bottom: 1rem;
}

.mode-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mode-btn {
  flex: 1; min-width: 120px; padding: 0.75rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; font-family: inherit; font-size: 0.85rem;
}
.mode-btn.active, .mode-btn:hover { border-color: var(--primary); background: rgba(220,20,60,0.15); }
.mode-btn.active { color: var(--primary); font-weight: 600; }

.toggle-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.toggle-row input { accent-color: var(--primary); }

.deck-panel-wide { grid-column: 1 / -1; }

.dual-decks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.deck-unit {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.deck-unit.deck-live {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(220, 20, 60, 0.25);
}

.deck-tag {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--primary);
  display: block;
  margin-bottom: 0.35rem;
}

.deck-fader {
  width: 100%;
  margin-top: 0.75rem;
  accent-color: var(--primary);
}

.crossfader-block {
  margin: 1rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.crossfader-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.5rem;
}

.crossfader-track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.crossfader-track span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1rem;
}

.crossfader {
  flex: 1;
  accent-color: var(--primary);
  height: 6px;
}

.mix-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.fade-duration {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fade-duration input { flex: 1; min-width: 100px; accent-color: var(--primary); }

.deck-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.shortcuts-panel { grid-column: 1 / -1; }

.shortcuts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.4rem 0;
}

.shortcut-key {
  min-width: 4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
}

.shortcut-key.listening {
  border-color: var(--primary);
  color: var(--primary);
}

.video-bg-btn.active {
  background: rgba(220, 20, 60, 0.2);
  border-color: var(--primary);
  color: var(--primary);
}

.video-bg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


@media (max-width: 640px) {
  .dual-decks { grid-template-columns: 1fr; }
}

.deck-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.15rem; }
.deck-artist { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.deck-progress { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 0.5rem; overflow: hidden; }
.deck-progress div { height: 100%; width: 0%; background: var(--primary); transition: width 0.3s; }

.deck-controls { display: flex; gap: 0.5rem; }
.deck-btn {
  padding: 0.6rem 1rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; font-size: 1rem;
}
.deck-btn.play-toggle { min-width: 110px; font-weight: 600; }
.deck-btn.play-toggle.playing { background: var(--primary); border-color: var(--primary); color: #fff; }
.studio-err { color: #ff6b6b; font-size: 0.8rem; margin-top: 0.5rem; min-height: 1em; }

.vu-meters { display: flex; gap: 1rem; margin-bottom: 1rem; }
.vu { flex: 1; text-align: center; }
.vu span { font-size: 0.65rem; color: var(--text-muted); display: block; margin-top: 0.25rem; }
.vu-bar {
  height: 80px; width: 100%; background: var(--bg); border-radius: 4px; position: relative; overflow: hidden;
}
.vu-bar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: var(--level, 0%);
  background: linear-gradient(to top, #22c55e, #eab308, var(--primary));
  transition: height 0.05s;
}

.ptt-btn {
  width: 100%; padding: 1.25rem; border-radius: 12px; border: 2px solid var(--border);
  background: linear-gradient(145deg, #1a1a1a, #111); color: var(--text);
  cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  transition: all 0.15s; user-select: none;
}
.ptt-btn .ptt-icon { font-size: 2rem; }
.ptt-btn small { color: var(--text-muted); font-size: 0.7rem; }
.ptt-btn.active, .ptt-btn:active {
  border-color: var(--primary); background: rgba(220,20,60,0.25);
  box-shadow: 0 0 30px rgba(220,20,60,0.4); transform: scale(0.98);
}
.ptt-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.75rem; line-height: 1.4; }

.faders { display: flex; justify-content: space-around; align-items: flex-end; height: 200px; padding: 0 0.5rem; }
.fader-col { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; height: 100%; }
.fader-col label { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--text-muted); }
.fader {
  -webkit-appearance: slider-vertical; writing-mode: vertical-lr; direction: rtl;
  width: 8px; height: 140px; accent-color: var(--primary);
}
.fader.master { accent-color: #fff; }

.jingle-pads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.jingle-pad {
  padding: 0.85rem 0.5rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; font-size: 0.75rem;
  font-family: inherit; text-align: center; transition: all 0.1s;
}
.jingle-pad:hover { border-color: var(--primary); }
.jingle-pad:active { background: var(--primary); transform: scale(0.95); }
.jingle-upload { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.jingle-upload input { flex: 1; font-size: 0.8rem; }
.jingle-upload button {
  padding: 0.5rem 0.75rem; background: var(--primary); border: none; border-radius: 6px;
  color: #fff; cursor: pointer; font-family: inherit; font-size: 0.8rem;
}

.studio-library {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.studio-library li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.lib-btns { display: flex; gap: 0.35rem; flex-shrink: 0; }

.lib-deck-btn {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.lib-deck-btn:hover { border-color: var(--primary); color: var(--primary); }

.track-search {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  margin-bottom: 0.5rem;
}

.track-edit-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

.track-actions { display: flex; gap: 0.35rem; white-space: nowrap; }

.btn-save-track {
  background: none;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
}

.library-panel { grid-column: 1 / -1; }

.queue-refresh { width: 100%; margin-bottom: 0.5rem; font-size: 0.85rem !important; }
.studio-queue {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.75rem;
}
.studio-queue li {
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.85rem;
  display: flex; justify-content: space-between; align-items: center;
}
.studio-queue li.playing { color: var(--primary); font-weight: 600; }
.studio-queue li button {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  padding: 0.2rem 0.5rem; border-radius: 4px; cursor: pointer; font-size: 0.7rem;
}

.studio-nav { color: var(--primary) !important; font-weight: 600; }

@media (max-width: 768px) {
  .faders { height: 160px; }
  .fader { height: 100px; }
}
