/* ==============================================================================
   RETIRADOSMC • DECORACIÓN OFICIAL DE HALLOWEEN
   Aditivo no invasivo: preserva el diseño original y añade ambiente festivo
   ============================================================================== */

/* Telarañas en esquinas superiores fijas */
.halloween-web-tl {
  position: fixed;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  background: url('/assets/spiderweb.svg') no-repeat top left;
  background-size: contain;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.halloween-web-tr {
  position: fixed;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: url('/assets/spiderweb.svg') no-repeat top left;
  background-size: contain;
  transform: scaleX(-1);
  pointer-events: none;
  z-index: 1000;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

@media (max-width: 640px) {
  .halloween-web-tl,
  .halloween-web-tr {
    width: 90px;
    height: 90px;
    opacity: 0.35;
  }
}

/* Araña colgante animada desde la esquina superior */
.halloween-spider-drop {
  position: fixed;
  top: 0;
  right: 85px;
  width: 38px;
  height: 76px;
  background: url('/assets/spider.svg') no-repeat top center;
  background-size: contain;
  pointer-events: none;
  z-index: 999;
  opacity: 0.85;
  transform-origin: top center;
  animation: spiderSwing 14s ease-in-out infinite;
}

@keyframes spiderSwing {
  0% { transform: translateY(-30px) rotate(0deg); }
  15% { transform: translateY(12px) rotate(6deg); }
  35% { transform: translateY(28px) rotate(-8deg); }
  55% { transform: translateY(10px) rotate(5deg); }
  75% { transform: translateY(35px) rotate(-6deg); }
  90% { transform: translateY(0px) rotate(2deg); }
  100% { transform: translateY(-30px) rotate(0deg); }
}

@media (max-width: 640px) {
  .halloween-spider-drop {
    right: 35px;
    width: 28px;
    height: 56px;
  }
}

/* ==============================================================================
   SOMBRERO DE BRUJA ENCIMA DEL TÍTULO (Experiencia / Tienda)
   ============================================================================== */
.halloween-title-hat-wrap {
  position: relative;
  display: inline-block;
}

.halloween-title-hat {
  position: absolute;
  top: -38px;
  left: -18px;
  width: 62px;
  height: 62px;
  background: url('/assets/witch-hat.svg') no-repeat center;
  background-size: contain;
  transform: rotate(-16deg);
  filter: drop-shadow(0 6px 16px rgba(168, 85, 247, 0.7));
  pointer-events: none;
  z-index: 10;
  animation: titleHatFloat 3.2s ease-in-out infinite alternate;
}

@keyframes titleHatFloat {
  0% {
    transform: translateY(0px) rotate(-16deg);
  }
  100% {
    transform: translateY(-6px) rotate(-11deg);
  }
}

@media (max-width: 768px) {
  .halloween-title-hat {
    width: 46px;
    height: 46px;
    top: -28px;
    left: -14px;
  }
}

@media (max-width: 480px) {
  .halloween-title-hat {
    width: 36px;
    height: 36px;
    top: -22px;
    left: -10px;
  }
}

/* Contenedor de murciélagos volando en el fondo */
.halloween-bat-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.halloween-bat-1 {
  position: absolute;
  top: 14%;
  right: -100px;
  width: 48px;
  height: 30px;
  background: url('/assets/bat.svg') no-repeat center;
  background-size: contain;
  opacity: 0.7;
  animation: flyAcrossScreen1 24s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.halloween-bat-2 {
  position: absolute;
  top: 26%;
  right: -100px;
  width: 36px;
  height: 22px;
  background: url('/assets/bat.svg') no-repeat center;
  background-size: contain;
  opacity: 0.55;
  animation: flyAcrossScreen2 30s cubic-bezier(0.4, 0, 0.2, 1) infinite 11s;
}

@keyframes flyAcrossScreen1 {
  0% {
    transform: translate(0, 0) scale(1) rotate(6deg);
  }
  20% {
    transform: translate(-25vw, -35px) scale(0.95) rotate(-8deg);
  }
  45% {
    transform: translate(-55vw, 20px) scale(0.9) rotate(7deg);
  }
  70% {
    transform: translate(-80vw, -25px) scale(0.95) rotate(-6deg);
  }
  100% {
    transform: translate(-120vw, 15px) scale(1) rotate(0deg);
  }
}

@keyframes flyAcrossScreen2 {
  0% {
    transform: translate(0, 0) scale(0.8) rotate(-4deg);
  }
  30% {
    transform: translate(-35vw, 30px) scale(0.85) rotate(8deg);
  }
  65% {
    transform: translate(-70vw, -15px) scale(0.8) rotate(-7deg);
  }
  100% {
    transform: translate(-120vw, 5px) scale(0.85) rotate(0deg);
  }
}

/* Fantasma flotante amistoso en el fondo inferior */
.halloween-ghost {
  position: fixed;
  bottom: 12%;
  left: -80px;
  width: 56px;
  height: 56px;
  background: url('/assets/ghost.svg') no-repeat center;
  background-size: contain;
  opacity: 0.45;
  pointer-events: none;
  z-index: 2;
  animation: ghostDriftAcross 38s ease-in-out infinite;
}

@keyframes ghostDriftAcross {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  5% { opacity: 0.45; }
  25% { transform: translate(30vw, -25px) scale(1.05); }
  50% { transform: translate(60vw, 15px) scale(0.95); }
  75% { transform: translate(85vw, -20px) scale(1.02); }
  95% { opacity: 0.45; }
  100% { transform: translate(115vw, 0) scale(1); opacity: 0; }
}

/* Badge / Píldora del evento de Halloween */
.halloween-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16) 0%, rgba(147, 51, 234, 0.16) 100%);
  border: 1px solid rgba(249, 115, 22, 0.4);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.2), inset 0 0 12px rgba(147, 51, 234, 0.15);
  padding: 6px 16px;
  border-radius: 9999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fdba74;
  text-transform: uppercase;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  animation: halloweenPillGlow 3s ease-in-out infinite alternate;
}

@keyframes halloweenPillGlow {
  0% {
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.4);
  }
  100% {
    box-shadow: 0 0 28px rgba(249, 115, 22, 0.4), 0 0 12px rgba(168, 85, 247, 0.35);
    border-color: rgba(249, 115, 22, 0.7);
  }
}

/* Calabaza Jack-O'-Lantern decorativa */
.halloween-pumpkin-icon {
  width: 24px;
  height: 24px;
  background: url('/assets/pumpkin.svg') no-repeat center;
  background-size: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.7));
  animation: pumpkinPulse 2.8s ease-in-out infinite alternate;
}

@keyframes pumpkinPulse {
  0% {
    filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.5));
    transform: scale(1);
  }
  100% {
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.9));
    transform: scale(1.08);
  }
}

/* Calabaza decorativa en esquina de tarjetas (IP / Categorías) */
.halloween-corner-pumpkin {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: url('/assets/pumpkin.svg') no-repeat center;
  background-size: contain;
  filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.8));
  animation: pumpkinPulse 3s ease-in-out infinite alternate;
}

/* Overlay sutil de niebla y luz espectral de Halloween */
.halloween-ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: 
    radial-gradient(circle at 15% 25%, rgba(147, 51, 234, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(249, 115, 22, 0.07) 0%, transparent 50%);
}

/* Canvas de brasas/partículas de calabaza flotantes */
#halloweenEmbersCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.75;
}
