/* ==========================================================================
   CrazyPlayers · one stylesheet for the whole site and the admin panel
   Plain CSS, no framework. Edit the tokens below to restyle everything.

   Theme: "GX" — gaming-browser look. Near-black purple-tinted panels,
   one neon accent colour, sharp angled corners and accent glows.
   The accent can be switched by players (see [data-accent] below).
   ========================================================================== */

:root {
  /* Accent: GX-style neon red by default. Change BOTH lines to recolour the site. */
  --accent: #fa1e4e;
  --accent-rgb: 250 30 78;

  --bg: #0c0b11;
  --bg-rgb: 12 11 17;
  --bg-deep: #08070c;
  --bg-deep-rgb: 8 7 12;
  --surface: #15131c;
  --surface-2: #1d1a26;
  --surface-3: #282433;
  --border: #2a2634;
  --text: #f4f2f8;
  --text-soft: #d3cfdc;
  --text-muted: #9a94a9;

  --primary: var(--accent);                                   /* Play buttons, main calls to action */
  --primary-2: color-mix(in srgb, var(--accent) 72%, #000);
  --on-primary: #ffffff;
  --secondary: color-mix(in srgb, var(--accent) 65%, #ffffff); /* links, focus, active states */
  --glow: 0 0 0 1px rgb(var(--accent-rgb) / .55), 0 0 18px rgb(var(--accent-rgb) / .35);
  --danger: #ff6a3d;
  --danger-rgb: 255 106 61;
  --success: #2fd47a;

  --radius: 6px;
  --radius-sm: 4px;
  --cut: 10px;                 /* size of the angled corner on buttons and panels */
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Chakra Petch', 'Nunito', system-ui, sans-serif;
  --header-h: 104px;   /* fits the 96px logo */
  --marquee-h: 0px;
  --sidebar-w: 236px;
  --sidebar-mini: 68px;
  --bottom-h: 62px;
  --gutter: clamp(14px, 2.4vw, 28px);
  --shadow: 0 12px 34px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Category colour buckets (used for fallbacks and dots) — neon set */
  --h0: #ff4d6a; --h1: #ff9f1c; --h2: #39e58c; --h3: #00d4ff;
  --h4: #6e7bff; --h5: #b14dff; --h6: #ff3fb4; --h7: #19f0c8;
}

/* Accent presets, like GX's colour picker. Set by the swatches in the sidebar (saved per device). */
:root[data-accent="purple"] { --accent: #a14dff; --accent-rgb: 161 77 255; }
:root[data-accent="cyan"]   { --accent: #00d4ff; --accent-rgb: 0 212 255; }
:root[data-accent="green"]  { --accent: #23e07a; --accent-rgb: 35 224 122; }
:root[data-accent="pink"]   { --accent: #ff2e9a; --accent-rgb: 255 46 154; }
:root[data-accent="orange"] { --accent: #ff7a1a; --accent-rgb: 255 122 26; }
:root[data-accent="cyan"], :root[data-accent="green"], :root[data-accent="orange"] { --on-primary: #0c0b11; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--marquee-h) + var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 900; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; }
.muted { color: var(--text-muted); }
.small { font-size: .86rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px;
  background: var(--primary); color: var(--on-primary); font-weight: 800; border-radius: 8px;
}
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Category colour helpers */
.hue-0 { --hue: var(--h0); } .hue-1 { --hue: var(--h1); } .hue-2 { --hue: var(--h2); } .hue-3 { --hue: var(--h3); }
.hue-4 { --hue: var(--h4); } .hue-5 { --hue: var(--h5); } .hue-6 { --hue: var(--h6); } .hue-7 { --hue: var(--h7); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 800; font-size: .95rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--on-primary);
  box-shadow: 0 6px 18px rgb(var(--accent-rgb) / .28);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgb(var(--accent-rgb) / .4); }
.btn-secondary { border-color: var(--secondary); color: var(--secondary); background: transparent; }
.btn-secondary:hover { background: rgb(var(--accent-rgb) / .1); }
.btn-ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--secondary); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: rgb(var(--danger-rgb) / .1); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: transparent; border: 1.5px solid transparent; color: var(--text-muted);
  transition: background-color .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn[aria-current="page"] { color: var(--primary); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: var(--marquee-h) 0 auto 0; height: var(--header-h); z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter) 0 12px;
  background: rgb(var(--bg-rgb) / .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; flex: none; height: 44px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 40px; width: auto; max-width: 170px; object-fit: contain; }
.brand-text { display: none; font-weight: 900; font-size: 1.3rem; color: var(--text); letter-spacing: -.02em; }
.brand-text span, .footer-brand span, .brand-admin span { color: var(--primary); }
.brand.no-logo .brand-logo { display: none; }
.brand.no-logo .brand-text { display: inline; }

.search { position: relative; flex: 1; max-width: 520px; margin: 0 auto; }
.search input[type="search"] {
  width: 100%; height: 42px; min-height: 42px; padding: 0 16px 0 42px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--text-muted); }
.search input:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .15); }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; max-height: 70vh; overflow-y: auto;
}
.search-results a {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px;
  color: var(--text); font-weight: 700; text-decoration: none;
}
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--surface-2); }
.search-results .sr-thumb {
  width: 38px; height: 50px; border-radius: 7px; overflow: hidden; flex: none;
  background: linear-gradient(135deg, var(--hue, var(--h3)), var(--surface-3));
}
.search-results .sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-results .sr-cat { margin-left: auto; font-size: .78rem; color: var(--text-muted); font-weight: 700; }
.search-results .sr-all { justify-content: center; color: var(--secondary); }
.search-results .sr-empty { padding: 12px; color: var(--text-muted); }

.topnav { display: flex; align-items: center; gap: 4px; flex: none; }
.topnav a:not(.icon-btn) {
  padding: 8px 14px; border-radius: 999px; color: var(--text-muted); font-weight: 800; text-decoration: none;
}
.topnav a:not(.icon-btn):hover, .topnav a[aria-current="page"]:not(.icon-btn) { color: var(--text); background: var(--surface-2); }

/* ---------- Layout shell ---------- */
.shell { display: flex; padding-top: calc(var(--marquee-h) + var(--header-h)); min-height: 100vh; }
.main {
  flex: 1; min-width: 0; outline: none;
  padding: 18px var(--gutter) 40px;
  margin-left: var(--sidebar-w);
  transition: margin-left .25s var(--ease);
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: calc(var(--marquee-h) + var(--header-h)); bottom: 0; left: 0; z-index: 50;
  width: var(--sidebar-w); overflow-y: auto; overflow-x: hidden;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 10px 10px 24px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
  transition: width .25s var(--ease), transform .25s var(--ease);
}
.side-collapse {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font-weight: 700; font-size: .88rem;
}
.side-collapse:hover { background: var(--surface-2); color: var(--text); }
.side-collapse .icon { transition: transform .25s var(--ease); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px;
  border-radius: 10px; color: var(--text-muted); font-weight: 700; white-space: nowrap; text-decoration: none;
}
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-link[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.side-link[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary);
}
.side-count { margin-left: auto; font-size: .76rem; color: var(--text-muted); font-weight: 800; }
.side-heading {
  margin: 16px 12px 6px; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 900; white-space: nowrap;
}
.cat-dot {
  display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 7px;
  background: color-mix(in srgb, var(--hue) 22%, transparent); color: var(--hue);
  font-size: .72rem; font-weight: 900; line-height: 1;
}
.chip .cat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hue); }

/* Desktop: collapsible mini sidebar */
@media (min-width: 1024px) {
  body.sidebar-mini .sidebar { width: var(--sidebar-mini); }
  body.sidebar-mini .main { margin-left: var(--sidebar-mini); }
  body.sidebar-mini .side-label, body.sidebar-mini .side-count, body.sidebar-mini .side-heading { display: none; }
  body.sidebar-mini .side-link, body.sidebar-mini .side-collapse { justify-content: center; padding: 0; }
  body.sidebar-mini .side-collapse .icon { transform: rotate(180deg); }
  body.sidebar-mini .side-heading + .side-link { margin-top: 10px; }
  body.sidebar-mini .side-link[aria-current="page"]::before { left: -10px; }
  body.sidebar-mini .side-link:hover::after {
    content: attr(data-tip); position: fixed; left: calc(var(--sidebar-mini) + 6px);
    padding: 6px 12px; border-radius: 8px; background: var(--surface-3); color: var(--text);
    font-size: .84rem; box-shadow: var(--shadow); pointer-events: none; z-index: 90;
  }
  .menu-btn { display: none; }
}

/* Tablet and phone: sidebar becomes a drawer */
@media (max-width: 1023.98px) {
  .sidebar { transform: translateX(-105%); box-shadow: var(--shadow); width: min(84vw, 300px); }
  body.menu-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .side-collapse { display: none; }
  .scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .55); }
  body.menu-open { overflow: hidden; }
}
@media (min-width: 1024px) { .scrim { display: none !important; } }

/* ---------- Bottom nav (phones) ---------- */
.bottom-nav { display: none; }
@media (max-width: 767.98px) {
  .topnav { display: none; }
  .topbar { gap: 8px; padding-right: 12px; }
  .brand-logo { height: 34px; max-width: 120px; }
  .brand-text { font-size: 1.1rem; }
  .main { padding-bottom: calc(var(--bottom-h) + 30px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    position: fixed; inset: auto 0 0 0; z-index: 55; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgb(var(--bg-rgb) / .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: 0; color: var(--text-muted); font-size: .7rem; font-weight: 800; text-decoration: none;
  }
  .bottom-nav [aria-current="page"] { color: var(--primary); }
  .bottom-nav .icon { width: 22px; height: 22px; }
}
@media (max-width: 420px) {
  .search input[type="search"] { padding-left: 38px; }
}

/* ---------- Hero carousel ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: calc(var(--radius) + 4px);
  background: var(--surface); margin-bottom: 18px; border: 1px solid var(--border);
}
.hero-track { display: flex; transition: transform .55s var(--ease); }
.hero-slide { position: relative; flex: 0 0 100%; aspect-ratio: 16 / 6.2; min-height: 230px; max-height: 420px; }
.hero-media, .player-poster-media, .card-media, .post-card-media, .thumb-sm, .thumb-preview, .banner-preview {
  position: relative; display: block; overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--hue, var(--h3)) 55%, transparent), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--hue, var(--h3)) 35%, var(--surface-2)), var(--surface));
}
/* Fallback when an image is missing: show the game's initials */
.hero-media::after, .player-poster-media::after, .card-media::after, .post-card-media::after,
.thumb-sm::after, .thumb-preview::after, .banner-preview::after {
  content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 900; font-size: clamp(1.4rem, 5vw, 3rem); color: rgba(255, 255, 255, .85); letter-spacing: -.02em;
  z-index: 0;
}
.hero-media img, .player-poster-media img, .card-media img, .post-card-media img,
.thumb-sm img, .thumb-preview img, .banner-preview img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover;
}
.img-failed { display: none !important; }
.hero-media { position: absolute; inset: 0; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgb(var(--bg-deep-rgb) / .92) 0%, rgb(var(--bg-deep-rgb) / .55) 45%, rgb(var(--bg-deep-rgb) / 0) 75%);
}
.hero-content {
  position: absolute; z-index: 2; left: clamp(18px, 4vw, 48px); bottom: clamp(18px, 4vw, 44px);
  max-width: min(520px, 70%);
}
.pill-tag {
  display: inline-block; padding: 4px 10px; margin-bottom: 10px; border-radius: 999px;
  background: rgb(var(--accent-rgb) / .16); color: var(--primary); font-size: .74rem; font-weight: 900;
  letter-spacing: .04em; text-transform: uppercase;
}
.hero-title { font-size: clamp(1.4rem, 3.4vw, 2.5rem); margin-bottom: 6px; text-shadow: 0 2px 16px rgba(0, 0, 0, .5); }
.hero-sub { color: var(--text-soft); margin-bottom: 16px; font-size: clamp(.86rem, 1.3vw, 1rem); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-nav {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(var(--bg-rgb) / .6); border: 1px solid rgba(255, 255, 255, .15); color: #fff;
  opacity: 0; transition: opacity .2s;
}
.hero:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-prev { left: 12px; } .hero-next { right: 12px; }
.hero-dots { position: absolute; z-index: 3; right: 18px; bottom: 16px; display: flex; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .4); transition: width .25s, background-color .25s; }
.hero-dots button[aria-current="true"] { width: 24px; background: var(--primary); }
@media (max-width: 600px) {
  .hero-slide { aspect-ratio: 4 / 3; max-height: none; }
  .hero-slide::after { background: linear-gradient(0deg, rgb(var(--bg-deep-rgb) / .95) 5%, rgb(var(--bg-deep-rgb) / .2) 70%); }
  .hero-content { max-width: none; right: 18px; bottom: 38px; }
  .hero-dots { left: 50%; right: auto; transform: translateX(-50%); bottom: 10px; }
  .hero-nav { display: none; }
}

/* ---------- Chips and segmented control ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 0 18px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-weight: 800; font-size: .88rem; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--secondary); color: var(--text); text-decoration: none; }
.chip[aria-current="page"] { border-color: var(--primary); color: var(--text); background: rgb(var(--accent-rgb) / .1); }
.chip-count { color: var(--text-muted); font-size: .78rem; }

.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); flex: none; }
.segmented a { padding: 7px 14px; border-radius: 999px; color: var(--text-muted); font-weight: 800; font-size: .88rem; text-decoration: none; }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a[aria-current="page"] { background: var(--surface-3); color: var(--text); }

/* ---------- Rows of cards ---------- */
.row { margin: 0 0 28px; }
.row-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.row-title { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin: 0; }
.row-title .icon { color: var(--primary); }
.see-all {
  display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding: 4px 6px;
  background: none; border: 0; color: var(--text-muted); font-weight: 800; font-size: .88rem; text-decoration: none;
}
.see-all:hover { color: var(--secondary); text-decoration: none; }
.see-all .icon { width: 16px; height: 16px; }
.row-arrows { display: flex; gap: 4px; }
.row-arrows .icon-btn { width: 34px; height: 34px; border-color: var(--border); }
@media (max-width: 767.98px) { .row-arrows { display: none; } }
.row-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(132px, 15vw, 186px);
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 2px 10px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 15vw, 186px), 1fr)); gap: 16px 14px; margin-bottom: 30px; }

/* ---------- Game card ---------- */
.card { position: relative; min-width: 0; }
.card-link { display: block; color: var(--text); text-decoration: none; border-radius: var(--radius); }
.card-link:hover { text-decoration: none; }
.card-media {
  aspect-ratio: 3 / 4; border-radius: var(--radius); border: 1px solid var(--border);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.card-wide .card-media { aspect-ratio: 16 / 9; }
.card-media img { transition: transform .35s var(--ease); }
.card-link:hover .card-media, .card-link:focus-visible .card-media {
  transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 12px 26px rgba(0, 0, 0, .45);
}
.card-link:hover .card-media img { transform: scale(1.04); }
.card-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s var(--ease);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}
.card-play .icon { width: 22px; height: 22px; margin-left: 2px; }
.card-link:hover .card-play, .card-link:focus-visible .card-play { opacity: 1; transform: none; }
.card-body { display: block; padding: 8px 2px 0; }
.card-title { display: block; font-weight: 800; font-size: .93rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-cat { display: block; font-size: .78rem; color: var(--text-muted); font-weight: 700; }
.fav-btn {
  position: absolute; z-index: 3; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: rgb(var(--bg-rgb) / .7); color: #fff;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .15s, transform .15s, color .15s;
}
.fav-btn .icon { width: 18px; height: 18px; }
.card:hover .fav-btn, .fav-btn:focus-visible, .fav-btn[aria-pressed="true"] { opacity: 1; }
.fav-btn[aria-pressed="true"] { color: var(--accent); }
.fav-btn[aria-pressed="true"] .icon, .fav-toggle[aria-pressed="true"] .icon { fill: currentColor; }
.fav-btn:hover { transform: scale(1.1); }
@media (hover: none) { .fav-btn { opacity: 1; } }

/* ---------- Page heads, empty states, notices ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 6px 0 16px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; }
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 40px 20px; margin-bottom: 30px; border: 1.5px dashed var(--border); border-radius: var(--radius); color: var(--text-muted);
}
.empty p { margin: 0; }
.empty-lg { padding: 70px 20px; margin-top: 20px; }
.empty-lg h1 { color: var(--text); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--primary); line-height: 1; }

.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; font-weight: 700; }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { background: rgba(46, 204, 113, .12); color: #7ee2a8; border: 1px solid rgba(46, 204, 113, .3); }
.notice-error { background: rgb(var(--danger-rgb) / .12); color: #ff9c9c; border: 1px solid rgb(var(--danger-rgb) / .35); }

.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 767.98px) { .toasts { bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); } }
.toast {
  padding: 10px 18px; border-radius: 999px; background: var(--surface-3); color: var(--text);
  font-weight: 800; font-size: .9rem; box-shadow: var(--shadow); animation: toast-in .25s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Game page ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 12px; font-size: .86rem; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--secondary); }
.crumbs .icon { width: 14px; height: 14px; }
.crumbs [aria-current] { color: var(--text); font-weight: 700; }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 1279.98px) { .game-layout { grid-template-columns: minmax(0, 1fr); } }

.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden;
  border-radius: calc(var(--radius) + 2px); background: #000; border: 1px solid var(--border);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player:fullscreen { border-radius: 0; border: 0; aspect-ratio: auto; }
.player.is-fake-fullscreen {
  position: fixed; inset: 0; z-index: 500; aspect-ratio: auto; border-radius: 0; border: 0; width: 100vw; height: 100dvh;
}
.player-exit {
  position: absolute; z-index: 5; top: 10px; right: 10px; padding: 8px 14px; border-radius: 999px;
  border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-weight: 800;
}
.player-poster { position: absolute; inset: 0; display: grid; place-items: center; }
.player-poster-media { position: absolute; inset: 0; }
.player-poster-media img { filter: brightness(.55) saturate(1.1); }
.player-poster-media::before {
  content: ""; position: absolute; inset: 0; z-index: 2; background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .45) 100%);
}
.player-start {
  position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 12px;
  border: 0; background: none; color: #fff; font-weight: 900; font-size: clamp(1rem, 2vw, 1.25rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}
.player-start-icon {
  display: grid; place-items: center; width: clamp(64px, 9vw, 88px); height: clamp(64px, 9vw, 88px); border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--on-primary);
  box-shadow: 0 0 0 10px rgb(var(--accent-rgb) / .18), 0 10px 30px rgba(0, 0, 0, .5);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.player-start-icon .icon { width: 42%; height: 42%; margin-left: 6%; }
.player-start:hover .player-start-icon { transform: scale(1.06); box-shadow: 0 0 0 14px rgb(var(--accent-rgb) / .22), 0 10px 30px rgba(0, 0, 0, .5); }
.player-hint { position: absolute; z-index: 3; bottom: 12px; left: 0; right: 0; text-align: center; margin: 0; font-size: .82rem; color: var(--text-soft); font-weight: 700; display: none; }
@media (max-width: 767.98px) and (orientation: portrait) { .player-hint { display: block; } }
.player-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: var(--text-muted); font-weight: 800; pointer-events: none; }

.game-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 18px; }
.game-heading h1 { margin: 0 0 2px; }
.game-heading p { margin: 0; }
.game-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) {
  .game-actions .btn { padding: 0 12px; }
  .game-actions .btn span { display: none; }
  .game-actions .btn { width: 44px; padding: 0; }
}
.fav-toggle[aria-pressed="true"] { color: var(--accent); border-color: rgb(var(--accent-rgb) / .5); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(16px, 2.4vw, 24px); margin-bottom: 18px; }
.panel h2 { font-size: 1.12rem; }
.panel h3 { margin-top: 1.2em; }
.panel details summary { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; list-style: none; }
.panel details summary::-webkit-details-marker { display: none; }
.panel details summary .icon { color: var(--text-muted); }
.panel details[open] summary { margin-bottom: 14px; }

.controls { display: grid; gap: 8px; margin: 0; }
.controls div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.controls dt { color: var(--text-muted); font-weight: 700; }
.controls dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
kbd { display: inline-block; min-width: 28px; padding: 3px 8px; text-align: center; border-radius: 7px; background: var(--surface-3); border: 1px solid var(--border); box-shadow: 0 2px 0 var(--bg-deep); font-weight: 700; }

.game-side .row-title { margin-bottom: 12px; }
.side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1279.98px) { .side-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 15vw, 186px), 1fr)); } }

/* ---------- Text content ---------- */
.prose { color: var(--text-soft); }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin-top: 1.4em; color: var(--text); }
.prose h3 { margin-top: 1.2em; color: var(--text); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose strong { color: var(--text); }
.article { max-width: 760px; margin: 6px auto 30px; }
.article > header { margin-bottom: 18px; }
.article h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-top: 4px; }
.lead { font-size: 1.12rem; color: var(--text-soft); }
.article-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 22px; }
.article-game { max-width: 360px; margin: 26px 0; }
.intro { max-width: 860px; padding-top: 10px; color: var(--text-muted); }
.intro h2 { color: var(--text); font-size: 1.05rem; }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.news-grid-lg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 24px; }
.post-card-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s var(--ease); }
.post-card-link:hover { border-color: var(--secondary); transform: translateY(-2px); text-decoration: none; }
.post-card-media { aspect-ratio: 16 / 9; }
.post-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 16px; }
.post-card-title { font-weight: 900; line-height: 1.3; }
.post-card-excerpt { color: var(--text-muted); font-size: .88rem; }
.pager { display: flex; gap: 10px; justify-content: center; margin-bottom: 30px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-weight: 800; font-size: .9rem; }
.field small { font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"],
input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .12); }
input[type="file"] { font-size: .88rem; color: var(--text-muted); }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 800; cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field-error { margin: 0; color: #ff9c9c; font-weight: 700; font-size: .86rem; }
.search-page { display: flex; gap: 10px; max-width: 640px; margin-bottom: 24px; }
.search-page input { border-radius: 999px; padding-left: 18px; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
.footer-brand { font-weight: 900; font-size: 1.3rem; color: var(--text); margin-bottom: 6px; }
.footer nav { display: flex; flex-direction: column; gap: 6px; }
.footer nav a { color: var(--text-muted); }
.footer nav a:hover { color: var(--secondary); }
.footer-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text); margin-bottom: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .84rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--text-muted); }

/* ==========================================================================
   Admin panel
   ========================================================================== */
.admin-body { background: var(--bg); }
.admin-top {
  position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 10px 20px; background: rgb(var(--bg-rgb) / .95); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
}
.brand-admin { font-weight: 900; font-size: 1.2rem; color: var(--text); text-decoration: none; margin: 0; }
.brand-admin small { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; margin-left: 4px; }
.brand-admin:hover { text-decoration: none; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; color: var(--text-muted); font-weight: 800; font-size: .9rem; text-decoration: none; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a[aria-current="page"] { background: var(--surface-2); color: var(--primary); }
.admin-nav .icon { width: 17px; height: 17px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .72rem; }
.admin-user { display: flex; gap: 8px; margin-left: auto; }
.admin-user form { margin: 0; }
.admin-main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }
.admin-main-narrow { max-width: 480px; padding-top: 7vh; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.admin-head h1 { margin: 0 auto 0 0; }
.admin-search input { min-height: 40px; border-radius: 999px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.5rem; margin-top: 10px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; font-size: .9rem; }
.checks li { padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.checks li.ok span { color: var(--success); font-weight: 900; }
.checks li.bad { background: rgb(var(--danger-rgb) / .12); }
.checks li.bad span { color: var(--danger); font-weight: 900; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
a.stat:hover { border-color: var(--secondary); text-decoration: none; }
.stat-value { font-size: 2rem; font-weight: 900; line-height: 1.1; }
.stat-label { color: var(--text-muted); font-weight: 700; font-size: .88rem; }
.stat-alert { border-color: rgb(var(--danger-rgb) / .5); }
.stat-alert .stat-value { color: var(--danger); }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--text-muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 900; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table td a { color: var(--text); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.table .actions form { margin: 0; }
.table input[type="text"], .table input[type="number"] { min-height: 38px; padding: 6px 10px; }
.table-game { display: flex; align-items: center; gap: 12px; }
.thumb-sm { width: 40px; height: 53px; border-radius: 7px; flex: none; }
.thumb-sm::after { font-size: .7rem; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 900; background: var(--surface-3); color: var(--text-muted); }
.tag-ok { background: rgba(46, 204, 113, .15); color: #7ee2a8; }
.tag-gold { background: rgb(var(--accent-rgb) / .15); color: var(--primary); }
.input-num { max-width: 110px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: grid; place-items: center; padding: 0 10px; border: 1.5px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); color: var(--text-muted); font-size: .88rem; font-weight: 700; }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-prefix-sm > span { font-size: .78rem; padding: 0 8px; }

.admin-form-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.admin-form-grid-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .admin-form-grid, .admin-form-grid-wide { grid-template-columns: 1fr; } }
.admin-form .panel { display: grid; gap: 14px; margin-bottom: 0; align-content: start; }
.admin-form > .panel { margin-top: 18px; }
.admin-form .panel h2 { margin: 0; }
.checks-inline { align-content: center; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.image-field { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.image-field > div { display: grid; gap: 10px; min-width: 0; }
.thumb-preview { width: 90px; aspect-ratio: 3 / 4; border-radius: 10px; }
.banner-preview { width: 150px; aspect-ratio: 16 / 9; border-radius: 10px; }
.thumb-preview::after, .banner-preview::after { font-size: 1.1rem; }
.cover-preview { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); }
.danger-zone { margin-top: 30px; border-color: rgb(var(--danger-rgb) / .35); display: grid; gap: 10px; justify-items: start; }
.danger-zone h2 { margin: 0; }
.danger-zone p { margin: 0; }
.form-inline { grid-template-columns: 1fr auto auto; align-items: end; }
.form-inline h2 { grid-column: 1 / -1; margin: 0; }
@media (max-width: 600px) { .form-inline { grid-template-columns: 1fr; } }
.narrow { max-width: 520px; }
.inbox { display: grid; gap: 12px; }
.message header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.message-body { white-space: normal; background: var(--surface-2); padding: 12px 14px; border-radius: 10px; }
.message form { margin: 0; }

/* ==========================================================================
   GX theme layer — shapes, glows and type that give the gaming-browser look.
   Everything above sets colours; this block sets the "feel".
   ========================================================================== */

html { background: var(--bg-deep); }
body {
  background:
    radial-gradient(1100px 520px at 85% -10%, rgb(var(--accent-rgb) / .13), transparent 60%),
    radial-gradient(800px 480px at -10% 110%, rgb(var(--accent-rgb) / .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
::selection { background: rgb(var(--accent-rgb) / .45); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
:focus-visible { outline-color: var(--accent); border-radius: 2px; }

/* Display type: angular, uppercase headings */
h1, h2, .row-title, .hero-title, .side-heading, .footer-title, .footer-brand, .brand-text,
.brand-admin, .pill-tag, .stat-value, .error-code, .card-title, .post-card-title {
  font-family: var(--font-display);
}
h1, .hero-title { text-transform: uppercase; letter-spacing: .02em; font-weight: 700; }
.row-title { text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; font-weight: 700; }
.row-title .icon { color: var(--accent); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .7)); }
.card-title, .post-card-title { font-weight: 600; letter-spacing: .01em; }
.brand-text, .footer-brand, .brand-admin { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.brand-text span, .footer-brand span, .brand-admin span { color: var(--accent); text-shadow: 0 0 14px rgb(var(--accent-rgb) / .6); }

/* Angled-corner buttons */
.btn {
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: .88rem;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--primary-2)); color: var(--on-primary); box-shadow: none; }
.btn-primary:hover { box-shadow: none; filter: brightness(1.15) saturate(1.1); }
.btn-ghost { background: var(--surface-2); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); background: rgb(var(--accent-rgb) / .12); color: #fff; }
.btn-secondary { border-color: var(--accent); color: var(--secondary); }
.btn-secondary:hover { background: rgb(var(--accent-rgb) / .14); }
.btn-sm { --cut: 7px; }
.icon-btn { border-radius: var(--radius-sm); }
.icon-btn:hover { color: var(--accent); background: rgb(var(--accent-rgb) / .1); }

/* Top bar with an accent light line */
.topbar { background: rgb(var(--bg-deep-rgb) / .9); border-bottom-color: transparent; }
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb) / .9) 30%, rgb(var(--accent-rgb) / .9) 70%, transparent);
}
.search input[type="search"] { border-radius: var(--radius-sm); background: var(--surface); }
.search input[type="search"]:focus { border-color: var(--accent); box-shadow: var(--glow); }
.search-results { border-radius: var(--radius); border-color: rgb(var(--accent-rgb) / .35); }
.search-results a:hover, .search-results a[aria-selected="true"] { background: rgb(var(--accent-rgb) / .12); }
.search-results .sr-thumb { border-radius: 3px; }
.topnav a:not(.icon-btn) { border-radius: var(--radius-sm); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }
.topnav a[aria-current="page"]:not(.icon-btn) { color: #fff; background: rgb(var(--accent-rgb) / .14); box-shadow: inset 0 -2px 0 var(--accent); }

/* Sidebar: GX-style rail */
.sidebar { background: rgb(var(--bg-deep-rgb) / .85); border-right-color: var(--border); }
.side-link, .side-collapse { border-radius: var(--radius-sm); }
.side-link:hover { background: rgb(var(--accent-rgb) / .08); color: #fff; }
.side-link:hover .icon { color: var(--accent); }
.side-link[aria-current="page"] { background: linear-gradient(90deg, rgb(var(--accent-rgb) / .22), rgb(var(--accent-rgb) / .04)); color: #fff; }
.side-link[aria-current="page"] .icon { color: var(--accent); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .8)); }
.side-link[aria-current="page"]::before { left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.side-heading { letter-spacing: .14em; font-weight: 700; color: rgb(var(--accent-rgb) / .8); }
.cat-dot { border-radius: 3px; }

/* Accent picker */
.accent-picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 12px 8px; }
.accent-picker button {
  width: 24px; height: 24px; padding: 0; border: 2px solid transparent; border-radius: 3px; cursor: pointer;
  background: var(--swatch); transform: rotate(45deg) scale(.82); transition: transform .15s, box-shadow .15s;
}
.accent-picker button:hover { transform: rotate(45deg) scale(.95); }
.accent-picker button[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 12px var(--swatch); transform: rotate(45deg) scale(.95); }
.swatch-red { --swatch: #fa1e4e; } .swatch-purple { --swatch: #a14dff; } .swatch-cyan { --swatch: #00d4ff; }
.swatch-green { --swatch: #23e07a; } .swatch-pink { --swatch: #ff2e9a; } .swatch-orange { --swatch: #ff7a1a; }
@media (min-width: 1024px) { body.sidebar-mini .accent-picker { display: none; } }

/* Hero */
.hero { border-radius: var(--radius); border-color: rgb(var(--accent-rgb) / .3); box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / .08), 0 20px 50px rgba(0, 0, 0, .45); }
.pill-tag { border-radius: 0; background: var(--accent); color: var(--on-primary); letter-spacing: .1em; font-weight: 700;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); padding: 4px 14px; }
.hero-title { text-shadow: 0 0 24px rgb(var(--accent-rgb) / .35), 0 2px 16px rgba(0, 0, 0, .6); }
.hero-dots button { border-radius: 0; height: 4px; width: 16px; }
.hero-dots button[aria-current="true"] { width: 30px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero-nav { border-radius: var(--radius-sm); }
.hero-nav:hover { background: var(--accent); border-color: var(--accent); }

/* Chips and tabs: squared */
.chip, .segmented, .segmented a { border-radius: var(--radius-sm); }
.chip { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: .82rem; }
.chip:hover { border-color: var(--accent); color: #fff; }
.chip[aria-current="page"] { border-color: var(--accent); background: rgb(var(--accent-rgb) / .16); color: #fff; box-shadow: 0 0 12px rgb(var(--accent-rgb) / .25); }
.chip .cat-dot { border-radius: 1px; transform: rotate(45deg); width: 8px; height: 8px; }
.segmented a[aria-current="page"] { background: var(--accent); color: var(--on-primary); }
.row-arrows .icon-btn:hover { border-color: var(--accent); }

/* Game cards: thin frame that lights up */
.card-media { border-radius: var(--radius); border-color: var(--border); }
.card-link:hover .card-media, .card-link:focus-visible .card-media {
  border-color: var(--accent); box-shadow: var(--glow), 0 14px 28px rgba(0, 0, 0, .5); transform: translateY(-4px);
}
.card-link:hover .card-title { color: var(--secondary); }
.card-play {
  border-radius: 0; background: var(--accent); color: var(--on-primary);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); width: 56px; height: 56px; margin: -28px 0 0 -28px;
}
.fav-btn { border-radius: var(--radius-sm); }
.fav-btn[aria-pressed="true"] { color: var(--accent); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .8)); }

/* Panels: GX corner brackets */
.panel, .auth-card, .stat, .post-card-link, .table-wrap { border-radius: var(--radius); }
.panel, .auth-card { position: relative; background: linear-gradient(180deg, var(--surface), rgb(var(--bg-rgb) / .9)); }
.panel::before, .auth-card::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 26px; height: 26px; pointer-events: none;
  border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: var(--radius);
}
.panel::after, .auth-card::after {
  content: ""; position: absolute; bottom: -1px; right: -1px; width: 26px; height: 26px; pointer-events: none;
  border-bottom: 2px solid rgb(var(--accent-rgb) / .5); border-right: 2px solid rgb(var(--accent-rgb) / .5); border-bottom-right-radius: var(--radius);
}
.post-card-link:hover { border-color: var(--accent); box-shadow: var(--glow); }

/* Game player */
.player { border-radius: var(--radius); border-color: rgb(var(--accent-rgb) / .35); box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / .1), 0 24px 60px rgba(0, 0, 0, .5); }
.player-start { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; }
.player-start-icon {
  border-radius: 0; background: var(--accent); color: var(--on-primary);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); box-shadow: none;
  width: clamp(76px, 10vw, 104px); height: clamp(76px, 10vw, 104px);
  filter: drop-shadow(0 0 18px rgb(var(--accent-rgb) / .8));
}
.player-start:hover .player-start-icon { box-shadow: none; transform: scale(1.08); filter: drop-shadow(0 0 28px rgb(var(--accent-rgb) / 1)); }
.player-start-icon .icon { width: 34%; height: 34%; margin-left: 4%; }
.fav-toggle[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: rgb(var(--accent-rgb) / .2); }
kbd { border-radius: 3px; box-shadow: 0 2px 0 var(--bg-deep), inset 0 -1px 0 rgb(var(--accent-rgb) / .4); font-family: var(--font-display); }
.controls div { border-radius: var(--radius-sm); border-left: 2px solid var(--accent); }

/* Forms */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"],
input[type="datetime-local"], select, textarea { border-radius: var(--radius-sm); background: var(--bg-deep); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--glow); }
input[type="file"]::file-selector-button { border-radius: var(--radius-sm); }
.search-page input { border-radius: var(--radius-sm); }
.check input { accent-color: var(--accent); }

/* Misc */
.toast { border-radius: var(--radius-sm); border-left: 3px solid var(--accent); background: var(--surface-2); }
.notice { border-radius: var(--radius-sm); }
.tag { border-radius: 2px; font-family: var(--font-display); letter-spacing: .05em; text-transform: uppercase; }
.tag-gold { background: rgb(var(--accent-rgb) / .18); color: var(--secondary); }
.badge { background: var(--accent); box-shadow: 0 0 8px var(--accent); border-radius: 3px; }
.bottom-nav { background: rgb(var(--bg-deep-rgb) / .96); }
.bottom-nav [aria-current="page"] { color: var(--accent); }
.bottom-nav [aria-current="page"] .icon { filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .9)); }
.footer { border-top-color: rgb(var(--accent-rgb) / .25); }
.footer nav a:hover, .crumbs a:hover, .see-all:hover { color: var(--accent); }
.empty { border-radius: var(--radius); border-color: rgb(var(--accent-rgb) / .25); }
.error-code { color: var(--accent); text-shadow: 0 0 30px rgb(var(--accent-rgb) / .6); }
.admin-top { background: rgb(var(--bg-deep-rgb) / .95); border-bottom-color: rgb(var(--accent-rgb) / .3); }
.admin-nav a { border-radius: var(--radius-sm); }
.admin-nav a[aria-current="page"] { color: #fff; background: rgb(var(--accent-rgb) / .16); box-shadow: inset 0 -2px 0 var(--accent); }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
a.stat:hover { border-color: var(--accent); box-shadow: var(--glow); }
.table th { font-family: var(--font-display); }

/* ==========================================================================
   Accounts and leaderboards
   ========================================================================== */
.signin-btn { flex: none; min-height: 38px; }
.signin-btn .icon { width: 16px; height: 16px; }
.account-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 4px 10px 4px 4px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 800; font-size: .9rem; text-decoration: none;
}
.account-btn:hover, .account-btn[aria-current="page"] { border-color: var(--accent); text-decoration: none; box-shadow: var(--glow); }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--hue, var(--accent)), color-mix(in srgb, var(--hue, var(--accent)) 45%, #000));
  color: #fff; font-family: var(--font-display); font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.avatar-lg { width: 72px; height: 72px; font-size: 2rem; border-radius: var(--radius);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
@media (max-width: 767.98px) {
  .account-name, .signin-btn span { display: none; }
  .account-btn { padding: 4px; }
  .signin-btn { width: 40px; padding: 0; }
}

.auth-wrap { display: grid; place-items: center; padding: clamp(10px, 4vh, 48px) 0 30px; }
.auth-wrap .auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card .form { margin-top: 18px; }
.auth-links { margin: 14px 0 0; font-size: .92rem; }
.auth-switch { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: .92rem; color: var(--text-muted); }
.check a { color: var(--secondary); }
.check { align-items: flex-start; }
.check input { margin-top: 2px; flex: none; }
.panel.form > .btn { justify-self: start; }
.account-settings { align-items: start; }
.account-settings .danger-zone { margin-top: 0; justify-items: stretch; }
.account-settings .danger-zone > .btn { justify-self: start; }

.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 6px 0 24px; }
.profile-head h1 { margin: 0 0 2px; }
.profile-head p { margin: 0; }
.profile-actions { margin-left: auto; }
.account-settings { margin-top: 10px; }

/* Leaderboard panel */
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.board-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-display); }
.board-head h2 .icon { color: var(--accent); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .7)); }
.board-head .segmented a { padding: 6px 12px; font-size: .82rem; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board-list li, .board-me {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--radius-sm); background: rgb(var(--bg-deep-rgb) / .6); border: 1px solid transparent;
}
.board-list li.is-me, .board-me { border-color: rgb(var(--accent-rgb) / .6); background: rgb(var(--accent-rgb) / .1); }
.board-me { margin-top: 8px; }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 800; }
.board-score { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.board-score small { color: var(--text-muted); font-family: var(--font); font-weight: 600; }
.rank {
  display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 6px;
  font-family: var(--font-display); font-weight: 700; color: var(--text-muted);
  background: var(--surface-2); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.rank-1 { background: #f5b301; color: #1a1300; }
.rank-2 { background: #c9ced8; color: #14161b; }
.rank-3 { background: #d0813f; color: #1a0e04; }
.board-empty { margin: 6px 0 0; }
.board-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }

/* Leaderboards page */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 30px; }
.board-card {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.board-card:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-2px); text-decoration: none; }
.board-card-media { width: 76px; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); }
.board-card-media::after { font-size: 1.2rem; }
.board-card-body { display: grid; gap: 4px; min-width: 0; }
.board-leader { display: flex; align-items: center; gap: 6px; font-size: .9rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.board-leader .icon { width: 16px; height: 16px; color: #f5b301; flex: none; }
.scores-table .table-game { color: var(--text); text-decoration: none; }

/* ==========================================================================
   XP, levels, badges and the daily challenge
   ========================================================================== */
.avatar { position: relative; }
.avatar-level {
  position: absolute; right: -6px; bottom: -6px; min-width: 18px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; font-size: .66rem; line-height: 1; font-family: var(--font-display);
  background: var(--accent); color: var(--on-primary); border: 2px solid var(--bg-deep); border-radius: 3px;
}
.account-meta { display: grid; gap: 4px; min-width: 0; }
.xp-mini { display: block; width: 72px; height: 3px; background: var(--surface-3); overflow: hidden; }
.xp-mini-fill, .xp-bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary-2), var(--accent)); box-shadow: 0 0 8px rgb(var(--accent-rgb) / .8); transition: width .8s var(--ease); }
@media (max-width: 767.98px) { .account-meta { display: none; } }

.level-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 22px; }
.level-badge {
  width: 64px; height: 64px; display: grid; place-items: center;
  background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: drop-shadow(0 0 10px rgb(var(--accent-rgb) / .7));
}
.level-badge span { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--on-primary); }
.level-info p { margin: 0; }
.level-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: .03em; text-transform: uppercase; }
.level-rank { color: var(--secondary); }
.xp-bar { height: 10px; margin: 8px 0 6px; background: var(--bg-deep); border: 1px solid var(--border); overflow: hidden;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.streak { display: grid; justify-items: center; gap: 0; text-align: center; padding: 6px 12px; border-left: 1px solid var(--border); }
.streak .icon { width: 26px; height: 26px; color: #ff8a1c; filter: drop-shadow(0 0 6px rgba(255, 138, 28, .7)); }
.streak strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
@media (max-width: 600px) {
  .level-card { grid-template-columns: auto minmax(0, 1fr); }
  .streak { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; justify-content: flex-start; border-left: 0; border-top: 1px solid var(--border); padding: 10px 0 0; }
}

.badge-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.badge-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); opacity: .55; filter: grayscale(.8);
}
.badge-item.is-earned { opacity: 1; filter: none; border-color: rgb(var(--accent-rgb) / .45); background: linear-gradient(90deg, rgb(var(--accent-rgb) / .12), var(--surface)); }
.badge-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--surface-3);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.badge-item.is-earned .badge-icon { background: var(--accent); color: var(--on-primary); }
.badge-text { display: grid; min-width: 0; }
.badge-text strong { font-family: var(--font-display); letter-spacing: .02em; }

.xp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 640px; }
.xp-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 8px 12px; background: var(--surface); border-radius: var(--radius-sm); }
.xp-list strong { color: var(--secondary); font-family: var(--font-display); }

.lv-chip { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 3px; font-size: .7rem; font-family: var(--font-display);
  background: rgb(var(--accent-rgb) / .16); color: var(--secondary); vertical-align: 1px; }

/* Daily challenge card */
.challenge {
  position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 18px;
  padding: 14px 18px 14px 14px; margin: 0 0 18px; border-radius: var(--radius);
  background: linear-gradient(100deg, rgb(var(--accent-rgb) / .22), rgb(var(--accent-rgb) / .05) 55%, var(--surface));
  border: 1px solid rgb(var(--accent-rgb) / .5); box-shadow: 0 0 24px rgb(var(--accent-rgb) / .12);
}
.challenge::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.challenge-compact { grid-template-columns: minmax(0, 1fr) auto; padding-left: 20px; }
.challenge-media { width: 84px; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); }
.challenge-media::after { font-size: 1.2rem; }
.challenge-body p { margin: 0; }
.challenge-kicker { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--secondary); }
.challenge-kicker .icon { width: 16px; height: 16px; }
.challenge-kicker { flex-wrap: wrap; row-gap: 2px; }
.challenge-timer { white-space: nowrap; color: var(--text-muted); letter-spacing: .04em; text-transform: none; font-family: var(--font); font-weight: 700; }
.challenge-title { font-size: clamp(1.05rem, 2vw, 1.35rem); margin: 4px 0 4px; font-family: var(--font-display); text-transform: none; }
.challenge-action { display: grid; justify-items: end; gap: 6px; }
.challenge-done { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: #0c0b11; background: var(--success); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.challenge-done .icon { width: 18px; height: 18px; }
.challenge.is-done { border-color: rgb(47 212 122 / .6); }
.challenge.is-done::before { background: var(--success); box-shadow: 0 0 10px var(--success); }
@media (max-width: 600px) {
  .challenge { grid-template-columns: 64px minmax(0, 1fr); }
  .challenge-media { width: 64px; }
  .challenge-action { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; align-items: center; }
  .challenge-compact { grid-template-columns: minmax(0, 1fr); }
}

/* Reward toasts */
.toast-xp { border-left-color: var(--success); }
.toast-level, .toast-badge {
  background: linear-gradient(90deg, rgb(var(--accent-rgb) / .9), var(--primary-2)); color: var(--on-primary);
  border-left-color: #fff; box-shadow: 0 0 24px rgb(var(--accent-rgb) / .6), var(--shadow);
  font-family: var(--font-display); letter-spacing: .03em; padding: 12px 20px;
}

/* ==========================================================================
   Admin dashboard charts (neon infographic palette, colours set in src/Charts.php)
   ========================================================================== */
.analytics { margin: 6px 0 24px; }
.analytics-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.analytics-head h2 { margin: 0 0 2px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.analytics-head p { margin: 0; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-wide { grid-column: 1 / -1; }
@media (max-width: 980px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }
.chart-card.panel { margin: 0; display: grid; gap: 10px; align-content: start; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chart-head p { margin: 2px 0 0; }
.chart-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; font-family: var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.chart-kpi { display: grid; justify-items: end; gap: 2px; flex: none; }
.chart-kpi-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.delta { font-size: .78rem; font-weight: 800; padding: 2px 7px; border-radius: 3px; white-space: nowrap; }
.delta-up { color: #3DFF6E; background: rgb(61 255 110 / .12); }
.delta-down { color: #ff5c73; background: rgb(255 31 61 / .14); }
.delta-flat { color: var(--text-muted); background: var(--surface-2); }
.swatch { width: 12px; height: 12px; flex: none; display: inline-block; vertical-align: -1px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .84rem; color: var(--text-soft); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item b { color: var(--text); font-variant-numeric: tabular-nums; }
.chart-legend .swatch + .swatch { margin-left: -4px; }

.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.chart-gridlines line { stroke: rgb(255 255 255 / .06); stroke-width: 1; }
.chart-gridlines line.chart-base { stroke: rgb(255 255 255 / .22); }
.chart-axis { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-label { fill: var(--text); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-cat { fill: var(--text-soft); font-size: 12.5px; font-weight: 700; }
.chart-line { filter: drop-shadow(0 0 5px currentColor); }
.chart-dot { stroke: var(--surface); stroke-width: 2; }
.chart-bar { filter: drop-shadow(0 0 4px rgb(0 0 0 / .4)); transition: filter .15s; }
.chart-seg { stroke: var(--surface); stroke-width: 1.5px; }
.chart-track { fill: rgb(255 255 255 / .04); }
.chart-cross { stroke: rgb(255 255 255 / .35); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-empty-box { fill: none; stroke: var(--border); stroke-dasharray: 4 4; }
.chart-empty { fill: var(--text-muted); font-size: 13px; }
.hit { cursor: crosshair; }
.hit .hover-only { opacity: 0; transition: opacity .1s; }
.hit:hover .hover-only { opacity: 1; }
.hit:hover .chart-bar { filter: drop-shadow(0 0 8px currentColor) brightness(1.15); }
.hit:hover .chart-seg { filter: brightness(1.2); }
.hit:hover .chart-cat { fill: var(--text); }
.heat-cell.heat-zero { fill: #1f1c29; }
.heat-cell:not(.heat-zero) { filter: drop-shadow(0 0 3px rgb(0 180 255 / .25)); }
.heat-cell:hover { stroke: #fff; stroke-width: 1.5; }

.chart-tip {
  position: fixed; z-index: 1000; max-width: 320px; padding: 8px 12px; pointer-events: none;
  background: rgb(var(--bg-deep-rgb) / .96); color: var(--text); border: 1px solid rgb(var(--accent-rgb) / .5);
  border-radius: var(--radius-sm); font-size: .85rem; font-weight: 700; box-shadow: var(--shadow);
}
.chart-data summary { cursor: pointer; color: var(--text-muted); font-size: .84rem; font-weight: 700; }
.chart-data summary:hover { color: var(--secondary); }
.chart-data .table-wrap { margin: 10px 0 0; max-height: 280px; overflow: auto; }
@media (forced-colors: active) { .chart-bar, .chart-seg, .heat-cell { forced-color-adjust: none; } }
/* Phones: charts keep a readable size and scroll sideways instead of shrinking */
@media (max-width: 760px) {
  .chart-body { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px 6px; }
  .chart-body .chart { min-width: 480px; }
  .chart-wide .chart-body .chart { min-width: 860px; }
  .chart-head { flex-wrap: wrap; }
}

/* ==========================================================================
   Gameplay videos (YouTube, click to load)
   ========================================================================== */
.video-panel h2 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.video-panel h2 .icon { color: var(--accent); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .7)); }
.video-panel > p { margin: 10px 0 0; }
.yt { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #000; border: 1px solid rgb(var(--accent-rgb) / .3); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-poster { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-decoration: none; }
.yt-poster:hover { text-decoration: none; }
.yt-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); transition: filter .2s, transform .4s var(--ease); }
.yt-poster:hover img { filter: brightness(.85); transform: scale(1.02); }
.yt-play {
  position: relative; z-index: 1; display: grid; place-items: center; width: 84px; height: 84px;
  background: var(--accent); color: var(--on-primary); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 0 18px rgb(var(--accent-rgb) / .8)); transition: transform .2s var(--ease);
}
.yt-play .icon { width: 34%; height: 34%; margin-left: 4%; }
.yt-poster:hover .yt-play, .yt-poster:focus-visible .yt-play { transform: scale(1.08); }
.yt-label {
  position: absolute; left: 14px; bottom: 12px; z-index: 1; padding: 4px 10px; border-radius: 3px;
  background: rgb(var(--bg-deep-rgb) / .8); font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .03em;
}
.video-mini { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: .85rem; font-weight: 700; }
.video-mini img { width: 112px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.video-mini .icon { width: 14px; height: 14px; }
.videos-table input[type="text"] { min-width: 260px; }
.videos-table tr.row-error td { background: rgb(var(--danger-rgb) / .08); }

/* ==========================================================================
   Galaxy background + glass (frosted panels) + pop-out game card hover
   Added on top of everything above; remove this block to go back to the solid theme.
   ========================================================================== */
:root {
  --glass-bg: rgba(14, 12, 24, .5);
  --glass-bg-strong: rgba(9, 8, 17, .72);
  --glass-tint: linear-gradient(155deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .012) 45%, rgba(255, 255, 255, .03));
  --glass-border: rgba(255, 255, 255, .09);
  --glass-border-hi: rgba(255, 255, 255, .16);
  --glass-blur: blur(18px) saturate(155%);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* --- Sci-fi Milky Way background (original artwork in /assets/images/bg) --- */
html { background: #05050b; }
body, .admin-body { background: transparent; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -8%, rgb(var(--accent-rgb) / .16), transparent 62%),
    radial-gradient(700px 480px at -8% 108%, rgb(var(--accent-rgb) / .10), transparent 62%),
    linear-gradient(180deg, rgba(5, 5, 12, .28), rgba(5, 5, 12, .55)),
    url("/assets/images/bg/galaxy-2560.webp") center / cover no-repeat #05050b;
}
@media (max-width: 1280px) and (min-aspect-ratio: 4/5) {
  body::before {
    background:
      radial-gradient(700px 420px at 88% -8%, rgb(var(--accent-rgb) / .16), transparent 62%),
      linear-gradient(180deg, rgba(5, 5, 12, .28), rgba(5, 5, 12, .55)),
      url("/assets/images/bg/galaxy-1280.webp") center / cover no-repeat #05050b;
  }
}
@media (max-aspect-ratio: 4/5) {
  body::before {
    background:
      radial-gradient(500px 360px at 90% -6%, rgb(var(--accent-rgb) / .18), transparent 62%),
      linear-gradient(180deg, rgba(5, 5, 12, .3), rgba(5, 5, 12, .58)),
      url("/assets/images/bg/galaxy-mobile.webp") center / cover no-repeat #05050b;
  }
}
/* Twinkling foreground stars (pure CSS, paused for reduced motion) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #cfe3ff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 38% 66%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 54%, #ffe6c7 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 22% 88%, #dcd2ff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 36%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 94% 82%, #cfe3ff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 8%, #fff 50%, transparent 51%);
  background-size: 620px 620px, 540px 540px, 700px 700px, 480px 480px, 660px 660px, 580px 580px, 760px 760px, 520px 520px;
  animation: cp-twinkle 5.5s ease-in-out infinite alternate;
}
@keyframes cp-twinkle { from { opacity: .25; } to { opacity: .7; } }

/* Readable text straight on the galaxy */
.row-title, .page-head h1, .page-head p, .analytics-head, .admin-head h1, .crumbs, .card-title, .card-cat,
.intro, .footer, .profile-head, .game-heading, .side-heading { text-shadow: 0 1px 10px rgba(0, 0, 0, .65); }

/* --- Frosted glass surfaces --- */
.topbar, .admin-top {
  background: linear-gradient(180deg, rgba(8, 7, 14, .62), rgba(8, 7, 14, .46));
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border-bottom: 1px solid var(--glass-border);
}
.sidebar {
  background: linear-gradient(180deg, rgba(10, 9, 18, .55), rgba(10, 9, 18, .42));
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border-right: 1px solid var(--glass-border);
}
.bottom-nav {
  background: rgba(8, 7, 14, .6);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border-top: 1px solid var(--glass-border);
}
.panel, .auth-card, .stat, .table-wrap, .post-card-link, .board-card, .search-results, .empty, .hero,
.chart-tip, .toast, .level-card {
  background: var(--glass-tint), var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.search-results, .chart-tip, .toast { background: var(--glass-tint), var(--glass-bg-strong); }
.challenge {
  background: linear-gradient(100deg, rgb(var(--accent-rgb) / .22), rgb(var(--accent-rgb) / .06) 55%, rgba(255, 255, 255, .02)), var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), 0 0 24px rgb(var(--accent-rgb) / .12);
}
.table th { background: rgba(255, 255, 255, .045); }
.table td { border-bottom-color: rgba(255, 255, 255, .06); }
/* Inner items sit on glass already: light translucency, no extra blur */
.badge-item, .xp-list li, .controls div, .board-list li, .message-body, .checks li, .chart-track { background-color: rgba(255, 255, 255, .035); }
.badge-item { border-color: var(--glass-border); }
.badge-item.is-earned { background: linear-gradient(90deg, rgb(var(--accent-rgb) / .16), rgba(255, 255, 255, .03)); }
/* Controls */
.chip, .segmented, .btn-ghost, .account-btn, .row-arrows .icon-btn, .hero-nav, .search input[type="search"], .search-page input {
  background-color: rgba(255, 255, 255, .045);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
}
.chip:hover, .btn-ghost:hover, .account-btn:hover { background-color: rgb(var(--accent-rgb) / .14); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"], select, textarea {
  background-color: rgba(5, 5, 12, .55);
  border-color: var(--glass-border);
}
.footer { border-top-color: var(--glass-border); }
.hero { border-color: rgb(var(--accent-rgb) / .3); }
/* Browsers without backdrop blur get a solid-enough fallback */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar, .admin-top, .sidebar, .bottom-nav { background: rgba(10, 9, 18, .94); }
  .panel, .auth-card, .stat, .table-wrap, .post-card-link, .board-card, .search-results, .empty, .challenge, .level-card { background-color: rgba(16, 14, 26, .9); }
}

/* --- Game cards: pop-out hover with live preview (like the big game portals) --- */
.card-media { border-color: rgba(255, 255, 255, .1); }
.card-hover {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: grid; gap: 6px;
  padding: 34px 10px 10px; pointer-events: none; opacity: 0; transform: translateY(6px);
  background: linear-gradient(180deg, transparent, rgba(8, 6, 18, .78) 45%, rgba(8, 6, 18, .94));
  transition: opacity .2s ease, transform .25s var(--ease);
}
.card-hover-title { font-family: var(--font-display); font-weight: 700; font-size: .98rem; line-height: 1.15; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-hover-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .72rem; font-weight: 800; color: #e7e3f1; }
.card-hover-cat { padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .18); }
.card-hover-stat { display: inline-flex; align-items: center; gap: 4px; }
.card-hover-stat .icon { width: 12px; height: 12px; }
.card-preview { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .35s ease; background: #000; }
.card-preview.is-on { opacity: 1; }
.card-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-preview iframe { position: absolute; top: 50%; left: 50%; height: 122%; width: auto; aspect-ratio: 16 / 9; border: 0; transform: translate(-50%, -50%); }
.card-wide .card-preview iframe { width: 122%; height: auto; }

@media (hover: hover) and (pointer: fine) {
  .card { z-index: 1; }
  .card:hover, .card:focus-within { z-index: 30; }
  .card .card-media { transition: transform .32s cubic-bezier(.2, .9, .25, 1.15), box-shadow .25s, border-color .2s; }
  .card:hover .card-link .card-media, .card .card-link:focus-visible .card-media {
    transform: scale(1.13);
    border-color: var(--accent);
    box-shadow: 0 0 0 1.5px var(--accent), 0 0 30px rgb(var(--accent-rgb) / .55), 0 22px 46px rgba(0, 0, 0, .7);
  }
  .card:hover .card-link .card-media img { transform: scale(1.03); }
  .card:hover .card-hover, .card .card-link:focus-visible .card-hover { opacity: 1; transform: none; }
  .card:hover .card-body { opacity: 0; transition: opacity .2s; }
  .card .card-media.is-previewing .card-play { opacity: 0 !important; }
  .card:hover .fav-btn { z-index: 6; transform: translate(10px, -14px); }
  /* room for the pop-out inside horizontal rows */
  .row-head { margin-bottom: 0; }
  .row-track { padding: 20px 16px 24px; margin-inline: -16px; scroll-padding-inline: 16px; }
  .row { margin-bottom: 12px; }
}
.board-card:hover, .post-card-link:hover { border-color: var(--accent); box-shadow: var(--glass-shadow), 0 0 0 1px var(--accent), 0 0 26px rgb(var(--accent-rgb) / .35); }

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .card:hover .card-link .card-media { transform: none; }
}

/* ==========================================================================
   Home layout v2: promo buttons, image-only game cards, 6-across rows,
   Premium / Join our team pages, colourful sidebar icons
   ========================================================================== */
/* Premium membership (gold) + Join our team (blue) buttons */
.promo-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 22px; }
.promo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 22px;
  border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .07em; text-transform: uppercase;
  transition: transform .18s var(--ease), box-shadow .2s, filter .2s;
}
.promo-btn:hover { text-decoration: none; transform: translateY(-2px); filter: brightness(1.08) saturate(1.1); }
.promo-btn:active { transform: translateY(0); }
.promo-btn-gold { background: linear-gradient(90deg, #ffd000, #ffb800 55%, #ff9f0a); color: #15100a; box-shadow: 0 6px 22px rgba(255, 184, 0, .28); }
.promo-btn-gold:hover { color: #15100a; box-shadow: 0 8px 30px rgba(255, 184, 0, .5); }
.promo-btn-blue { background: linear-gradient(90deg, #00d4ff, #1aa8ff 50%, #1e6bff); color: #fff; box-shadow: 0 6px 22px rgba(0, 170, 255, .28); }
.promo-btn-blue:hover { color: #fff; box-shadow: 0 8px 30px rgba(0, 170, 255, .5); }
.promo-bar .promo-btn { width: 100%; }
@media (max-width: 560px) {
  .promo-bar { gap: 8px; }
  .promo-btn { font-size: .78rem; letter-spacing: .04em; padding: 10px 8px; }
}

/* Game cards show only the artwork (title + category stay readable to screen readers and on hover) */
.card .card-body {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.card .card-media { border-radius: 8px; }
/* Thumbnails already carry the game name, so the hover strip only shows plays and the preview badge */
.card .card-hover-title, .card .card-hover-cat { display: none; }
.card .card-hover { padding: 22px 10px 9px; background: linear-gradient(180deg, transparent, rgba(8, 6, 18, .72)); }
.card .card-hover-meta:empty { display: none; }

/* Rows show 6 games across on wide screens, like the grid below them */
@media (min-width: 1200px) {
  .row-track { grid-auto-columns: calc((100% - 5 * 14px) / 6); }
  .grid-home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.grid-home { margin-bottom: 18px; }
/* Phones: big game boxes, two per line, in every section (rows become a 2-column grid, first 6 games; "See all" shows the rest) */
@media (max-width: 640px) {
  .grid, .grid-home, .side-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .row-track {
    grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto;
    gap: 12px; overflow: visible; scroll-snap-type: none; padding: 0; margin-inline: 0;
  }
  .row-track > .card:nth-child(n+7) { display: none; }
  .card .card-media { border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
  .card .card-link:active .card-media { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent), 0 0 18px rgb(var(--accent-rgb) / .5); }
  .promo-bar { gap: 10px; }
}
@media (min-width: 1100px) { .row .news-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Premium / Join our team pages */
.promo-hero {
  position: relative; overflow: hidden; text-align: center; padding: clamp(28px, 5vw, 54px) 20px; margin-bottom: 22px;
  border-radius: 14px; border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.promo-hero-gold { background: radial-gradient(120% 140% at 50% 0%, rgba(255, 196, 0, .28), transparent 60%), var(--glass-bg); border-color: rgba(255, 196, 0, .35); }
.promo-hero-blue { background: radial-gradient(120% 140% at 50% 0%, rgba(0, 180, 255, .28), transparent 60%), var(--glass-bg); border-color: rgba(0, 180, 255, .35); }
.promo-hero h1 { margin: 10px 0 8px; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.promo-hero .lead { max-width: 620px; margin: 0 auto 20px; }
.promo-hero-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; }
.promo-hero-icon .icon { width: 34px; height: 34px; }
.promo-hero-gold .promo-hero-icon { background: linear-gradient(135deg, #ffd000, #ff9f0a); color: #15100a; box-shadow: 0 0 34px rgba(255, 184, 0, .55); }
.promo-hero-blue .promo-hero-icon { background: linear-gradient(135deg, #00d4ff, #1e6bff); color: #fff; box-shadow: 0 0 34px rgba(0, 170, 255, .55); }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 26px; }
.perk {
  display: block; padding: 18px; border-radius: 12px; color: var(--text); text-decoration: none;
  background: var(--glass-tint), var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transition: transform .18s var(--ease), border-color .2s;
}
@media (min-width: 900px) { .perk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.perk h2 { font-size: 1.05rem; margin: 12px 0 6px; }
.perk p { margin: 0; color: var(--text-soft); font-size: .92rem; }
.perk-link:hover { text-decoration: none; transform: translateY(-3px); border-color: #1aa8ff; color: var(--text); }
.perk-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; }
.perk-icon .icon { width: 22px; height: 22px; }
.perk-icon-gold { background: rgba(255, 196, 0, .16); color: #ffc400; border: 1px solid rgba(255, 196, 0, .35); }
.perk-icon-blue { background: rgba(0, 180, 255, .16); color: #2bb6ff; border: 1px solid rgba(0, 180, 255, .35); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); justify-content: center; gap: 14px; margin-bottom: 26px; }
.plan { position: relative; text-align: center; padding: 22px; border-radius: 12px; background: var(--glass-tint), var(--glass-bg); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.plan-best { border-color: rgba(255, 196, 0, .6); box-shadow: 0 0 28px rgba(255, 184, 0, .2); }
.plan h2 { margin: 0 0 6px; font-size: 1.1rem; }
.plan-price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin: 0 0 14px; }
.plan-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: #ffc400; color: #15100a; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.form.panel h2 { margin-top: 0; }

/* Colourful sidebar icons */
.si { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; transition: transform .2s var(--ease), filter .2s; }
.si svg { width: 30px; height: 30px; display: block; overflow: visible; }
.side-link:hover .si { transform: translateY(-1px) scale(1.07); filter: drop-shadow(0 0 7px rgba(255, 255, 255, .22)) brightness(1.12); }
.side-link[aria-current="page"] .si { filter: drop-shadow(0 0 9px rgba(255, 255, 255, .3)) brightness(1.15); }
.side-link[aria-current="page"] .si .si-tile, .side-link:hover .si .si-tile { fill-opacity: .3; stroke-opacity: .8; }
.si .si-tile { transition: fill-opacity .2s, stroke-opacity .2s; }

/* ==========================================================================
   SEO & analytics: cookie banner, embed code, admin SEO tools
   ========================================================================== */
.consent {
  position: fixed; z-index: 200; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(720px, calc(100% - 24px)); display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border-radius: 14px; border: 1px solid var(--glass-border-hi);
  background: var(--glass-tint), var(--glass-bg-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.consent[hidden] { display: none; }
.consent-body { flex: 1; min-width: 0; }
.consent-title { margin: 0 0 4px; font-weight: 900; }
.consent-text { margin: 0; font-size: .88rem; color: var(--text-soft); }
.consent-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 640px) {
  .consent { flex-direction: column; align-items: stretch; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .consent-actions .btn { flex: 1; }
}
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--accent); }

.embed-panel h2 { margin-top: 0; font-size: 1.05rem; }
.embed-code { width: 100%; font: .82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; margin-bottom: 10px; }
.category-intro { margin-top: 10px; }
.category-intro h2 { margin-top: 0; font-size: 1.1rem; }

.text-danger { color: var(--danger); }
.tag-danger { background: rgb(var(--danger-rgb) / .18); color: #ff8fa6; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input { min-width: 160px; flex: 1; }
.link-list { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 6px; }
.log-tail { max-height: 260px; overflow: auto; padding: 10px; border-radius: 8px; background: rgba(0, 0, 0, .45); font-size: .74rem; white-space: pre-wrap; word-break: break-all; }
.row-sub td { padding-top: 0; border-bottom-color: rgba(255, 255, 255, .08); }
.row-sub summary { cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--text-muted); padding: 4px 0 8px; }
.row-sub details[open] { padding-bottom: 10px; }
.serp { display: grid; gap: 3px; max-width: 620px; padding: 14px 16px; border-radius: 10px; background: #fff; font-family: Arial, sans-serif; }
.serp-url { color: #202124; font-size: 13px; }
.serp-title { color: #1a0dab; font-size: 19px; line-height: 1.3; }
.serp-desc { color: #4d5156; font-size: 13.5px; line-height: 1.5; }

/* ==========================================================================
   Theme logo (mascot changes colour with the chosen theme) + loading screen
   ========================================================================== */
.brand-mark {
  flex: none; width: 42px; height: 42px; margin-right: 8px;
  background: url("/assets/images/logo/mark-red.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgb(var(--accent-rgb) / .35));
  transition: transform .3s cubic-bezier(.2, .9, .25, 1.3), filter .3s;
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); filter: drop-shadow(0 0 14px rgb(var(--accent-rgb) / .6)); }
:root[data-accent="purple"] .brand-mark { background-image: url("/assets/images/logo/mark-purple.webp"); }
:root[data-accent="cyan"]   .brand-mark { background-image: url("/assets/images/logo/mark-cyan.webp"); }
:root[data-accent="green"]  .brand-mark { background-image: url("/assets/images/logo/mark-green.webp"); }
:root[data-accent="pink"]   .brand-mark { background-image: url("/assets/images/logo/mark-pink.webp"); }
:root[data-accent="orange"] .brand-mark { background-image: url("/assets/images/logo/mark-orange.webp"); }
@media (max-width: 640px) { .brand-mark { width: 34px; height: 34px; margin-right: 6px; } }

.preloader {
  display: none; position: fixed; inset: 0; z-index: 1000; place-items: center;
  background: radial-gradient(420px 420px at 50% 50%, rgba(255, 255, 255, .045), transparent 70%), #12141b;
}
.cp-loading .preloader { display: grid; animation: pl-failsafe .4s ease 7s forwards; }
.cp-loaded .preloader { opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.preloader-logo { position: relative; width: clamp(120px, 30vw, 176px); aspect-ratio: 1; animation: pl-wobble 1.2s ease-in-out infinite; }
.preloader-logo span {
  position: absolute; inset: 0; opacity: 0; background: center / contain no-repeat;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45));
  animation: pl-cycle 3.6s steps(1, end) infinite;
}
.preloader-logo .pl-red    { background-image: url("/assets/images/logo/mark-red.webp"); animation-delay: 0s; }
.preloader-logo .pl-cyan   { background-image: url("/assets/images/logo/mark-cyan.webp"); animation-delay: .6s; }
.preloader-logo .pl-green  { background-image: url("/assets/images/logo/mark-green.webp"); animation-delay: 1.2s; }
.preloader-logo .pl-orange { background-image: url("/assets/images/logo/mark-orange.webp"); animation-delay: 1.8s; }
.preloader-logo .pl-pink   { background-image: url("/assets/images/logo/mark-pink.webp"); animation-delay: 2.4s; }
.preloader-logo .pl-purple { background-image: url("/assets/images/logo/mark-purple.webp"); animation-delay: 3s; }
.preloader-logo .pl-red { opacity: 1; }   /* visible from the very first frame */
@keyframes pl-cycle { 0% { opacity: 1; } 16.6667% { opacity: 0; } 100% { opacity: 0; } }
@keyframes pl-wobble { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.04); } }
@keyframes pl-failsafe { to { opacity: 0; visibility: hidden; } }

/* ==========================================================================
   Header v3: 96px logo, stylish wordmark, language menu, marquee, promo popup,
   fullscreen / rotate prompts. Hamburger removed (bottom bar "Menu" opens the drawer).
   ========================================================================== */
.has-marquee { --marquee-h: 24px; }
.brand { height: 96px; }
.brand-mark { width: 96px; height: 96px; margin-right: 6px; }
@media (max-width: 640px) { .brand-mark { width: 96px; height: 96px; margin-right: 2px; } }
.menu-btn { display: none !important; }

/* Wordmark: arcade-style CRAZY over a glowing, accent-coloured PLAYERS */
.brand.no-logo .brand-text.wordmark { display: inline-flex; }
.wordmark { flex-direction: column; justify-content: center; gap: 1px; line-height: 1; text-transform: none; letter-spacing: 0; font-weight: 400; }
.wordmark .wm-top, .wordmark .wm-bottom { font-family: 'Bungee', var(--font-display); display: block; white-space: nowrap; }
.wordmark .wm-top {
  font-size: 1.62rem; color: #fff; letter-spacing: .02em; transform: skewX(-8deg);
  text-shadow: 2px 2px 0 var(--accent), 4px 4px 0 rgb(var(--accent-rgb) / .35), 0 0 18px rgb(var(--accent-rgb) / .45);
}
.wordmark .wm-bottom {
  font-size: 1.02rem; letter-spacing: .28em; padding-left: 3px; transform: skewX(-8deg);
  background: linear-gradient(90deg, var(--accent), #fff 55%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .55));
  background-size: 200% 100%; animation: wm-shine 6s linear infinite;
}
.wordmark .wm-top span, .wordmark .wm-bottom span { color: inherit; }
@keyframes wm-shine { to { background-position: -200% 0; } }
.brand:hover .wm-top { text-shadow: 2px 2px 0 var(--accent), 5px 5px 0 rgb(var(--accent-rgb) / .45), 0 0 26px rgb(var(--accent-rgb) / .7); }
@media (max-width: 640px) {
  .wordmark .wm-top { font-size: 1.22rem; }
  .wordmark .wm-bottom { font-size: .78rem; letter-spacing: .2em; }
}
@media (max-width: 359.98px) { .brand-text.wordmark { display: none !important; } }

/* Language menu */
.lang-switch { position: relative; flex: none; }
.lang-switch > summary { list-style: none; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  color: var(--text); font-weight: 900; font-size: .82rem; border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.lang-btn:hover, .lang-switch[open] .lang-btn { border-color: var(--accent); color: #fff; }
.lang-btn .icon { width: 17px; height: 17px; }
.lang-btn .lang-caret { width: 13px; height: 13px; transition: transform .2s; }
.lang-switch[open] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 170px; padding: 6px; display: grid; gap: 2px;
  border-radius: 12px; border: 1px solid var(--glass-border-hi); background: var(--glass-tint), var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 800; text-decoration: none; }
.lang-menu a:hover { background: rgb(var(--accent-rgb) / .16); }
.lang-menu a[aria-checked="true"] { background: rgb(var(--accent-rgb) / .22); color: #fff; }
.lang-short { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 6px; background: rgba(255, 255, 255, .08); font-size: .74rem; }

/* Hindi / Malayalam text uses Noto fonts (loaded only for that language) */
:root:lang(hi) { --font: 'Nunito', 'Noto Sans Devanagari', system-ui, sans-serif; --font-display: 'Chakra Petch', 'Noto Sans Devanagari', system-ui, sans-serif; }
:root:lang(ml) { --font: 'Nunito', 'Noto Sans Malayalam', system-ui, sans-serif; --font-display: 'Chakra Petch', 'Noto Sans Malayalam', system-ui, sans-serif; }
:root:lang(hi) .row-title, :root:lang(ml) .row-title, :root:lang(hi) .side-heading, :root:lang(ml) .side-heading { letter-spacing: 0; }

/* Phones: logo + wordmark + language + account fill the bar; search lives in the bottom bar */
@media (max-width: 767.98px) {
  .topbar .search { display: none; }
  .topbar { justify-content: space-between; padding-left: 8px; }
  .topbar .brand { margin-right: auto; }
}
/* Tablets: bottom bar (with Menu) replaces the removed hamburger */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .main { padding-bottom: calc(var(--bottom-h) + 30px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    position: fixed; inset: auto 0 0 0; z-index: 55; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--glass-border);
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: 0; color: var(--text-muted); font-size: .74rem; font-weight: 800; text-decoration: none;
  }
  .bottom-nav [aria-current="page"] { color: var(--accent); }
  .bottom-nav .icon { width: 22px; height: 22px; }
}

/* Marquee: thin lime announcement bar on every page */
.marquee {
  position: fixed; inset: 0 0 auto 0; z-index: 61; height: var(--marquee-h); overflow: hidden;
  display: flex; align-items: center; background: #ccff00; color: #0b0b0b;
  font: 800 .78rem/1 var(--font); box-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}
.marquee-track { display: flex; width: max-content; animation: mq-scroll 45s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-list { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee-list li { display: block; white-space: nowrap; padding: 0 22px; }
.marquee-list li::after { content: "◆"; margin-left: 44px; font-size: .55rem; color: #0b0b0b; opacity: .55; }
.marquee a { color: inherit; text-decoration: none; }
.marquee a:hover { text-decoration: underline; }
.mq-hl { font-weight: 900; }
.mq-hl-a { color: #ff5a00; }
.mq-hl-b { color: #1565ff; }
@keyframes mq-scroll { to { transform: translateX(-50%); } }

/* Promo popup: image + Claim Now + close */
.promo-pop { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 18px; }
.promo-pop[hidden] { display: none; }
.promo-pop-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 10, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.promo-pop-card {
  position: relative; width: min(420px, 100%); max-height: calc(100dvh - 36px); aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden;
  background: #0c0b11; border: 1px solid rgb(var(--accent-rgb) / .5);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 40px rgb(var(--accent-rgb) / .35);
  opacity: 0; transform: translateY(18px) scale(.94); transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .25, 1.2);
}
.promo-pop.is-open .promo-pop-backdrop { opacity: 1; }
.promo-pop.is-open .promo-pop-card { opacity: 1; transform: none; }
.promo-pop-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-pop-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer;
}
.promo-pop-close:hover { background: var(--accent); border-color: var(--accent); }
.promo-pop-close .icon { width: 18px; height: 18px; }
.promo-pop-cta {
  position: absolute; left: 50%; bottom: 6%; z-index: 2; transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center; min-width: 62%; min-height: 50px; padding: 12px 26px; border-radius: 999px;
  background: linear-gradient(90deg, #ccff00, #9dff3a); color: #0b0b0b; text-decoration: none;
  font: 900 1.05rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(204, 255, 0, .35); animation: cta-pulse 1.8s ease-in-out infinite;
}
.promo-pop-cta:hover { color: #0b0b0b; text-decoration: none; filter: brightness(1.06); }
@keyframes cta-pulse { 0%, 100% { box-shadow: 0 10px 30px rgba(204, 255, 0, .3), 0 0 0 0 rgba(204, 255, 0, .5); } 50% { box-shadow: 0 10px 30px rgba(204, 255, 0, .45), 0 0 0 10px rgba(204, 255, 0, 0); } }
.popup-preview img { width: 160px; height: 200px; object-fit: cover; border-radius: 10px; border: 1px solid var(--glass-border); }

/* Fullscreen hint (computers) and rotate card (phones) inside the game player */
.fs-hint {
  position: absolute; top: 12px; right: 12px; z-index: 6; display: inline-flex; align-items: center; gap: 8px;
  max-width: calc(100% - 24px); padding: 6px 6px 6px 11px; border-radius: 999px; font-size: .78rem; font-weight: 800; color: #fff;
  background: rgba(10, 9, 18, .82); border: 1px solid rgb(var(--accent-rgb) / .6); box-shadow: 0 8px 22px rgba(0, 0, 0, .45), 0 0 16px rgb(var(--accent-rgb) / .3);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s;
}
.fs-hint.is-on { opacity: 1; transform: none; }
.fs-hint > .icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
.fs-hint span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-hint-go { flex: none; border: 0; border-radius: 999px; padding: 5px 10px; background: var(--accent); color: var(--on-primary, #fff); font: inherit; font-weight: 900; cursor: pointer; }
.fs-hint-x { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.fs-hint-x .icon { width: 13px; height: 13px; }
.fs-rotate {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom-h) + 12px + env(safe-area-inset-bottom)); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 18px 12px; text-align: center; color: #fff;
  border-radius: 18px; border: 1px solid rgb(var(--accent-rgb) / .55);
  background: var(--glass-tint), rgba(10, 8, 20, .94); box-shadow: 0 -10px 40px rgba(0, 0, 0, .55), 0 0 24px rgb(var(--accent-rgb) / .25);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(20px); transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .25, 1.15);
}
.fs-rotate.is-on { opacity: 1; transform: none; }
.fs-rotate .btn { width: 100%; justify-content: center; }
.fs-rotate strong { font-family: var(--font-display); font-size: 1.05rem; }
.fs-rotate-text { font-size: .86rem; color: #d9d4ea; max-width: 280px; }
.fs-rotate .link-btn { color: #cfc9e2; font-size: .84rem; }
.fs-rotate-phone { display: grid; place-items: center; width: 52px; height: 52px; color: var(--accent); animation: fs-turn 2.2s ease-in-out infinite; }
.fs-rotate-phone .icon { width: 46px; height: 46px; stroke-width: 1.6; }
@keyframes fs-turn { 0%, 20% { transform: rotate(0); } 45%, 75% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; scrollbar-width: none; }
  .marquee-track { animation: none; }
  .wordmark .wm-bottom, .promo-pop-cta, .fs-rotate-phone { animation: none; }
}

/* ==========================================================================
   Lime signal accents (chosen ideas 1–14 and 16). The theme colour stays the main
   colour; lime #CCFF00 marks highlights. Change --lime to retune all of them.
   ========================================================================== */
:root { --lime: #ccff00; --lime-rgb: 204 255 0; --hot: #ff5a00; --live: #1565ff; }

/* 1 · Header neon line  ·  2 · Footer neon line */
.topbar { border-bottom: 0; box-shadow: 0 1px 0 rgb(var(--lime-rgb) / .85), 0 8px 22px -10px rgb(var(--lime-rgb) / .45); }
.footer { border-top: 0; box-shadow: inset 0 1px 0 rgb(var(--lime-rgb) / .75), 0 -8px 22px -12px rgb(var(--lime-rgb) / .35); }

/* 3 · Section title marker + lime "See all" */
.row-title::before {
  content: ""; flex: none; width: 4px; height: 1.05em; border-radius: 2px;
  background: var(--lime); box-shadow: 0 0 10px rgb(var(--lime-rgb) / .7);
}
.see-all { color: var(--lime); }
.see-all:hover { color: #e6ff73; }

/* 4 · Lime corner brackets on game boxes (hover, computers) */
.card-frame {
  position: absolute; inset: 6px; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .2s;
  background:
    linear-gradient(var(--lime), var(--lime)) top left / 16px 2px no-repeat, linear-gradient(var(--lime), var(--lime)) top left / 2px 16px no-repeat,
    linear-gradient(var(--lime), var(--lime)) top right / 16px 2px no-repeat, linear-gradient(var(--lime), var(--lime)) top right / 2px 16px no-repeat,
    linear-gradient(var(--lime), var(--lime)) bottom left / 16px 2px no-repeat, linear-gradient(var(--lime), var(--lime)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--lime), var(--lime)) bottom right / 16px 2px no-repeat, linear-gradient(var(--lime), var(--lime)) bottom right / 2px 16px no-repeat;
  filter: drop-shadow(0 0 4px rgb(var(--lime-rgb) / .8));
}
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-frame, .card .card-link:focus-visible .card-frame { opacity: 1; }
}

/* 5 · NEW / HOT / LIVE badges */
.card-badge {
  position: absolute; top: 8px; left: 8px; z-index: 4; padding: 3px 7px; border-radius: 5px;
  font: 900 .62rem/1 var(--font); letter-spacing: .07em; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.card-badge-new { background: var(--lime); color: #0b0b0b; }
.card-badge-hot { background: var(--hot); color: #fff; }
.card-badge-live { background: var(--live); color: #fff; }
.card-badge-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #fff; vertical-align: 1px; animation: live-dot 1.4s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .25; } }

/* 6 · Current menu item */
.side-link[aria-current="page"]::before { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.side-link[aria-current="page"] { box-shadow: inset 0 0 0 1px rgb(var(--lime-rgb) / .22); }

/* 7 · Selected category chip */
.chip[aria-current="page"] { border-color: var(--lime); color: var(--lime); background: rgb(var(--lime-rgb) / .08); box-shadow: 0 0 12px rgb(var(--lime-rgb) / .18); }

/* 8 · Daily challenge frame + lime countdown */
.challenge { border-color: rgb(var(--lime-rgb) / .7); box-shadow: var(--glass-shadow), 0 0 0 1px rgb(var(--lime-rgb) / .15), 0 0 26px -6px rgb(var(--lime-rgb) / .4); }
.challenge-timer { color: var(--lime); }

/* 9 · XP and progress bars */
.xp-bar-fill, .xp-mini-fill { background: linear-gradient(90deg, #9dff3a, var(--lime)) !important; box-shadow: 0 0 10px rgb(var(--lime-rgb) / .55); }

/* 10 · Top-3 leaderboard ranks */
.rank-1, .rank-2, .rank-3 { background: var(--lime); color: #0b0b0b; box-shadow: 0 0 10px rgb(var(--lime-rgb) / .5); }
.board-list li:has(.rank-1) { box-shadow: inset 0 0 0 1px rgb(var(--lime-rgb) / .45); }

/* 11 · Lime focus ring */
:focus-visible { outline-color: var(--lime); }
input:focus, select:focus, textarea:focus, .search input[type="search"]:focus { border-color: var(--lime) !important; box-shadow: 0 0 0 3px rgb(var(--lime-rgb) / .22) !important; outline: none; }

/* 12 · Text selection */
::selection { background: var(--lime); color: #0b0b0b; }

/* 13 · Lime scrollbar */
* { scrollbar-color: var(--lime) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--lime), #9dff3a); border-radius: 10px; border: 2px solid rgba(8, 7, 14, .9); }
.row-track { scrollbar-width: none; }
.sidebar { scrollbar-color: rgb(var(--lime-rgb) / .55) transparent; }

/* 14 · Loading line (page loads, link clicks, game start) */
.load-line { position: fixed; top: var(--marquee-h); left: 0; z-index: 400; height: 3px; width: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--lime-rgb) / 0), var(--lime)); box-shadow: 0 0 10px var(--lime), 0 0 4px var(--lime); }
.load-line.is-busy { opacity: 1; animation: load-go 8s cubic-bezier(.1, .7, .2, 1) forwards; }
.load-line.is-done { width: 100% !important; animation: none; opacity: 0; transition: width .25s ease, opacity .35s ease .2s; }
@keyframes load-go { 0% { width: 0; } 20% { width: 45%; } 100% { width: 92%; } }

/* 16 · Sign in as a lime outline button */
.signin-btn.btn-primary { background: transparent; color: var(--lime); box-shadow: inset 0 0 0 1.5px var(--lime); clip-path: none; border-radius: 10px; }
.signin-btn.btn-primary:hover { background: rgb(var(--lime-rgb) / .12); color: #e6ff73; }

@media (prefers-reduced-motion: reduce) { .card-badge-live::before { animation: none; } .load-line.is-busy { animation: none; width: 60%; } }

/* ==========================================================================
   Tournaments, ratings & reviews
   ========================================================================== */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-bottom: 26px; }
.t-card {
  display: grid; border-radius: 14px; overflow: hidden; color: var(--text); text-decoration: none;
  background: var(--glass-tint), var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.t-card:hover { text-decoration: none; color: var(--text); transform: translateY(-3px); border-color: var(--lime); box-shadow: var(--glass-shadow), 0 0 22px -4px rgb(var(--lime-rgb) / .45); }
.t-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, rgb(var(--accent-rgb) / .5), #120d1d); }
.t-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-card-body { display: grid; gap: 6px; padding: 12px 14px 14px; }
.t-card-game { font: 700 .7rem var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.t-card-title { font: 700 1.1rem/1.2 var(--font-display); }
.t-card-prize, .t-card-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; }
.t-card-prize { color: #ffd36e; }
.t-card-prize .icon, .t-card-meta .icon { width: 15px; height: 15px; }
.t-card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.t-count { color: var(--lime); font-weight: 900; font-variant-numeric: tabular-nums; }
.t-status { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font: 900 .66rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.t-status-live { background: var(--lime); color: #0b0b0b; }
.t-status-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e0002a; animation: live-dot 1.2s ease-in-out infinite; }
.t-status-upcoming { background: var(--live); color: #fff; }
.t-status-ended { background: rgba(255, 255, 255, .15); color: #fff; }
.t-grid-home { margin-bottom: 18px; }
@media (min-width: 1200px) { .t-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.t-hero { position: relative; display: grid; border-radius: 18px; overflow: hidden; margin-bottom: 20px; border: 1px solid rgb(var(--lime-rgb) / .35); min-height: 300px; }
.t-hero-media { position: absolute; inset: 0; }
.t-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.t-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 6, 18, .95) 0%, rgba(8, 6, 18, .82) 45%, rgba(8, 6, 18, .35)); }
.t-hero-body { position: relative; z-index: 1; display: grid; gap: 10px; align-content: end; padding: clamp(18px, 4vw, 34px); max-width: 760px; }
.t-hero .t-status { position: static; justify-self: start; }
.t-hero h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.1; text-wrap: balance; }
.t-hero-game, .t-hero-prize { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 800; }
.t-hero-game a { color: var(--text); }
.t-hero-prize { color: #ffd36e; }
.t-hero-game .icon, .t-hero-prize .icon { width: 18px; height: 18px; }
.t-hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 6px; }
.t-hero-facts div { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-border); }
.t-hero-facts small { display: block; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.t-hero-facts strong { font-size: .95rem; font-variant-numeric: tabular-nums; }
.t-hero-count { border-color: rgb(var(--lime-rgb) / .5) !important; }
.t-hero-count strong { color: var(--lime); }
.t-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.t-hero-actions .btn small { opacity: .8; font-size: .75em; margin-left: 4px; }
.t-in { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; background: rgb(var(--lime-rgb) / .14); color: var(--lime); font-weight: 900; border: 1px solid rgb(var(--lime-rgb) / .5); }
.t-in .icon { width: 16px; height: 16px; }
.t-in-full { background: rgba(255, 255, 255, .06); color: var(--text-muted); border-color: var(--glass-border); }
.t-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .t-layout { grid-template-columns: minmax(0, 1fr); } }
.t-side { display: grid; gap: 16px; }
.t-side h2, .t-how h2 { margin-top: 0; font-size: 1.05rem; }
.t-rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 700; font-size: .9rem; }
.t-rewards li { display: flex; align-items: center; gap: 10px; }
.t-how ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 6px 0 18px; text-align: center; }
.podium-step { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.podium-step a { font-weight: 900; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font: 700 1.2rem var(--font-display); color: #fff; background: var(--hue, var(--accent)); border: 2px solid var(--lime); box-shadow: 0 0 14px rgb(var(--lime-rgb) / .45); }
.podium-1 .podium-avatar { width: 60px; height: 60px; }
.podium-score { font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.podium-block { width: 100%; display: grid; place-items: center; border-radius: 10px 10px 4px 4px; font: 700 1.5rem var(--font-display); color: #0b0b0b; background: linear-gradient(180deg, var(--lime), #8fd400); }
.podium-1 .podium-block { height: 96px; } .podium-2 .podium-block { height: 70px; opacity: .85; } .podium-3 .podium-block { height: 54px; opacity: .7; }
.t-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: linear-gradient(100deg, rgb(var(--lime-rgb) / .14), rgba(255, 255, 255, .02)); border: 1px solid rgb(var(--lime-rgb) / .5);
}
.t-strip:hover { text-decoration: none; color: var(--text); border-color: var(--lime); }
.t-strip .t-status { position: static; }
.t-strip-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; }
.t-strip-title .icon { width: 16px; height: 16px; color: #ffd36e; }
.t-strip-go { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--lime); font-weight: 900; font-size: .86rem; }
.t-strip-go .icon { width: 15px; height: 15px; }

/* Stars */
.stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.star { width: 16px; height: 16px; }
.star-on path { fill: #ffc83d; }
.star-off path { fill: rgba(255, 255, 255, .18); }
.stars-lg .star { width: 22px; height: 22px; }
.stars-sm .star { width: 13px; height: 13px; }
.rating-inline { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-weight: 800; }
.card-hover-rate .icon { color: #ffc83d; }

/* Reviews panel */
.reviews h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.reviews h2 .icon { color: #ffc83d; }
.rv-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 26px; align-items: center; margin-bottom: 16px; }
@media (max-width: 520px) { .rv-top { grid-template-columns: minmax(0, 1fr); } }
.rv-score { display: grid; justify-items: center; gap: 4px; min-width: 120px; }
.rv-score strong { font: 700 2.6rem/1 var(--font-display); }
.rv-dist { display: grid; gap: 5px; }
.rv-bar { display: grid; grid-template-columns: 32px minmax(0, 1fr) 30px; gap: 8px; align-items: center; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rv-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.rv-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb02e, #ffc83d); border-radius: inherit; }
.rv-form { display: grid; gap: 10px; padding: 14px; margin-bottom: 14px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid var(--glass-border); }
.star-input { border: 0; margin: 0; padding: 0; min-width: 0; }
.star-input legend { padding: 0; font-weight: 800; font-size: .9rem; margin-bottom: 6px; }
.star-row { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; padding: 2px; border-radius: 6px; }
.star-input svg { width: 32px; height: 32px; display: block; }
.star-input svg path { fill: rgba(255, 255, 255, .16); stroke: rgba(255, 255, 255, .25); stroke-width: 1; transition: fill .15s, transform .15s; }
.star-input input:checked ~ label svg path, .star-input label:hover svg path, .star-input label:hover ~ label svg path { fill: #ffc83d; stroke: #ffc83d; }
.star-input input:focus-visible + label { outline: 2px solid var(--lime); outline-offset: 2px; }
.rv-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rv-signin { margin: 0 0 14px; }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rv-list li { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--glass-border); }
.rv-list p, .rv-admin-item p { margin: 8px 0 0; overflow-wrap: anywhere; }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rv-head .avatar { width: 28px; height: 28px; font-size: .8rem; }
.rv-head a { font-weight: 900; color: var(--text); }
.rv-admin { display: grid; gap: 12px; }
.rv-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
