/* ==============================================================================
   ECO NARRATIVO - HOJA DE ESTILOS DE PRODUCCIÓN PROFESIONAL (styles.css)
   Paleta oficial "Sapphire nightfall whisper":
     - #0474C4 : Azul Zafiro Vibrante (Acento primario, acción, iluminación)
     - #5379AE : Azul Pizarra / Acero (Bordes refinados, controles secundarios)
     - #2C444C : Verde Carbón / Petróleo (Tarjetas oscuras, contraste dramático)
     - #A8C4EC : Azul Hielo Celeste (Brillos, tipografía secundaria, badges)
     - #06457F : Azul Marino Zafiro Profundo (Cabeceras, gradientes y navegación)
     - #262B40 : Azul Medianoche Carbón (Lienzo base global)
   Acento de Dirección:
     - #F59E0B / #D97706 : Ámbar Dorado (Panel Maestro de la Directora)
   Tipografía: Lato (Google Fonts)
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700&display=swap');

:root {
  --color-sapphire: #0474c4;
  --color-slate-blue: #5379ae;
  --color-teal-charcoal: #2c444c;
  --color-ice-blue: #a8c4ec;
  --color-navy-deep: #06457f;
  --color-midnight: #262b40;
  
  --color-gold: #f59e0b;
  --color-gold-dark: #b45309;
  --color-emerald: #10b981;
  --color-rose: #f43f5e;
  --color-amber-glow: #fbbf24;

  /* Superficies */
  --bg-dark: #262b40;
  --bg-surface: #1e2233;
  --bg-card: rgba(44, 68, 76, 0.45);
  --bg-card-hover: rgba(44, 68, 76, 0.7);
  --border-subtle: rgba(168, 196, 236, 0.18);
  --border-focus: #0474c4;

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #8fa6c5;

  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
  --shadow-lg: 0 15px 35px -10px rgba(4, 116, 196, 0.35);
  --shadow-gold: 0 10px 30px -8px rgba(245, 158, 11, 0.35);
}

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-midnight);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Fondo atmosférico sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 10% 15%, rgba(4, 116, 196, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(6, 69, 127, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(44, 68, 76, 0.25) 0%, transparent 65%);
  pointer-events: none;
  z-index: -1;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 { font-size: 2.75rem; font-weight: 900; }
h2 { font-size: 2.1rem; margin-bottom: 0.65rem; }
h3 { font-size: 1.35rem; }

p {
  color: #e2e8f0;
  margin-bottom: 1rem;
}

a {
  color: var(--color-ice-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #ffffff;
}

.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-sapphire), var(--color-navy-deep));
  color: #ffffff;
  border-color: rgba(168, 196, 236, 0.35);
  box-shadow: 0 4px 15px rgba(4, 116, 196, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #058ce9, var(--color-sapphire));
  box-shadow: 0 6px 20px rgba(4, 116, 196, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(44, 68, 76, 0.65);
  color: var(--color-ice-blue);
  border-color: var(--color-slate-blue);
}

.btn-secondary:hover {
  background: rgba(83, 121, 174, 0.35);
  color: #ffffff;
  border-color: var(--color-ice-blue);
}

.btn-outline {
  background: transparent;
  color: var(--color-ice-blue);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(4, 116, 196, 0.15);
  border-color: var(--color-sapphire);
  color: #ffffff;
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #ffffff;
  border-color: rgba(253, 230, 138, 0.4);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #047857);
  color: #ffffff;
  border-color: rgba(110, 231, 183, 0.4);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
}

.btn-danger:hover {
  background: #f43f5e;
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
}

.badge-sapphire {
  background: rgba(4, 116, 196, 0.22);
  color: var(--color-ice-blue);
  border: 1px solid rgba(4, 116, 196, 0.4);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-rose {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Header de la Plataforma */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(38, 43, 64, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-sapphire), var(--color-navy-deep));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(4, 116, 196, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0.35rem 0;
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-sapphire);
  border-radius: 2px;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(6, 69, 127, 0.45);
  border: 1px solid var(--color-sapphire);
  border-radius: 9999px;
  font-size: 0.82rem;
  color: var(--color-ice-blue);
  margin-bottom: 1.5rem;
}

.hero-title {
  max-width: 960px;
  margin: 0 auto 1.25rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #ffffff 25%, var(--color-ice-blue) 75%, var(--color-sapphire) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 760px;
  margin: 0 auto 2.25rem;
  font-size: 1.15rem;
  color: var(--color-ice-blue);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* Secciones Generales */
.section-wrap {
  padding: 4.5rem 0;
  border-top: 1px solid rgba(168, 196, 236, 0.1);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-subtitle {
  color: var(--color-ice-blue);
  font-size: 0.98rem;
  max-width: 650px;
}

/* ==============================================================================
   PANEL MAESTRO DE LA DIRECTORA (Inyección Exclusiva para rol 'admin')
   ============================================================================== */
.director-master-panel {
  background: linear-gradient(180deg, rgba(30, 34, 51, 0.98), rgba(20, 24, 38, 0.98));
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin: 2.5rem 0;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), var(--shadow-gold);
  position: relative;
}

.director-master-panel::before {
  content: 'SISTEMA DE MANDO SUPREMO &bull; ACCESO EXCLUSIVO DE LA DIRECTORA';
  position: absolute;
  top: -12px;
  left: 24px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-dark));
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.director-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}

.director-nav-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.director-tab-btn {
  background: rgba(44, 68, 76, 0.5);
  border: 1px solid var(--color-slate-blue);
  color: var(--color-ice-blue);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
}

.director-tab-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--color-gold);
  color: #ffffff;
}

.director-tab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #ffffff;
  border-color: var(--color-gold);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* Tablas del Panel Maestro */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 0.75rem;
}

.admin-table th {
  text-align: left;
  padding: 0.8rem 1rem;
  background: rgba(44, 68, 76, 0.5);
  color: var(--color-ice-blue);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(168, 196, 236, 0.1);
  color: #e2e8f0;
  vertical-align: middle;
}

.admin-table tr:hover {
  background: rgba(83, 121, 174, 0.12);
}

/* Switches para Visibilidad de Estudios */
.switch-pill {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-pill input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(44, 68, 76, 0.8);
  border: 1px solid var(--color-slate-blue);
  transition: .3s;
  border-radius: 34px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: var(--color-sapphire);
  border-color: var(--color-ice-blue);
}

input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* ==============================================================================
   INDICADOR EN TIEMPO REAL Y TARJETA DE FINALIZACIÓN ("Procesamiento Completado")
   ============================================================================== */
.audio-processing-status-card {
  background: rgba(17, 20, 32, 0.95);
  border: 1px solid var(--color-amber-glow);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  animation: pulseAmberBorder 2s infinite ease-in-out;
  display: none;
}

.audio-processing-status-card.visible {
  display: block;
}

.audio-processing-status-card.completed {
  border-color: var(--color-emerald);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  animation: none;
}

@keyframes pulseAmberBorder {
  0%, 100% { border-color: rgba(245, 158, 11, 0.5); box-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }
  50% { border-color: rgba(245, 158, 11, 1); box-shadow: 0 0 25px rgba(245, 158, 11, 0.45); }
}

.processing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-weight: 700;
  font-size: 0.98rem;
}

.processing-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-amber-glow);
  display: inline-block;
  animation: blinkRec 0.9s infinite;
  margin-right: 0.4rem;
}

.processing-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(44, 68, 76, 0.6);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.65rem 0;
}

.processing-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  transition: width 0.4s ease;
}

.processing-phase-log {
  font-size: 0.8rem;
  color: var(--color-ice-blue);
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
}

/* Acciones en la tarjeta de finalización */
.processing-completed-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(16, 185, 129, 0.25);
  flex-wrap: wrap;
}

.audio-processing-status-card.completed .processing-completed-actions {
  display: flex;
}

/* Tarjeta de Estado del PDF cargado */
.pdf-loaded-card {
  background: rgba(30, 34, 51, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  display: none;
}

.pdf-loaded-card.visible {
  display: block;
}

/* ==============================================================================
   BANCOS INTEGRADOS: BANCO DE VOCES (VOICE BANK) & BANCO FOLEY/FX
   ============================================================================== */
.voice-bank-grid, .foley-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.voice-bank-card, .foley-bank-card {
  background: rgba(30, 34, 51, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.25s ease;
  position: relative;
}

.voice-bank-card:hover, .foley-bank-card:hover {
  border-color: var(--color-sapphire);
  transform: translateY(-2px);
  background: rgba(44, 68, 76, 0.6);
}

.voice-bank-card.assigned {
  border-color: var(--color-gold);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.foley-bank-card.playing {
  border-color: var(--color-emerald);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.voice-card-header, .foley-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

/* ==============================================================================
   ESTUDIOS OPACIFICADOS PARA ALUMNOS (Estudio A, B, C y D)
   ============================================================================== */
.opaque-studios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.opaque-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.opaque-studio-card:hover {
  border-color: var(--color-sapphire);
  box-shadow: var(--shadow-lg);
}

.opaque-studio-badge {
  background: rgba(4, 116, 196, 0.2);
  color: var(--color-ice-blue);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 1rem;
  border: 1px solid rgba(4, 116, 196, 0.4);
}

/* Estudio D: Laboratorio de Doblaje y Caracterización con TimeCode */
.dubbing-console-box {
  background: rgba(17, 20, 32, 0.95);
  border: 1px solid var(--color-teal-charcoal);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

.smpte-timecode-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.1em;
  background: #0b0e17;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--color-slate-blue);
  text-align: center;
  margin: 0.75rem 0;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.guide-track-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(30, 34, 51, 0.8);
  padding: 0.65rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-subtle);
}

/* Consola de Grabación Manual (Estudio A) */
.recorder-box {
  background: rgba(20, 24, 38, 0.85);
  border: 1px solid var(--color-teal-charcoal);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

.prompter-box {
  background: #111420;
  border-left: 4px solid var(--color-sapphire);
  padding: 1.25rem;
  border-radius: 4px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #f1f5f9;
  margin-bottom: 1.25rem;
}

.rec-timer-display {
  font-family: monospace;
  font-size: 1.8rem;
  font-weight: 900;
  color: #f43f5e;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f43f5e;
}

.rec-dot.active {
  animation: blinkRec 1s infinite;
}

@keyframes blinkRec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Estudio C: Karaoke Dramático Sincronizado */
.karaoke-display-board {
  background: rgba(17, 20, 32, 0.95);
  border: 1px solid var(--color-teal-charcoal);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  max-height: 280px;
  overflow-y: auto;
  font-size: 1.15rem;
  line-height: 1.9;
  color: #94a3b8;
  scroll-behavior: smooth;
}

.karaoke-cue {
  display: inline;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-right: 0.25rem;
}

.karaoke-cue:hover {
  color: #ffffff;
  background: rgba(83, 121, 174, 0.25);
}

.karaoke-cue.active {
  background: linear-gradient(90deg, rgba(4, 116, 196, 0.6), rgba(6, 69, 127, 0.7));
  color: #ffffff;
  font-weight: 700;
  border-bottom: 2px solid var(--color-ice-blue);
  box-shadow: 0 0 15px rgba(4, 116, 196, 0.5);
}

.karaoke-speaker-tag {
  color: #f59e0b;
  font-weight: 900;
  font-size: 0.85rem;
  display: block;
  margin-top: 0.75rem;
}

/* ==============================================================================
   CATÁLOGO DE CURSOS Y OBRAS
   ============================================================================== */
.courses-grid, .works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.course-card, .work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.course-card:hover, .work-card:hover {
  border-color: var(--color-sapphire);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover);
}

.work-card.active-play {
  border-color: var(--color-ice-blue);
  box-shadow: 0 0 25px rgba(4, 116, 196, 0.45);
}

/* ==============================================================================
   REPRODUCTOR WEB SEGURO FLOTANTE (Solo Escucha / Cifrado)
   ============================================================================== */
.player-bar-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(26, 30, 46, 0.97);
  backdrop-filter: blur(18px);
  border-top: 2px solid var(--color-sapphire);
  padding: 0.85rem 1.5rem;
  z-index: 95;
  box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.7);
}

.player-layout {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px 1fr 310px;
  align-items: center;
  gap: 1.5rem;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.player-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-sapphire), var(--color-navy-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.player-meta h4 {
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.player-meta span {
  font-size: 0.75rem;
  color: var(--color-ice-blue);
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-timeline-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.timeline-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(83, 121, 174, 0.35);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-sapphire);
  box-shadow: 0 0 10px var(--color-sapphire);
  cursor: pointer;
}

.player-extras {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* Master MP3 Download Button States */
.master-download-btn.locked {
  background: rgba(44, 68, 76, 0.4);
  border: 1px dashed var(--color-slate-blue);
  color: var(--text-dim);
  cursor: not-allowed;
}

.master-download-btn.unlocked {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #ffffff;
  border-color: #fde68a;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

/* Modales y Formularios */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 30, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-box {
  background: #1b1f30;
  border: 1px solid var(--color-slate-blue);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  padding: 2rem;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-backdrop.open .modal-box {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-ice-blue);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(38, 43, 64, 0.85);
  border: 1px solid var(--color-slate-blue);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-sapphire);
  box-shadow: 0 0 0 3px rgba(4, 116, 196, 0.25);
}

/* Visor Local de Comprobantes */
.voucher-dropzone {
  border: 2px dashed var(--color-slate-blue);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: rgba(44, 68, 76, 0.25);
  cursor: pointer;
  transition: all 0.2s;
}

.voucher-dropzone:hover {
  border-color: var(--color-sapphire);
  background: rgba(4, 116, 196, 0.12);
}

.voucher-preview-container {
  margin-top: 1rem;
  background: rgba(17, 20, 32, 0.95);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: none;
  border: 1px solid var(--border-subtle);
}

.voucher-preview-container.has-file {
  display: block;
}

.voucher-preview-img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}

.voucher-preview-pdf {
  width: 100%;
  height: 240px;
  border: none;
  border-radius: var(--radius-sm);
}

/* Comentarios en Biblioteca */
.comments-thread {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(168, 196, 236, 0.15);
}

.comment-item {
  background: rgba(20, 24, 38, 0.6);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 0.65rem;
  border-left: 3px solid var(--color-sapphire);
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-ice-blue);
  display: flex;
  justify-content: space-between;
}

.comment-text {
  font-size: 0.88rem;
  color: #e2e8f0;
  margin-top: 0.25rem;
}

/* Notificaciones Toast */
.toast-stack {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: rgba(27, 31, 48, 0.98);
  border: 1px solid var(--color-sapphire);
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  pointer-events: auto;
  animation: slideInToast 0.3s ease forwards;
}

.toast.toast-gold {
  border-color: var(--color-gold);
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.site-footer {
  background: #141724;
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem;
  margin-top: 4.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(168, 196, 236, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Media Queries */
@media (max-width: 992px) {
  .player-layout {
    grid-template-columns: 1fr auto;
  }
  .player-extras {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .courses-grid, .works-grid, .voice-bank-grid, .foley-bank-grid {
    grid-template-columns: 1fr;
  }
}

/* Selector Iniciar Sesión / Solicitar Registro */
.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: rgba(20, 24, 38, 0.7);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.auth-mode-tab {
  background: transparent;
  color: var(--text-dim);
  border: none;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-mode-tab.active {
  background: linear-gradient(135deg, var(--color-sapphire), var(--color-navy-deep));
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(4, 116, 196, 0.3);
}

/* Pantalla sobria de espera para alumnos pendientes */
.pending-approval-card {
  background: rgba(30, 34, 51, 0.85);
  border: 1px solid rgba(168, 196, 236, 0.25);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 12px 30px rgba(10, 14, 24, 0.45);
}

