:root {
  --bg-primary: #0f1117;
  --bg-card: #171b26;
  --bg-card-hover: #1f2535;
  --border: #2b3245;
  --text-main: #f0f3fa;
  --text-muted: #8c97b2;
  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.25);
  --accent-amber: #ffaa00;
  --accent-amber-glow: rgba(255, 170, 0, 0.25);
  --accent-purple: #a855f7;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --knob-bg: #22293a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header & Master Controls */
header {
  background: #131722;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #000;
  font-weight: 900;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  background: #252c3f;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn:hover {
  background: #2f3850;
  border-color: #3f4a69;
}

.btn-primary {
  background: #008899;
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.btn-primary:hover {
  background: var(--accent-cyan);
  color: #000;
}

.btn-export {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 9px 18px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.btn-export:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.time-display {
  font-family: "Courier New", Courier, monospace;
  font-size: 18px;
  background: #090b10;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #1a2030;
  color: var(--accent-cyan);
  text-shadow: 0 0 8px var(--accent-cyan-glow);
  min-width: 100px;
  text-align: center;
}

/* Master visualizer canvas */
#masterSpectrum {
  width: 120px;
  height: 38px;
  background: #0a0d14;
  border-radius: 4px;
  border: 1px solid #1f2536;
}

/* Main Container Grid */
.studio-layout {
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Panels */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #23293b;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title span.badge {
  font-size: 10px;
  background: #252e42;
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Dropzone & Waveform */
.dropzone {
  border: 2px dashed #343f5a;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: #11141e;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: #141926;
}

.waveform-container {
  position: relative;
  width: 100%;
  height: 90px;
  background: #0c0f17;
  border-radius: 8px;
  border: 1px solid #1f2537;
  overflow: hidden;
  cursor: pointer;
  margin-top: 12px;
}

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

.playhead-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  pointer-events: none;
  left: 0%;
}

/* Two-column rack grid */
.rack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

/* Faders & Controls */
.control-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.control-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label-group {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.control-val {
  color: var(--accent-cyan);
  font-weight: 600;
  font-family: monospace;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #252c3d;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-cyan-glow);
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.range-amber::-webkit-slider-thumb {
  background: var(--accent-amber);
  box-shadow: 0 0 6px var(--accent-amber-glow);
}

/* Studio Noise Strip */
.noise-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.noise-box {
  background: #11141e;
  border: 1px solid #232a3d;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.noise-box.active {
  border-color: var(--accent-amber);
}

.noise-box h4 {
  font-size: 12px;
  color: var(--text-main);
}

/* Sequencer Grid */
.sequencer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.drum-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drum-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drum-name {
  width: 80px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.step-btns {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
  flex: 1;
}

.step-btn {
  height: 32px;
  background: #1c2230;
  border: 1px solid #283147;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.step-btn:hover {
  background: #2a334a;
}

.step-btn.active {
  background: var(--accent-cyan);
  border-color: #fff;
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.step-btn.current {
  box-shadow: 0 0 0 2px #ffaa00 !important;
}

/* Beat groupings */
.step-btn:nth-child(4n+1) {
  margin-left: 4px;
}
.step-btn:first-child {
  margin-left: 0;
}

/* Sample Pads */
.pads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.pad-card {
  background: #121520;
  border: 1px solid #232b3f;
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.pad-card:hover {
  background: #191e2e;
  border-color: var(--accent-cyan);
}

.pad-card:active, .pad-card.flash {
  background: var(--accent-cyan);
  color: #000;
  transform: scale(0.96);
}

.pad-shortcut {
  font-size: 10px;
  color: var(--text-muted);
  background: #1e2434;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.pad-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pad-file-btn {
  font-size: 10px;
  color: var(--accent-amber);
  text-decoration: underline;
  cursor: pointer;
}

/* Info Banner */
.info-guide {
  background: #141a26;
  border: 1px solid #232e44;
  border-left: 4px solid var(--accent-cyan);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #bac5df;
}

.info-guide strong {
  color: #fff;
}

/* Modal for export */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #171b26;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #2a334a;
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 16px auto;
}

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

/* =========================================
   NOVA ATUALIZAÇÃO: MEDIDORES DE ESTÚDIO & RADAR
   ========================================= */

/* Medidor Master de Pico / Anti-Estouro / Rádio */
.meter-strip {
  background: #0b0e14;
  border: 1px solid #1f2738;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

.meter-channels {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

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

.meter-ch-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  width: 12px;
}

.meter-track {
  flex: 1;
  height: 10px;
  background: #141a27;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

.meter-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #10b981 65%, #ffaa00 85%, #ef4444 100%);
  border-radius: 2px;
  transition: width 0.05s linear;
}

.meter-target-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 88%; /* -1.0 dB target */
  width: 2px;
  background: #ffaa00;
  box-shadow: 0 0 4px #ffaa00;
  pointer-events: none;
}

.clip-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 3px;
  background: #252834;
  color: #555e70;
  letter-spacing: 0.5px;
  transition: all 0.1s;
}

.clip-badge.active {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  animation: pulse 0.3s ease infinite alternate;
}

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

.meter-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
}

.meter-db-val {
  font-family: monospace;
  font-weight: 700;
  font-size: 13px;
  color: #00f0ff;
}

/* Gráfico Comparador: Padrão Humano vs Padrão Robótico */
.radar-panel {
  background: #0e121b;
  border: 1px solid #232c40;
  border-radius: 10px;
  padding: 14px;
}

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

.radar-legends {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
}

.legend-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-human {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.dot-robot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 2px;
  box-shadow: 0 0 6px #ef4444;
}

.dot-live {
  width: 10px;
  height: 10px;
  background: #00f0ff;
  border-radius: 50%;
  box-shadow: 0 0 6px #00f0ff;
}

#compareCanvas {
  width: 100%;
  height: 130px;
  background: #07090e;
  border: 1px solid #1a2233;
  border-radius: 6px;
  display: block;
}

/* Botões de Reset nos Equalizadores (Original vs Estúdio) */
.slider-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.reset-pills {
  display: flex;
  gap: 6px;
}

.btn-reset-mini {
  background: #181f2e;
  border: 1px solid #28344e;
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  font-weight: 600;
}

.btn-reset-mini:hover {
  background: #25314a;
  color: #fff;
  border-color: #3b4b70;
}

.btn-reset-mini.btn-studio {
  color: var(--accent-amber);
  border-color: rgba(255, 170, 0, 0.4);
}

.btn-reset-mini.btn-studio:hover {
  background: #33260c;
  color: #ffaa00;
  border-color: #ffaa00;
}

.btn-reset-mini.btn-original:hover {
  color: #00f0ff;
  border-color: #00f0ff;
}

/* Botão Auto-Ajuste IA e Caixa de Sugestão */
.btn-ai-auto {
  background: linear-gradient(135deg, #00b4d8, #7209b7);
  border: 1px solid #00f0ff;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 11px;
}

.btn-ai-auto:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
}

.ai-suggestion-box {
  background: #111a2e;
  border: 1px solid #1f3760;
  border-left: 4px solid var(--accent-cyan);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: #cdd9f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   MÓDULO DE VOZ DE ESTÚDIO, RÁDIO & MICROFONE
   ========================================= */
.vocal-studio-panel {
  border-color: #2d3b5e;
  background: linear-gradient(180deg, #161c2b 0%, #121622 100%);
}

.vocal-io-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: #0d111a;
  border: 1px solid #222b40;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.vocal-io-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-mic-live.active {
  background: #059669;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.btn-mic-rec.recording {
  background: #dc2626;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.7);
  animation: pulse 0.5s ease infinite alternate;
}

.vocal-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.vocal-card {
  background: #10141f;
  border: 1px solid #222a3d;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vocal-meter-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #141926;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #242e47;
  min-width: 210px;
}

.vocal-meter-track {
  flex: 1;
  height: 8px;
  background: #090c12;
  border-radius: 4px;
  overflow: hidden;
}

.vocal-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f0ff, #10b981, #ffaa00);
  transition: width 0.05s linear;
}

/* ===================================================
   NOVO: SELEÇÃO DE TRECHO, ZOOM FINO & 2ª PISTA (MULTI-FAIXA)
   =================================================== */

.waveform-editor-box {
  background: #090c13;
  border: 1px solid #1f273b;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.waveform-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  background: #111622;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #1c2438;
}

.waveform-scroll-viewport {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #06080d;
  border: 1px solid #171f30;
  border-radius: 6px;
  cursor: crosshair;
}

.waveform-scroll-viewport::-webkit-scrollbar {
  height: 8px;
}
.waveform-scroll-viewport::-webkit-scrollbar-track {
  background: #0b0e17;
}
.waveform-scroll-viewport::-webkit-scrollbar-thumb {
  background: #2b354d;
  border-radius: 4px;
}
.waveform-scroll-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.waveform-canvas-container {
  position: relative;
  height: 180px;
  min-width: 100%;
}

.track-label-overlay {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10;
  pointer-events: none;
}

.track-label-a { color: var(--accent-cyan); border-left: 3px solid var(--accent-cyan); }
.track-label-b { color: #10b981; border-left: 3px solid #10b981; }

.selection-range-highlight {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(255, 215, 0, 0.18);
  border-left: 2px solid #ffd700;
  border-right: 2px solid #ffd700;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.selection-handle-tag {
  position: absolute;
  top: 2px;
  font-size: 9px;
  font-family: monospace;
  background: #ffd700;
  color: #000;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
}

/* Macro Slider IA <---> Estúdio Humano */
.macro-human-card {
  background: linear-gradient(135deg, #0e1422 0%, #171b2a 100%);
  border: 1px solid #2b3652;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}

.macro-slider-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.macro-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.macro-slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #00f0ff 0%, #a855f7 50%, #ffaa00 100%);
  outline: none;
  cursor: pointer;
}

.macro-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #ffaa00;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.8);
  cursor: pointer;
  transition: transform 0.1s;
}

.macro-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Painel da 2ª Música (Faixa B) */
.track-b-card {
  background: #0e131d;
  border: 1px solid #1c273c;
  border-left: 4px solid #10b981;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 14px;
}

.btn-ai-magic {
  background: linear-gradient(135deg, #7928ca, #ff0080);
  border: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 0, 128, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ai-magic:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 0, 128, 0.6);
}

.scope-pill-group {
  display: flex;
  gap: 4px;
  background: #0a0d14;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid #1e2638;
}

.scope-pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.scope-pill-btn.active {
  background: #242e47;
  color: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

/* ===================================================
   NOVO: GANHO EXTRA PÓS-HUMANIZAÇÃO (MAKEUP GAIN)
   =================================================== */
.human-makeup-strip {
  background: linear-gradient(90deg, #181409 0%, #201a0d 100%);
  border: 1px solid #ffaa00;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 0 14px rgba(255, 170, 0, 0.15);
}

/* ===================================================
   NOVO: MESA DE MIXAGEM MULTICANAL (STUDIO MIXER)
   =================================================== */
.studio-mixer-rack {
  background: #090c13;
  border: 1px solid #1c2538;
  border-radius: 10px;
  padding: 16px;
  margin-top: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.mixer-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.mixer-strip {
  background: #111520;
  border: 1px solid #1f273b;
  border-radius: 8px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: border-color 0.15s;
}

.mixer-strip.muted {
  opacity: 0.55;
  filter: grayscale(0.5);
}

.mixer-strip.soloed {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

.mixer-strip-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  color: var(--text-main);
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mixer-pan-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.mixer-pan-slider {
  width: 80px;
  height: 6px;
  -webkit-appearance: none;
  background: #1e2638;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.mixer-pan-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
}

.mixer-mute-solo-btns {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.btn-mute, .btn-solo {
  width: 32px;
  height: 24px;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  border: 1px solid #2a344d;
  background: #181e2c;
  color: #8c97b2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-mute.active {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.btn-solo.active {
  background: #ffd700;
  border-color: #ffd700;
  color: #000;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.mixer-fader-and-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 140px;
  justify-content: center;
  width: 100%;
}

.vertical-fader-track {
  height: 130px;
  width: 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vertical-fader {
  -webkit-appearance: none;
  transform: rotate(-90deg);
  width: 120px;
  height: 8px;
  background: #090c14;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin: 0;
}

.vertical-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4b5875 0%, #2b354d 100%);
  border: 1px solid #7c8ba8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  cursor: pointer;
}

.mixer-vu-meter {
  width: 12px;
  height: 120px;
  background: #05070a;
  border-radius: 3px;
  border: 1px solid #1a2233;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column-reverse;
}

.mixer-vu-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(0deg, #10b981 0%, #10b981 65%, #ffd700 85%, #ef4444 100%);
  transition: height 0.05s linear;
}

.mixer-val-readout {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* ===================================================
   NOVO: TECLADO SINTETIZADOR & HARMONIZADOR RÍTMICO
   =================================================== */
.synth-piano-rack {
  background: #090c13;
  border: 1px solid #1c2538;
  border-radius: 10px;
  padding: 16px;
  margin-top: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.piano-container {
  position: relative;
  height: 150px;
  background: #05070c;
  border-radius: 6px;
  border: 2px solid #161c2b;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  padding: 0 4px;
  user-select: none;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.8);
}

.piano-white-key {
  position: relative;
  flex: 1;
  min-width: 38px;
  height: 142px;
  background: linear-gradient(180deg, #f0f3fa 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 0 0 5px 5px;
  cursor: pointer;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 6px;
  color: #1e293b;
  font-size: 10px;
  font-weight: 700;
  transition: background 0.05s, transform 0.05s;
}

.piano-white-key:active, .piano-white-key.active {
  background: #00f0ff;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
  transform: translateY(2px);
}

.piano-black-key {
  position: absolute;
  width: 24px;
  height: 90px;
  background: linear-gradient(180deg, #1e2538 0%, #0a0d14 100%);
  border: 1px solid #000;
  border-radius: 0 0 4px 4px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 5px;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  box-shadow: 0 3px 6px rgba(0,0,0,0.8);
  transition: background 0.05s, transform 0.05s;
}

.piano-black-key:active, .piano-black-key.active {
  background: #a855f7;
  color: #fff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.9);
  transform: translateY(2px);
}

.chord-pads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.chord-trigger-card {
  background: #101624;
  border: 1px solid #1f2b45;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chord-trigger-card:hover {
  background: #172138;
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.chord-trigger-card:active, .chord-trigger-card.active {
  background: linear-gradient(135deg, #008899, #7928ca);
  border-color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

.chord-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.chord-notes {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 2px;
}

/* ===================================================
   NOVO: SUPER STK (9 PADS COLORIDOS & AUTO-REPETIÇÃO)
   =================================================== */
.super-stk-rack {
  background: linear-gradient(145deg, #0b0f19 0%, #151a28 100%);
  border: 2px solid #2e3b56;
  border-radius: 14px;
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
}

.stk-brand-badge {
  background: linear-gradient(90deg, #ff0055, #ffaa00, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.stk-repeat-bar {
  background: #090c13;
  border: 1px solid #1e2638;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn-repeat-toggle {
  background: #171d2b;
  border: 1px solid #2b3652;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-repeat-toggle.active {
  background: linear-gradient(135deg, #ff0055, #ffaa00);
  border-color: #ffaa00;
  color: #000;
  box-shadow: 0 0 16px rgba(255, 0, 85, 0.6);
}

.stk-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 540px;
  margin: 0 auto;
}

.stk-pad {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  cursor: pointer;
  user-select: none;
  position: relative;
  box-shadow: 0 6px 14px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.15);
  transition: transform 0.08s ease, filter 0.08s ease;
}

.stk-pad:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.stk-pad:active, .stk-pad.active {
  transform: translateY(2px) scale(0.97);
  filter: brightness(1.4) drop-shadow(0 0 16px var(--pad-color));
}

.stk-pad-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 900;
}

.stk-key-badge {
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.stk-pad-title {
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  line-height: 1.2;
}

.stk-pad-sub {
  font-size: 10px;
  opacity: 0.85;
}

/* 9 Cores Vibrantes Super STK */
.pad-c1 { background: radial-gradient(circle at 30% 30%, #ff4b5c, #990014); --pad-color: #ff4b5c; }
.pad-c2 { background: radial-gradient(circle at 30% 30%, #ff8800, #b34700); --pad-color: #ff8800; }
.pad-c3 { background: radial-gradient(circle at 30% 30%, #ffd000, #997c00); --pad-color: #ffd000; color: #000; }
.pad-c4 { background: radial-gradient(circle at 30% 30%, #00e676, #008040); --pad-color: #00e676; color: #000; }
.pad-c5 { background: radial-gradient(circle at 30% 30%, #00e5ff, #007785); --pad-color: #00e5ff; color: #000; }
.pad-c6 { background: radial-gradient(circle at 30% 30%, #2979ff, #0d47a1); --pad-color: #2979ff; }
.pad-c7 { background: radial-gradient(circle at 30% 30%, #a855f7, #581c87); --pad-color: #a855f7; }
.pad-c8 { background: radial-gradient(circle at 30% 30%, #ff2a85, #990044); --pad-color: #ff2a85; }
.pad-c9 { background: radial-gradient(circle at 30% 30%, #ffbb00, #805e00); --pad-color: #ffbb00; color: #000; }

/* ===================================================
   NOVO: ABAS PRINCIPAIS DO APLICATIVO (ÁUDIO VS VÍDEO)
   =================================================== */
.app-nav-tabs {
  display: flex;
  gap: 8px;
  background: #090c13;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #1f273b;
  margin: 10px 24px 0 24px;
}

.nav-tab-btn {
  flex: 1;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.nav-tab-btn:hover {
  background: #151a26;
  color: #fff;
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, #1b2438 0%, #202d47 100%);
  border-color: var(--accent-cyan);
  color: #00f0ff;
  box-shadow: 0 0 16px var(--accent-cyan-glow);
}

.nav-tab-btn.tab-video.active {
  border-color: #ff0077;
  color: #ff0077;
  box-shadow: 0 0 16px rgba(255, 0, 119, 0.4);
}

/* ===================================================
   NOVO: MINI JANELA FLUTUANTE DE VÍDEO NA ABA DE ÁUDIO
   =================================================== */
.pip-video-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: #0b0f19;
  border: 2px solid var(--accent-cyan);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px var(--accent-cyan-glow);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.pip-video-header {
  background: #141b2a;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid #1f2a3f;
}

.pip-video-video {
  width: 100%;
  height: 180px;
  background: #000;
  object-fit: contain;
}

.pip-video-toolbar {
  padding: 6px 10px;
  background: #0f1422;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

/* ===================================================
   NOVO: SUPER STK COM PASTAS LATERAIS & GANHO POR PAD
   =================================================== */
.stk-workspace {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 860px) {
  .stk-workspace {
    grid-template-columns: 1fr;
  }
}

.stk-library-sidebar {
  background: #080b12;
  border: 1px solid #1a2336;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stk-folder-btn {
  background: #101624;
  border: 1px solid #1f2a3f;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.12s;
  text-align: left;
}

.stk-folder-btn:hover, .stk-folder-btn.active {
  background: #1a243a;
  border-color: #00f0ff;
  color: #00f0ff;
}

.stk-folder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #101522;
  border: 1px solid #1c263b;
  border-radius: 6px;
  padding: 6px 8px;
  gap: 6px;
  transition: all 0.12s;
}

.stk-folder-row:hover, .stk-folder-row.active {
  background: #162035;
  border-color: #00f0ff;
}

.stk-folder-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stk-folder-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1d283f;
  color: #00f0ff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-folder-up {
  background: #1e283d;
  border: 1px solid #2d3d5d;
  color: #ffd700;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.btn-folder-up:hover {
  background: #ffd700;
  color: #000;
}

.stk-upload-box {
  background: #0d121f;
  border: 1px dashed #2a3754;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  margin-top: 6px;
}

.stk-upload-box:hover {
  border-color: #ffaa00;
}

.stk-gain-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #070a10;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #172033;
  font-size: 11px;
  margin-top: 8px;
}

/* ===================================================
   NOVO: ABA 2 - EDITOR DE VÍDEO COMPLETO ESTILO CAPCUT
   =================================================== */
.video-editor-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
}

.capcut-top-bar {
  background: #111624;
  border: 1px solid #1f2b45;
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.capcut-aspect-pills {
  display: flex;
  gap: 6px;
}

.aspect-btn {
  background: #171f33;
  border: 1px solid #293859;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.aspect-btn.active {
  background: linear-gradient(135deg, #ff0077, #7928ca);
  border-color: #ff0077;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 0, 119, 0.4);
}

.capcut-preview-area {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}

@media (max-width: 980px) {
  .capcut-preview-area {
    grid-template-columns: 1fr;
  }
}

.capcut-monitor-box {
  background: #06080e;
  border: 1px solid #1a2336;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  position: relative;
  min-height: 420px;
}

.capcut-viewport-frame {
  background: #000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Aspect ratio frames */
.frame-16-9 { width: 100%; max-width: 680px; aspect-ratio: 16 / 9; }
.frame-9-16 { width: 260px; aspect-ratio: 9 / 16; }
.frame-1-1  { width: 380px; aspect-ratio: 1 / 1; }
.frame-4-5  { width: 320px; aspect-ratio: 4 / 5; }

.capcut-video-elem {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.capcut-side-tools {
  background: #0f1422;
  border: 1px solid #1e283d;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.capcut-timeline-box {
  background: #080b12;
  border: 1px solid #1a2336;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.capcut-timeline-tracks {
  background: #0d121c;
  border: 1px solid #161e30;
  border-radius: 6px;
  padding: 10px;
  min-height: 120px;
  overflow-x: auto;
  position: relative;
}

.timeline-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 44px;
}

.timeline-clip-card {
  background: linear-gradient(135deg, #1b263b, #2b3954);
  border: 1px solid #3d4f73;
  border-radius: 6px;
  padding: 6px 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
  user-select: none;
  min-width: 140px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.timeline-clip-card.audio-clip {
  background: linear-gradient(135deg, #0e352b, #134e3f);
  border-color: #10b981;
}

/* ===================================================
   NOVO: FERRAMENTAS AVANÇADAS STK SUPER VÍDEOS
   =================================================== */
.video-text-overlay {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 2px 5px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.8);
  max-width: 90%;
  white-space: pre-wrap;
  word-break: break-word;
  transition: all 0.2s;
  display: none;
}

.video-text-overlay.active {
  display: block;
}

.video-text-bottom { bottom: 18px; }
.video-text-center { top: 50%; transform: translate(-50%, -50%); }
.video-text-top { top: 18px; }

.stk-tool-group {
  background: #090d16;
  border: 1px solid #1c263b;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stk-tool-title {
  font-size: 11px;
  font-weight: 800;
  color: #00f0ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stk-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.stk-folders-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.stk-folders-list::-webkit-scrollbar {
  width: 4px;
}
.stk-folders-list::-webkit-scrollbar-thumb {
  background: #23304c;
  border-radius: 4px;
}

/* ===================================================
   BARRA DE CORTE, AGULHA DE EDIÇÃO & ARRASTAR DO TOPO
   =================================================== */
.video-drag-handle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #19243a;
  border: 1px dashed #3a5078;
  color: #00f0ff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: grab;
  user-select: none;
  transition: all 0.15s ease;
  margin-bottom: 8px;
}

.video-drag-handle-badge:hover {
  background: #223250;
  border-color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.video-drag-handle-badge:active {
  cursor: grabbing;
  background: #2e446d;
}

.video-scrubber-bar-wrap {
  width: 100%;
  max-width: 680px;
  margin-top: 10px;
  background: #090d16;
  border: 1px solid #1c263b;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-scrubber-track {
  width: 100%;
  height: 28px;
  background: #05070c;
  border: 1px solid #222d44;
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
}

.video-scrubber-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 100%;
  background: rgba(0, 240, 255, 0.25);
  border-left: 3px solid #00f0ff;
  border-right: 3px solid #ffd700;
  pointer-events: none;
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.3);
}

.video-scrubber-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.video-scrubber-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 3px;
  background: #ff0055;
  box-shadow: 0 0 10px #ff0055, 0 0 4px #fff;
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 5;
}

.video-trim-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
}

.timeline-clip-card {
  transition: all 0.15s ease;
  position: relative;
}

.timeline-clip-card.dragging {
  opacity: 0.35;
  border-style: dashed;
  transform: scale(0.96);
}

.timeline-clip-card.active-playback {
  border-color: #00f0ff !important;
  box-shadow: 0 0 14px #00f0ff !important;
  background: linear-gradient(135deg, #16364d, #1c4b6e) !important;
}

.timeline-drop-target {
  border: 2px dashed #00f0ff !important;
  background: rgba(0, 240, 255, 0.12) !important;
}

.clip-order-btns {
  display: flex;
  gap: 2px;
}

.btn-order-move {
  background: #172134;
  border: 1px solid #283959;
  color: #fff;
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
}

.btn-order-move:hover {
  background: #00f0ff;
  color: #000;
}


/* ==========================================================================
   GRAVADOR DE TELA, SOM & CÂMERA BOLINHA PIP (FRONTAL / TRASEIRA)
   ========================================================================== */
.screen-rec-suite {
  background: linear-gradient(135deg, #091322 0%, #0d1e36 100%);
  border: 1px solid #1e3a66;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rec-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-rec-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #283959;
  background: #101826;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-rec-action:hover {
  background: #17243b;
  border-color: #38bdf8;
  color: #fff;
}

.btn-rec-action.recording {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ff0055 !important;
  animation: pulseRec 1s infinite alternate;
}

@keyframes pulseRec {
  from { box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 20px rgba(239, 68, 68, 0.9); }
}

.rec-timer-badge {
  font-family: 'Consolas', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  display: none;
}

/* Bolinha Flutuante da Câmera (PiP) */
.pip-camera-circle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid #00f0ff;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.5), 0 10px 30px rgba(0,0,0,0.8);
  overflow: hidden;
  z-index: 999999;
  background: #000;
  cursor: move;
  touch-action: none;
  display: none;
}

.pip-camera-circle video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(1);
}

.pip-camera-circle.mirrored video {
  transform: scaleX(-1);
}

.pip-camera-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.4);
}

.pip-camera-controls {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.pip-camera-circle:hover .pip-camera-controls {
  opacity: 1;
}

.pip-ctrl-btn {
  background: rgba(0,0,0,0.75);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pip-ctrl-btn:hover {
  background: #00f0ff;
  color: #000;
}

/* ==========================================================================
   MIXER DE DISCO REDONDO (VINYL DJ TURNTABLE PLATTER)
   ========================================================================== */
.turntable-panel {
  background: radial-gradient(circle at center, #121929 0%, #060911 100%);
  border: 1px solid #1f2f4d;
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  color: #e2e8f0;
}

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

.turntable-deck {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.vinyl-chassis {
  width: 270px;
  height: 270px;
  background: #0d111a;
  border: 2px solid #233554;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 0 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(0, 240, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}

.vinyl-disc {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1a1a 0%, #0d0d0d 40%, #151515 70%, #050505 100%);
  position: relative;
  box-shadow: 0 0 15px rgba(0,0,0,0.9);
  cursor: grab;
  touch-action: none;
  transition: transform 0.05s linear;
}

.vinyl-disc:active {
  cursor: grabbing;
}

.vinyl-disc.spinning {
  animation: spinVinyl 1.8s linear infinite;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-grooves {
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 8px rgba(0,0,0,0.7),
              inset 0 0 0 16px rgba(255,255,255,0.03),
              inset 0 0 0 28px rgba(0,0,0,0.8),
              inset 0 0 0 38px rgba(255,255,255,0.04),
              inset 0 0 0 54px rgba(0,0,0,0.85);
  pointer-events: none;
}

.vinyl-center-label {
  position: absolute;
  width: 82px;
  height: 82px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ff0055 0%, #88002a 100%);
  border: 2px solid #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.8);
  pointer-events: none;
}

.vinyl-spindle-hole {
  width: 14px;
  height: 14px;
  background: #e2e8f0;
  border-radius: 50%;
  box-shadow: inset 0 0 4px #000;
  margin-top: 2px;
}

.vinyl-label-txt {
  font-size: 8px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px #000;
}

.turntable-controls-rack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 220px;
}

.pitch-fader-card {
  background: #090e18;
  border: 1px solid #1b2942;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deck-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-deck {
  flex: 1;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  border: 1px solid #233554;
  background: #0f1828;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-deck:hover {
  background: #17243c;
  border-color: #00f0ff;
  color: #00f0ff;
}

.btn-deck.cue-active {
  background: #f59e0b !important;
  color: #000 !important;
  border-color: #f59e0b !important;
}

.btn-deck.play-active {
  background: #10b981 !important;
  color: #000 !important;
  border-color: #10b981 !important;
}

/* ==========================================================================
   LINHA HORIZONTAL MULTI-ÁUDIO (TIMELINE DE TRILHAS ADICIONAIS)
   ========================================================================== */
.multi-audio-rack {
  background: #080d16;
  border: 1px solid #1a2a44;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}

.multi-audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #16243a;
}

.multi-audio-track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-track-item {
  background: linear-gradient(135deg, #0d1624, #08101a);
  border: 1px solid #1e3352;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.audio-track-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  min-width: 120px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-trim-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.audio-trim-input {
  width: 54px;
  background: #04070d;
  border: 1px solid #233554;
  color: #00f0ff;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  text-align: center;
  font-family: monospace;
}

/* ==========================================================================
   GALERIA DE PRINTS E EDITOR DE FOTOS / CRIADOR DE CAPAS (THUMBNAILS)
   ========================================================================== */
.photo-cover-suite {
  background: #080d16;
  border: 1px solid #1a2a44;
  border-radius: 12px;
  padding: 18px;
  margin-top: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.photo-editor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 14px;
}

@media (min-width: 860px) {
  .photo-editor-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.photo-canvas-wrap {
  background: #03050a;
  border: 1px solid #1e2c44;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: 440px;
  position: relative;
}

.photo-canvas-wrap canvas {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.photo-controls-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #22334e;
  background: #0d1522;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover, .filter-chip.active {
  background: #00f0ff;
  color: #000;
  border-color: #00f0ff;
}

.prints-gallery-shelf {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 6px;
  scrollbar-width: thin;
}

.print-thumb-card {
  flex: 0 0 110px;
  height: 70px;
  border-radius: 6px;
  border: 1px solid #233554;
  background: #000;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s;
}

.print-thumb-card:hover {
  transform: scale(1.05);
  border-color: #00f0ff;
}

.print-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   MODAL DE IMPORTAÇÃO DE MÍDIA COMPARTILHADA (YOURKUT / CHAT / SHOP)
   ========================================================================== */
.stk-hub-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.stk-hub-modal-card {
  background: #0b1220;
  border: 1px solid #1e3a66;
  border-radius: 14px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.8);
}


/* ==========================================================================
   MODAL POP-UP: ESTÚDIO COMPLETO DE GRAVAÇÃO (TELA + CÂMERAS + ÁUDIO MIX)
   ========================================================================== */
.stk-rec-studio-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 6, 14, 0.94);
  backdrop-filter: blur(12px);
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.stk-rec-studio-card {
  background: #080f1d;
  border: 1px solid #1e3a66;
  border-radius: 16px;
  width: 100%;
  max-width: 980px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.85);
  color: #e2e8f0;
}

.studio-modal-head {
  padding: 14px 20px;
  background: #0d182e;
  border-bottom: 1px solid #1a2f52;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.studio-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 820px) {
  .studio-modal-body {
    grid-template-columns: 1.25fr 0.75fr;
  }
}

.studio-monitor-wrap {
  background: #020408;
  border: 1px solid #172844;
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.9);
}

.studio-monitor-wrap.vertical-aspect {
  aspect-ratio: 9/16;
  max-height: 480px;
  margin: 0 auto;
}

.studio-monitor-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.studio-monitor-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.studio-rec-tag {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  display: none;
  animation: pulseRec 1s infinite alternate;
}

.studio-ctrl-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-box-section {
  background: #0b1424;
  border: 1px solid #1a2c47;
  border-radius: 10px;
  padding: 12px 14px;
}

.studio-box-title {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-btn-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.studio-chip-btn {
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid #233554;
  background: #111c30;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}

.studio-chip-btn:hover, .studio-chip-btn.active {
  background: #00f0ff;
  color: #000;
  border-color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.studio-select {
  width: 100%;
  box-sizing: border-box;
  background: #060b14;
  border: 1px solid #1e3352;
  color: #fff;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  margin-top: 6px;
}

.studio-audio-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  margin: 6px 0;
  cursor: pointer;
}

.studio-audio-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00f0ff;
}

.studio-actions-footer {
  padding: 14px 20px;
  background: #0a1120;
  border-top: 1px solid #172740;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* GPT 2026-10-26: fluxos mobile reais, sem reduzir toda a pagina por zoom. */
.studio-layout,.media-workspace,.capcut-workspace,.studio-modal-body{min-width:0}
.studio-layout>*,.media-workspace>*,.studio-modal-body>*{min-width:0}
@media(max-width:980px){
 html,body{width:100%;max-width:100%;min-width:0}
 header{position:relative;flex-wrap:wrap;justify-content:flex-start;gap:12px;padding:12px}
 header>div{min-width:0;max-width:100%}
 .logo-wrap{flex:1 1 100%;flex-wrap:wrap;gap:8px}
 .logo-wrap>div:last-child{flex:1 1 150px;min-width:0}
 .logo-badge{font-size:12px;white-space:nowrap}
 .app-title{font-size:17px}.app-subtitle{font-size:10px;line-height:1.5;overflow-wrap:anywhere}
 .transport-controls{flex:1 1 100%;flex-wrap:wrap;gap:8px}
 .export-options-bar{width:100%;gap:6px}
 .export-options-bar button{min-height:40px;flex:1 1 70px;justify-content:center;font-size:11px}
 .export-options-bar #btnTopBarRecordVideo{flex:1 1 100%;margin-right:0!important}
 .app-nav-tabs{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:10px}
 .app-nav-tabs>*{min-width:0;margin:0!important;padding:10px!important;white-space:normal;text-align:center;justify-content:center;font-size:12px;line-height:1.4}
 .studio-layout{width:100%;max-width:100%;padding:12px;gap:12px;grid-template-columns:minmax(0,1fr)}
 .panel,.panel-body,.panel-content,.info-guide,.meter-strip,.capcut-main-layout{min-width:0;max-width:100%}
 .info-guide{overflow-wrap:anywhere;line-height:1.55}
 .meter-strip{flex-wrap:wrap}.meter-channels{min-width:0;flex:1 1 160px}
 .controls-grid,.capcut-main-layout,.cover-editor-grid{grid-template-columns:minmax(0,1fr)!important}
 .waveform-canvas-container,.piano-container,.sequencer-grid{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .stk-rec-studio-modal{padding:6px;align-items:flex-start;overflow:auto}
 .stk-rec-studio-card{min-width:0;max-height:calc(100dvh - 12px);width:100%}
 .studio-modal-head{padding:10px;gap:8px;flex-shrink:0}
 .studio-modal-head>div{min-width:0;max-width:100%;flex-wrap:wrap}
 #studioModalHeading{font-size:13px!important;line-height:1.4}
 .studio-modal-body{padding:10px;min-height:0;grid-template-columns:minmax(0,1fr);gap:12px}
 .studio-monitor-wrap{min-width:0;width:100%;max-width:100%}
 .studio-ctrl-panel,.studio-box-section{min-width:0;max-width:100%}
 .studio-box-section{padding:10px}.studio-box-title{flex-wrap:wrap}
 .studio-btn-row>*{min-width:0;max-width:100%;min-height:42px;white-space:normal}
 .studio-select{width:100%;max-width:100%}.studio-chip-btn{font-size:12px;line-height:1.4}
 #btnCloseStudioModal{min-height:42px}#stkRecordFloating{right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom,0px))!important}
}
@media(max-width:480px){
 .panel{padding:12px}.panel-header{gap:8px;flex-wrap:wrap}
 .knob-grid,.fx-grid,.pads-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .controls-grid{grid-template-columns:minmax(0,1fr)!important}
 .capcut-top-bar{flex-wrap:wrap;gap:8px}.capcut-top-bar>*{min-width:0;max-width:100%}
 input,select,textarea{max-width:100%}
}
@media(max-width:980px){
 .stk-workspace{min-width:0;grid-template-columns:minmax(0,1fr)}
 .stk-workspace>*,.stk-library-sidebar,.stk-library-sidebar>*,.stk-tools-grid>*{min-width:0;max-width:100%}
 .stk-library-sidebar select{min-width:0;width:100%}
 .stk-grid-3x3{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .stk-pad{min-width:0;padding:8px;overflow-wrap:anywhere;font-size:11px}
 .radar-header,.radar-legends{flex-wrap:wrap;min-width:0}
 .modal-overlay{max-width:100vw}.modal-card{min-width:0;max-width:calc(100vw - 20px)}
}