/**
 * HAZE STUDIOS — HALLOWEEN DEEP IMMERSION THEME
 * Pure Non-Destructive Scoped Styles (.theme-halloween)
 * All directives: Webs, Spiders, Jack-o'-Lanterns, Ghosts, Bat Bursts, Full Moon & Cemetery Horizon
 */

/* ─── 1. ROOT VARIABLES OVERRIDE (Scoped to .theme-halloween) ─── */
html.theme-halloween {
  --bg-primary: #07060a;
  --bg-secondary: #0c0914;
  --bg-card: rgba(18, 14, 26, 0.92);
  --bg-card-hover: rgba(255, 119, 0, 0.09);
  --border-color: rgba(255, 119, 0, 0.22);
  --border-subtle: rgba(157, 78, 221, 0.25);
  --border-neon: #ff7700;
  --border-green-dark: #2a1202;

  --accent-green: #ff7700;
  --accent-green-rgb: 255, 119, 0;
  --accent-green-glow: rgba(255, 119, 0, 0.55);
  --accent-green-hover: #ffa200;

  --cfx-orange: #ff7700;
  --cfx-orange-glow: rgba(255, 119, 0, 0.55);

  --halloween-orange: #ff7700;
  --halloween-orange-bright: #ffa200;
  --halloween-orange-fire: #ff4500;
  --halloween-purple: #9d4edd;
  --halloween-purple-deep: #5a189a;
  --halloween-green-toxic: #10b981;
  --halloween-glow-multi: 0 0 25px rgba(255, 119, 0, 0.4), 0 0 50px rgba(157, 78, 221, 0.25);
}

/* ─── 2. GLOBAL ATMOSPHERE & BACKGROUND ─── */
html.theme-halloween body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(157, 78, 221, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 85% 35%, rgba(255, 119, 0, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(90, 24, 154, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, rgba(7, 6, 10, 0.85) 0%, rgba(12, 9, 20, 0.95) 100%);
  background-attachment: fixed;
  color: #e2e8f0;
}

/* Custom Gothic Halloween Scrollbar */
html.theme-halloween::-webkit-scrollbar {
  width: 10px;
}
html.theme-halloween::-webkit-scrollbar-track {
  background: #07060a;
}
html.theme-halloween::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff7700, #9d4edd);
  border-radius: 6px;
  border: 2px solid #07060a;
}
html.theme-halloween::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffa200, #c77dff);
  box-shadow: 0 0 14px rgba(255, 119, 0, 0.7);
}

/* ─── 3. AMBIENT CANVAS (Embers, Distant Bats & Wisps) ─── */
#halloweenAmbientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease;
}
html.theme-halloween #halloweenAmbientCanvas {
  opacity: 1;
}

/* ─── 4. VIEWPORT FIXED CORNER COBWEBS (Diretriz 1) ─── */
.halloween-viewport-web {
  position: fixed;
  width: 160px;
  height: 160px;
  pointer-events: none;
  z-index: 998;
  opacity: 0;
  transition: opacity 0.6s ease;
}
html.theme-halloween .halloween-viewport-web {
  opacity: 0.32;
}
.halloween-viewport-web.top-left {
  top: 0;
  left: 0;
}
.halloween-viewport-web.top-right {
  top: 0;
  right: 0;
  transform: scaleX(-1);
}
.halloween-viewport-web.bottom-left {
  bottom: 0;
  left: 0;
  transform: scaleY(-1);
}
.halloween-viewport-web.bottom-right {
  bottom: 0;
  right: 0;
  transform: scale(-1);
}

/* Teias na Barra de Navegação */
.halloween-navbar-web {
  position: absolute;
  top: 100%;
  pointer-events: none;
  z-index: 10;
  display: none;
  opacity: 0.4;
}
html.theme-halloween .halloween-navbar-web {
  display: block;
}
.halloween-navbar-web.left {
  left: 20px;
  width: 90px;
}
.halloween-navbar-web.right {
  right: 20px;
  width: 90px;
  transform: scaleX(-1);
}

/* Teias nos Cartões e Modais */
.halloween-card-web {
  position: absolute;
  top: 0;
  left: 0;
  width: 65px;
  height: 65px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.38;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
}
html.theme-halloween .halloween-card-web {
  display: block;
}
html.theme-halloween .package-card:hover .halloween-card-web,
html.theme-halloween .bestseller-card:hover .halloween-card-web {
  opacity: 0.65;
  transform: scale(1.06);
}

/* ─── 5. ARANHAS INTERATIVAS PENDURADAS EM FIOS (Diretriz 1) ─── */
.halloween-hanging-spider {
  position: absolute;
  z-index: 95;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: top center;
  transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: none;
}
html.theme-halloween .halloween-hanging-spider {
  display: block;
}

.halloween-hanging-spider .spider-thread {
  width: 1.5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 119, 0, 0.5) 70%, rgba(157, 78, 221, 0.8) 100%);
  margin: 0 auto;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  transition: height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.halloween-hanging-spider .spider-body-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  margin: 0 auto;
  animation: spiderBreezeSwing 4s ease-in-out infinite alternate;
  transform-origin: top center;
  transition: transform 0.35s ease;
}

.halloween-hanging-spider:hover .spider-body-wrap {
  animation: spiderPanicShake 0.25s infinite alternate;
}

/* Estado de retração rápida quando perturbada */
.halloween-hanging-spider.scared {
  top: -60px !important;
  transition: top 0.35s cubic-bezier(0.12, 0, 0.39, 0) !important;
}

@keyframes spiderBreezeSwing {
  0% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
  100% { transform: rotate(-7deg); }
}

@keyframes spiderPanicShake {
  0% { transform: scale(1.08) rotate(-14deg); }
  100% { transform: scale(1.08) rotate(14deg); }
}

/* Aranha rastejante ao longo das bordas */
.halloween-crawling-spider {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 12;
  opacity: 0.7;
  display: none;
}
html.theme-halloween .halloween-crawling-spider {
  display: block;
}

/* ─── 6. TOP HERO: LUA CHEIA, NUVENS, ÁRVORES SECAS & MANSÃO (Diretriz 4) ─── */
.halloween-hero-scenery {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  display: none;
}
html.theme-halloween .halloween-hero-scenery {
  display: block;
}

/* Grande Lua Cheia com Halo Místico */
.halloween-moon-wrap {
  position: absolute;
  top: 35px;
  right: 12%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff5d1 0%, #ffaa00 45%, #e65c00 75%, #992200 100%);
  box-shadow: 
    0 0 45px rgba(255, 170, 0, 0.7),
    0 0 100px rgba(255, 119, 0, 0.45),
    0 0 180px rgba(157, 78, 221, 0.3);
  animation: moonPulse 6s ease-in-out infinite alternate;
  z-index: 1;
}

.halloween-moon-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 60% 40%, rgba(130, 40, 10, 0.35) 12%, transparent 22%),
    radial-gradient(circle at 45% 65%, rgba(130, 40, 10, 0.3) 16%, transparent 28%),
    radial-gradient(circle at 75% 70%, rgba(130, 40, 10, 0.25) 10%, transparent 20%);
}

@keyframes moonPulse {
  0% { box-shadow: 0 0 40px rgba(255, 170, 0, 0.6), 0 0 90px rgba(255, 119, 0, 0.35), 0 0 160px rgba(157, 78, 221, 0.25); }
  100% { box-shadow: 0 0 60px rgba(255, 185, 0, 0.85), 0 0 130px rgba(255, 119, 0, 0.6), 0 0 220px rgba(157, 78, 221, 0.45); }
}

/* Nuvens Noturnas Deslizantes */
.halloween-moon-cloud {
  position: absolute;
  top: 75px;
  right: 6%;
  width: 280px;
  height: 55px;
  background: rgba(12, 9, 20, 0.65);
  border-radius: 999px;
  filter: blur(14px);
  z-index: 2;
  animation: moonCloudDrift 38s linear infinite alternate;
}
.halloween-moon-cloud.cloud-2 {
  top: 110px;
  right: 18%;
  width: 220px;
  height: 45px;
  background: rgba(157, 78, 221, 0.2);
  filter: blur(18px);
  animation: moonCloudDrift 28s linear infinite alternate-reverse;
}

@keyframes moonCloudDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-60px); }
}

/* Mansão Mal-Assombrada e Árvores Góticas */
.halloween-mansion-silhouette {
  position: absolute;
  bottom: 0;
  right: 8%;
  width: 220px;
  height: 180px;
  z-index: 2;
  opacity: 0.42;
  filter: drop-shadow(0 -5px 15px rgba(0, 0, 0, 0.9));
}

.halloween-spooky-tree-left {
  position: absolute;
  top: 0;
  left: -20px;
  width: 200px;
  height: 380px;
  opacity: 0.38;
  z-index: 2;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.95));
}

.halloween-spooky-tree-right {
  position: absolute;
  top: 0;
  right: -20px;
  width: 180px;
  height: 340px;
  opacity: 0.34;
  transform: scaleX(-1);
  z-index: 2;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.95));
}

/* Camada de névoa ondulante no hero */
.halloween-fog-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  display: none;
}
html.theme-halloween .halloween-fog-layer {
  display: block;
}
.halloween-fog-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 250%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 100%, rgba(157, 78, 221, 0.22) 0%, rgba(255, 119, 0, 0.12) 40%, transparent 75%);
  filter: blur(25px);
  animation: halloweenFogDrift 30s linear infinite alternate;
}
.halloween-fog-wave.secondary {
  animation: halloweenFogDriftReverse 45s linear infinite alternate;
  opacity: 0.75;
}

@keyframes halloweenFogDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-40%); }
}
@keyframes halloweenFogDriftReverse {
  0% { transform: translateX(-35%); }
  100% { transform: translateX(5%); }
}

/* ─── 7. JACK-O'-LANTERNS VIVAS & CLICÁVEIS (Diretriz 2) ─── */
.halloween-scenery-pumpkin {
  position: absolute;
  z-index: 4;
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 18px rgba(255, 119, 0, 0.45));
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
  display: none;
}
html.theme-halloween .halloween-scenery-pumpkin {
  display: block;
}
.halloween-scenery-pumpkin:hover {
  transform: scale(1.15) rotate(-3deg);
  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 30px rgba(255, 119, 0, 0.85));
}
.halloween-scenery-pumpkin.shaking {
  animation: pumpkinShockWave 0.7s ease-in-out;
}

@keyframes pumpkinShockWave {
  0% { transform: scale(1); }
  20% { transform: scale(1.25) rotate(-10deg); filter: drop-shadow(0 0 45px #ffaa00); }
  40% { transform: scale(0.9) rotate(10deg); }
  60% { transform: scale(1.15) rotate(-6deg); }
  80% { transform: scale(0.95) rotate(4deg); }
  100% { transform: scale(1); }
}

/* Fogo pulsante dentro das Jack-o'-Lanterns */
.pumpkin-fire-glow {
  animation: flameFlicker 2.8s ease-in-out infinite alternate;
}
@keyframes flameFlicker {
  0%, 100% { opacity: 0.9; filter: drop-shadow(0 0 4px #ffa200); }
  25% { opacity: 0.65; filter: drop-shadow(0 0 2px #ff4500); }
  50% { opacity: 1; filter: drop-shadow(0 0 8px #ffdd00); }
  75% { opacity: 0.8; filter: drop-shadow(0 0 5px #ff7700); }
}

/* Mini abóbora no canto de cada pacote da loja */
.card-mini-pumpkin {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.45;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: none;
}
html.theme-halloween .card-mini-pumpkin {
  display: block;
}
html.theme-halloween .package-card:hover .card-mini-pumpkin,
html.theme-halloween .bestseller-card:hover .card-mini-pumpkin {
  opacity: 1;
  transform: scale(1.25) rotate(-5deg);
  filter: drop-shadow(0 0 16px rgba(255, 119, 0, 0.95)) drop-shadow(0 0 25px rgba(255, 162, 0, 0.7));
}

/* Chuva de doces e faíscas ao clicar na abóbora */
.halloween-candy-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 24px;
  transform: translate(-50%, -50%);
  animation: candyScatter 1.1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes candyScatter {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
  }
  60% {
    opacity: 1;
    transform: translate(var(--tx), var(--ty)) scale(1.2) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), calc(var(--ty) + 40px)) scale(0.8) rotate(360deg);
  }
}

/* ─── 8. FANTASMAS ESPECTRAIS & PEEKABOO NOS CARDS (Diretriz 3) ─── */
.halloween-floating-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease;
  filter: drop-shadow(0 0 20px rgba(157, 78, 221, 0.6)) drop-shadow(0 0 35px rgba(16, 185, 129, 0.3));
}
html.theme-halloween .halloween-floating-ghost.active {
  opacity: 0.75;
}

/* Fantasma Peekaboo nos Cartões */
.card-peekaboo-ghost {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(25px) scale(0.5);
  width: 44px;
  height: 44px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  filter: drop-shadow(0 0 12px rgba(157, 78, 221, 0.8));
  display: none;
}
html.theme-halloween .card-peekaboo-ghost {
  display: block;
}
html.theme-halloween .package-card.ghost-peek .card-peekaboo-ghost,
html.theme-halloween .bestseller-card.ghost-peek .card-peekaboo-ghost {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  animation: ghostCuriousBob 2s ease-in-out infinite alternate;
}

@keyframes ghostCuriousBob {
  0% { transform: translateX(-50%) translateY(0) rotate(-4deg); }
  100% { transform: translateX(-50%) translateY(-6px) rotate(4deg); }
}

/* Baforada de fumaça quando o fantasma some */
.halloween-ghost-smoke {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.45) 0%, rgba(255, 119, 0, 0.2) 50%, transparent 75%);
  filter: blur(8px);
  animation: smokeDissipate 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes smokeDissipate {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0.9; }
  100% { transform: translateX(-50%) scale(2); opacity: 0; }
}

/* Revoada de morcegos nos cliques (Click Bat Burst) */
.click-burst-bat {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
  animation: batBurstFly 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes batBurstFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.4) rotate(var(--angle, 0deg));
  }
  60% {
    opacity: 0.9;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(calc(var(--angle, 0deg) + 20deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx) * 1.5), calc(-50% + var(--dy) * 1.5 - 30px)) scale(0.7) rotate(calc(var(--angle, 0deg) - 20deg));
  }
}

/* ─── 9. RODAPÉ DE CEMITÉRIO ASSOMBRADO (Diretriz 4) ─── */
.halloween-cemetery-horizon {
  position: relative;
  width: 100%;
  height: 90px;
  overflow: hidden;
  pointer-events: none;
  margin-bottom: -15px;
  z-index: 2;
  display: none;
}
html.theme-halloween .halloween-cemetery-horizon {
  display: block;
}

.cemetery-silhouette-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 -4px 12px rgba(0, 0, 0, 0.9));
}

.cemetery-fog-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 50px;
  background: radial-gradient(ellipse at 50% 100%, rgba(157, 78, 221, 0.28) 0%, rgba(255, 119, 0, 0.15) 35%, transparent 70%);
  filter: blur(14px);
  animation: cemeteryFogDrift 24s linear infinite alternate;
}
@keyframes cemeteryFogDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-35%); }
}

/* ─── 10. BOTÕES & TÍTULOS ASSOMBRADOS (Diretriz 4) ─── */
html.theme-halloween .section-title-gradient,
html.theme-halloween .hero-quasar-title {
  text-shadow: 0 0 25px rgba(255, 119, 0, 0.4), 0 0 45px rgba(157, 78, 221, 0.25);
}

html.theme-halloween .btn-card-buy,
html.theme-halloween .btn-quasar-primary,
html.theme-halloween .btn-hero-primary {
  background: linear-gradient(135deg, #ff6600 0%, #ff8800 50%, #ffa200 100%) !important;
  color: #000 !important;
  font-weight: 800 !important;
  border: 1px solid rgba(255, 230, 150, 0.4) !important;
  box-shadow: 
    0 0 20px rgba(255, 119, 0, 0.5),
    0 0 35px rgba(157, 78, 221, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

html.theme-halloween .btn-card-buy::after,
html.theme-halloween .btn-quasar-primary::after,
html.theme-halloween .btn-hero-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: candleFlickerSweep 4s infinite;
}

@keyframes candleFlickerSweep {
  0%, 75% { left: -100%; }
  100% { left: 160%; }
}

html.theme-halloween .btn-card-buy:hover,
html.theme-halloween .btn-quasar-primary:hover,
html.theme-halloween .btn-hero-primary:hover {
  background: linear-gradient(135deg, #ff7700 0%, #ffa200 100%) !important;
  box-shadow: 0 0 35px rgba(255, 119, 0, 0.85), 0 0 60px rgba(157, 78, 221, 0.45) !important;
  transform: translateY(-2px);
}

/* Título e logo com aura bruxuleante */
html.theme-halloween .brand-logo {
  filter: drop-shadow(0 0 14px rgba(255, 119, 0, 0.75)) drop-shadow(0 0 32px rgba(157, 78, 221, 0.4));
  animation: halloweenLogoPulse 4s ease-in-out infinite;
}

@keyframes halloweenLogoPulse {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(255, 119, 0, 0.65)) drop-shadow(0 0 25px rgba(157, 78, 221, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 24px rgba(255, 140, 0, 0.95)) drop-shadow(0 0 45px rgba(157, 78, 221, 0.6));
  }
}

/* ─── 11. TOGGLE BUTTON & WIDGET (Preservação & Reversibilidade) ─── */
.halloween-theme-toggle-btn {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 16px rgba(255, 119, 0, 0.2);
}
.halloween-theme-toggle-btn:hover {
  background: rgba(255, 119, 0, 0.25);
  color: #fff;
  border-color: #ff9500;
  box-shadow: 0 0 24px rgba(255, 119, 0, 0.55);
  transform: translateY(-1px);
}
.halloween-theme-toggle-btn .theme-toggle-status {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 119, 0, 0.3);
  color: #fff;
  letter-spacing: 0.5px;
}
html:not(.theme-halloween) .halloween-theme-toggle-btn {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(255, 119, 0, 0.6);
  pointer-events: none;
  animation: pumpkinBubbleFloat 2.5s ease-in-out infinite;
}
.pumpkin-bubble::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: #ff7700 transparent;
  display: block;
  width: 0;
}
@keyframes pumpkinBubbleFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -4px); }
}

/* Modal de Doces ou Travessuras */
.halloween-treat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.halloween-treat-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.halloween-treat-card {
  background: #0d0a14;
  border: 1px solid rgba(255, 119, 0, 0.4);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 119, 0, 0.3);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.halloween-treat-modal-overlay.active .halloween-treat-card {
  transform: scale(1);
}
.treat-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 119, 0, 0.15);
  color: #ff9500;
  border: 1px solid rgba(255, 119, 0, 0.3);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.treat-card-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}
.treat-card-desc {
  font-size: 14px;
  color: #a1a1aa;
  line-height: 1.5;
  margin-bottom: 24px;
}
.treat-coupon-box {
  background: rgba(255, 119, 0, 0.08);
  border: 2px dashed rgba(255, 119, 0, 0.5);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.treat-coupon-code {
  font-family: var(--font-mono, monospace);
  font-size: 22px;
  font-weight: 800;
  color: #ff9500;
  letter-spacing: 2px;
}
.treat-coupon-discount {
  font-size: 11.5px;
  color: #10b981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}
.btn-treat-apply {
  background: linear-gradient(135deg, #ff7700 0%, #ff9500 100%);
  color: #000;
  font-family: var(--font-heading, sans-serif);
  font-size: 14px;
  font-weight: 800;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 24px rgba(255, 119, 0, 0.45);
  transition: all 0.2s ease;
  margin-bottom: 10px;
}
.btn-treat-apply:hover {
  background: linear-gradient(135deg, #ffa200 0%, #ffaa00 100%);
  box-shadow: 0 0 35px rgba(255, 119, 0, 0.75);
  transform: translateY(-1px);
}
.btn-treat-close {
  background: none;
  border: none;
  color: #71717a;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.btn-treat-close:hover {
  color: #e4e4e7;
}

/* Cursor Trail Sparkles */
.halloween-sparkle {
  position: fixed;
  pointer-events: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff7700;
  box-shadow: 0 0 8px #ff7700, 0 0 16px #9d4edd;
  z-index: 9999;
  transform: translate(-50%, -50%);
  animation: halloweenSparkleFade 0.45s ease-out forwards;
}
@keyframes halloweenSparkleFade {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) translateY(-12px); }
}

/* ─── 12. RESPONSIVIDADE & REDUCED MOTION ─── */
@media (max-width: 900px) {
  .halloween-moon-wrap {
    width: 110px;
    height: 110px;
    right: 5%;
    top: 20px;
  }
  .halloween-mansion-silhouette {
    width: 140px;
    height: 120px;
  }
  .halloween-viewport-web {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 640px) {
  .halloween-pumpkin-widget {
    bottom: 16px;
    left: 16px;
    transform: scale(0.85);
  }
  .halloween-viewport-web {
    width: 70px;
    height: 70px;
  }
  .halloween-spooky-tree-left,
  .halloween-spooky-tree-right {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .halloween-fog-wave,
  .halloween-sparkle,
  .halloween-moon-wrap,
  .halloween-moon-cloud,
  .halloween-hanging-spider .spider-body-wrap,
  .brand-logo {
    animation: none !important;
  }
}
