/* Хэллоуинское оформление (core/hwtheme.js ставит html.hwt на неделю ивента, если игрок не выключил тему у кнопки
   «Хэллоуин»). Не зависит от «Лёгкой графики» (владелец 30.10): мыши летают и в ней. Анимации — только transform. */
html.hwt { --accent: #FFA24C; --gold: #FFA24C; --gold-2: #E8661E; --accent-ink: #2A1204; }

/* картинки вкладок и страниц: фиолетовое небо, тыквенный отсвет у горизонта, сиреневый туман внизу (фон игры — atmo.js) */
html.hwt .tabroot.has-bg .nv-bg::before, html.hwt .page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(70% 38% at 50% 62%, rgba(255, 120, 30, .26), rgba(255, 120, 30, 0) 70%),
    linear-gradient(180deg, rgba(64, 18, 96, .62) 0%, rgba(80, 26, 110, .34) 34%, rgba(110, 40, 90, .12) 58%, rgba(120, 70, 160, .28) 84%, rgba(40, 14, 60, .3) 100%);
}
html:not(.hwt) .hwt-sky, html:not(.hwt) .hwt-fsky, html:not(.hwt) .hwt-pump { display: none; }

/* небо: луна, паутина, мыши — над подкраской, под текстом */
.hwt-sky { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.hwt-moon { position: absolute; top: calc(var(--safe-top, 0px) + 84px); right: 24px; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #FFF6DE 0%, #FBE3B0 46%, #F0B56A 100%);
  box-shadow: 0 0 30px 8px rgba(255, 170, 80, .4), 0 0 90px 30px rgba(255, 130, 40, .2); opacity: .92; }
.hwt-moon::before, .hwt-moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(190, 120, 60, .22); }
.hwt-moon::before { width: 12px; height: 12px; left: 32px; top: 12px; }
.hwt-moon::after { width: 8px; height: 8px; left: 16px; top: 34px; }
.tabroot[data-tab="spots"] .hwt-moon { display: none; }       /* у «Рыбалки» — фото места со своим небом */
.page .hwt-moon { top: calc(var(--safe-top, 0px) + 70px); }
.hwt-web { position: absolute; top: 0; right: 0; width: 150px; height: 150px; opacity: .26; }

/* летучая мышь: полёт — обёртка, взмахи — картинка внутри; большую часть цикла она за краем экрана */
.hwt-bat { position: absolute; left: 0; top: 0; width: 42px; height: 22px; will-change: transform; transform: translate(470px, 70px);
  animation: hwtFly 19s linear infinite; }
.hwt-bat svg { display: block; width: 100%; height: 100%; transform-origin: 50% 40%; animation: hwtFlap .22s ease-in-out infinite alternate; }
.hwt-bat.b2 { width: 28px; height: 15px; animation-duration: 23s; animation-delay: -7s; }
.hwt-bat.b3 { width: 34px; height: 18px; animation-duration: 27s; animation-delay: -15s; }
.hwt-bat.b2 svg { animation-duration: .19s; }
@keyframes hwtFly {
  0%   { transform: translate(-60px, 190px) rotate(-8deg); }
  5%   { transform: translate(80px, 150px) rotate(-4deg); }
  10%  { transform: translate(210px, 168px) rotate(6deg); }
  16%  { transform: translate(470px, 70px) rotate(-12deg); }
  16.1%, 100% { transform: translate(470px, 70px); }
}
@keyframes hwtFlap { from { transform: scaleY(1); } to { transform: scaleY(.35); } }
/* «Лёгкая графика» (lite.css) делает бесконечные анимации однократными — тема от неё не зависит */
html.lite .hwt-bat:not(#_), html.lite .hwt-bat:not(#_) svg { animation-iteration-count: infinite !important; }

/* сцена рыбалки: мыши над водой, под удочкой и панелями */
.hwt-fsky { position: absolute; left: 0; right: 0; top: 0; height: 48%; pointer-events: none; overflow: hidden; }
.hwt-fsky .hwt-bat { animation-name: hwtFlyF; }
@keyframes hwtFlyF {
  0%   { transform: translate(-60px, 150px) rotate(-8deg); }
  5%   { transform: translate(90px, 110px) rotate(-4deg); }
  10%  { transform: translate(230px, 140px) rotate(6deg); }
  16%  { transform: translate(470px, 60px) rotate(-12deg); }
  16.1%, 100% { transform: translate(470px, 60px); }
}

/* кнопки, что были золотым градиентом, — тыквенные */
html.hwt .nv-go, html.hwt .tm-place .ph .nv-qbadge { background: linear-gradient(100deg, #FFC58A, #F2761E); color: #2A1204;
  box-shadow: 0 10px 26px rgba(242, 118, 30, .32); }
html.hwt .tab.active .icon, html.hwt .tab.tab-shop .icon { filter: drop-shadow(0 0 8px rgba(255, 140, 50, .55)); }

/* нижнее меню: фиолетовый отлив и тыква на краю */
html.hwt .tabbar { box-shadow: 0 14px 34px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(181, 123, 247, .22); }
.hwt-pump { position: absolute; left: 8px; top: -24px; width: 38px; height: 38px; pointer-events: none; z-index: 3; }
.hwt-pump img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 130, 30, .65)); }

/* переключатель темы у кнопки «Хэллоуин» (screens/spots.js) */
.ev-promo-row.hwt-row { gap: 8px; align-items: center; }
.hwt-tg { display: flex; align-items: center; gap: 7px; flex: none; padding: 8px 12px 8px 8px; border-radius: 999px; border: 1.5px solid rgba(181, 123, 247, .5);
  background: rgba(30, 12, 44, .72); color: #f4eefb; font: inherit; }
.hwt-tg .sw { position: relative; width: 36px; height: 22px; flex: none; border-radius: 999px; background: rgba(255, 255, 255, .18); transition: background .2s; }
.hwt-tg .sw i { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.hwt-tg.on .sw { background: #FF9A3A; }
.hwt-tg.on .sw i { transform: translateX(14px); }
.hwt-tg b { font-size: 17px; line-height: 1; }
.hwt-row .ev-promo { min-width: 0; }
.hwt-row .ev-promo-t small { white-space: nowrap; }
