/* ═══════════════════════════════════════════════════════════
   Server Runner v9.0 — NEON REBIRTH overlay styles
   Layered on top of server-runner-arcade.css. Scoped under
   .sr-game so nothing leaks into the rest of the portal.
   Palette: Retro-Futurism (cyan / hot pink / purple / amber)
   ═══════════════════════════════════════════════════════════ */

.sr-game {
    --sr-neon-primary: #22d3ee;
    --sr-neon-secondary: #a78bfa;
    --sr-neon-accent: #f43f5e;
    --sr-neon-amber: #fbbf24;
    --sr-shake-x: 0px;
    --sr-shake-y: 0px;
}

/* Camera shake — applied via class + CSS vars, decays in JS */
.sr-game.sr-neon-shake .sr-canvas-wrap {
    transform: translate(var(--sr-shake-x), var(--sr-shake-y));
    transition: transform 35ms linear;
}

/* Hit-stop micro-freeze: brief desaturated flash */
.sr-game.sr-neon-hitstop .sr-canvas-wrap {
    filter: saturate(2.2) brightness(1.4) contrast(1.15);
    transition: filter 60ms ease-out;
}

/* Rainbow mode (Konami easter egg) */
.sr-game.sr-neon-rainbow .sr-canvas-wrap {
    animation: srNeonHueCycle 4s linear infinite;
}
@keyframes srNeonHueCycle {
    0%   { filter: hue-rotate(0deg)   saturate(1.4); }
    100% { filter: hue-rotate(360deg) saturate(1.4); }
}
@media (prefers-reduced-motion: reduce) {
    .sr-game.sr-neon-rainbow .sr-canvas-wrap { animation: none; filter: saturate(1.4) hue-rotate(120deg); }
    .sr-game.sr-neon-shake .sr-canvas-wrap { transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   Z-INDEX LAYERING (single source of truth)
   ─────────────────────────────────────────────────────────
     1  stage decor (background)
     2  vignette
     3  CRT scanlines
    10  start overlay (engine)        ← above all background
    11  game-over overlay (engine)
    12  banner host (mid-game stage/boss)
    13  play fade flash
    14  FX canvas (particles, popups)
    50  file-notify (engine)
    60+ tutorial / spin modal
   ═══════════════════════════════════════════════════════════ */
.sr-game .sr-overlay { z-index: 10; }
.sr-game .sr-gameover-overlay { z-index: 11; }

/* ─── CRT scanlines (subtle, static — no flicker animation) ─── */
.sr-neon-crt {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0.30;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.14) 0px,
            rgba(0, 0, 0, 0.14) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: multiply;
}
[data-bs-theme="light"] .sr-neon-crt {
    opacity: 0.10;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(15, 23, 42, 0.08) 0px,
            rgba(15, 23, 42, 0.08) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: multiply;
}

/* Vignette + thin border glow */
.sr-neon-vignette {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 2;
    box-shadow: inset 0 0 80px rgba(34, 211, 238, 0.08), inset 0 0 14px rgba(167, 139, 250, 0.10);
    border-radius: inherit;
}
[data-bs-theme="light"] .sr-neon-vignette {
    box-shadow: inset 0 0 60px rgba(99, 102, 241, 0.06);
}

/* ─── Stage decor — fills empty canvas during start screen ─── */
.sr-neon-stage-decor {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    transition: opacity 380ms ease, transform 380ms ease;
    opacity: 1;
}
.sr-game.sr-neon-game-running .sr-neon-stage-decor {
    opacity: 0;
    transform: scale(0.97);
}
@media (prefers-reduced-motion: reduce) {
    .sr-neon-stage-decor { transition: none; }
}

.sr-neon-stage-grid {
    position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
    background:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 39px,
            rgba(167, 139, 250, 0.36) 39px,
            rgba(167, 139, 250, 0.36) 40px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 19px,
            rgba(34, 211, 238, 0.34) 19px,
            rgba(34, 211, 238, 0.34) 20px
        );
    transform: perspective(220px) rotateX(58deg);
    transform-origin: center bottom;
    opacity: 0.55;
    -webkit-mask-image: linear-gradient(transparent 0%, black 35%, black 90%, transparent 100%);
    mask-image: linear-gradient(transparent 0%, black 35%, black 90%, transparent 100%);
}
[data-bs-theme="light"] .sr-neon-stage-grid {
    background:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 39px,
            rgba(99, 102, 241, 0.20) 39px,
            rgba(99, 102, 241, 0.20) 40px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 19px,
            rgba(8, 145, 178, 0.22) 19px,
            rgba(8, 145, 178, 0.22) 20px
        );
    opacity: 0.45;
}

.sr-neon-stage-corners {
    position: absolute; inset: 12px;
    pointer-events: none;
}
.sr-neon-stage-corner {
    position: absolute;
    width: 22px; height: 22px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
}
.sr-neon-stage-corner-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.sr-neon-stage-corner-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.sr-neon-stage-corner-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.sr-neon-stage-corner-br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
[data-bs-theme="light"] .sr-neon-stage-corner {
    border-color: rgba(8, 145, 178, 0.55);
    box-shadow: 0 0 8px rgba(8, 145, 178, 0.20);
}

/* Bigtype as a centered ARENA WATERMARK — sits behind wings + card,
   filling the empty canvas with a "SERVER RUNNER" stage logo. Low alpha
   text-fill so wings overlapping it still get to be the focus, but the
   identity is unmistakable. */
.sr-neon-stage-bigtype {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    letter-spacing: 0.18em;
    line-height: 0.85;
    pointer-events: none;
    text-align: center;
}
.sr-neon-stage-bigtype-l1,
.sr-neon-stage-bigtype-l2 {
    display: block;
    font-size: clamp(2.6rem, 9vw, 6rem);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.45;
    filter: blur(0.4px);
}
.sr-neon-stage-bigtype-l1 {
    background-image: linear-gradient(90deg, #22d3ee, #a78bfa);
    text-shadow: 0 0 38px rgba(34, 211, 238, 0.38);
}
.sr-neon-stage-bigtype-l2 {
    background-image: linear-gradient(90deg, #f472b6, #fbbf24);
    text-shadow: 0 0 38px rgba(244, 114, 182, 0.32);
}
.sr-neon-stage-bigtype-tag {
    display: block;
    margin-top: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.30em;
    color: rgba(34, 211, 238, 0.55);
    opacity: 0.85;
}
[data-bs-theme="light"] .sr-neon-stage-bigtype-l1,
[data-bs-theme="light"] .sr-neon-stage-bigtype-l2 { opacity: 0.30; }
[data-bs-theme="light"] .sr-neon-stage-bigtype-tag { color: #0e7490; }

.sr-neon-stage-tickerwrap {
    position: absolute;
    left: 0; right: 0; bottom: 6px;
    height: 18px;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.sr-neon-stage-ticker {
    display: inline-flex;
    gap: 32px;
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(34, 211, 238, 0.65);
    padding-left: 12px;
    animation: srNeonTickerScroll 32s linear infinite;
}
.sr-neon-stage-ticker > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sr-neon-stage-ticker > span > i {
    color: rgba(244, 114, 182, 0.7);
}
@keyframes srNeonTickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .sr-neon-stage-ticker { animation: none; }
}
[data-bs-theme="light"] .sr-neon-stage-ticker { color: #0e7490; }
[data-bs-theme="light"] .sr-neon-stage-ticker > span > i { color: #c026d3; }

/* ─── Play fade overlay (smooths transition when game starts) ─ */
.sr-neon-fade {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 13;
    background: radial-gradient(circle, rgba(34,211,238,0.20), transparent 70%);
    opacity: 0;
    transition: opacity 200ms ease;
}
.sr-neon-fade.is-flashing {
    animation: srNeonPlayFlash 420ms ease-out;
}
@keyframes srNeonPlayFlash {
    0%   { opacity: 0; }
    20%  { opacity: 1; }
    100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .sr-neon-fade { animation: none; opacity: 0; }
}

/* FX canvas — additive blend on top of game canvas */
.sr-neon-fx {
    position: absolute; left: 0; top: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 14;
    mix-blend-mode: screen;
}
[data-bs-theme="light"] .sr-neon-fx {
    mix-blend-mode: multiply;
    opacity: 0.85;
}

/* ─── HUD: speedometer + buff stack + photo button ──────────── */
.sr-neon-speedo {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 4px;
    border-right: 1px solid rgba(255,255,255,0.06);
    margin-right: 4px;
}
[data-bs-theme="light"] .sr-neon-speedo { border-right-color: rgba(15,23,42,0.08); }
.sr-neon-speedo-svg {
    width: 38px; height: 22px;
    flex-shrink: 0;
}
.sr-neon-speedo-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem; font-weight: 800;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.12em;
}
[data-bs-theme="light"] .sr-neon-speedo-label { color: #475569; }

.sr-neon-buff-stack {
    display: inline-flex; align-items: center; gap: 4px;
    margin-left: 6px;
}
.sr-neon-buff {
    position: relative;
    width: 22px; height: 22px;
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--bc, #22d3ee);
    color: var(--bc, #22d3ee);
    font-size: 0.65rem;
    box-shadow: 0 0 10px color-mix(in srgb, var(--bc, #22d3ee) 35%, transparent);
    animation: srNeonBuffIn 280ms cubic-bezier(.34, 1.56, .64, 1);
}
[data-bs-theme="light"] .sr-neon-buff { background: rgba(15,23,42,0.04); }
@keyframes srNeonBuffIn {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.sr-neon-buff-ring {
    position: absolute; left: -2px; right: -2px; bottom: -3px;
    height: 2px; border-radius: 2px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.sr-neon-buff-fill {
    display: block; height: 100%;
    width: var(--w, 0%);
    background: linear-gradient(90deg, var(--bc), color-mix(in srgb, var(--bc) 60%, white));
    box-shadow: 0 0 6px var(--bc);
    transition: width 80ms linear;
}

/* Photo button (camera) */
.sr-neon-photo-btn {
    color: rgba(252, 211, 77, 0.85) !important;
    border-color: rgba(252, 211, 77, 0.35) !important;
}
.sr-neon-photo-btn:hover {
    color: #fbbf24 !important;
    background: rgba(252, 211, 77, 0.10) !important;
    border-color: rgba(252, 211, 77, 0.6) !important;
    box-shadow: 0 0 14px rgba(252, 211, 77, 0.35);
}

/* ─── Stage / boss banners ──────────────────────────────────── */
.sr-neon-banner-host {
    position: absolute; left: 0; right: 0; top: 22%;
    pointer-events: none;
    /* Above start overlay (z:10) so banners don't slide under the start
       card, but below tutorial (z:60). Banners are decorative, not modal. */
    z-index: 12;
    display: flex; flex-direction: column; align-items: center;
    gap: 6px;
}
.sr-neon-banner {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.85), rgba(15, 23, 42, 0.7));
    backdrop-filter: blur(6px);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    animation: srNeonBannerIn 380ms cubic-bezier(.34, 1.56, .64, 1);
    overflow: hidden;
    transition: opacity 380ms ease, transform 380ms ease;
}
.sr-neon-banner.is-out {
    opacity: 0; transform: scale(0.94) translateY(-10px);
}
.sr-neon-banner::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(255,255,255,0.025) 2px,
        rgba(255,255,255,0.025) 3px
    );
    pointer-events: none;
}
.sr-neon-banner-tag {
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.25em;
    color: rgba(255,255,255,0.55); margin-bottom: 4px;
}
.sr-neon-banner-title {
    font-size: 1.4rem; font-weight: 900; letter-spacing: 0.18em;
    background: linear-gradient(90deg, var(--bnp, #22d3ee), var(--bns, #a78bfa));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px var(--bnp, #22d3ee);
    line-height: 1.05;
}
.sr-neon-banner-sub {
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.25em;
    color: rgba(255,255,255,0.4); margin-top: 4px;
}
[data-bs-theme="light"] .sr-neon-banner {
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(241,245,249,0.85));
    border-color: rgba(15,23,42,0.10);
}
[data-bs-theme="light"] .sr-neon-banner-tag,
[data-bs-theme="light"] .sr-neon-banner-sub { color: #475569; }
@keyframes srNeonBannerIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sr-neon-banner-boss {
    border-color: rgba(244, 63, 94, 0.45);
    box-shadow: 0 0 32px rgba(244, 63, 94, 0.30);
    animation: srNeonBannerIn 380ms cubic-bezier(.34,1.56,.64,1), srNeonBossPulse 1.4s ease-in-out infinite;
}
@keyframes srNeonBossPulse {
    0%, 100% { box-shadow: 0 0 32px rgba(244, 63, 94, 0.30); }
    50%      { box-shadow: 0 0 48px rgba(244, 63, 94, 0.55); }
}

/* ─── Tutorial overlay ─────────────────────────────────────── */
.sr-neon-tutorial {
    position: absolute; inset: 0;
    z-index: 60;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: srNeonTutIn 280ms ease-out;
}
.sr-neon-tutorial.is-out { opacity: 0; transition: opacity 320ms ease; }
[data-bs-theme="light"] .sr-neon-tutorial { background: rgba(15, 23, 42, 0.55); }
@keyframes srNeonTutIn { from { opacity: 0; } to { opacity: 1; } }

.sr-neon-tut-card {
    position: relative;
    max-width: 460px; width: 100%;
    padding: 1.25rem 1.4rem;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.94), rgba(28, 19, 56, 0.88));
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 14px;
    box-shadow: 0 12px 60px rgba(167, 139, 250, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
    overflow: hidden;
    animation: srNeonTutCardIn 420ms cubic-bezier(.34, 1.56, .64, 1);
}
.sr-neon-tut-grid {
    position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
    background:
        linear-gradient(transparent, rgba(167,139,250,0.10)),
        repeating-linear-gradient(
            to right,
            rgba(167, 139, 250, 0.18) 0,
            rgba(167, 139, 250, 0.18) 1px,
            transparent 1px,
            transparent 18px
        ),
        repeating-linear-gradient(
            to bottom,
            rgba(34, 211, 238, 0.15) 0,
            rgba(34, 211, 238, 0.15) 1px,
            transparent 1px,
            transparent 18px
        );
    transform: perspective(220px) rotateX(45deg);
    transform-origin: center bottom;
    opacity: 0.5;
    pointer-events: none;
}
[data-bs-theme="light"] .sr-neon-tut-card {
    background: linear-gradient(140deg, #fff, #f8fafc);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.18);
}
@keyframes srNeonTutCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sr-neon-tut-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px;
}
.sr-neon-tut-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.22em;
    color: rgba(167, 139, 250, 0.85);
}
[data-bs-theme="light"] .sr-neon-tut-tag { color: #6d28d9; }
.sr-neon-tut-close {
    background: transparent; border: 0;
    color: rgba(255,255,255,0.5);
    width: 22px; height: 22px; line-height: 1;
    border-radius: 6px; cursor: pointer;
    font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
}
.sr-neon-tut-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
[data-bs-theme="light"] .sr-neon-tut-close { color: #475569; }
[data-bs-theme="light"] .sr-neon-tut-close:hover { background: rgba(15,23,42,0.06); color: #0f172a; }
.sr-neon-tut-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem; font-weight: 900; letter-spacing: 0.12em;
    margin-bottom: 0.85rem;
    background: linear-gradient(90deg, #22d3ee, #a78bfa, #fbbf24);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(167, 139, 250, 0.5);
    position: relative;
}
.sr-neon-tut-tips {
    display: grid; gap: 6px;
    margin-bottom: 0.9rem;
    position: relative;
}
.sr-neon-tut-tip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px;
    background: rgba(34, 211, 238, 0.04);
    border: 1px solid rgba(34, 211, 238, 0.12);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.78);
}
[data-bs-theme="light"] .sr-neon-tut-tip {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.18);
    color: #1e293b;
}
.sr-neon-tut-key {
    flex-shrink: 0;
    min-width: 48px; text-align: center;
    padding: 3px 8px; border-radius: 4px;
    background: linear-gradient(180deg, rgba(34,211,238,0.15), rgba(34,211,238,0.05));
    border: 1px solid rgba(34, 211, 238, 0.4);
    color: #67e8f9;
    font-weight: 800; font-size: 0.65rem;
    box-shadow: 0 1px 0 rgba(34, 211, 238, 0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-bs-theme="light"] .sr-neon-tut-key { color: #0e7490; border-color: rgba(8, 145, 178, 0.4); }
.sr-neon-tut-tags {
    display: flex; flex-wrap: wrap; gap: 5px;
    margin-bottom: 0.9rem;
    position: relative;
}
.sr-neon-tut-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.12em;
    padding: 3px 8px; border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.7);
}
.sr-neon-tut-pill[data-c="cyan"]  { color: #22d3ee; border-color: rgba(34, 211, 238, 0.4); }
.sr-neon-tut-pill[data-c="pink"]  { color: #f472b6; border-color: rgba(244, 114, 182, 0.4); }
.sr-neon-tut-pill[data-c="amber"] { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }
.sr-neon-tut-pill[data-c="green"] { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); }
[data-bs-theme="light"] .sr-neon-tut-pill { background: rgba(15,23,42,0.04); }
.sr-neon-tut-go {
    display: block; width: 100%;
    padding: 0.55rem 1rem;
    border: 0; border-radius: 8px;
    background: linear-gradient(90deg, #22d3ee, #a78bfa, #fbbf24);
    color: #0f172a; font-weight: 900; letter-spacing: 0.18em;
    font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(167, 139, 250, 0.35), 0 0 0 0 rgba(34, 211, 238, 0);
    transition: all 0.2s ease;
    position: relative;
}
.sr-neon-tut-go:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(167, 139, 250, 0.5), 0 0 0 4px rgba(34, 211, 238, 0.15);
}

/* ─── Score share button on game over card ─────────────────── */
.sr-neon-share-btn {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.1)) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
    color: #67e8f9 !important;
}
.sr-neon-share-btn:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(167, 139, 250, 0.18)) !important;
    border-color: rgba(34, 211, 238, 0.55) !important;
    color: #22d3ee !important;
    box-shadow: 0 4px 18px rgba(34, 211, 238, 0.25);
}
[data-bs-theme="light"] .sr-neon-share-btn {
    color: #0e7490 !important;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(99, 102, 241, 0.08)) !important;
    border-color: rgba(8, 145, 178, 0.35) !important;
}

/* ─── Compact mode (small canvas, e.g. dashboard widget) ───── */
@media (max-width: 575.98px) {
    .sr-neon-speedo-svg { width: 30px; height: 18px; }
    .sr-neon-speedo-label { display: none; }
    .sr-neon-buff { width: 18px; height: 18px; font-size: 0.55rem; }
    .sr-neon-banner { padding: 6px 14px; }
    .sr-neon-banner-title { font-size: 1rem; }
    .sr-neon-banner-tag, .sr-neon-banner-sub { font-size: 0.5rem; }
    .sr-neon-tut-card { padding: 1rem; }
    .sr-neon-tut-title { font-size: 1.1rem; }
}

/* When the canvas is small (non-fullscreen) the banner sits closer to top */
.sr-game:not(.sr-fullscreen):not(.sr-fullscreen-pc) .sr-neon-banner-host {
    top: 14%;
}

/* ═══════════════════════════════════════════════════════════
   Start screen 3-column wing layout
   The engine renders the centre card; we add LEFT (live stats)
   and RIGHT (Daily Spin big CTA + help) panels around it.
   ═══════════════════════════════════════════════════════════ */
.sr-start-overlay:not(.d-none) {
    /* Override the engine's centred translate with a flex row that lays
       out wings + card horizontally. Keeps the engine's z-index + bg. */
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 14px;
    text-align: left;
    /* Reset the engine's translate centring — flex handles it now. */
    top: 0 !important; left: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
}

.sr-neon-wing {
    flex: 0 0 auto;
    width: 240px;
    align-self: stretch;
    max-height: 100%;
    padding: 14px 16px;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.88), rgba(28, 19, 56, 0.78));
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 14px;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 38px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
    display: flex; flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    animation: srNeonWingIn 420ms cubic-bezier(.34,1.56,.64,1);
}
.sr-neon-wing::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,0.6), transparent);
}
.sr-neon-wing-left::before  { background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.7), transparent); }
.sr-neon-wing-right::before { background: linear-gradient(90deg, transparent, rgba(248, 113, 196, 0.7), transparent); }
[data-bs-theme="light"] .sr-neon-wing {
    background: linear-gradient(140deg, rgba(255,255,255,0.95), rgba(241,245,249,0.85));
    border-color: rgba(99,102,241,0.20);
    box-shadow: 0 14px 38px rgba(15,23,42,0.10);
}
@keyframes srNeonWingIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sr-neon-wing-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.22em;
    color: rgba(167, 139, 250, 0.85);
}
.sr-neon-wing-right .sr-neon-wing-tag { color: rgba(248, 113, 196, 0.85); }
[data-bs-theme="light"] .sr-neon-wing-tag { color: #6d28d9; }
[data-bs-theme="light"] .sr-neon-wing-right .sr-neon-wing-tag { color: #c026d3; }

.sr-neon-wing-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem; font-weight: 900; letter-spacing: 0.10em;
    color: #fff;
    margin-bottom: 2px;
    line-height: 1;
}
[data-bs-theme="light"] .sr-neon-wing-title { color: #0f172a; }

.sr-neon-stat-stack {
    display: flex; flex-direction: column;
    gap: 6px;
    flex: 1;
}
.sr-neon-stat {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.15);
    border-radius: 10px;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.sr-neon-stat:hover {
    background: rgba(34, 211, 238, 0.10);
    border-color: rgba(34, 211, 238, 0.30);
}
.sr-neon-stat[data-stat="streak"] {
    background: rgba(251, 146, 60, 0.06);
    border-color: rgba(251, 146, 60, 0.18);
}
.sr-neon-stat[data-stat="streak"] > i { color: #fb923c; }
.sr-neon-stat[data-stat="best"] > i { color: #fbbf24; }
.sr-neon-stat[data-stat="bolts"] > i { color: #22d3ee; }
.sr-neon-stat > i {
    flex-shrink: 0;
    font-size: 1.1rem;
    width: 28px; text-align: center;
    text-shadow: 0 0 8px currentColor;
}
.sr-neon-stat-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sr-neon-stat-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900; font-size: 0.95rem;
    color: #fff;
    line-height: 1;
    letter-spacing: 0.04em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-bs-theme="light"] .sr-neon-stat-num { color: #0f172a; }
.sr-neon-stat-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem; font-weight: 700; letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.50);
}
[data-bs-theme="light"] .sr-neon-stat-lbl { color: #475569; }
[data-bs-theme="light"] .sr-neon-stat {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.15);
}
[data-bs-theme="light"] .sr-neon-stat[data-stat="streak"] {
    background: rgba(234, 88, 12, 0.05);
    border-color: rgba(234, 88, 12, 0.15);
}

.sr-neon-wing-foot {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.40);
}
.sr-neon-wing-foot > i { color: rgba(248, 113, 196, 0.7); }
[data-bs-theme="light"] .sr-neon-wing-foot {
    color: #64748b;
    border-color: rgba(15,23,42,0.08);
}
[data-bs-theme="light"] .sr-neon-wing-foot > i { color: #c026d3; }
.sr-neon-wing-pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
    animation: srNeonWingPulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes srNeonWingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}

/* ─── DAILY SPIN big CTA — primary button on right wing ────── */
.sr-neon-spin-cta {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #FF71CE 0%, #B967FF 50%, #22D3EE 100%);
    background-size: 200% 200%;
    color: #fff;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 10px 28px rgba(167, 139, 250, 0.40), inset 0 1px 0 rgba(255,255,255,0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    overflow: hidden;
}
.sr-neon-spin-cta::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 0% 50%, rgba(255,255,255,0.20), transparent 50%);
    pointer-events: none;
}
.sr-neon-spin-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(167, 139, 250, 0.55), inset 0 1px 0 rgba(255,255,255,0.20);
}
.sr-neon-spin-cta:active { transform: translateY(0); }
.sr-neon-spin-cta.is-ready {
    animation: srNeonSpinCtaPulse 2.2s ease-in-out infinite;
}
@keyframes srNeonSpinCtaPulse {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.sr-neon-spin-cta-glow {
    position: absolute; inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, #FF71CE, #22D3EE);
    filter: blur(14px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s ease;
}
.sr-neon-spin-cta.is-ready .sr-neon-spin-cta-glow {
    opacity: 0.45;
    animation: srNeonSpinCtaGlow 2.6s ease-in-out infinite alternate;
}
@keyframes srNeonSpinCtaGlow {
    from { opacity: 0.35; }
    to   { opacity: 0.65; }
}
.sr-neon-spin-cta-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(6px);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.sr-neon-spin-cta.is-ready .sr-neon-spin-cta-icon > i {
    animation: srNeonSpinIconWiggle 1.8s ease-in-out infinite;
    display: inline-block;
}
@keyframes srNeonSpinIconWiggle {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-12deg); }
    75%      { transform: rotate(12deg); }
}
.sr-neon-spin-cta-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sr-neon-spin-cta-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900; font-size: 0.85rem; letter-spacing: 0.12em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    line-height: 1;
}
.sr-neon-spin-cta-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.10em;
    color: rgba(255,255,255,0.85);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sr-neon-spin-cta-badge {
    flex-shrink: 0;
    padding: 3px 7px; border-radius: 999px;
    background: #fff;
    color: #B967FF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 900; letter-spacing: 0.18em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* ─── HELP CTA — secondary on right wing ───────────────────── */
.sr-neon-help-cta {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(34, 211, 238, 0.30);
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.06);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.18s ease;
}
.sr-neon-help-cta:hover {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.55);
    color: #fff;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.30);
}
.sr-neon-help-cta-icon {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 7px;
    background: rgba(34, 211, 238, 0.12);
    color: #22d3ee;
    display: inline-flex; align-items: center; justify-content: center;
}
.sr-neon-help-cta-label {
    flex: 1;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.16em;
}
.sr-neon-help-cta > i:last-child {
    color: rgba(34, 211, 238, 0.6);
    font-size: 1.2rem;
    transition: transform 0.18s ease;
}
.sr-neon-help-cta:hover > i:last-child {
    transform: translateX(3px);
    color: #22d3ee;
}
[data-bs-theme="light"] .sr-neon-help-cta {
    background: rgba(8, 145, 178, 0.04);
    border-color: rgba(8, 145, 178, 0.30);
    color: #0f172a;
}
[data-bs-theme="light"] .sr-neon-help-cta-icon { color: #0e7490; background: rgba(8, 145, 178, 0.12); }
[data-bs-theme="light"] .sr-neon-help-cta > i:last-child { color: rgba(8, 145, 178, 0.6); }

/* ─── Responsive: stack wings vertically on narrow widths ──── */
@media (max-width: 1199.98px) {
    .sr-neon-wing { width: 200px; padding: 10px 12px; gap: 6px; }
    .sr-neon-wing-title { font-size: 0.85rem; }
    .sr-neon-stat { padding: 6px 8px; gap: 8px; }
    .sr-neon-stat-num { font-size: 0.85rem; }
    .sr-neon-spin-cta-icon { width: 32px; height: 32px; font-size: 1rem; }
    .sr-neon-spin-cta-label { font-size: 0.75rem; }
}
@media (max-width: 991.98px) {
    .sr-start-overlay:not(.d-none) {
        flex-direction: column;
        gap: 10px;
        padding: 8px;
        overflow-y: auto;
    }
    .sr-neon-wing {
        width: min(420px, 100%);
        align-self: center;
    }
    .sr-neon-wing-left .sr-neon-stat-stack {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sr-neon-wing-left .sr-neon-stat { flex: 1 1 calc(50% - 4px); }
    .sr-neon-wing-foot { padding-top: 4px; margin-top: 4px; }
}
@media (max-width: 575.98px) {
    .sr-neon-wing-left { display: none; } /* drop stats on tiny screens */
    .sr-neon-spin-cta { padding: 10px 12px; }
    .sr-neon-spin-cta-label { font-size: 0.7rem; }
}
@keyframes srSpinDotPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
    50%      { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.05); }
}

/* ─── Daily Spin wheel modal ───────────────────────────────── */
.sr-spin-modal {
    position: fixed; inset: 0;
    z-index: 10080;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center; justify-content: center;
    padding: 1rem;
    animation: srSpinFadeIn 240ms ease-out;
}
.sr-spin-modal.is-open { display: flex; }
[data-bs-theme="light"] .sr-spin-modal { background: rgba(15, 23, 42, 0.65); }
@keyframes srSpinFadeIn { from { opacity: 0; } to { opacity: 1; } }

.sr-spin-card {
    position: relative;
    width: 100%; max-width: 380px;
    padding: 1rem 1.25rem 1.25rem;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.94), rgba(28, 19, 56, 0.92));
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(167, 139, 250, 0.30), inset 0 1px 0 rgba(255,255,255,0.08);
    text-align: center;
    animation: srSpinCardIn 380ms cubic-bezier(.34, 1.56, .64, 1);
}
[data-bs-theme="light"] .sr-spin-card {
    background: linear-gradient(140deg, #fff, #f8fafc);
    border-color: rgba(99, 102, 241, 0.30);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}
@keyframes srSpinCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sr-spin-close {
    position: absolute; top: 8px; right: 10px;
    width: 26px; height: 26px;
    background: transparent; border: 0;
    color: rgba(255,255,255,0.5);
    border-radius: 6px; cursor: pointer;
    font-size: 1.25rem; line-height: 1;
}
.sr-spin-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
[data-bs-theme="light"] .sr-spin-close { color: #475569; }
[data-bs-theme="light"] .sr-spin-close:hover { background: rgba(15,23,42,0.06); color: #0f172a; }

.sr-spin-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.22em;
    color: rgba(167, 139, 250, 0.85);
    margin-bottom: 0.5rem;
}
[data-bs-theme="light"] .sr-spin-tag { color: #6d28d9; }

.sr-spin-streak {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px;
    background: rgba(251, 146, 60, 0.10);
    border: 1px solid rgba(251, 146, 60, 0.35);
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.85rem;
}
.sr-spin-streak-flame {
    color: #fb923c; font-size: 0.85rem; line-height: 1;
}
.sr-spin-streak-num {
    color: #fed7aa; font-weight: 900; font-size: 0.95rem;
}
.sr-spin-streak-lbl {
    color: rgba(254, 215, 170, 0.7);
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.16em;
}
[data-bs-theme="light"] .sr-spin-streak {
    background: rgba(234, 88, 12, 0.10);
    border-color: rgba(234, 88, 12, 0.35);
}
[data-bs-theme="light"] .sr-spin-streak-num { color: #c2410c; }
[data-bs-theme="light"] .sr-spin-streak-lbl { color: #9a3412; }

.sr-spin-stage {
    position: relative;
    width: 320px; height: 320px;
    margin: 0 auto 0.85rem;
}
.sr-spin-canvas {
    display: block;
    width: 100%; height: 100%;
}
.sr-spin-pointer {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 26px solid #f43f5e;
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.6));
    z-index: 2;
}
.sr-spin-hub {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 92px; height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0F0F23, #1a0e2e);
    border: 2px solid rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.4), inset 0 0 12px rgba(167, 139, 250, 0.2);
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
}
.sr-spin-go {
    width: 76px; height: 76px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, #22d3ee, #a78bfa);
    color: #0f172a;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900; font-size: 0.85rem; letter-spacing: 0.10em;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(34, 211, 238, 0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sr-spin-go:hover:not([disabled]) {
    transform: scale(1.04);
    box-shadow: 0 6px 24px rgba(34, 211, 238, 0.55);
}
.sr-spin-go[disabled] {
    opacity: 0.55; cursor: not-allowed;
    background: linear-gradient(135deg, #475569, #1e293b);
    color: #94a3b8;
    font-size: 0.55rem;
    box-shadow: none;
}

.sr-spin-result {
    min-height: 0;
    transition: min-height 320ms ease;
}
.sr-spin-result.is-shown { min-height: 80px; }
.sr-spin-result-card {
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.3));
    border: 1px solid var(--c, #22d3ee);
    border-radius: 10px;
    box-shadow: 0 0 18px color-mix(in srgb, var(--c, #22d3ee) 30%, transparent);
    animation: srSpinResultIn 460ms cubic-bezier(.34, 1.56, .64, 1);
}
[data-bs-theme="light"] .sr-spin-result-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(241,245,249,0.85));
}
@keyframes srSpinResultIn {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}
.sr-spin-result-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem; font-weight: 900; letter-spacing: 0.10em;
    color: var(--c, #22d3ee);
    text-shadow: 0 0 12px var(--c, #22d3ee);
    line-height: 1;
}
.sr-spin-result-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}
[data-bs-theme="light"] .sr-spin-result-sub { color: #475569; }

.sr-spin-foot {
    margin-top: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem; font-weight: 600; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
}
[data-bs-theme="light"] .sr-spin-foot { color: #94a3b8; }

@media (max-width: 575.98px) {
    .sr-spin-stage { width: 280px; height: 280px; }
    .sr-spin-canvas { width: 280px; height: 280px; }
    .sr-spin-hub { width: 80px; height: 80px; }
    .sr-spin-go { width: 66px; height: 66px; font-size: 0.75rem; }
}
