/* ============================================================
   PS3 WORLD — HALLOWEEN THEME (temporary)
   ------------------------------------------------------------
   Loaded on every page after style.css. Does nothing unless
   <html> has the class "halloween", which the small inline
   script in each page's <head> adds between 20 Oct and 1 Nov.
   After 1 Nov the site looks normal again by itself; to remove
   for good, delete this file and the "Halloween theme" block
   from each page's <head>.
   ============================================================ */

/* ---------- 1. Token swap: PS blue -> pumpkin orange, night purple ---------- */
html.halloween {
  /* Surfaces */
  --bg: #0a0610;
  --bg-2: #120a18;
  --card: #16101f;
  --card-2: #1d1528;
  --media-bg: #07040b;
  --panel-top: #1a1224;
  --panel-bottom: #0d0812;

  /* Borders */
  --border: #2a1f36;
  --border-2: #3d2c50;

  /* Text */
  --text: #f3eef8;
  --text-2: #b9aacb;
  --text-3: #8c7c9f;

  /* Brand (blue -> orange) */
  --ps-blue: #d9480f;
  --ps-blue-2: #ff7a18;
  --ps-cyan: #ffa94d;
  --ps-sky: #ff8c3a;
  --ps-sky-2: #ffb36b;
  --ps-ice: #ffc98f;

  /* Small UI */
  --kbd-bg: #2a1a14;
  --kbd-text: #ffd9b3;

  /* Depth */
  --shadow-glow: 0 0 40px rgba(255, 122, 24, 0.18);
  --ring: 0 0 0 3px rgba(255, 169, 77, 0.45);

  scrollbar-color: #5a3a24 var(--bg);
}

/* ---------- 2. Background & base ---------- */
html.halloween body {
  background:
    linear-gradient(rgba(10, 6, 16, 0.94), rgba(10, 6, 16, 0.94)),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 122, 24, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(155, 89, 182, 0.10), transparent);
  background-attachment: fixed;
}
html.halloween ::selection { background: rgba(255, 122, 24, 0.4); }

/* XMB waves: rotate blue to orange */
html.halloween .page-waves { filter: hue-rotate(185deg) saturate(1.3); }

html.halloween hr.solid { border-bottom-color: rgba(255, 140, 58, 0.2); }

/* ---------- 3. Header, logo & nav ---------- */
html.halloween header.site {
  background: rgba(10, 6, 16, 0.8);
  border-bottom-color: rgba(255, 122, 24, 0.35);
}
html.halloween .logo::after {
  content: "🎃";
  font-size: 22px;
  line-height: 1;
  animation: hwBob 3s ease-in-out infinite;
}
html.halloween nav.main > a.active::after,
html.halloween nav.main .nav-item > a.active::after { box-shadow: 0 0 10px rgba(255, 169, 77, 0.6); }
html.halloween nav.main .dropdown { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 122, 24, 0.08); }
html.halloween nav.main .dropdown a:hover,
html.halloween nav.main .dropdown a:focus-visible { background: rgba(255, 122, 24, 0.1); }
html.halloween nav.main .dropdown a.active { background: rgba(255, 169, 77, 0.08); }
html.halloween .search-trigger:focus-visible { box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.15); }

/* ---------- 4. Hero ---------- */
html.halloween .hero h1 {
  background: linear-gradient(180deg, #fff 0%, #ffb36b 70%, #ff7a18 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- 5. Buttons ---------- */
html.halloween .btn,
html.halloween .contact-form button,
html.halloween .contact-form input[type="submit"] { box-shadow: 0 0 24px rgba(255, 122, 24, 0.35); }
html.halloween .btn:hover,
html.halloween .btn-manual:hover,
html.halloween .contact-form button:hover,
html.halloween .contact-form input[type="submit"]:hover { box-shadow: 0 0 36px rgba(255, 169, 77, 0.6); }
html.halloween .btn.btn-ghost:hover { background: rgba(255, 122, 24, 0.1); }
html.halloween .alpha-btn.active { box-shadow: 0 0 16px rgba(255, 122, 24, 0.45); }

/* ---------- 6. Cards & home ---------- */
html.halloween .explore-card {
  background:
    radial-gradient(120% 120% at 100% 100%, rgba(255, 122, 24, 0.16), transparent 60%),
    linear-gradient(160deg, var(--panel-top), var(--panel-bottom));
}
html.halloween .explore-card:hover,
html.halloween .link-card:hover {
  border-color: rgba(255, 122, 24, 0.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 122, 24, 0.18), 0 0 30px rgba(255, 122, 24, 0.12);
}
html.halloween .link-card:hover { background: linear-gradient(180deg, rgba(255, 122, 24, 0.09), rgba(255, 122, 24, 0.02)); }
html.halloween .explore-chips a:hover { background: rgba(255, 122, 24, 0.2); }
html.halloween .feed-item--lead { background: linear-gradient(135deg, rgba(255, 122, 24, 0.1), rgba(255, 255, 255, 0.02) 60%); }
html.halloween .share-btn:hover { box-shadow: 0 6px 24px rgba(255, 122, 24, 0.18); }
html.halloween .post .post-date { border-color: rgba(255, 169, 77, 0.25); background: rgba(255, 169, 77, 0.07); }
html.halloween .info-box,
html.halloween .info-box-purple,
html.halloween .contact-notice { --accent-soft: rgba(255, 122, 24, 0.2); }

/* ---------- 7. Navigation aids ---------- */
html.halloween .crumbs { border-color: rgba(255, 169, 77, 0.25); background: rgba(255, 169, 77, 0.06); }
html.halloween .quick-nav-count { background: rgba(255, 169, 77, 0.12); }
html.halloween .quick-nav-links a:hover { background: rgba(255, 122, 24, 0.12); }
html.halloween .quick-nav-links a.is-current { box-shadow: 0 0 14px rgba(255, 122, 24, 0.4); }
html.halloween .sb-item.is-current { background: rgba(255, 122, 24, 0.16); }
html.halloween .scroll-progress { box-shadow: 0 0 8px rgba(255, 169, 77, 0.6); }
html.halloween #backToTop { box-shadow: 0 8px 32px rgba(255, 122, 24, 0.4); }
html.halloween #backToTop:hover { box-shadow: 0 12px 40px rgba(255, 122, 24, 0.6), 0 0 0 8px rgba(255, 169, 77, 0.08); }
html.halloween .lightbox button.close:hover,
html.halloween .lightbox button.close:focus-visible,
html.halloween .lb-nav:hover,
html.halloween .lb-nav:focus-visible { background: rgba(255, 122, 24, 0.25); }
html.halloween .contact-form input:focus,
html.halloween .contact-form textarea:focus,
html.halloween .contact-form select:focus { box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.15); }

/* ---------- 8. Footer ---------- */
html.halloween footer.site { border-top-color: rgba(155, 89, 182, 0.4); }
html.halloween footer.site::before {
  content: "🦇  Happy Halloween from PS3 World  🎃";
  display: block;
  margin: -12px 0 24px;
  text-align: center;
  color: var(--ps-cyan);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ---------- 9. Decorations (added by the inline script) ---------- */
/* Corner cobwebs */
.hw-web {
  position: fixed;
  top: 0;
  z-index: 0;
  width: 150px;
  height: 150px;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-radial-gradient(circle at 0 0, transparent 0 17px, #fff 17px 18px),
    repeating-conic-gradient(from 0deg at 0 0, transparent 0 14deg, #fff 14deg 15deg);
  -webkit-mask: radial-gradient(circle at 0 0, #000 55%, transparent 72%);
          mask: radial-gradient(circle at 0 0, #000 55%, transparent 72%);
}
.hw-web--l { left: 0; }
.hw-web--r { right: 0; transform: scaleX(-1); }

/* Bats flying across */
.hw-bat {
  position: fixed;
  left: -60px;
  z-index: 0;
  pointer-events: none;
  font-size: 26px;
  line-height: 1;
  opacity: 0.85;
  animation: hwFly 26s linear infinite;
}
.hw-bat--1 { top: 18%; }
.hw-bat--2 { top: 42%; font-size: 18px; opacity: 0.6; animation-duration: 34s; animation-delay: -12s; }
.hw-bat--3 { top: 70%; font-size: 22px; opacity: 0.7; animation-duration: 30s; animation-delay: -22s; }

@keyframes hwFly {
  0%   { transform: translate(0, 0) scaleX(1); }
  20%  { transform: translate(22vw, -4vh); }
  40%  { transform: translate(45vw, 3vh); }
  60%  { transform: translate(68vw, -5vh); }
  80%  { transform: translate(90vw, 2vh); }
  100% { transform: translate(115vw, -2vh); }
}
@keyframes hwBob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-3px) rotate(6deg); }
}

html:not(.halloween) .hw-web,
html:not(.halloween) .hw-bat { display: none; }

/* ---------- 10. Small screens & reduced motion ---------- */
@media (max-width: 700px) {
  .hw-web { width: 90px; height: 90px; }
  .hw-bat--2, .hw-bat--3 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-bat { display: none; }
  html.halloween .logo::after { animation: none; }
}
