/* ═══════════════════════════════════════════════════════════════
   IPA STORE — Halloween Seasonal Theme Overlay (Site-Wide)
   Preserves 100% of the core dark cinematic theme while adding
   subtle spooky season ambience, background pumpkins, glowing
   accents, and seasonal visuals across all pages.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --spooky-orange: #ff7518;
  --spooky-amber: #ff9f1c;
  --spooky-purple: #9d4edd;
  --spooky-violet: #7b2cbf;
  --spooky-grad: linear-gradient(105deg, #ff7518 0%, #ff9f1c 25%, #9d4edd 70%, #ff3daa 100%);
}

/* ── Seasonal glowing brand accent ──────────────────────────── */
.halloween-brand-badge {
  display: inline-block;
  margin-left: 5px;
  font-size: 1.15rem;
  line-height: 1;
  vertical-align: middle;
  filter: drop-shadow(0 0 8px rgba(255, 117, 24, 0.8));
  animation: spookyFloat 3.5s ease-in-out infinite;
  transform-origin: center bottom;
  cursor: default;
  user-select: none;
}

@keyframes spookyFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 0 8px rgba(255, 117, 24, 0.7)); }
  50% { transform: translateY(-4px) rotate(6deg); filter: drop-shadow(0 0 14px rgba(255, 159, 28, 0.95)) drop-shadow(0 0 20px rgba(157, 78, 221, 0.5)); }
}

/* ── Fixed background decorations container ─────────────────── */
.halloween-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* ── Corner spiderwebs (pure SVG, pointer-events none) ──────── */
.halloween-web {
  position: fixed;
  top: 0;
  width: 140px;
  height: 140px;
  pointer-events: none;
  z-index: 45;
  opacity: .28;
  background-repeat: no-repeat;
  background-size: contain;
  transition: opacity .4s ease;
}

.halloween-web:hover {
  opacity: .5;
}

.web-top-left {
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23ff9f1c' stroke-width='1.2' opacity='.8'%3E%3Cpath d='M0 0 L100 0 M0 0 L85 35 M0 0 L60 65 M0 0 L35 85 M0 0 L0 100'/%3E%3Cpath d='M20 0 Q20 20 0 20' stroke-width='0.9'/%3E%3Cpath d='M40 0 Q38 38 0 40' stroke-width='0.9'/%3E%3Cpath d='M65 0 Q60 60 0 65' stroke-width='0.9'/%3E%3Cpath d='M90 0 Q82 82 0 90' stroke-width='0.9'/%3E%3C/svg%3E");
}

.web-top-right {
  right: 0;
  transform: scaleX(-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23ff9f1c' stroke-width='1.2' opacity='.8'%3E%3Cpath d='M0 0 L100 0 M0 0 L85 35 M0 0 L60 65 M0 0 L35 85 M0 0 L0 100'/%3E%3Cpath d='M20 0 Q20 20 0 20' stroke-width='0.9'/%3E%3Cpath d='M40 0 Q38 38 0 40' stroke-width='0.9'/%3E%3Cpath d='M65 0 Q60 60 0 65' stroke-width='0.9'/%3E%3Cpath d='M90 0 Q82 82 0 90' stroke-width='0.9'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
  .halloween-web { width: 90px; height: 90px; opacity: .2; }
}

/* ── Site-Wide Spooky Season Neon Accents ───────────────────── */
body.halloween-theme .grad {
  background: var(--spooky-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.halloween-theme .brand-text b {
  background: var(--spooky-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Seasonal glow on primary CTA buttons */
body.halloween-theme .btn-primary {
  background: var(--spooky-grad);
  box-shadow: 0 8px 30px -8px rgba(255, 117, 24, 0.65), 0 8px 40px -12px rgba(157, 78, 221, 0.55);
}

body.halloween-theme .btn-primary:hover {
  box-shadow: 0 14px 40px -8px rgba(255, 117, 24, 0.8), 0 14px 50px -12px rgba(157, 78, 221, 0.7);
}

/* Subtle orange/purple tint on cursor dot */
body.halloween-theme .cursor-dot {
  background: var(--spooky-orange);
  box-shadow: 0 0 12px 2px rgba(255, 117, 24, 0.85), 0 0 22px 6px rgba(157, 78, 221, 0.5);
}

/* Marquee seasonal tint */
body.halloween-theme .marquee {
  background: linear-gradient(90deg, rgba(255, 117, 24, 0.05), rgba(157, 78, 221, 0.07) 50%, rgba(255, 61, 170, 0.05)), var(--bg-2);
  border-color: rgba(255, 117, 24, 0.2);
}

body.halloween-theme .marquee i {
  background: var(--spooky-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 117, 24, 0.8));
}

/* Category chips and filters active state */
body.halloween-theme .chip.on {
  background: var(--spooky-orange);
  color: #05060a;
  border-color: var(--spooky-orange);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(255, 117, 24, 0.35);
}

body.halloween-theme .chip:hover {
  border-color: rgba(255, 117, 24, 0.45);
}

/* Search input focus highlight */
body.halloween-theme .topsearch input:focus {
  border-color: var(--spooky-orange);
  box-shadow: 0 0 18px rgba(255, 117, 24, 0.3);
}

/* Seasonal hover glow on game cards across all listings */
body.halloween-theme .frame:hover,
body.halloween-theme .shelf-card:hover,
body.halloween-theme .genre-poster:hover,
body.halloween-theme .guide-card:hover {
  border-color: rgba(255, 117, 24, 0.38);
  box-shadow: 0 12px 36px -8px rgba(255, 117, 24, 0.22), 0 0 24px -4px rgba(157, 78, 221, 0.25);
}

/* Download page glow ring */
body.halloween-theme .dl-ring::before {
  background: radial-gradient(circle, rgba(255, 117, 24, 0.5), rgba(157, 78, 221, 0.35) 50%, transparent 70%);
}

/* ── Atmospheric Canvas Layer (behind content, above background) */
#halloween-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1; /* Below page content and decorations */
  opacity: .85;
}

/* ── Accessibility: Reduced motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .halloween-brand-badge {
    animation: none;
  }
  #halloween-canvas {
    display: none;
  }
}
