/* ========================================================
   🎃 TECHFIX - AMBIENTE VISUAL DE HALLOWEEN (100% DECORATIVO)
   Optimizado para máxima fluidez y belleza en Celulares y PC.
   Sin promociones, sin ofertas. Solo estética visual.
   ======================================================== */

:root {
  --halloween-orange: #ff5500;
  --halloween-purple: #9333ea;
  --halloween-dark-violet: #1e0b36;
}

/* ── 1. TELARAÑAS EN LAS ESQUINAS SUPERIORES ── */
.spooky-corner-web {
  position: fixed;
  top: 0;
  z-index: 45;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.spooky-corner-web.left {
  left: 0;
}

.spooky-corner-web.right {
  right: 0;
  transform: scaleX(-1);
}

/* Arañita colgante animada con oscilación suave */
.spooky-spider {
  position: fixed;
  top: 0;
  left: 70px;
  z-index: 46;
  pointer-events: none;
  transform-origin: top center;
  animation: spiderSway 4s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes spiderSway {
  0% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  50% { transform: translate3d(2px, 5px, 0) rotate(8deg); }
  100% { transform: translate3d(-1px, 0, 0) rotate(-7deg); }
}

/* ── 2. SOMBRERITO DE BRUJA SOBRE EL LOGO ── */
.spooky-witch-hat {
  position: absolute;
  top: -13px;
  left: -7px;
  width: 26px;
  height: 26px;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(147, 51, 234, 0.7));
  animation: hatTilt 5s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes hatTilt {
  0% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(2deg) scale(1.05); }
  100% { transform: rotate(-10deg) scale(1); }
}

/* ── 3. CALABACITA NEÓN EN EL HEADER ── */
.spooky-nav-pumpkin {
  display: inline-flex;
  align-items: center;
  font-size: 1.15rem;
  margin-left: 5px;
  filter: drop-shadow(0 0 8px rgba(255, 85, 0, 0.7));
  cursor: default;
  user-select: none;
  animation: pumpkinPulse 3s ease-in-out infinite;
  will-change: transform;
}

@keyframes pumpkinPulse {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 6px rgba(255, 85, 0, 0.5)); }
  50% { transform: scale(1.12) rotate(6deg); filter: drop-shadow(0 0 14px rgba(255, 120, 0, 0.9)); }
}

/* ── 4. MURCIÉLAGOS SILENCIOSOS VOLANDO EN EL FONDO ── */
.spooky-bat-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 20;
}

.spooky-bat {
  position: absolute;
  opacity: 0.35;
  filter: drop-shadow(0 0 6px rgba(147, 51, 234, 0.4));
  animation: batFlight 25s linear infinite;
  will-change: transform;
}

.spooky-bat.bat-1 {
  top: 14%;
  left: -60px;
  animation-duration: 22s;
  animation-delay: 2s;
}

.spooky-bat.bat-2 {
  top: 26%;
  left: -60px;
  animation-duration: 28s;
  animation-delay: 12s;
  transform: scale(0.75);
  opacity: 0.25;
}

@keyframes batFlight {
  0% {
    transform: translate3d(-100px, 0, 0) scale(0.8);
    opacity: 0;
  }
  5% { opacity: 0.35; }
  30% { transform: translate3d(30vw, 35px, 0) scale(0.85); }
  60% { transform: translate3d(65vw, -25px, 0) scale(0.8); }
  85% { opacity: 0.35; }
  100% {
    transform: translate3d(calc(100vw + 80px), 15px, 0) scale(0.75);
    opacity: 0;
  }
}

/* ── 5. NIEBLA AMBIENTAL SUTIL DE FONDO ── */
.spooky-ambient-glow {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1400px;
  height: 380px;
  background: radial-gradient(ellipse at 50% 0%, rgba(147, 51, 234, 0.14) 0%, rgba(255, 85, 0, 0.06) 45%, transparent 75%);
  pointer-events: none;
  z-index: 15;
  filter: blur(40px);
}

/* ── 6. DETALLE SOBRE EL BOTÓN DE WHATSAPP ── */
body.spooky-mode .whatsapp-btn::after {
  content: '🎃';
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
  animation: pumpkinBob 3.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes pumpkinBob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -4px, 0) rotate(10deg); }
}

/* ========================================================
   📱 AJUSTES PERFECTOS PARA CELULARES Y TABLETS
   ======================================================== */
@media (max-width: 768px) {
  /* Telarañas más pequeñas y discretas en móvil para no tapar el notch ni el header */
  .spooky-corner-web svg {
    width: 48px;
    height: 48px;
  }
  .spooky-corner-web {
    opacity: 0.35;
  }

  /* Arañita proporcionada al celular */
  .spooky-spider {
    left: 28px;
    transform: scale(0.65);
  }

  /* Sombrerito adaptado al icono móvil */
  .spooky-witch-hat {
    width: 22px;
    height: 22px;
    top: -10px;
    left: -5px;
  }

  /* Calabacita en el header móvil */
  .spooky-nav-pumpkin {
    font-size: 1rem;
    margin-left: 3px;
  }

  /* Murciélagos en móvil: vuelan más alto y en escala compacta */
  .spooky-bat.bat-1 {
    top: 9%;
    transform: scale(0.55);
    opacity: 0.25;
  }
  .spooky-bat.bat-2 {
    top: 18%;
    transform: scale(0.45);
    opacity: 0.2;
  }

  /* Niebla ligera para rendimiento en pantallas móviles */
  .spooky-ambient-glow {
    height: 220px;
    top: -80px;
    filter: blur(25px);
  }

  /* Detalle de WhatsApp adaptado al botón móvil (52px) */
  body.spooky-mode .whatsapp-btn::after {
    top: -7px;
    right: -3px;
    font-size: 14px;
  }
}
