/* ==========================================================================
   REPTARAUDIO - ESTILOS OFICIALES HOMOLOGADOS (TEMA ÁMBAR / ORO NEÓN #F59E0B)
   Suite MicroSaaS Reptar: 100% Homologado con ReptarImage, ReptarPDF, ReptarConvert
   ========================================================================== */

/* 1. VARIABLES DE COLOR Y SOMBRAS CALIBRADAS AL LOGOTIPO */
:root,
[data-theme="light"] {
  --primary: #d97706 !important;
  --primary-dark: #b45309 !important;
  --primary-hover: #f59e0b !important;
  --primary-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  --primary-glow: rgba(217, 119, 6, 0.25) !important;
  --primary-light: rgba(245, 158, 11, 0.08) !important;
  --border-highlight: rgba(217, 119, 6, 0.35) !important;
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.08);

  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --radius: 14px;
}

[data-theme="dark"] {
  --primary: #f59e0b !important;
  --primary-dark: #d97706 !important;
  --primary-hover: #fbbf24 !important;
  --primary-gradient: linear-gradient(135deg, #fbbf24 0%, #b45309 100%) !important;
  --primary-glow: rgba(245, 158, 11, 0.32) !important;
  --primary-light: rgba(245, 158, 11, 0.12) !important;
  --border-highlight: rgba(245, 158, 11, 0.45) !important;

  --bg: #0b0f19;
  --bg-card: #151c2c;
  --bg-card-hover: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #232e42;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

body {
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text) !important;
}

/* Tool intro header homologado */
.tool-intro-header {
  margin: 0 auto 24px auto !important;
  text-align: center !important;
}

.tool-intro-header .section-title {
  font-size: 1.85rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin-bottom: 8px !important;
  letter-spacing: -0.02em !important;
}

.tool-intro-header .section-desc {
  font-size: 0.96rem !important;
  color: var(--text-muted) !important;
  max-width: 820px !important;
  margin: 0 auto !important;
  line-height: 1.55 !important;
}

/* 2. LOGO Y NAVBAR */
.brand-logo {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  font-weight: 800 !important;
  font-size: 1.35rem !important;
  color: var(--text) !important;
  text-decoration: none !important;
}

.brand-logo .logo-img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 9px;
  object-fit: cover !important;
  filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.brand-logo .logo-text {
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  font-size: 1.35rem !important;
  color: var(--text) !important;
}

.brand-logo .logo-accent {
  color: var(--primary) !important;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary) !important;
}

.nav-donate-link {
  color: var(--primary) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  background: rgba(245, 158, 11, 0.06) !important;
  border-radius: 9999px !important;
  padding: 5px 14px !important;
  transition: all 0.2s ease !important;
}

.nav-donate-link:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}

.nav-dropdown-btn {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  border-radius: 9999px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s ease !important;
}

.nav-dropdown-btn:hover,
.nav-dropdown.open .nav-dropdown-btn {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}

.dropdown-item:hover {
  background: var(--primary-light) !important;
  border-color: var(--border-highlight) !important;
}

/* 3. HERO SECTION */
.hero-main-logo {
  width: 290px;
  height: 290px;
  max-width: 100%;
  border-radius: 36px;
  object-fit: cover;
  box-shadow: 0 18px 45px -8px var(--primary-glow), 0 0 0 1px rgba(245, 158, 11, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.hero-main-logo:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 55px -6px var(--primary-glow), 0 0 0 2px var(--primary);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-highlight);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

/* 4. HERRAMIENTAS - PESTAÑAS NAVEGADORAS */
.audio-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2rem;
}

.audio-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.audio-tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 18px var(--primary-glow);
  transform: translateY(-2px);
}

.audio-tab-btn.active svg {
  stroke: #ffffff;
}

/* 5. DROPZONE HOMOLOGADA */
.audio-dropzone {
  border: 2.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.audio-dropzone:hover,
.audio-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.008);
  box-shadow: 0 10px 30px var(--primary-glow);
}

.dropzone-icon-squircle {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 6px 20px var(--primary-glow);
  border: 1px solid var(--border-highlight);
  transition: transform 0.25s ease;
}

.audio-dropzone:hover .dropzone-icon-squircle {
  transform: scale(1.1) rotate(-3deg);
}

/* 6. WAVEFORM CANVAS Y CONTROLES */
.waveform-container {
  background: #080d1a;
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

#waveform-canvas {
  width: 100%;
  height: 140px;
  display: block;
  border-radius: 8px;
  cursor: crosshair;
}

.waveform-timecode {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.85rem;
  margin-top: 10px;
}

.timecode-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* 7. CONTROLES DE REPRODUCCIÓN Y CORTE */
.audio-player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0;
}

.playback-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s ease;
}

.playback-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.08);
}

.playback-btn.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.trim-range-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 14px;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

/* 8. GRABADORA DE VOZ */
.recorder-card {
  text-align: center;
  padding: 36px 20px;
}

.rec-mic-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: 4px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  cursor: pointer;
  box-shadow: 0 8px 28px var(--primary-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.rec-mic-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 36px var(--primary-glow);
}

.rec-mic-btn.recording {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: pulse-red 1.2s infinite;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.45);
}

@keyframes pulse-red {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.06); box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.rec-timer {
  font-family: monospace;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

/* 9. LISTA DE PISTAS PARA UNIR (AUDIO JOINER) */
.joiner-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.joiner-track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.joiner-track-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.track-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-index {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-item-actions {
  display: flex;
  gap: 6px;
}

.track-action-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.track-action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.track-action-btn.delete:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* 10. BOTONES DE ACCIÓN */
.btn-primary-audio {
  background: var(--primary-gradient);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 18px var(--primary-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-audio:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-primary-audio:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* 11. PREGUNTAS FRECUENTES (FAQ ACORDEÓN HOMOLOGADO) */
.faq-accordion, .faq-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  max-width: 820px !important;
  margin: 0 auto !important;
}

.faq-item {
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  background: var(--bg-card) !important;
  overflow: hidden !important;
  transition: all 0.2s ease !important;
}

.faq-item:hover {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow) !important;
}

.faq-question {
  width: 100% !important;
  text-align: left !important;
  padding: 16px 20px !important;
  font-weight: 750 !important;
  font-size: 0.98rem !important;
  border: none !important;
  background: transparent !important;
  color: var(--text) !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  user-select: none !important;
}

.faq-chevron, .faq-icon, .faq-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  transition: transform 0.25s ease, color 0.25s ease !important;
  flex-shrink: 0 !important;
}

.faq-item.open .faq-chevron,
.faq-item.open .faq-icon,
.faq-item.open .faq-arrow,
.faq-item.active .faq-chevron,
.faq-item.active .faq-icon,
.faq-item.active .faq-arrow {
  transform: rotate(45deg) !important;
  color: var(--primary) !important;
}

.faq-answer {
  display: none !important;
  padding: 0 20px 16px !important;
  color: var(--text-muted) !important;
  font-size: 0.91rem !important;
  line-height: 1.6 !important;
}

.faq-item.open .faq-answer,
.faq-item.active .faq-answer {
  display: block !important;
  animation: faqFadeIn 0.22s ease-out forwards;
}

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

/* Feature cards y Security Banner */
.feature-card, .feature-box {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.security-banner {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

#btn-remove-audio:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}

/* Real-Time Audio Effect Preview */
.btn-preview-effect {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-preview-effect:hover {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: var(--primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}

.btn-preview-effect:active {
  transform: translateY(0);
}

.btn-preview-effect.active-preview {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25), 0 4px 14px rgba(245, 158, 11, 0.35) !important;
  animation: previewPulse 2s infinite ease-in-out;
}

@keyframes previewPulse {
  0% { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), 0 4px 12px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.35), 0 6px 18px rgba(245, 158, 11, 0.4); }
  100% { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), 0 4px 12px rgba(245, 158, 11, 0.25); }
}

#btn-effects-compare-ab.comparing-original {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3) !important;
}

/* Audio Format Cards & Compression Preset Cards */
.audio-format-card,
.audio-compress-preset {
  user-select: none;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-format-card:hover,
.audio-compress-preset:hover {
  transform: translateY(-2px);
  border-color: var(--primary) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.audio-format-card.active,
.audio-compress-preset.active {
  border-color: var(--primary) !important;
  background: rgba(245, 158, 11, 0.06) !important;
  box-shadow: 0 0 0 1px var(--primary), 0 6px 20px rgba(245, 158, 11, 0.15) !important;
}
