/* ============================================================
   NOXUS WOW LAYER — 2026-06-11
   Premium micro-interactions on top of the epic hero engine:
   - themed scrollbar + text selection
   - animated gold shimmer on the hero title
   - PLAY NOW: breathing glow + looping sheen + magnetic hover
   - podium cards: pointer-driven 3D tilt + holographic shine
   - LIVE badge heartbeat, countdown digit pop
   - Castle Siege lightning flashes
   - soft cursor glow (desktop, fine pointer only)
   Everything is additive and guarded for reduced motion.
   Companion script: js/noxus-wow.js
   ============================================================ */

/* ── 1. SCROLLBAR + SELECTION ─────────────────────────────── */

::selection {
  background: rgba(176, 78, 255, 0.55);
  color: #fff;
}

/* Keep the 3D/parallax motion, but remove the visible shine/glare beams. */
.nx-godrays,
.nx-card-shine,
.newone-podium-card::after {
  display: none !important;
}

.newone-podium-card::after {
  content: none !important;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 70, 255, 0.55) rgba(12, 8, 20, 0.9);
}

::-webkit-scrollbar {
  width: 11px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #0c0814, #140b22);
}

::-webkit-scrollbar-thumb {
  border-radius: 8px;
  border: 2px solid #0c0814;
  background: linear-gradient(180deg, rgba(196, 120, 255, 0.85), rgba(110, 40, 210, 0.85));
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.18);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(214, 150, 255, 0.95), rgba(130, 55, 235, 0.95));
}

/* ── 2. HERO TITLE GOLD SHIMMER ───────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .newone-hero h1 span {
    background: linear-gradient(
      105deg,
      #fff5ba 0%,
      #d69c37 30%,
      #ffe9a8 46%,
      #fffbe6 50%,
      #ffe9a8 54%,
      #d69c37 70%,
      #fff5ba 100%
    );
    background-size: 230% 100%;
    background-position: 120% 0;
    -webkit-background-clip: text;
    background-clip: text;
    animation: nxGoldSweep 6.5s ease-in-out infinite;
  }

  @keyframes nxGoldSweep {
    0%, 55% { background-position: 120% 0; }
    85%, 100% { background-position: -110% 0; }
  }
}

/* ── 3. PLAY NOW — breathing glow, sheen, magnetic ────────── */

.newone-play {
  overflow: hidden;
  isolation: isolate;
  transform: translate(var(--nx-mag-x, 0px), var(--nx-mag-y, 0px));
  transition: transform 0.22s cubic-bezier(0.2, 0.65, 0.25, 1), filter 0.25s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .newone-play {
    animation: nxPlayBreathe 3.2s ease-in-out infinite;
  }

  .newone-play::after {
    content: "";
    position: absolute;
    inset: -40% auto -40% -80%;
    width: 45%;
    transform: skewX(-22deg);
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.34),
      transparent
    );
    animation: nxSheen 4.6s ease-in-out infinite;
    pointer-events: none;
  }

  @keyframes nxPlayBreathe {
    0%, 100% { box-shadow: 0 0 18px rgba(160, 70, 255, 0.38), 0 0 42px rgba(126, 51, 255, 0.18); }
    50% { box-shadow: 0 0 30px rgba(186, 100, 255, 0.62), 0 0 70px rgba(140, 60, 255, 0.32); }
  }

  @keyframes nxSheen {
    0%, 58% { left: -80%; }
    88%, 100% { left: 165%; }
  }
}

/* ── 4. NAV HOVER GLOW ────────────────────────────────────── */

.newone-nav a {
  transition: color 0.22s ease, text-shadow 0.22s ease;
}

.newone-nav a:hover {
  text-shadow: 0 0 14px rgba(196, 128, 255, 0.85), 0 0 30px rgba(150, 70, 255, 0.45);
}

/* ── 5. PODIUM CARDS — 3D tilt + holographic shine ────────── */
/* JS writes --nxpx/--nxpy (pointer, -1..1) and --nxho (0|1).
   Theme positions the cards themselves with !important transforms,
   so the tilt is applied to the frame + content children instead. */

@media (min-width: 1181px) and (prefers-reduced-motion: no-preference) {
  .newone-podium-card {
    transition: filter 0.3s ease;
  }

  .newone-podium-card:hover {
    filter:
      drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55))
      drop-shadow(0 0 26px rgba(176, 78, 255, 0.5));
    z-index: 5;
  }

  .newone-podium-card .newone-podium-frame,
  .newone-podium-card .newone-podium-content {
    transform:
      perspective(720px)
      rotateY(calc(var(--nxpx, 0) * 9deg))
      rotateX(calc(var(--nxpy, 0) * -9deg))
      translateY(calc(var(--nxho, 0) * -7px))
      scale(calc(1 + var(--nxho, 0) * 0.03));
    transition: transform 0.16s ease-out;
    will-change: transform;
  }

  .nx-card-shine {
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    background: radial-gradient(
      circle at calc(50% + var(--nxpx, 0) * 46%) calc(42% + var(--nxpy, 0) * 46%),
      rgba(255, 255, 255, 0.22),
      rgba(216, 160, 255, 0.1) 32%,
      transparent 58%
    );
    opacity: var(--nxho, 0);
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
    pointer-events: none;
    transform:
      perspective(720px)
      rotateY(calc(var(--nxpx, 0) * 9deg))
      rotateX(calc(var(--nxpy, 0) * -9deg))
      translateY(calc(var(--nxho, 0) * -7px))
      scale(calc(1 + var(--nxho, 0) * 0.03));
  }
}

/* ── 6. LIVE BADGE HEARTBEAT ──────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .newone-server-live::before {
    animation: nxLivePulse 2.1s ease-out infinite;
  }

  @keyframes nxLivePulse {
    0% { box-shadow: 0 0 0 0 rgba(49, 231, 180, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(49, 231, 180, 0); }
    100% { box-shadow: 0 0 0 0 rgba(49, 231, 180, 0); }
  }
}

/* ── 7. COUNTDOWN DIGIT POP ───────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .nx-pop {
    animation: nxDigitPop 0.42s cubic-bezier(0.2, 0.65, 0.25, 1);
  }

  @keyframes nxDigitPop {
    0% { transform: translateY(0) scale(1); filter: brightness(1); }
    35% { transform: translateY(-3px) scale(1.18); filter: brightness(1.7); }
    100% { transform: translateY(0) scale(1); filter: brightness(1); }
  }

  .newone-server-siege b,
  .wonderCastleHero-countdown strong {
    display: inline-block;
    will-change: transform;
  }
}

/* ── 8. CASTLE SIEGE LIGHTNING ────────────────────────────── */

.nx-lightning {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 42% at 68% 8%, rgba(232, 214, 255, 0.85), transparent 62%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(176, 120, 255, 0.5), transparent 70%),
    linear-gradient(180deg, rgba(214, 188, 255, 0.32), transparent 56%);
  mix-blend-mode: screen;
}

@media (prefers-reduced-motion: no-preference) {
  .nx-lightning.nx-flash {
    animation: nxLightning 0.62s ease-out;
  }

  @keyframes nxLightning {
    0% { opacity: 0; }
    8% { opacity: 0.95; }
    18% { opacity: 0.12; }
    30% { opacity: 0.6; }
    48% { opacity: 0.08; }
    62% { opacity: 0.3; }
    100% { opacity: 0; }
  }
}

/* ── 9. CURSOR GLOW (desktop, fine pointer) ───────────────── */

.nx-cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.10), rgba(126, 51, 255, 0.045) 42%, transparent 68%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.nx-cursor-glow.nx-on {
  opacity: 1;
}

/* ── 10. SPLASH SCREEN ────────────────────────────────────── */
/* Markup lives in the layout right after <body>; CSS paints it
   from the first frame, js/noxus-wow.js fades it away on load.
   .nx-splash-seen on <html> (sessionStorage) skips repeat visits. */

#nx-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 45% at 50% 42%, rgba(72, 28, 130, 0.55), transparent 70%),
    #07040d;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.nx-splash-seen #nx-splash,
#nx-splash.nx-splash-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nx-splash-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 340px;
  height: 340px;
}

.nx-splash-logo {
  width: 240px;
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 0 26px rgba(168, 85, 247, 0.65))
    drop-shadow(0 0 60px rgba(126, 51, 255, 0.35));
}

.nx-splash-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(246, 215, 120, 0.4);
  mask: linear-gradient(180deg, #000 60%, transparent);
}

.nx-splash-ring--inner {
  inset: 34px;
  border: 1px solid rgba(176, 78, 255, 0.45);
  border-style: dotted;
  mask: linear-gradient(0deg, #000 60%, transparent);
}

.nx-splash-bar {
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 190px;
  height: 2px;
  margin-left: -95px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(176, 78, 255, 0.18);
}

.nx-splash-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -45%;
  width: 45%;
  background: linear-gradient(90deg, transparent, #d6a93f, #b65cff, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .nx-splash-logo {
    animation: nxSplashLogo 1.6s cubic-bezier(0.2, 0.65, 0.25, 1) both;
  }

  .nx-splash-ring {
    animation: nxSpin 9s linear infinite;
  }

  .nx-splash-ring--inner {
    animation: nxSpinBack 6s linear infinite;
  }

  .nx-splash-bar::after {
    animation: nxSplashBar 1.3s ease-in-out infinite;
  }

  @keyframes nxSplashLogo {
    from { opacity: 0; transform: scale(0.86); filter: blur(8px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
  }

  @keyframes nxSpin {
    to { transform: rotate(360deg); }
  }

  @keyframes nxSpinBack {
    to { transform: rotate(-360deg); }
  }

  @keyframes nxSplashBar {
    0% { left: -45%; }
    100% { left: 100%; }
  }
}

/* ── 11. SCROLL PROGRESS BAR ──────────────────────────────── */

.nx-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform-origin: 0 0;
  transform: scaleX(var(--nx-progress, 0));
  background: linear-gradient(90deg, #d6a93f, #b65cff 55%, #7e33ff);
  box-shadow: 0 0 10px rgba(176, 78, 255, 0.65);
}

/* ── 12. BACK TO TOP ──────────────────────────────────────── */

.nx-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 8900;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(246, 215, 120, 0.4);
  background:
    radial-gradient(circle at 50% 30%, rgba(176, 78, 255, 0.32), transparent 70%),
    rgba(14, 8, 24, 0.82);
  color: #f6d778;
  font: 700 19px/1 "Cinzel", serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(150, 70, 255, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, box-shadow 0.3s ease;
}

.nx-top.nx-top-on {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nx-top:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 0 30px rgba(176, 78, 255, 0.55);
  color: #ffe9a8;
}

/* ── 13. LIVE PANELS HOVER (home quick panels) ────────────── */
/* (the character video edge fade lives in noxus-hero-epic.css,
   where the authoritative !important hero rules are) */

.newone-live-card {
  transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.newone-live-card:hover {
  filter: brightness(1.07);
  box-shadow:
    0 0 0 1px rgba(190, 110, 255, 0.45),
    0 16px 44px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(145, 75, 255, 0.3);
}
