/* =====================================================
   PANEL 2 - ESCENA CINETICA (ORIENTACIÓN INTELIGENTE)
   ===================================================== */
   
.scene-orientacion {
  position: relative;
  width: 100%;
  min-height: 90vh;
  background-color: #02040a; /* Oscuro abisal profundo */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- AMBIENTE ABSOLUTO (FONDOS & CANVAS) --- */
.scene-ambient-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 70% 60%, rgba(0, 180, 216, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 30% 40%, rgba(13, 20, 36, 0.5) 0%, transparent 50%);
  z-index: 1;
}

.scene-canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.8;
  mix-blend-mode: screen; 
}

/* Capa sutil de blur/fog sobre el canvas para dar profundidad extra */
.scene-fog-layer {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(2, 4, 10, 0.6) 0%, transparent 20%, transparent 80%, rgba(2, 4, 10, 0.8) 100%);
  z-index: 3;
  pointer-events: none;
}

/* --- CONTENIDO FRONTAL FLOTANTE --- */
.scene-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  pointer-events: none; /* Para no bloquear clicks si hay espacio muerto */
}

@media (min-width: 1024px) {
  .scene-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    padding: 120px 40px;
  }
}

/* Habilitar clicks en hijos */
.scene-narrative, .scene-ai-core {
  pointer-events: auto;
}

/* --- NARRATIVA (IZQUIERDA/ARRIBA) --- */
.scene-narrative {
  flex: 1;
  max-width: 600px;
  text-align: left;
}

.scene-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  color: transparent;
  transition: opacity 0.5s ease;
}

@media (min-width: 1024px) {
  .scene-title {
    font-size: 4rem;
  }
}

.scene-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  font-weight: 400;
  max-width: 500px;
}

@media (min-width: 1024px) {
  .scene-subtitle {
    font-size: 1.25rem;
  }
}

/* --- MÓDULO IA GLASSMORPHIC (DERECHA/CENTRO) --- */
.scene-ai-core {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 1024px) {
  .scene-ai-core {
    justify-content: flex-end;
  }
}

.ai-glass-module {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-glass-module:hover {
  transform: translateY(-5px);
  box-shadow: 0 50px 100px rgba(0, 180, 216, 0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}

.ai-glass-header {
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

.ai-header-pulse {
  width: 12px;
  height: 12px;
  background-color: #00b4d8;
  border-radius: 50%;
  box-shadow: 0 0 15px #00b4d8;
  animation: pulse-core 2s infinite;
}

@keyframes pulse-core {
  0% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 180, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0); }
}

.ai-header-text h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #fff;
  letter-spacing: 0.5px;
}

.ai-header-text p {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  line-height: 1.3;
}

/* Chat Area */
.ai-glass-chat {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 450px;
  min-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.ai-glass-chat::-webkit-scrollbar {
  width: 4px;
}
.ai-glass-chat::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* Mensajes con look orgánico */
.glass-message {
  display: flex;
  flex-direction: column;
  max-width: 90%;
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  align-items: flex-end;
}

.message-content {
  padding: 16px 20px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}

.bot-message .message-content {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top-left-radius: 4px;
  color: #e2e8f0;
}

.user-message .message-content {
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

/* Contenedor de Botones (Chips) integrados al cristal */
.ai-chips-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

@media (min-width: 480px) {
  .ai-chips-container {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.glass-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.glass-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.glass-btn.primary-glow {
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  border: none;
  box-shadow: 0 5px 20px rgba(0, 180, 216, 0.4);
}

.glass-btn.primary-glow:hover {
  box-shadow: 0 8px 30px rgba(0, 180, 216, 0.6);
  transform: translateY(-2px);
}

.glass-btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
}

.glass-btn.outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

/* Tipiando / Processing */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  border-top-left-radius: 4px;
  width: max-content;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background-color: rgba(0, 180, 216, 0.8);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* Resultados Premium */
.result-banner {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(21, 128, 61, 0.1) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  margin-top: 10px;
}

.result-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #4ade80;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
}

.result-action {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border: none;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(34, 197, 94, 0.3);
}

.result-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.5);
}

/* Utility Animations */
.fade-in-up {
  animation: fadeInUp 0.5s forwards ease-out;
}

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

.highlight-pulse {
  animation: pulseSuccessglow 3s infinite;
}

@keyframes pulseSuccessglow {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
