/* ==========================================================================
   Voice Studio Brasil AI - DESIGN SYSTEM & STYLES (Vanilla CSS)
   ========================================================================== */

:root {
  --bg-main: #060913;
  --bg-card: rgba(13, 20, 38, 0.75);
  --bg-card-header: rgba(18, 28, 54, 0.9);
  --bg-input: #090e1d;
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: #3b82f6;
  
  /* Cores de Destaque */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  
  /* Fontes */
  --font-family-body: 'Inter', sans-serif;
  --font-family-title: 'Outfit', sans-serif;
  
  /* Efeitos */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --neon-glow-blue: 0 0 15px rgba(59, 130, 246, 0.4);
  --neon-glow-cyan: 0 0 15px rgba(6, 182, 212, 0.4);
  --transition-speed: 0.2s;
}

/* Reset e Configurações Globais */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family-body);
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
  padding: 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* App Container Layout */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   CABECALHO
   ========================================================================== */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: var(--neon-glow-blue);
}

.header-brand h1 {
  font-family: var(--font-family-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.accent-text {
  color: var(--accent-blue);
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.sub-brand {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: -2px;
}

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

/* Badges e Status */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.status-online {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.2);
}

.status-offline {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.status-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* ==========================================================================
   CARDS E ELEMENTOS COMUNS
   ========================================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-header-small {
  padding: 16px 20px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
}

.card-header-small h3 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.card-header-small p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Botões */
button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-family-body);
  transition: all var(--transition-speed) ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: var(--neon-glow-blue);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--neon-glow-cyan);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-danger-icon:hover {
  background: var(--color-danger);
  color: #fff;
}

.btn-secondary-icon {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary-icon:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger-outline {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
}

.btn-danger-outline:hover {
  background: var(--color-danger);
  color: #fff;
}

.btn-success {
  background: var(--color-success);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-success:hover {
  filter: brightness(1.1);
}

/* ==========================================================================
   LAYOUT CORE: COLUNAS
   ========================================================================== */
.main-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   COLUNA ESQUERDA: COMPONENTES
   ========================================================================== */

/* Exemplos Rapidos */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
}

.example-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.example-btn:hover {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.example-btn strong {
  font-size: 13px;
  color: var(--text-main);
}

.example-btn span {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Editor de Texto */
.card-header-editor {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
}

.card-header-editor h3 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-metrics {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.editor-metrics .separator {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.1);
}

.editor-wrapper {
  padding: 16px;
  background: var(--bg-input);
}

#script-textarea {
  width: 100%;
  height: 250px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--text-main);
  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
}

.editor-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card-header);
  border-top: 1px solid var(--border-color);
}

.duration-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-generate {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--neon-glow-blue);
}

.btn-generate:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.btn-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Custom Player e Status de Geração */
.card-player-status {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  position: relative;
}

/* Placeholder */
.player-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 480px;
}

.disk-spinner {
  font-size: 44px;
  color: var(--text-muted);
  animation: none;
}

.player-placeholder h4 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
}

.player-placeholder p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Progresso de Geracao */
.generation-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.spinner-neon {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(6, 182, 212, 0.1);
  border-left-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

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

.generation-progress h4 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  box-shadow: 0 0 8px var(--accent-cyan);
  transition: width 0.3s ease;
}

.generation-progress p {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-cancel {
  background: transparent;
  color: var(--color-danger);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 4px;
}

.btn-cancel:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Custom Player */
.custom-player {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.player-visualizer {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.wave-animation {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  width: 40px;
}

.wave-animation .bar {
  width: 3px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 2px;
  transition: height 0.1s ease;
}

/* Mock de animação de onda ao tocar */
.custom-player.playing .wave-animation .bar {
  animation: wave 1.2s ease-in-out infinite alternate;
}

.custom-player.playing .wave-animation .bar:nth-child(2) { animation-delay: 0.1s; }
.custom-player.playing .wave-animation .bar:nth-child(3) { animation-delay: 0.25s; }
.custom-player.playing .wave-animation .bar:nth-child(4) { animation-delay: 0.05s; }
.custom-player.playing .wave-animation .bar:nth-child(5) { animation-delay: 0.4s; }
.custom-player.playing .wave-animation .bar:nth-child(6) { animation-delay: 0.15s; }
.custom-player.playing .wave-animation .bar:nth-child(7) { animation-delay: 0.3s; }
.custom-player.playing .wave-animation .bar:nth-child(8) { animation-delay: 0.2s; }
.custom-player.playing .wave-animation .bar:nth-child(9) { animation-delay: 0.35s; }
.custom-player.playing .wave-animation .bar:nth-child(10) { animation-delay: 0.1s; }

@keyframes wave {
  0% { height: 4px; }
  100% { height: 22px; }
}

.audio-metadata h4 {
  font-family: var(--font-family-title);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.audio-metadata p {
  font-size: 11px;
  color: var(--text-muted);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.btn-play-pause {
  width: 44px;
  height: 44px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--neon-glow-blue);
}

.btn-play-pause:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

.seek-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.seek-container span {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
  min-width: 32px;
}

/* Volume Slider */
.volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 110px;
}

.btn-icon {
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px;
}

.btn-icon:hover {
  color: var(--text-main);
}

/* Controles de velocidade e ações do player */
.player-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.play-speed-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-speed-control label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.play-speed-control select {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

/* Biblioteca de Tags */
.card-header-tags {
  padding: 16px 20px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
}

.card-header-tags h3 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
}

.card-header-tags p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tag-search {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
}

.tag-search i {
  color: var(--text-muted);
  font-size: 13px;
}

.tag-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 12px;
  width: 100%;
}

.tag-categories {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  max-height: 380px;
  overflow-y: auto;
}

.tags-section h4 {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-btn:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.star-icon {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 2px;
}

.star-icon.active, .star-icon:hover {
  color: var(--color-warning);
  font-weight: 900;
}

.tags-footer {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid var(--border-color);
}

.tags-footer p {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   COLUNA DIREITA: COMPONENTES
   ========================================================================== */

/* Configuracao de Vozes */
.card-header-voices {
  padding: 16px 20px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.voices-title h3 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
}

.voices-title p {
  font-size: 11px;
  color: var(--text-muted);
}

.voices-mode-switch {
  display: flex;
  background: var(--bg-input);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.mode-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border-radius: 6px;
}

.mode-btn.active {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: var(--neon-glow-blue);
}

.info-alert-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--text-main);
  padding: 12px 16px;
  margin: 16px 16px 0;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  line-height: 1.5;
}

.info-alert-box i {
  color: var(--accent-blue);
  font-size: 14px;
  margin-top: 1px;
}

/* Container do Locutor */
.speakers-list-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 520px;
  overflow-y: auto;
}

.speaker-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.speaker-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

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

.speaker-num {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.speaker-alias-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-main);
  font-family: var(--font-family-title);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 4px;
  width: 140px;
  outline: none;
}

.speaker-alias-input:focus {
  border-bottom-color: var(--accent-blue);
}

.speaker-actions-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speaker-actions-header button {
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
}

.speaker-actions-header button:hover {
  color: var(--text-main);
}

.speaker-actions-header .btn-delete-speaker:hover {
  color: var(--color-danger);
}

/* Narrador Banco Dropdown */
.narrator-preset-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.narrator-preset-box label {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 32px 10px 12px;
  font-size: 13px;
  outline: none;
  appearance: none;
}

select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* Vozes Base */
.voice-base-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-base-section label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

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

.voice-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.voice-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.voice-btn.active {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: var(--neon-glow-blue);
}

.voice-btn .voice-name {
  font-size: 11px;
  font-weight: 600;
}

.voice-btn .voice-gender {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 700;
}

.voice-btn.active .voice-gender {
  color: var(--accent-blue);
}

/* Sintonia do locutor card */
.speaker-sintonia-box {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.sintonia-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sintonia-label {
  color: var(--text-muted);
}

.sintonia-tag {
  color: var(--accent-blue);
  letter-spacing: 0.5px;
}

.speaker-sintonia-box p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.btn-test-voice {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 600;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-test-voice:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn-test-voice.playing {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Emoção e Tom Dropdowns do Locutor */
.speaker-dropdowns-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.speaker-dropdowns-row label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.speaker-dropdowns-row select {
  padding: 8px 24px 8px 10px;
  font-size: 12px;
}

.multi-voice-actions {
  padding: 0 16px 16px;
}

.btn-add-speaker {
  width: 100%;
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 13px;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-speaker:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-blue);
}

/* Ajustes Globais Form */
.settings-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group > label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.field-hint {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.3;
}

#custom-accent-input {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  outline: none;
}

#custom-accent-input:focus {
  border-color: var(--accent-blue);
}

/* Sliders customizados */
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.slider-header label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.slider-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Estilização básica do input range */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  outline: none;
}

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

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-cyan);
  box-shadow: var(--neon-glow-cyan);
}

/* Direcoes adicionais textarea */
#global-instructions {
  width: 100%;
  height: 64px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  outline: none;
  resize: none;
}

#global-instructions:focus {
  border-color: var(--accent-blue);
}

/* ==========================================================================
   HISTORICO DE GRAVAÇÕES
   ========================================================================== */
.card-history {
  margin-top: 10px;
}

.card-header-history {
  padding: 16px 20px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-title h3 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
}

.history-title p {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-danger-link {
  background: transparent;
  color: var(--color-danger);
  font-size: 12px;
  font-weight: 600;
}

.btn-danger-link:hover {
  text-decoration: underline;
}

.info-warning-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--text-main);
  padding: 12px 16px;
  margin: 16px 16px 0;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  line-height: 1.5;
}

.info-warning-box i {
  color: var(--color-warning);
  font-size: 14px;
  margin-top: 1px;
}

.history-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.no-history-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  gap: 10px;
}

.no-history-placeholder i {
  font-size: 32px;
}

.no-history-placeholder p {
  font-size: 12px;
}

/* Item do Historico */
.history-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.history-item-voice-badge {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.history-item-text {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.history-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-tag {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.history-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.left-actions, .right-actions {
  display: flex;
  gap: 8px;
}

.btn-history-play, .btn-history-download {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-history-play {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-history-play:hover {
  background: var(--accent-blue);
  color: #fff;
}

.btn-history-download {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-history-download:hover {
  background: var(--color-success);
  color: #fff;
}

.btn-history-restore, .btn-history-delete {
  background: transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid transparent;
}

.btn-history-restore:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-history-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   RODAPE
   ========================================================================== */
.main-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: 10px;
}

.gemini-brand {
  font-family: var(--font-family-title);
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   MODAL DE CHAVE DE API
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-btn {
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-body p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-body input {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  margin-top: 6px;
}

.modal-body input:focus {
  border-color: var(--accent-blue);
  box-shadow: var(--neon-glow-blue);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* ==========================================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  
  body {
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    text-align: center;
  }
  
  .header-brand {
    justify-content: center;
  }
  
  .header-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .examples-grid {
    grid-template-columns: 1fr;
  }
  
  .voices-btn-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .speaker-dropdowns-row {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .main-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ==========================================================================
   CLONAGEM DE VOZ (ELEVENLABS) - ESTILOS
   ========================================================================== */
.card-clone {
  margin-bottom: 0px;
}

.file-upload-wrapper {
  transition: all var(--transition-speed) ease;
}

.file-upload-wrapper:hover {
  border-color: var(--accent-blue) !important;
  background: rgba(59, 130, 246, 0.03);
}

.file-upload-wrapper.dragover {
  border-color: var(--accent-cyan) !important;
  background: rgba(6, 182, 212, 0.05);
}

.custom-voice-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-speed) ease;
}

.custom-voice-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.custom-voice-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}

.custom-voice-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
}

.custom-voice-id {
  font-size: 9px;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.btn-delete-custom-voice {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 12px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition-speed);
}

.btn-delete-custom-voice:hover {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
}
