/* Fondo global */
body {
  margin: 0;
  padding: 0;
  background-color: #000a1a;
  font-family: 'Orbitron', sans-serif;
  color: #cceeff;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Contenedor principal para los bloques */
.panel-contenedor {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
}

/* Estilo base para cada bloque */
.bloque {
  padding: 20px;
  margin: 0;
  background: none;
  border-radius: 16px;
  box-shadow: 0 0 30px #66e0ff55;
  color: #66e0ff;
  position: absolute;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid #66e0ff;
}

/* Panel 1 - Arriba izquierda */
.panel-superior-izquierdo {
  width: 26.5%;
  height: 43%;
  top: 1%;
  left: 0%;
  z-index: 2;
}

/* Panel 2 - Abajo izquierda */
.panel-inferior-izquierdo {
  width: 26.5%;
  height: 43%;
  bottom: 2%;
  left: 0%;
  z-index: 2;
}

/* Panel 3: Historial de conversación */
#historial-conversaciones {
  background-color: #0d1320;
  border: 1px solid #00f6ff;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
  color: #00f6ff;
}

/* Panel 4 - Arriba derecha */
.panel-superior-derecho {
  width: 31%;
  height: 26%;
  top: 2%;
  right: 0%;
  z-index: 2;
}

/* Panel 5 - Abajo derecha */
.panel-inferior-derecho {
  width: 31%;
  height: 61%;
  bottom: 1%;
  right: 0%;
  z-index: 2;
}

/* Efectos de hover */
.bloque:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px #00f6ff99;
}

/* Títulos */
.bloque h2 {
  color: #66d9ff;
  font-size: 1.8em;
  text-align: center;
  text-shadow: 0 0 3px #66d9ff66, 0 0 6px #66d9ff33;
}

/* Botones y textarea comunes */
textarea, button {
  width: 100%;
  padding: 15px;
  font-size: 1.1em;
  border-radius: 6px;
  background-color: #0d1320;
  color: #00f6ff;
  border: 1px solid #00f6ff;
  margin-top: 10px;
}

button {
  background-color: #00f6ff;
  color: #0a0f1c;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
  background-color: #00c2cc;
  transform: scale(1.05);
}

/* Panel 3 específico */
.bloque-instruccion {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

textarea {
  font-size: 1.2em;
  border-radius: 10px;
  height: 150px;
}

.bloque-respuesta {
  width: 100%;
  padding: 15px;
  background-color: #0d1320;
  color: #00f6ff;
  border: 1px solid #00f6ff;
  font-family: 'Courier New', monospace;
  font-size: 1em;
  border-radius: 6px;
  box-shadow: 0 0 15px #00f6ff77;
  transition: box-shadow 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bloque-respuesta:hover {
  box-shadow: 0 0 25px #00f6ff;
}

/* Animación suave */
@keyframes aparecerRespuesta {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mensajes */
.error {
  color: #ff4d4d;
  font-weight: bold;
}

.cargando {
  color: #ffff99;
  font-style: italic;
}

/* NUEVOS ESTILOS AGREGADOS */

/* Panel 1: Estado de Alya */
#panel-1 p {
  margin: 10px 0;
  font-size: 1.1em;
  color: #00f6ff;
}

#estado-chat {
  margin-top: 15px;
  background-color: #0d1320;
  border: 1px solid #00f6ff;
  padding: 10px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
  height: 120px;
  overflow-y: auto;
}

/* Panel 2: Historial */
#historial-conversaciones {
  background-color: #0d1320;
  border: 1px solid #00f6ff;
  padding: 10px;
  border-radius: 8px;
  height: calc(100% - 60px);
  overflow-y: auto;
  font-size: 0.95em;
  font-family: 'Courier New', monospace;
}

/* Panel 4: Configuración en vivo */
#estructura-carpetas {
  background-color: #0d1320;
  border: 1px solid #66e0ff; /* antes: #00f6ff */
  border-radius: 8px;
  height: calc(100% - 70px);
  padding: 10px;
  overflow-y: auto;
  font-size: 0.95em;
  font-family: 'Courier New', monospace;
  color: #cceeff; /* se agrega para texto legible */
}

#carpeta-actual {
  font-weight: bold;
  color: #00f6ff;
}

/* Panel 5: Estado de las Fuentes */
#estado-conexiones {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}

#estado-conexiones li {
  margin-bottom: 10px;
  font-size: 1.05em;
  color: #cceeff;
}

#estado-conexiones span {
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  background-color: #1a1a1a;
  color: #cceeff;
  border: 1px solid #66e0ff;
}
/* HOLOGRAMA DE ALYA */
#holograma-alya {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: flotar 3s ease-in-out infinite;
}

/* Bolita flotante */
#holograma-alya .esfera {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #00f6ff 20%, #003344 90%);
  border-radius: 50%;
  box-shadow: 0 0 3px #00f6ff, 0 0 30px #00f6ff66, inset 0 0 10px #00f6ffaa;
  animation: pulso 2s ease-in-out infinite;
}

/* Ondas tipo agua */
#holograma-alya .ondas {
  margin-top: 8px;
  width: 100px;
  height: 10px;
  background: repeating-radial-gradient(circle, #00f6ff55 0px, transparent 6px);
  border-radius: 50%;
  animation: ondas-agua 3s ease-in-out infinite;
}

/* Texto ALYA */
#holograma-alya .nombre-alya {
  margin-top: 10px;
  font-size: 1.5em;
  font-weight: bold;
  color: #00f6ff;
  text-shadow: 0 0 8px #00f6ff, 0 0 12px #00f6ff;
}

/* Animaciones */
@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulso {
  0%, 100% { box-shadow: 0 0 15px #00f6ff, 0 0 30px #00f6ff66; }
  50% { box-shadow: 0 0 25px #00f6ff, 0 0 40px #00f6ffaa; }
}

@keyframes ondas-agua {
  0%, 100% { transform: scaleX(1); opacity: 0.7; }
  50% { transform: scaleX(1.1); opacity: 1; }
}
/* COLORES DINÁMICOS PARA EL HOLOGRAMA */
.esfera.modo-chat {
  background: radial-gradient(circle, #00f6ff 30%, #003344 90%);
  box-shadow: 0 0 20px #00f6ff, 0 0 30px #00f6ff66;
}

.esfera.modo-configuracion {
  background: radial-gradient(circle, #ff8800 30%, #332100 90%);
  box-shadow: 0 0 20px #ff8800, 0 0 30px #ff880044;
}

.esfera.modo-diagnostico {
  background: radial-gradient(circle, #ff4d4d 30%, #330000 90%);
  box-shadow: 0 0 20px #ff4d4d, 0 0 30px #ff4d4d44;
}

.esfera.modo-entrenamiento {
  background: radial-gradient(circle, #7eff00 30%, #1a3300 90%);
  box-shadow: 0 0 20px #7eff00, 0 0 30px #7eff0044;
}
#historial-documentos {
  flex-grow: 1;
  background-color: #0d1320;
  border: 1px solid #00f6ff;
  padding: 10px;
  border-radius: 8px;
  overflow-y: auto;
  font-size: 0.95em;
  font-family: 'Courier New', monospace;
  max-height: 160px; /* nuevo valor controlado */
}

#ultimas-respuestas {
  margin-top: 10px;
  background-color: #0d1320;
  border: 1px solid #00f6ff;
  padding: 10px;
  border-radius: 8px;
  max-height: 140px;
  overflow-y: auto;
}

#ultimas-respuestas ul {
  padding-left: 15px;
  list-style: disc;
  margin: 0;
}

#ultimas-respuestas li {
  font-size: 0.9em;
  margin-bottom: 6px;
  color: #00f6ff;
}
/* Estado procesando */
.esfera.procesando {
  animation: pulso-rapido 1s infinite;
  box-shadow: 0 0 25px #ffffffaa, 0 0 40px #ffffff55;
}

/* Nueva animación rápida para cuando Alya procesa */
@keyframes pulso-rapido {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
