/* Background */
html.sl-halloween body {
  background-image:
    linear-gradient(
      180deg,
      rgba(15, 13, 55, .08) 0%,
      rgba(35, 15, 64, .10) 55%,
      rgba(13, 20, 50, .18) 100%
    ),
    url('/assets/images/halloween-2026/bg-halloween-2026.webp') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

html.sl-halloween body::before {
  background:
    linear-gradient(
      180deg,
      rgba(34, 18, 75, .08),
      rgba(111, 39, 108, .06) 45%,
      rgba(244, 110, 34, .08)
    ) !important;
}

/* Decorations */
.sl-halloween-decor {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.sl-halloween-decor .sl-hw-bat {
  position: absolute;
  width: 38px;
  height: 18px;
  opacity: .78;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.28));
  will-change: transform;
}

.sl-halloween-decor .sl-hw-bat::before,
.sl-halloween-decor .sl-hw-bat::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 21px;
  height: 13px;
  background: #171224;
}

.sl-halloween-decor .sl-hw-bat::before {
  right: 50%;
  border-radius: 100% 10% 70% 10%;
  transform-origin: right center;
  transform: rotate(17deg);
  animation: slHwWingLeft .55s ease-in-out infinite alternate;
}

.sl-halloween-decor .sl-hw-bat::after {
  left: 50%;
  border-radius: 10% 100% 10% 70%;
  transform-origin: left center;
  transform: rotate(-17deg);
  animation: slHwWingRight .55s ease-in-out infinite alternate;
}

.sl-halloween-decor .sl-hw-bat-body {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 5px;
  width: 7px;
  height: 12px;
  margin-left: -3.5px;
  border-radius: 50% 50% 65% 65%;
  background: #100c19;
}

.sl-halloween-decor .sl-hw-bat-1 {
  top: 11%;
  left: -55px;
  animation: slHwFlyOne 18s linear infinite;
}

.sl-halloween-decor .sl-hw-bat-2 {
  top: 19%;
  left: -70px;
  transform: scale(.72);
  animation: slHwFlyTwo 24s linear 4s infinite;
}

.sl-halloween-decor .sl-hw-bat-3 {
  top: 7%;
  left: -60px;
  transform: scale(1.15);
  animation: slHwFlyThree 29s linear 9s infinite;
}

.sl-halloween-decor .sl-hw-bat-4 {
  top: 28%;
  left: -60px;
  transform: scale(.58);
  opacity: .58;
  animation: slHwFlyFour 32s linear 2s infinite;
}

/* Pumpkin glow */
.sl-halloween-decor::before,
.sl-halloween-decor::after {
  content: "";
  position: absolute;
  bottom: -90px;
  width: 340px;
  height: 260px;
  border-radius: 50%;
  opacity: .20;
  filter: blur(36px);
  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 133, 28, .92) 0%,
      rgba(255, 84, 14, .38) 42%,
      rgba(255, 84, 14, 0) 72%
    );
  animation: slHwPumpkinGlow 3.8s ease-in-out infinite alternate;
}

.sl-halloween-decor::before {
  left: -90px;
}

.sl-halloween-decor::after {
  right: -105px;
  width: 260px;
  opacity: .13;
  animation-delay: -1.6s;
}

html.sl-halloween .cabina-entry {
  overflow: visible;
}

html.sl-halloween .cabina-launcher {
  overflow: visible;
}

/* Chat */
html.sl-halloween .cabina-launcher::before {
  content: "🧙‍♀️";
  position: absolute;
  z-index: 20;
  top: -31px;
  left: -9px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 38px;
  line-height: 1;
  transform: rotate(-25deg);
  transform-origin: 50% 75%;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.28));
  animation: slHwHatFloat 3.4s ease-in-out infinite;
  pointer-events: none;
}

html.sl-halloween .cabina-panel {
  box-shadow:
    0 22px 55px rgba(12, 10, 35, .28),
    0 0 0 1px rgba(255, 139, 42, .14);
}

html.sl-halloween .cabina-launcher {
  box-shadow:
    0 10px 30px rgba(14, 21, 55, .24),
    0 0 18px rgba(255, 123, 27, .16);
}

@keyframes slHwWingLeft {
  from { transform: rotate(22deg) scaleY(1); }
  to   { transform: rotate(-10deg) scaleY(.58); }
}

@keyframes slHwWingRight {
  from { transform: rotate(-22deg) scaleY(1); }
  to   { transform: rotate(10deg) scaleY(.58); }
}

@keyframes slHwFlyOne {
  0%   { transform: translate3d(0,0,0) scale(.92) rotate(-3deg); }
  25%  { transform: translate3d(27vw,-22px,0) scale(.92) rotate(3deg); }
  55%  { transform: translate3d(59vw,18px,0) scale(.92) rotate(-2deg); }
  78%  { transform: translate3d(82vw,-16px,0) scale(.92) rotate(4deg); }
  100% { transform: translate3d(calc(100vw + 120px),8px,0) scale(.92) rotate(-2deg); }
}

@keyframes slHwFlyTwo {
  0%   { transform: translate3d(0,0,0) scale(.72); }
  30%  { transform: translate3d(34vw,26px,0) scale(.72); }
  65%  { transform: translate3d(68vw,-14px,0) scale(.72); }
  100% { transform: translate3d(calc(100vw + 130px),20px,0) scale(.72); }
}

@keyframes slHwFlyThree {
  0%   { transform: translate3d(0,0,0) scale(1.15); }
  38%  { transform: translate3d(40vw,34px,0) scale(1.15); }
  70%  { transform: translate3d(74vw,-12px,0) scale(1.15); }
  100% { transform: translate3d(calc(100vw + 140px),28px,0) scale(1.15); }
}

@keyframes slHwFlyFour {
  0%   { transform: translate3d(0,0,0) scale(.58); }
  45%  { transform: translate3d(48vw,-38px,0) scale(.58); }
  100% { transform: translate3d(calc(100vw + 120px),10px,0) scale(.58); }
}

@keyframes slHwPumpkinGlow {
  from {
    transform: scale(.92);
    opacity: .11;
  }
  to {
    transform: scale(1.08);
    opacity: .24;
  }
}

@keyframes slHwHatFloat {
  0%,100% { transform: translateY(0) rotate(-25deg); }
  50%     { transform: translateY(-3px) rotate(-20deg); }
}

@media (max-width: 767px) {
  html.sl-halloween body {
    
    background-position: 38% center !important;
    background-attachment: scroll !important;
  }

  .sl-halloween-decor .sl-hw-bat-3,
  .sl-halloween-decor .sl-hw-bat-4 {
    display: none;
  }

  .sl-halloween-decor .sl-hw-bat {
    opacity: .62;
  }

  .sl-halloween-decor::before {
    width: 230px;
    height: 190px;
    left: -100px;
    bottom: -60px;
  }

  .sl-halloween-decor::after {
    width: 180px;
    height: 160px;
    right: -95px;
    bottom: -45px;
  }

  body[data-sl-mobile-chat="1"] .cabina-launcher::before {
    display: none !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sl-halloween-decor .sl-hw-bat,
  .sl-halloween-decor .sl-hw-bat::before,
  .sl-halloween-decor .sl-hw-bat::after,
  .sl-halloween-decor::before,
  .sl-halloween-decor::after,
  html.sl-halloween .cabina-launcher::before {
    animation: none !important;
  }

  .sl-halloween-decor .sl-hw-bat {
    display: none;
  }
}

html.sl-halloween .player {
  background: rgba(244, 251, 255, .78) !important;
  backdrop-filter: blur(10px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.05) !important;
}

@media (min-width: 701px) {
  html.sl-halloween .player {
    background:
      linear-gradient(
        180deg,
        rgba(244,251,255,0) 0px,
        rgba(244,251,255,0) 145px,
        rgba(244,251,255,.30) 205px,
        rgba(244,251,255,.68) 290px,
        rgba(244,251,255,.78) 100%
      ) !important;

    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (min-width:701px) {
  html.sl-halloween .player {
    background: linear-gradient(
      130deg,
      rgba(255,255,255,.78),
      rgba(229,248,255,.68)
    ) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (min-width:701px) {
  html.sl-halloween .top {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html.sl-halloween .player {
    background: linear-gradient(
      130deg,
      rgba(255,255,255,.91),
      rgba(229,248,255,.76)
    ) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

.sl-halloween-decor .sl-hw-bat {
  width: 46px !important;
  height: 25px !important;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 52'%3E%3Cpath fill='%23120d1d' d='M50 25C44 17 37 13 29 12c-9-1-18 2-29 8 6 2 10 6 13 12 4-3 8-4 13-3-3 4-4 8-4 13 7-5 14-7 21-5l7 15 7-15c7-2 14 0 21 5 0-5-1-9-4-13 5-1 9 0 13 3 3-6 7-10 13-12-11-6-20-9-29-8-8 1-15 5-21 13Z'/%3E%3C/svg%3E")
    center / contain no-repeat !important;

  filter: drop-shadow(0 3px 3px rgba(0,0,0,.32)) !important;
  opacity: .82;
}

.sl-halloween-decor .sl-hw-bat::before,
.sl-halloween-decor .sl-hw-bat::after,
.sl-halloween-decor .sl-hw-bat-body {
  display: none !important;
}

.sl-halloween-decor .sl-hw-bat-1 {
  width: 45px !important;
  height: 24px !important;
}

.sl-halloween-decor .sl-hw-bat-2 {
  width: 34px !important;
  height: 19px !important;
}

.sl-halloween-decor .sl-hw-bat-3 {
  width: 52px !important;
  height: 28px !important;
}

.sl-halloween-decor .sl-hw-bat-4 {
  width: 29px !important;
  height: 16px !important;
  opacity: .60;
}

.sl-halloween-decor .sl-hw-bat {
  transform-origin: center;
}

@keyframes slBatFlap {
  0%, 100% {
    scale: 1 1;
  }
  45% {
    scale: 1 .58;
  }
  70% {
    scale: 1 .86;
  }
}

html.sl-halloween .sl-hw-bat {
  transform-origin: 50% 50% !important;
  animation:
    slBatFlap .42s ease-in-out infinite alternate !important;
}

html.sl-halloween .sl-hw-bat-1 {
  animation-duration: .38s !important;
}

html.sl-halloween .sl-hw-bat-2 {
  animation-duration: .46s !important;
}

html.sl-halloween .sl-hw-bat-3 {
  animation-duration: .34s !important;
}

html.sl-halloween .sl-hw-bat-4 {
  animation-duration: .50s !important;
}

@media (prefers-reduced-motion: reduce) {
  html.sl-halloween .sl-hw-bat {
    animation: none !important;
  }
}

/* Bats */
html.sl-halloween .sl-halloween-decor .sl-hw-bat {
  background: none !important;
  transform-origin: center !important;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.32)) !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;

  right: 48% !important;
  top: 20% !important;

  width: 54% !important;
  height: 68% !important;

  background: #120d1d !important;

  clip-path: polygon(
    100% 38%,
    76% 12%,
    47% 0%,
    20% 8%,
    0% 28%,
    24% 35%,
    7% 64%,
    39% 53%,
    30% 88%,
    62% 63%,
    100% 58%
  ) !important;

  transform-origin: 100% 50% !important;
  animation: slRealBatLeft .34s ease-in-out infinite alternate !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat::after {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;

  left: 48% !important;
  top: 20% !important;

  width: 54% !important;
  height: 68% !important;

  background: #120d1d !important;

  clip-path: polygon(
    0% 38%,
    24% 12%,
    53% 0%,
    80% 8%,
    100% 28%,
    76% 35%,
    93% 64%,
    61% 53%,
    70% 88%,
    38% 63%,
    0% 58%
  ) !important;

  transform-origin: 0% 50% !important;
  animation: slRealBatRight .34s ease-in-out infinite alternate !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-body {
  display: block !important;
  position: absolute !important;
  z-index: 3 !important;

  left: 50% !important;
  top: 25% !important;

  width: 16% !important;
  height: 62% !important;

  margin-left: -8% !important;

  background: #0e0a16 !important;
  border-radius: 50% 50% 65% 65% !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-body::before,
html.sl-halloween .sl-halloween-decor .sl-hw-bat-body::after {
  content: "" !important;
  position: absolute !important;
  top: -18% !important;
  width: 42% !important;
  height: 35% !important;
  background: #0e0a16 !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-body::before {
  left: 2% !important;
  transform: rotate(-25deg) !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-body::after {
  right: 2% !important;
  transform: rotate(25deg) !important;
}

@keyframes slRealBatLeft {
  0% {
    transform: rotate(24deg) scaleY(1);
  }
  100% {
    transform: rotate(-18deg) scaleY(.55);
  }
}

@keyframes slRealBatRight {
  0% {
    transform: rotate(-24deg) scaleY(1);
  }
  100% {
    transform: rotate(18deg) scaleY(.55);
  }
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-1 {
  animation: slHwFlyOne 18s linear infinite !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-2 {
  animation: slHwFlyTwo 24s linear 4s infinite !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-3 {
  animation: slHwFlyThree 29s linear 9s infinite !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-4 {
  animation: slHwFlyFour 32s linear 2s infinite !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-2::before,
html.sl-halloween .sl-halloween-decor .sl-hw-bat-2::after {
  animation-duration: .41s !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-3::before,
html.sl-halloween .sl-halloween-decor .sl-hw-bat-3::after {
  animation-duration: .29s !important;
}

html.sl-halloween .sl-halloween-decor .sl-hw-bat-4::before,
html.sl-halloween .sl-halloween-decor .sl-hw-bat-4::after {
  animation-duration: .46s !important;
}

@media (prefers-reduced-motion: reduce) {
  html.sl-halloween .sl-halloween-decor .sl-hw-bat,
  html.sl-halloween .sl-halloween-decor .sl-hw-bat::before,
  html.sl-halloween .sl-halloween-decor .sl-hw-bat::after {
    animation: none !important;
  }
}
