/* ============================================
   AURORA NEURAL EFFECTS
   Bold Visual System for JUAMPI IA
   ============================================ */

/* ------------------- */
/* 1. AURORA PALETTE   */
/* ------------------- */

:root {
  /* Aurora Palette - Ocean Blue (Suave y Profesional) */
  --aurora-green: #10b981;
  --aurora-cyan: #3fb4ff;
  --aurora-teal: #60a5fa;
  --aurora-mint: #38bdf8;
  --aurora-light: #E9F5F5;

  /* Legacy aliases for compatibility */
  --aurora-magenta: #0ea5e9;
  --aurora-violet: #60a5fa;
  --aurora-pink: #38bdf8;

  /* Gradientes Aurora - Ocean Blue */
  --aurora-gradient: linear-gradient(135deg,
      var(--aurora-green) 0%,
      var(--aurora-cyan) 35%,
      var(--aurora-teal) 65%,
      var(--aurora-light) 100%);

  --aurora-gradient-subtle: linear-gradient(135deg,
      rgba(16, 185, 129, 0.1) 0%,
      rgba(63, 180, 255, 0.12) 35%,
      rgba(96, 165, 250, 0.1) 70%,
      rgba(233, 245, 245, 0.08) 100%);

  /* Glow Colors - Ocean Blue */
  --glow-green: 0 0 40px rgba(16, 185, 129, 0.5);
  --glow-cyan: 0 0 40px rgba(63, 180, 255, 0.5);
  --glow-teal: 0 0 40px rgba(96, 165, 250, 0.4);
  --glow-magenta: 0 0 40px rgba(14, 165, 233, 0.4);
}

/* ------------------- */
/* 2. AURORA BACKGROUND */
/* ------------------- */

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background: #030014;
}

.aurora-bg::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(63, 180, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 70% 60%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
  animation: aurora-shift 30s ease-in-out infinite alternate;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

@keyframes aurora-shift {
  0% {
    transform: translate(0%, 0%) rotate(0deg);
    opacity: 0.8;
  }

  50% {
    transform: translate(10%, -5%) rotate(3deg);
    opacity: 1;
  }

  100% {
    transform: translate(-5%, 10%) rotate(-3deg);
    opacity: 0.9;
  }
}

/* ------------------- */
/* 3. NEURAL PARTICLES */
/* ------------------- */

.neural-particles {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  overflow: hidden;
}

.neural-particles::before,
.neural-particles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--aurora-cyan);
  border-radius: 50%;
  box-shadow:
    50vw 10vh 0 0 rgba(16, 185, 129, 0.3),
    20vw 30vh 0 1px rgba(63, 180, 255, 0.4),
    80vw 20vh 0 0 rgba(96, 165, 250, 0.3),
    40vw 60vh 0 2px rgba(16, 185, 129, 0.5),
    70vw 80vh 0 0 rgba(63, 180, 255, 0.3),
    10vw 70vh 0 1px rgba(56, 189, 248, 0.4),
    90vw 50vh 0 0 rgba(16, 185, 129, 0.3),
    30vw 90vh 0 1px rgba(63, 180, 255, 0.4),
    60vw 40vh 0 2px rgba(96, 165, 250, 0.5),
    15vw 15vh 0 0 rgba(14, 165, 233, 0.4);
  animation: float-particles 25s ease-in-out infinite;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.neural-particles::after {
  animation-delay: -7s;
  animation-duration: 20s;
}

@keyframes float-particles {

  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.6;
  }

  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 1;
  }

  50% {
    transform: translateY(-10px) translateX(-15px);
    opacity: 0.8;
  }

  75% {
    transform: translateY(15px) translateX(5px);
    opacity: 1;
  }
}

/* ------------------- */
/* 4. GRADIENT BORDER  */
/* ------------------- */

.aurora-border {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  overflow: hidden;
}

.aurora-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: var(--aurora-gradient);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-rotate 6s linear infinite;
  background-size: 300% 300%;
}

@keyframes border-rotate {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ------------------- */
/* 5. EXPLOSIVE HOVER  */
/* ------------------- */

.aurora-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.aurora-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: left 0.5s ease;
}

.aurora-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(96, 239, 255, 0.5);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(0, 255, 135, 0.15),
    0 0 100px rgba(96, 239, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.aurora-card:hover::before {
  left: 100%;
}

/* ------------------- */
/* 6. GLOWING BUTTONS  */
/* ------------------- */

.aurora-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--aurora-gradient);
  background-size: 200% 200%;
  border: none;
  border-radius: 9999px;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: gradient-flow 4s ease infinite;
  overflow: hidden;
}

.aurora-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--aurora-gradient);
  background-size: 200% 200%;
  border-radius: inherit;
  z-index: -1;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: gradient-flow 4s ease infinite;
}

.aurora-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 20px 40px rgba(0, 255, 135, 0.3),
    0 0 60px rgba(96, 239, 255, 0.4);
}

.aurora-btn:hover::before {
  opacity: 0.6;
}

.aurora-btn:active {
  transform: translateY(-2px) scale(1.02);
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ------------------- */
/* 7. GLOW TEXT        */
/* ------------------- */

.aurora-text {
  background: var(--aurora-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 6s ease infinite;
}

.aurora-text-glow {
  background: var(--aurora-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 6s ease infinite;
  filter: drop-shadow(0 0 30px rgba(0, 255, 135, 0.5)) drop-shadow(0 0 60px rgba(96, 239, 255, 0.3));
}

/* ------------------- */
/* 8. PULSE ANIMATION  */
/* ------------------- */

.neural-pulse {
  animation: neural-pulse-anim 3s ease-in-out infinite;
}

@keyframes neural-pulse-anim {

  0%,
  100% {
    box-shadow:
      0 0 20px rgba(0, 255, 135, 0.2),
      0 0 40px rgba(96, 239, 255, 0.1);
  }

  50% {
    box-shadow:
      0 0 40px rgba(0, 255, 135, 0.4),
      0 0 80px rgba(96, 239, 255, 0.2),
      0 0 120px rgba(255, 0, 255, 0.1);
  }
}

/* ------------------- */
/* 9. HERO ENHANCED    */
/* ------------------- */

.hero-aurora {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-aurora::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 255, 135, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: hero-glow 8s ease-in-out infinite alternate;
}

@keyframes hero-glow {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.8;
  }
}

/* ------------------- */
/* 10. NAVBAR AURORA   */
/* ------------------- */

.navbar-aurora {
  background: rgba(3, 0, 20, 0.6) !important;
  backdrop-filter: blur(60px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(60px) saturate(200%) !important;
  border: 1px solid rgba(96, 239, 255, 0.1) !important;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 60px rgba(0, 255, 135, 0.05);
}

/* ------------------- */
/* 11. STATS COUNTER   */
/* ------------------- */

.aurora-stat {
  text-align: center;
  padding: 1.5rem;
}

.aurora-stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--aurora-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 4s ease infinite;
  line-height: 1;
}

.aurora-stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

/* ------------------- */
/* 12. ICON GLOW       */
/* ------------------- */

.aurora-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(0, 255, 135, 0.1);
  border: 1px solid rgba(0, 255, 135, 0.3);
  border-radius: 16px;
  font-size: 1.75rem;
  color: var(--aurora-green);
  transition: all 0.3s ease;
}

.aurora-icon:hover {
  background: rgba(0, 255, 135, 0.2);
  box-shadow: var(--glow-green);
  transform: scale(1.1) rotate(5deg);
}

.aurora-icon--cyan {
  background: rgba(63, 180, 255, 0.1);
  border-color: rgba(63, 180, 255, 0.3);
  color: var(--aurora-cyan);
}

.aurora-icon--cyan:hover {
  background: rgba(63, 180, 255, 0.2);
  box-shadow: var(--glow-cyan);
}

.aurora-icon--teal,
.aurora-icon--magenta {
  background: rgba(139, 44, 255, 0.1);
  border-color: rgba(139, 44, 255, 0.3);
  color: var(--aurora-teal);
}

.aurora-icon--teal:hover,
.aurora-icon--magenta:hover {
  background: rgba(139, 44, 255, 0.2);
  box-shadow: var(--glow-teal);
}

/* ------------------- */
/* 13. REDUCED MOTION  */
/* ------------------- */

@media (prefers-reduced-motion: reduce) {

  .aurora-bg::before,
  .neural-particles::before,
  .neural-particles::after,
  .aurora-border::before,
  .aurora-btn,
  .aurora-btn::before,
  .aurora-text,
  .aurora-text-glow,
  .aurora-stat-number {
    animation: none !important;
  }

  .aurora-card:hover,
  .aurora-btn:hover,
  .aurora-icon:hover {
    transform: none !important;
  }
}

/* ------------------- */
/* 14. BADGE AURORA    */
/* ------------------- */

.aurora-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(0, 255, 135, 0.1);
  border: 1px solid rgba(0, 255, 135, 0.3);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--aurora-green);
  backdrop-filter: blur(20px);
  animation: badge-glow 3s ease-in-out infinite alternate;
}

@keyframes badge-glow {
  0% {
    box-shadow: 0 0 10px rgba(0, 255, 135, 0.2);
  }

  100% {
    box-shadow: 0 0 25px rgba(0, 255, 135, 0.4);
  }
}

/* ------------------- */
/* 15. MOBILE          */
/* ------------------- */

@media (max-width: 768px) {
  .aurora-card {
    padding: 1.5rem;
  }

  .aurora-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    min-height: 48px;
  }

  .aurora-icon {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }

  .aurora-stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .aurora-card {
    padding: 1.25rem;
  }

  .aurora-btn {
    padding: 0.75rem 1.25rem;
    width: 100%;
    justify-content: center;
  }

  .aurora-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .aurora-stat-number {
    font-size: 1.75rem;
  }
}

/* --------------------------------- */
/* 16. VOICE AGENT SCREEN GLOW FRAME */
/* --------------------------------- */

/* Marco iluminado que rodea toda la pantalla en modo voz */
.voice-screen-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 11000;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.voice-screen-glow.active {
  opacity: 1;
}

/* Borde iluminado estático (cuando escucha) */
.voice-screen-glow::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 24px;
  border: 2px solid rgba(99, 102, 241, 0.4);
  box-shadow:
    0 0 20px rgba(99, 102, 241, 0.3),
    0 0 40px rgba(99, 102, 241, 0.15),
    inset 0 0 20px rgba(99, 102, 241, 0.05);
  transition: all 0.3s ease;
}

/* Animación cuando el agente habla - pulso dinámico de brillo */
.voice-screen-glow.speaking::before {
  border-color: rgba(124, 58, 237, 0.7);
  animation: voice-glow-pulse 1.2s ease-in-out infinite;
}

@keyframes voice-glow-pulse {

  0%,
  100% {
    box-shadow:
      0 0 20px rgba(124, 58, 237, 0.3),
      0 0 40px rgba(99, 102, 241, 0.2),
      0 0 60px rgba(79, 70, 229, 0.1),
      inset 0 0 15px rgba(124, 58, 237, 0.05);
    border-color: rgba(124, 58, 237, 0.5);
  }

  50% {
    box-shadow:
      0 0 35px rgba(124, 58, 237, 0.6),
      0 0 70px rgba(99, 102, 241, 0.4),
      0 0 100px rgba(79, 70, 229, 0.25),
      inset 0 0 30px rgba(124, 58, 237, 0.1);
    border-color: rgba(139, 92, 246, 0.8);
  }
}

/* Efecto de audio visualizer en el borde inferior */
.voice-screen-glow::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg,
      rgba(99, 102, 241, 0.1),
      rgba(124, 58, 237, 0.8),
      rgba(99, 102, 241, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.voice-screen-glow.speaking::after {
  opacity: 1;
  animation: voice-bar-pulse 0.8s ease-in-out infinite;
}

@keyframes voice-bar-pulse {

  0%,
  100% {
    width: 150px;
    opacity: 0.6;
  }

  50% {
    width: 280px;
    opacity: 1;
  }
}

/* Reducir animaciones para usuarios con preferencia */
@media (prefers-reduced-motion: reduce) {

  .voice-screen-glow.speaking::before,
  .voice-screen-glow.speaking::after {
    animation: none !important;
  }
}