/* ==========================================================================
   CEREBRO // SISTEMA INTELIGENTE MUSICAL DE PROVIWEB v1.0
   Estilos de Interfaz Holográfica Cinemática / PROVIWEB HUD
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --neon-cyan: #00f0ff;
  --neon-blue: #0066ff;
  --neon-deep-blue: #002699;
  --neon-core: #e0f8ff;
  --neon-accent: #00d4ff;
  --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.65), 0 0 30px rgba(0, 240, 255, 0.35);
  --glow-strong: 0 0 25px rgba(0, 240, 255, 0.9), 0 0 50px rgba(0, 102, 255, 0.5);
  --bg-deep: #030814;
  --panel-bg: rgba(4, 16, 38, 0.72);
  --panel-border: rgba(0, 240, 255, 0.28);
  --font-hud: 'Orbitron', -apple-system, sans-serif;
  --font-data: 'Share Tech Mono', monospace;
  --font-sub: 'Rajdhani', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: #fff;
  font-family: var(--font-sub);
  cursor: none; /* El dedo / cursor holográfico sustituye al puntero estándar */
}

/* Fondo con rejilla cuántica y viñeta cinemática */
.hud-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: 
    radial-gradient(circle at 50% 50%, rgba(0, 40, 90, 0.35) 0%, rgba(2, 6, 18, 0.95) 75%, #01040a 100%),
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 45px 45px, 45px 45px;
}

/* Línea de barrido holográfico constante */
.scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.25), transparent);
  opacity: 0.6;
  animation: scanlineMove 6s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes scanlineMove {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Contenedor del Canvas 3D de Three.js */
#webgl-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* Canvas 2D para estela del dedo y efectos de partículas táctiles */
#finger-fx-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* Elemento del Cursor Holográfico Táctil (Dedo) */
#hologram-finger-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 90px;
  height: 90px;
  margin-top: -45px;
  margin-left: -45px;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.25s ease, transform 0.15s cubic-bezier(0.1, 0.8, 0.2, 1);
  filter: drop-shadow(0 0 12px var(--neon-cyan));
}

#hologram-finger-cursor.active {
  opacity: 1;
  transform: scale(1);
}

#hologram-finger-cursor.touching {
  transform: scale(1.3);
  filter: drop-shadow(0 0 24px var(--neon-cyan));
}

.cursor-ring-outer {
  position: absolute;
  inset: 0;
  border: 1px dashed var(--neon-cyan);
  border-radius: 50%;
  animation: rotateCW 8s linear infinite;
}

.cursor-ring-mid {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  border-radius: 50%;
  animation: rotateCCW 4s linear infinite;
}

.cursor-dot-center {
  position: absolute;
  inset: 38px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px #fff;
  animation: pulseDot 1.4s ease-in-out infinite;
}

.cursor-hud-data {
  position: absolute;
  left: 80px;
  top: 10px;
  white-space: nowrap;
  font-family: var(--font-data);
  font-size: 10px;
  color: var(--neon-cyan);
  letter-spacing: 1px;
  background: rgba(3, 15, 36, 0.85);
  padding: 5px 9px;
  border-left: 2px solid var(--neon-cyan);
  backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 0.9;
  border-radius: 0 4px 4px 0;
}

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

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

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.45); opacity: 1; box-shadow: 0 0 18px var(--neon-cyan), 0 0 25px #fff; }
}

/* ==========================================================================
   INTERFAZ HUD DE CONTROL / STARK LAB
   ========================================================================== */
.hud-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  z-index: 30;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 18px;
  box-sizing: border-box;
  overflow: hidden;
}

.hud-interactive {
  pointer-events: auto;
}

/* Barra Superior Fija */
.hud-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 45;
  pointer-events: none;
}

.hud-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hud-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-brand-title {
  font-family: var(--font-hud);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 12px var(--neon-cyan), 0 0 24px rgba(0, 102, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-brand-title .badge {
  font-size: 8.5px;
  font-family: var(--font-data);
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--neon-cyan);
  letter-spacing: 1.5px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.hud-brand-subtitle {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulseDot 1.2s infinite;
}

/* Panel de Telemetría Superior Derecho */
.hud-telemetry {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 4px 10px;
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(0, 240, 255, 0.08);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.telemetry-label {
  font-family: var(--font-data);
  font-size: 7.5px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

.telemetry-value {
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px var(--neon-cyan);
}

/* Masterclass Header Button */
.masterclass-toggle-head {
  padding: 5px 9px !important;
  font-size: 9.5px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

/* Paneles Laterales */
.hud-body {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  pointer-events: none;
  min-height: 0;
  overflow: visible;
  padding-top: 4px;
}

/* Sistema de Pestañas Compactas del HUD */
.hud-tabs-header {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 4px;
  margin-bottom: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hud-tabs-header::-webkit-scrollbar {
  display: none;
}

.hud-tab-btn {
  flex: 1 0 auto;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-data);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 4px 5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hud-tab-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  color: #fff;
  border-color: var(--neon-cyan);
}

.hud-tab-btn.active {
  background: rgba(0, 240, 255, 0.22);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.hud-tab-pane {
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(420px, calc(100vh - 180px));
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.35) transparent;
  padding-right: 2px;
  animation: fadeInPane 0.2s ease forwards;
}
.hud-tab-pane::-webkit-scrollbar {
  width: 3px;
}
.hud-tab-pane::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.35);
  border-radius: 3px;
}

.hud-tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panel Izquierdo Fijo: Núcleo Neural, Memoria, Voz, Acceso & Radar */
.hud-panel-left {
  position: fixed;
  top: 60px;
  left: 18px;
  background: rgba(4, 14, 34, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-left: 3px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 8px 10px;
  width: 256px;
  max-height: min(500px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 0 14px rgba(0, 240, 255, 0.08);
  z-index: 42;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  pointer-events: auto;
}

.hud-panel-left .hud-tabs-header {
  margin-right: 24px;
}

.hud-panel-left.collapsed {
  transform: translateX(calc(-100% + 28px));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.hud-panel-right.collapsed {
  transform: translateX(calc(100% - 28px));
  margin-left: -200px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.hud-panel-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s ease;
  opacity: 1;
}

.hud-panel-left.collapsed .hud-panel-inner,
.hud-panel-right.collapsed .hud-panel-inner {
  opacity: 0;
  pointer-events: none;
}

.hud-panel-toggle-btn {
  position: absolute;
  top: 7px;
  width: 20px;
  height: 20px;
  background: rgba(3, 16, 42, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--neon-cyan);
  font-size: 9px;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.2);
  transition: all 0.2s ease;
  pointer-events: auto !important;
}

.hud-panel-toggle-btn:hover {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 10px var(--neon-cyan);
}

.hud-panel-left .hud-panel-toggle-btn {
  right: 5px;
}

.hud-panel-right .hud-panel-toggle-btn {
  left: 5px;
}

.panel-title {
  font-family: var(--font-hud);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  color: var(--neon-cyan);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 3px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Visualizador de Red Neuronal y Sinapsis Cuánticas */
.neural-synaptic-container {
  position: relative;
  background: radial-gradient(circle at center, rgba(0, 30, 70, 0.45) 0%, rgba(2, 6, 18, 0.75) 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 6px;
  padding: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}

#neural-network-canvas {
  width: 100%;
  height: 60px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.3));
}

.neural-layer-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 1px 4px 0 4px;
  font-family: var(--font-data);
  font-size: 7px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.6px;
}

.neural-layer-labels span {
  text-align: center;
}

/* Caja de Diagnóstico Neuronal */
.neural-telemetry-box {
  background: rgba(1, 8, 22, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 5px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  margin-top: 4px;
}

.neural-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-data);
  font-size: 8px;
  letter-spacing: 0.5px;
}

.neural-row .n-lbl {
  color: rgba(255, 255, 255, 0.6);
}

.neural-row .n-val {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 6px var(--neon-cyan);
}

.neural-row .n-val.highlight {
  color: #10B981;
  text-shadow: 0 0 8px #10B981;
}

/* Memoria Evolutiva */
.memory-progress-card {
  background: rgba(1, 8, 22, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.memory-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-data);
  font-size: 8.5px;
  letter-spacing: 0.8px;
}

.memory-row .m-lbl {
  color: rgba(255, 255, 255, 0.65);
}

.memory-row .m-val {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 6px var(--neon-cyan);
}

.memory-row .m-val.highlight {
  color: #10B981;
  text-shadow: 0 0 8px #10B981;
}

/* Panel de Comandos de Voz */
.voice-commands-card {
  max-height: 165px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.35) transparent;
}
.voice-commands-card::-webkit-scrollbar {
  width: 3px;
}
.voice-commands-card::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.35);
  border-radius: 3px;
}

.vcmd-group-title {
  font-family: var(--font-data);
  font-size: 7.5px;
  letter-spacing: 0.8px;
  color: var(--neon-cyan);
  margin-top: 3px;
  margin-bottom: 2px;
  opacity: 0.9;
}

.vcmd-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.vcmd-chip {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 3px;
  color: #fff;
  font-family: var(--font-data);
  font-size: 7.5px;
  padding: 2px 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.vcmd-chip:hover {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--neon-cyan);
  transform: translateY(-1px);
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

.vcmd-hint-text {
  font-family: var(--font-data);
  font-size: 7px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 3px;
  line-height: 1.2;
}

/* Panel Derecho Fijo: Osciloscopio & Modos/Temas */
.hud-panel-right {
  position: fixed;
  top: 60px;
  right: 18px;
  background: rgba(4, 14, 34, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-right: 3px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 8px 10px;
  width: 240px;
  max-height: min(500px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 0 14px rgba(0, 240, 255, 0.08);
  z-index: 42;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  pointer-events: auto;
}

.hud-panel-right .hud-tabs-header {
  margin-left: 22px;
}

.hud-panel-right.collapsed {
  transform: translateX(calc(100% - 28px));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.oscilloscope-canvas {
  width: 100%;
  height: 52px;
  background: rgba(1, 10, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.finger-status-box {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  font-family: var(--font-data);
  font-size: 8px;
  background: rgba(1, 8, 22, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 5px;
  padding: 4px 6px;
  margin-top: 3px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
}

.status-row span:last-child {
  color: var(--neon-cyan);
  font-weight: bold;
}


/* ==========================================================================
   FOOTER INFERIOR: DIÁLOGO, CHAT Y CONTROLES UNIFICADOS (NO TAPA EL ORBE)
   ========================================================================== */
.hud-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  padding: 0 16px 12px 16px;
  pointer-events: none;
  z-index: 45;
}

.hud-console-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 840px;
  pointer-events: auto;
}

.hud-dialog-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  pointer-events: auto;
}

.hud-dialog-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(3, 14, 36, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 240, 255, 0.05);
}

.ai-avatar-pulse {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--neon-cyan);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.ai-avatar-pulse:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px var(--neon-cyan);
}

.ai-avatar-inner {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px var(--neon-cyan);
  animation: pulseDot 1.6s ease-in-out infinite;
}

.ai-speech-text {
  font-family: var(--font-sub);
  font-size: 13px;
  line-height: 1.35;
  color: #fff;
  letter-spacing: 0.4px;
  flex: 1;
}

.ai-speech-text .highlight {
  color: var(--neon-cyan);
  font-weight: 700;
  text-shadow: 0 0 8px var(--neon-cyan);
}

.ai-speech-text a.hud-link {
  color: var(--neon-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  transition: text-shadow 0.2s ease, color 0.2s ease;
}

.ai-speech-text a.hud-link:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--neon-cyan), 0 0 24px #fff;
}

.ai-thinking-stream {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: fadeInPane 0.25s ease forwards;
}

.thinking-text-glow {
  color: #00F0FF;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
  animation: quantumTextShimmer 1.8s ease-in-out infinite alternate;
  letter-spacing: 0.5px;
}

@keyframes quantumTextShimmer {
  0% { opacity: 0.78; filter: drop-shadow(0 0 4px var(--neon-cyan)); }
  100% { opacity: 1; filter: drop-shadow(0 0 12px var(--neon-cyan)); text-shadow: 0 0 12px #ffffff, 0 0 24px var(--neon-cyan); }
}

.thinking-dots {
  display: inline-block;
  color: var(--neon-cyan);
  font-weight: 900;
  letter-spacing: 2px;
  animation: thinkingDotsBlink 1.2s infinite ease-in-out;
}

@keyframes thinkingDotsBlink {
  0%, 15% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
  100% { opacity: 0.2; transform: translateY(0); }
}

/* Chips de Acción Rápida (Ergonomía y Usabilidad) */
.hud-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
  padding: 1px 0;
  scrollbar-width: none;
}
.hud-quick-actions::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(3, 16, 42, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 14px;
  padding: 3.5px 10px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.quick-chip .chip-icon {
  font-size: 11px;
}

.quick-chip:hover {
  background: rgba(0, 240, 255, 0.22);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
  transform: translateY(-1px);
}

.quick-chip:active {
  transform: translateY(0);
}

/* Fila Inferior Unificada: Chat + Botones de Control */
.hud-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Barra de Entrada de Consulta Rápida (Siempre Visible) */
.hud-input-bar,
#panel-chat-container {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  gap: 6px;
  flex: 1;
  background: rgba(3, 14, 36, 0.92);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 3px 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.12);
}

#cerebro-query-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: 0.6px;
  padding: 5px 8px;
}

#cerebro-query-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.hud-btn-send {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-btn-send:hover {
  background: var(--neon-cyan);
  color: #01040a;
  box-shadow: 0 0 12px var(--neon-cyan);
}

/* Botones de Control de la Barra Inferior */
.hud-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  pointer-events: auto;
}

.hud-action-btn {
  background: rgba(4, 18, 42, 0.85);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 6px 9px;
  border-radius: 6px;
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.1, 0.8, 0.2, 1);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
  white-space: nowrap;
}

.hud-action-btn:hover {
  background: var(--neon-cyan);
  color: #020712;
  box-shadow: 0 0 16px var(--neon-cyan);
  transform: translateY(-1px);
}

.hud-action-btn.active {
  background: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 14px var(--neon-cyan);
}

/* Efecto de Onda de Choque al Tocar */
.touch-shockwave {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 1;
  animation: shockwaveExpand 0.75s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
  box-shadow: 0 0 20px var(--neon-cyan), inset 0 0 15px var(--neon-cyan);
  z-index: 25;
}

@keyframes shockwaveExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 1;
    border-width: 3px;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
    border-width: 1px;
  }
}

/* Mensaje Inicial de Activación */
#overlay-ignition {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(3, 14, 38, 0.95) 0%, #01040a 100%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s;
}

#overlay-ignition.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ignition-orb-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--neon-cyan) 40%, var(--neon-deep-blue) 80%, transparent 100%);
  box-shadow: 0 0 40px var(--neon-cyan), 0 0 80px rgba(0, 102, 255, 0.6);
  animation: pulseDot 2s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ignition-title {
  font-family: var(--font-hud);
  font-size: 40px;
  letter-spacing: 8px;
  color: #fff;
  text-shadow: 0 0 15px var(--neon-cyan), 0 0 35px var(--neon-blue);
  text-align: center;
}

.ignition-subtitle {
  font-family: var(--font-data);
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  text-align: center;
  max-width: 480px;
  line-height: 1.6;
}

.ignition-btn {
  background: transparent;
  border: 2px solid var(--neon-cyan);
  color: #fff;
  font-family: var(--font-hud);
  font-size: 14px;
  letter-spacing: 3px;
  padding: 14px 34px;
  border-radius: 30px;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5), inset 0 0 15px rgba(0, 240, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.ignition-btn:hover {
  background: var(--neon-cyan);
  color: #01040a;
  box-shadow: 0 0 40px var(--neon-cyan);
  transform: scale(1.05);
}

@media (max-width: 1120px) {
  .hud-footer {
    gap: 8px;
  }
  .hud-action-btn {
    padding: 6px 8px;
    font-size: 9px;
  }
}

@media (max-width: 880px) {
  .hud-layer {
    padding: 8px 10px;
  }
  .hud-brand-title {
    font-size: 15px;
    letter-spacing: 1.5px;
  }
  .hud-telemetry {
    padding: 3px 6px;
    gap: 6px;
  }
  .telemetry-label {
    font-size: 6.5px;
  }
  .telemetry-value {
    font-size: 9.5px;
  }
  .hud-panel-left, .hud-panel-right {
    position: absolute;
    z-index: 50;
  }
  .hud-panel-left {
    left: 8px;
    top: 55px;
  }
  .hud-panel-right {
    right: 8px;
    top: 55px;
  }
  .hud-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .hud-controls {
    justify-content: center;
    gap: 6px;
    width: 100%;
  }
  .hud-action-btn .btn-label {
    display: none;
  }
  .hud-action-btn {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
  }
  .masterclass-console {
    top: 52px;
    width: 95vw;
    max-height: 85vh;
    padding: 10px;
  }
  .mc-note-name {
    font-size: 34px;
  }
  .mc-radar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 720px) {
  .hud-layer {
    padding: 6px 12px;
  }
  .hud-panel-left, .hud-panel-right {
    max-height: calc(100vh - 110px);
  }
  #neural-network-canvas {
    height: 44px;
  }
  .oscilloscope-canvas {
    height: 40px;
  }
  .hud-dialog-box {
    padding: 4px 8px;
  }
  .ai-speech-text {
    font-size: 11.5px;
    line-height: 1.25;
  }
}

/* ==========================================================================
   MASTERCLASS EN VIVO // MAESTRO MUSICAL STYLES
   ========================================================================== */
.masterclass-toggle-head {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(0, 102, 255, 0.3) 100%) !important;
  border: 1px solid var(--neon-cyan) !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4), inset 0 0 10px rgba(0, 240, 255, 0.2);
  color: #fff !important;
  animation: borderPulse 3s infinite ease-in-out;
}

@keyframes borderPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.4); }
  50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.8), inset 0 0 15px rgba(0, 240, 255, 0.4); }
}

.masterclass-console {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(0) scale(1);
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(4, 14, 34, 0.94) 0%, rgba(9, 24, 54, 0.96) 100%);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 32px rgba(0, 240, 255, 0.2);
  border-radius: 18px;
  padding: 20px 24px;
  z-index: 50;
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.masterclass-console.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-20px) scale(0.95);
}

.mc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 10px;
}

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

.mc-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px var(--neon-cyan));
}

.mc-title-text {
  font-family: var(--font-hud);
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.mc-subtitle-text {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  opacity: 0.85;
}

.mc-btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s ease;
}

.mc-btn-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ef4444;
  transform: rotate(90deg);
}

/* Selector Bar */
.mc-selector-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-family-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-chip {
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-data);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.mc-chip:hover, .mc-chip.active {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.mc-instrument-select {
  width: 100%;
  background: rgba(2, 9, 23, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-hud);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.mc-instrument-select option, .mc-instrument-select optgroup {
  background: #040c1d;
  color: #fff;
}

/* Panel Estroboscópico de Afinación */
.mc-strobe-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(circle at center, rgba(0, 40, 90, 0.4) 0%, rgba(2, 8, 20, 0.8) 100%);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.mc-note-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mc-note-name {
  font-family: var(--font-hud);
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 20px var(--neon-cyan), 0 0 35px var(--neon-cyan);
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.mc-note-name.in-tune {
  color: #10B981 !important;
  text-shadow: 0 0 25px #10B981, 0 0 40px #10B981 !important;
}

.mc-note-name.out-of-tune {
  color: #F59E0B !important;
  text-shadow: 0 0 20px #F59E0B !important;
}

.mc-note-name.sharp {
  color: #EF4444 !important;
  text-shadow: 0 0 20px #EF4444 !important;
}

.mc-note-meta {
  font-family: var(--font-data);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 1px;
}

.mc-dynamic-badge {
  margin-top: 4px;
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  padding: 2px 10px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

/* Dial de Cents */
.mc-dial-wrapper {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mc-dial-labels {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-data);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

.mc-dial-labels .center-label {
  color: #10B981;
  font-weight: 700;
}

.mc-cents-track {
  width: 100%;
  height: 12px;
  background: rgba(0, 15, 35, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.mc-tolerance-zone {
  position: absolute;
  left: 42%;
  width: 16%;
  height: 100%;
  background: rgba(16, 185, 129, 0.25);
  border-left: 1px dashed rgba(16, 185, 129, 0.6);
  border-right: 1px dashed rgba(16, 185, 129, 0.6);
}

.mc-cents-needle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 10px #fff, 0 0 18px var(--neon-cyan);
  transform: translateX(-50%);
  transition: left 0.08s ease-out;
  border-radius: 2px;
}

.mc-cents-text {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

/* Radar 4D Metrics Grid */
.mc-radar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mc-metric-card {
  background: rgba(2, 9, 23, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-title {
  font-family: var(--font-data);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

.metric-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f0ff 0%, #3b82f6 100%);
  border-radius: 3px;
  transition: width 0.12s ease-out;
}

.metric-bar-fill.highlight {
  background: linear-gradient(90deg, #10b981 0%, #00f0ff 100%);
}

.metric-num {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  align-self: flex-end;
}

/* Coach Feed */
.mc-coach-feed {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
}

.mc-coach-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--neon-cyan) 0%, rgba(0, 102, 255, 0.3) 70%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mc-coach-pulse {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  animation: pulseDot 2s infinite ease-in-out;
}

.mc-coach-bubble {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mc-coach-label {
  font-family: var(--font-data);
  font-size: 9px;
  color: var(--neon-cyan);
  letter-spacing: 1.5px;
  font-weight: 700;
}

.mc-coach-text {
  font-family: var(--font-hud);
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
  letter-spacing: 0.5px;
}

/* Actions Bar */
.mc-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mc-btn-primary {
  flex: 2;
  background: linear-gradient(135deg, #00f0ff 0%, #0066ff 100%);
  color: #01040a;
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.mc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--neon-cyan);
}

.mc-btn-secondary {
  flex: 2;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.mc-btn-tool {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #fff;
  font-family: var(--font-data);
  font-size: 11px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mc-btn-tool:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

/* ==========================================================================
   SISTEMA DE PESTAÑAS DE LA MASTERCLASS
   ========================================================================== */
.mc-tabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 8px;
  overflow-x: auto;
}

.mc-tab-btn {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mc-tab-btn:hover, .mc-tab-btn.active {
  background: rgba(0, 240, 255, 0.22);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.mc-tab-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: tabFadeIn 0.22s ease-out;
}

.mc-tab-pane.active {
  display: flex;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 1. Partitura Interactiva */
.sheet-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sheet-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.sheet-label {
  font-family: var(--font-data);
  font-size: 10px;
  color: var(--neon-cyan);
  white-space: nowrap;
}

.mc-select-dark {
  background: rgba(2, 9, 24, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #fff;
  font-family: var(--font-hud);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  width: 100%;
  max-width: 380px;
}

.mc-select-dark option, .mc-select-dark optgroup {
  background: #030a1c;
  color: #fff;
}

.sheet-stats-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  font-family: var(--font-data);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.badge-tag.green {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10B981;
  color: #10B981;
}

.btn-micro {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-family: var(--font-data);
  font-size: 9px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-micro:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
}

.sheet-canvas-wrapper {
  width: 100%;
  background: radial-gradient(circle at center, rgba(0, 28, 68, 0.4) 0%, rgba(2, 6, 18, 0.8) 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

#sheet-music-canvas {
  width: 100%;
  height: 145px;
  display: block;
}

.sheet-subnote {
  font-family: var(--font-data);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.8px;
  text-align: center;
}

/* 2. Dirección Orquestal & Metrónomo */
.baton-layout {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.baton-canvas-box {
  flex: 1;
  min-width: 280px;
  background: radial-gradient(circle at center, rgba(0, 28, 68, 0.5) 0%, rgba(2, 6, 18, 0.85) 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#baton-canvas {
  width: 100%;
  height: 160px;
  display: block;
}

.baton-controls-box {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.baton-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.baton-lbl {
  font-family: var(--font-data);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.baton-sig-chips {
  display: flex;
  gap: 6px;
}

.sig-chip {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: #fff;
  font-family: var(--font-hud);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.sig-chip:hover, .sig-chip.active {
  background: rgba(0, 240, 255, 0.35);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.tempo-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.tempo-slider-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--neon-cyan);
  cursor: pointer;
}

.full-w {
  width: 100%;
}

.rhythm-badge {
  font-family: var(--font-hud);
  font-size: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  letter-spacing: 1px;
}

.rhythm-badge.pocket {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10B981;
  color: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.rhythm-badge.rushing {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #F59E0B;
  color: #F59E0B;
}

.rhythm-badge.dragging {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3B82F6;
  color: #3B82F6;
}

/* 3. Oído & Llamada */
.ear-training-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ear-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ear-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.ear-status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: radial-gradient(circle at center, rgba(0, 32, 76, 0.45) 0%, rgba(2, 8, 20, 0.8) 100%);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
}

.ear-icon-state {
  font-size: 32px;
  filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.ear-status-title {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
}

.ear-status-desc {
  font-family: var(--font-data);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
  line-height: 1.4;
}

/* 4. Guía Anatómica del Instrumento */
.anatomy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.anatomy-card {
  background: rgba(2, 9, 24, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anatomy-card.warning-border {
  border-color: rgba(239, 68, 68, 0.4);
}

.anatomy-card.success-border {
  border-color: rgba(16, 185, 129, 0.4);
}

.anatomy-title {
  font-family: var(--font-hud);
  font-size: 10px;
  color: var(--neon-cyan);
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}

.anatomy-title.warn {
  color: #EF4444;
}

.anatomy-title.success {
  color: #10B981;
}

.anatomy-body {
  font-family: var(--font-data);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.45;
}

/* Módulos Extra de Acústica: Cuerdas al Aire & Vibratómetro */
.acoustics-extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.acoustics-extra-card {
  background: radial-gradient(circle at center, rgba(0, 30, 70, 0.4) 0%, rgba(2, 6, 18, 0.8) 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.extra-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.extra-card-title {
  font-family: var(--font-hud);
  font-size: 9.5px;
  color: var(--neon-cyan);
  letter-spacing: 1px;
  font-weight: 700;
}

.extra-card-badge {
  font-family: var(--font-data);
  font-size: 8px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.8px;
}

#string-tuner-canvas, #vibrato-canvas {
  width: 100%;
  height: 80px;
  display: block;
}

/* 5. Memoria Longitudinal del Estudiante */
.memory-progress-card {
  background: rgba(2, 8, 22, 0.78);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  backdrop-filter: blur(8px);
}

.memory-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.8px;
}

.m-lbl {
  color: rgba(255, 255, 255, 0.65);
}

.m-val {
  font-family: var(--font-hud);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

/* 6. Panel de Comandos de Voz Exclusivos de Cerebro */
.voice-commands-card {
  background: rgba(2, 8, 22, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.05);
  max-height: 120px;
  overflow-y: auto;
}

.voice-commands-card::-webkit-scrollbar {
  width: 3px;
}
.voice-commands-card::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.35);
  border-radius: 2px;
}

.vcmd-group-title {
  font-family: var(--font-hud);
  font-size: 8px;
  font-weight: 800;
  color: var(--neon-cyan);
  letter-spacing: 0.8px;
  margin-top: 4px;
  text-transform: uppercase;
}

.vcmd-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.vcmd-chip {
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: #cbd5e1;
  font-family: var(--font-data);
  font-size: 8.5px;
  padding: 2.5px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
}

.vcmd-chip:hover {
  background: rgba(0, 240, 255, 0.22);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
  transform: translateY(-1px);
}

.vcmd-hint-text {
  font-family: var(--font-data);
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  line-height: 1.3;
}

/* 7. Visor Didáctico Multimedia Lateral Flotante (NO obstruye el orbe 3D central) */
.cerebro-media-dock {
  position: fixed;
  right: 24px;
  top: 75px;
  width: 330px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 160px);
  background: rgba(3, 10, 28, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(16px);
  z-index: 45;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform: translateX(0);
  opacity: 1;
}

.cerebro-media-dock.hidden {
  display: none !important;
  transform: translateX(370px);
  opacity: 0;
  pointer-events: none;
}

.media-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 240, 255, 0.08);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

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

.media-dock-icon {
  font-size: 16px;
}

.media-dock-badge {
  font-family: var(--font-hud);
  font-size: 7.5px;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  font-weight: 800;
}

.media-dock-title {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.media-btn-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.media-btn-close:hover {
  color: #ff3366;
  background: rgba(255, 51, 102, 0.15);
}

.media-dock-content {
  padding: 12px;
  overflow-y: auto;
  max-height: 420px;
}

.media-dock-footer {
  padding: 8px 12px;
  background: rgba(2, 6, 18, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.media-dock-desc {
  font-family: var(--font-data);
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.35;
}

/* Tipos de Media */
.media-img-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.media-img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  background: #000;
  object-fit: contain;
  max-height: 220px;
}

.media-action-link, .media-btn-link, .media-btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-hud);
  font-size: 9.5px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.8px;
}

.media-action-link:hover, .media-btn-link:hover, .media-btn-pdf:hover {
  background: var(--neon-cyan);
  color: #020817;
  box-shadow: 0 0 12px var(--neon-cyan);
}

.media-video-wrap video {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  background: #000;
}

/* Reproductor Embebido de YouTube */
.media-yt-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.media-yt-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid var(--neon-cyan);
  background: #000;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
  display: block;
}

.media-yt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-data);
  font-size: 8.5px;
  padding: 4px 2px;
}

.yt-meta-channel {
  color: rgba(255, 255, 255, 0.7);
}

.yt-meta-channel strong {
  color: var(--neon-cyan);
}

.yt-open-external-btn {
  color: #ff3366;
  text-decoration: none;
  font-size: 8.5px;
  border: 1px solid rgba(255, 51, 102, 0.4);
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 51, 102, 0.1);
  transition: all 0.2s ease;
}

.yt-open-external-btn:hover {
  background: #ff3366;
  color: #fff;
  box-shadow: 0 0 10px #ff3366;
}

/* Lista de Sugerencias de Búsqueda de YouTube */
.media-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.media-sugg-hint-banner {
  background: rgba(0, 240, 255, 0.08);
  border-left: 2px solid var(--neon-cyan);
  padding: 6px 8px;
  font-family: var(--font-data);
  font-size: 8.5px;
  color: #e0f8ff;
  border-radius: 0 4px 4px 0;
  margin-bottom: 2px;
}

.media-suggestion-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 12, 32, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.media-suggestion-item:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--neon-cyan);
  transform: translateX(4px);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.media-sugg-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.18);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.media-sugg-thumb {
  width: 66px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}

.media-sugg-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-sugg-title {
  font-family: var(--font-sub);
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.media-sugg-sub {
  font-family: var(--font-data);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  gap: 6px;
  align-items: center;
}

.media-sugg-channel {
  color: var(--neon-cyan);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-sugg-duration {
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff;
  font-weight: bold;
}

.media-audio-card {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.media-audio-card audio {
  width: 100%;
  height: 36px;
  outline: none;
}

.audio-meta-hint {
  font-family: var(--font-data);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.6);
}

.media-pdf-card {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.pdf-icon {
  font-size: 32px;
}

.pdf-name {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: bold;
  color: #fff;
}

.pdf-size {
  font-family: var(--font-data);
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.6);
}

.media-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-url-text {
  font-family: var(--font-data);
  font-size: 8px;
  color: var(--neon-cyan);
  word-break: break-all;
}

.link-title {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 12px;
  color: #fff;
}

.link-desc {
  margin: 0;
  font-family: var(--font-data);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* 8. Clases de Visibilidad por Comandos de Voz */
.hud-panel-hidden:not(#panel-chat-container) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   9. WIDGET DE AUTENTICACIÓN & MODAL CUÁNTICO PROVIWEB
   ========================================================================== */
.hud-auth-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-auth-btn {
  background: rgba(0, 240, 255, 0.12) !important;
  border-color: var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
  font-weight: 700;
}

.hud-auth-btn:hover {
  background: var(--neon-cyan) !important;
  color: #01040a !important;
  box-shadow: 0 0 16px var(--neon-cyan);
}

/* Insignia Holográfica de Perfil de Usuario en el Header */
.hud-user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 12, 30, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hud-user-profile:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

.user-avatar-wrap {
  position: relative;
  width: 28px;
  height: 28px;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--neon-cyan);
  object-fit: cover;
  background: #030814;
}

.user-role-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #01040a;
}

.user-role-dot.member {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.user-role-dot.admin {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.user-role-dot.guest {
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

.user-info-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-display-name {
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-sub-tag {
  font-family: var(--font-data);
  font-size: 7.5px;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.btn-auth-trigger {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auth-trigger:hover {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

/* Tabs del Modal de Auth */
.auth-tabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 8px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: var(--font-hud);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.guest-avatar-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  margin: 4px 0;
}

.guest-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.guest-preview-note {
  font-family: var(--font-sub);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
}

.btn-logout-link {
  background: transparent;
  border: none;
  color: #ef4444;
  font-family: var(--font-data);
  font-size: 9px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-logout-link:hover {
  color: #f87171;
}

/* Modal Cuántico de Login */
.cerebro-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 12, 0.85);
  backdrop-filter: blur(12px);
}

.auth-modal-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 380px;
  background: rgba(2, 9, 24, 0.95);
  border: 1px solid var(--neon-cyan);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 0 32px rgba(0, 240, 255, 0.25), inset 0 0 20px rgba(0, 240, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 8px;
}

.auth-modal-title {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.auth-modal-close:hover {
  color: var(--neon-cyan);
}

.auth-modal-desc {
  font-family: var(--font-sub);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  margin: 0;
}

#cerebro-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-input-group label {
  font-family: var(--font-data);
  font-size: 8.5px;
  letter-spacing: 1px;
  color: var(--neon-cyan);
}

.auth-input-group input {
  background: rgba(3, 15, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-data);
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input-group input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.auth-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-family: var(--font-data);
  font-size: 9px;
  padding: 6px 8px;
  border-radius: 4px;
  line-height: 1.3;
}

.auth-btn-primary {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(0, 110, 255, 0.45) 100%);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}

.auth-btn-primary:hover {
  background: var(--neon-cyan);
  color: #01040a;
  box-shadow: 0 0 20px var(--neon-cyan);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2px 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-divider span {
  font-family: var(--font-data);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.45);
  padding: 0 8px;
  letter-spacing: 0.8px;
}

.auth-btn-google {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.auth-btn-google:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.auth-modal-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  font-family: var(--font-data);
  font-size: 8.5px;
}

.auth-modal-footer a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.auth-modal-footer a:hover {
  text-decoration: underline;
}

.login-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ==========================================================================
   CEREBRO NAVIGATOR // DOCK DE NAVEGACIÓN GPS & GUÍA TURN-BY-TURN
   Estética Glassmorphic Cyber-Dark (No obstruye el Orbe 3D Central)
   ========================================================================== */

.cerebro-nav-dock {
  position: fixed;
  top: 76px;
  right: 20px;
  width: 390px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  background: rgba(8, 12, 24, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.22);
  z-index: 950;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  font-family: var(--font-hud);
}

.cerebro-nav-dock.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px) scale(0.96);
}

.cerebro-nav-dock.minimized {
  max-height: 60px;
}

.cerebro-nav-dock.minimized .nav-dock-body {
  display: none;
}

/* Header del Dock de Navegación */
.nav-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 240, 255, 0.08);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  user-select: none;
}

.nav-dock-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-dock-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 8px var(--neon-cyan));
  animation: nav-pulse-icon 2s ease-in-out infinite;
}

@keyframes nav-pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 14px var(--neon-cyan)); }
}

.nav-dock-badge {
  font-family: var(--font-data);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-dock-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: radar-pulse 1.4s infinite;
}

.nav-dock-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.nav-btn-icon:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Cuerpo del Dock */
.nav-dock-body {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
}

/* Banner de Maniobra / Giro Actual */
.nav-turn-banner {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(138, 43, 226, 0.15) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.nav-turn-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
  animation: nav-scan-sweep 3s infinite;
}

@keyframes nav-scan-sweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

.nav-turn-symbol {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.nav-turn-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.nav-turn-distance {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.nav-turn-instruction {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
  margin-top: 2px;
  word-break: break-word;
}

.nav-turn-sub {
  font-family: var(--font-data);
  font-size: 8.5px;
  color: var(--neon-cyan);
  margin-top: 3px;
  letter-spacing: 0.8px;
}

/* Contenedor del Mapa */
.nav-map-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

#cerebro-nav-map {
  width: 100%;
  height: 100%;
  background: #060913;
}

/* Barra de Telemetría (Distancia, Tiempo, Llegada) */
.nav-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.nav-telem-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.nav-telem-lbl {
  font-family: var(--font-data);
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.8px;
}

.nav-telem-val {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.nav-telem-val.cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.nav-telem-val.purple {
  color: #c084fc;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.6);
}

.nav-telem-val.green {
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

/* Panel de Controles de Navegación */
.nav-controls-row {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.nav-btn {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: var(--font-data);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid transparent;
}

.nav-btn-sim {
  background: rgba(0, 240, 255, 0.18);
  border-color: rgba(0, 240, 255, 0.45);
  color: #00f0ff;
}

.nav-btn-sim:hover {
  background: rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

.nav-btn-step {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.nav-btn-step:hover {
  background: rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.4);
}

.nav-btn-stop {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  flex: 0 0 34px;
}

.nav-btn-stop:hover {
  background: rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

/* Banner de Llegada a Destino Triunfal */
.nav-arrival-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(0, 240, 255, 0.2) 100%);
  border: 1px solid #10b981;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
  animation: nav-arrival-glow 2s infinite alternate;
}

@keyframes nav-arrival-glow {
  0% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
  100% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.7); }
}

.nav-arrival-title {
  font-size: 14px;
  font-weight: 900;
  color: #10b981;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
}

.nav-arrival-msg {
  font-size: 11px;
  color: #ffffff;
  margin-top: 4px;
  font-style: italic;
}

/* Marcadores Cyberpunk en el Mapa */
.cyber-user-marker {
  position: relative;
  width: 22px;
  height: 22px;
}

.cyber-user-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00f0ff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px #00f0ff;
}

.cyber-user-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.8);
  animation: cyber-radar-pulse 1.8s infinite cubic-bezier(0.2, 0.8, 0.4, 1);
}

@keyframes cyber-radar-pulse {
  0% { width: 12px; height: 12px; opacity: 1; border-width: 3px; }
  100% { width: 44px; height: 44px; opacity: 0; border-width: 1px; }
}

.cyber-dest-marker {
  position: relative;
  width: 28px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cyber-dest-pin {
  font-size: 26px;
  filter: drop-shadow(0 0 10px #f43f5e);
  animation: cyber-pin-bob 1.5s ease-in-out infinite alternate;
}

@keyframes cyber-pin-bob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* Ajustes de Leaflet para modo HUD */
.leaflet-container {
  background: #060913 !important;
  font-family: var(--font-data) !important;
}

.leaflet-control-zoom a {
  background: rgba(8, 12, 24, 0.85) !important;
  color: #00f0ff !important;
  border-color: rgba(0, 240, 255, 0.3) !important;
  backdrop-filter: blur(8px) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(0, 240, 255, 0.25) !important;
  color: #ffffff !important;
}

.leaflet-control-attribution {
  background: rgba(6, 9, 19, 0.7) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: 7px !important;
}

.leaflet-control-attribution a {
  color: rgba(0, 240, 255, 0.7) !important;
}

/* ==========================================================================
   PERFIL DE USUARIO EN HUD & MODAL CUÁNTICO DE AUTENTICACIÓN
   PROVIWEB Platform © 2026
   ========================================================================== */

.hud-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 12, 28, 0.65);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 20px;
  padding: 4px 10px 4px 6px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.hud-user-profile:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
  transform: translateY(-1px);
}

.user-avatar-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--neon-cyan);
  background: rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.user-role-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #060c1c;
}

.user-role-dot.guest {
  background: #00f0ff;
  box-shadow: 0 0 6px #00f0ff;
}

.user-role-dot.member {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.user-role-dot.admin {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.user-info-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.user-display-name {
  font-family: var(--font-tech, 'Courier New', monospace);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-sub-tag {
  font-family: var(--font-data, sans-serif);
  font-size: 9px;
  color: var(--neon-cyan, #00f0ff);
  letter-spacing: 0.5px;
}

.btn-auth-trigger {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 8px;
  color: var(--neon-cyan);
  font-size: 12px;
  cursor: pointer;
  padding: 3px 6px;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-auth-trigger:hover {
  background: var(--neon-cyan);
  color: #040814;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Modal de Autenticación */
.cerebro-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cerebro-auth-modal.hidden {
  display: none !important;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-modal-content {
  position: relative;
  width: 90%;
  max-width: 420px;
  background: linear-gradient(135deg, rgba(8, 16, 36, 0.96) 0%, rgba(3, 7, 20, 0.98) 100%);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.25), 0 20px 40px rgba(0, 0, 0, 0.8);
  z-index: 1;
  animation: auth-modal-appear 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-modal-appear {
  0% { transform: scale(0.94) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.auth-modal-title {
  font-family: var(--font-tech, 'Courier New', monospace);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.auth-modal-close:hover {
  color: #f43f5e;
}

.auth-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.auth-tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-tech, 'Courier New', monospace);
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.auth-tab-btn:hover {
  color: #ffffff;
  border-color: rgba(0, 240, 255, 0.3);
}

.auth-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan, #00f0ff);
  border-color: var(--neon-cyan, #00f0ff);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.auth-modal-desc {
  font-family: var(--font-data, sans-serif);
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  text-align: left;
}

.auth-input-group label {
  font-family: var(--font-tech, 'Courier New', monospace);
  font-size: 9px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
}

.auth-input-group input {
  background: rgba(4, 8, 22, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-data, sans-serif);
  font-size: 12px;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input-group input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.guest-avatar-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px dashed rgba(0, 240, 255, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.guest-preview-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--neon-cyan);
}

.guest-preview-note {
  font-family: var(--font-data, sans-serif);
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.4;
}

.auth-error-msg {
  font-family: var(--font-data, sans-serif);
  font-size: 11px;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.auth-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #00f0ff);
  color: #040814;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-tech, 'Courier New', monospace);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}

.auth-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.55);
}

.auth-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: #475569;
  font-size: 9px;
  letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  padding: 0 10px;
}

.auth-btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px;
  color: #e2e8f0;
  font-family: var(--font-data, sans-serif);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.auth-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-data, sans-serif);
  font-size: 10px;
}

#auth-current-state-lbl {
  color: #64748b;
  font-weight: 600;
}

.btn-logout-link {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-data, sans-serif);
  font-size: 10px;
  transition: color 0.2s ease;
}

.btn-logout-link:hover {
  color: #ef4444;
}

/* ==========================================================================
   10. ENLACES DE ACCESO EN PANTALLA DE IGNICIÓN & PESTAÑA HUD ACCESO
   ========================================================================== */

/* Enlaces de Acceso (Invitado / Usuario) debajo del botón INICIAR CONEXIÓN NEURAL */
.ignition-auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  z-index: 10;
  user-select: none;
}

.ignition-guest-link {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--neon-cyan);
  font-family: var(--font-hud, sans-serif);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.18);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ignition-guest-link:hover {
  background: var(--neon-cyan);
  color: #01040a;
  border-color: #fff;
  box-shadow: 0 0 24px var(--neon-cyan);
  transform: translateY(-2px);
  text-decoration: none;
}

.ignition-link-divider {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.ignition-user-link {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-data, sans-serif);
  font-size: 11px;
  letter-spacing: 0.8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 16px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ignition-user-link:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

/* Pestaña HUD Izquierda: Sesión // Identidad */
#tab-left-auth {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(4, 12, 32, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 10px;
  padding: 12px;
  margin-top: 4px;
}

.auth-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.tab-auth-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-cyan);
  background: #020617;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.auth-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.tab-auth-display-name {
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-auth-sub-tag {
  font-family: var(--font-data);
  font-size: 9px;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.tab-auth-note {
  font-family: var(--font-data);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.auth-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.hud-auth-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
  border: 1px solid transparent;
}

.hud-auth-action-btn.user {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.35) 100%);
  border-color: rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

.hud-auth-action-btn.user:hover {
  background: #10b981;
  color: #022c22;
  border-color: #34d399;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.hud-auth-action-btn.guest {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(2, 132, 199, 0.3) 100%);
  border-color: rgba(0, 240, 255, 0.4);
  color: #bae6fd;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}

.hud-auth-action-btn.guest:hover {
  background: var(--neon-cyan);
  color: #01040a;
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  transform: translateY(-1px);
}

.hud-auth-action-btn.logout {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  margin-top: 4px;
}

.hud-auth-action-btn.logout:hover {
  background: #ef4444;
  color: #fff;
  border-color: #f87171;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   11. RADAR DE COMPETENCIA & PILOTO AUTOMÁTICO CUÁNTICO
   ========================================================================== */

.radar-competitor-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}

.radar-competitor-list::-webkit-scrollbar {
  width: 3px;
}

.radar-competitor-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 3px;
}

.radar-card {
  position: relative;
  background: rgba(8, 22, 50, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.radar-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(12, 30, 68, 0.85);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
  transform: translateY(-1px);
}

.radar-status-chip {
  font-family: var(--font-data, monospace);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: all 0.2s ease;
}

.btn-radar-outperform {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-family: var(--font-hud, sans-serif);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-radar-outperform:hover:not(:disabled) {
  background: #10b981;
  color: #011d14;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transform: scale(1.02);
}

.btn-radar-outperform:disabled {
  opacity: 0.5;
  cursor: wait;
}

#btn-toggle-autopilot {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#btn-toggle-autopilot:hover {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

#radar-log-content {
  line-height: 1.4;
  scrollbar-width: thin;
}

/* ==========================================================================
   Cinta Continua de Afinación y Expresión (Live Pitch Ribbon)
   ========================================================================== */
.mc-ribbon-wrapper {
  width: 100%;
  margin-top: 10px;
  background: rgba(2, 9, 23, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.mc-ribbon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-data, monospace);
  font-size: 9px;
  letter-spacing: 0.8px;
}

.mc-ribbon-title {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.mc-ribbon-status {
  color: #10b981;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.mc-pitch-ribbon-canvas {
  width: 100%;
  height: 65px;
  background: rgba(0, 8, 20, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  display: block;
}

/* ==========================================================================
   Mini-Tour Holográfico Guiado por Voz
   ========================================================================== */
.cerebro-tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 4, 12, 0.65);
  backdrop-filter: blur(3px);
  z-index: 99990;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.cerebro-tour-highlight-box {
  position: absolute;
  border: 2px solid var(--neon-cyan, #00f0ff);
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.2);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: tourPulseRing 2s infinite ease-in-out;
  z-index: 99991;
}

@keyframes tourPulseRing {
  0%, 100% {
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.5), inset 0 0 10px rgba(0, 240, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.9), inset 0 0 20px rgba(0, 240, 255, 0.4);
  }
}

.cerebro-tour-card {
  position: fixed;
  z-index: 99995;
  width: 360px;
  max-width: 90vw;
  background: linear-gradient(135deg, rgba(3, 12, 28, 0.96), rgba(8, 24, 48, 0.94));
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.25);
  font-family: var(--font-hud, sans-serif);
  color: #fff;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cerebro-tour-step-badge {
  display: inline-block;
  font-family: var(--font-data, monospace);
  font-size: 9px;
  font-weight: 700;
  color: var(--neon-cyan, #00f0ff);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.cerebro-tour-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cerebro-tour-desc {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(220, 235, 255, 0.88);
  margin-bottom: 16px;
}

.cerebro-tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.btn-tour-skip {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.btn-tour-skip:hover {
  color: #fff;
}

.btn-tour-next {
  background: linear-gradient(135deg, #00f0ff, #0077ff);
  border: none;
  color: #011222;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 6px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
  transition: all 0.2s ease;
}

.btn-tour-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.7);
}

.btn-revert-evolution {
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(147, 51, 234, 0.5);
  color: #c084fc;
  font-family: var(--font-hud, sans-serif);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-revert-evolution:hover {
  background: #9333ea;
  color: #fff;
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}



