/* ZincirX site chrome and portal pages: dark, neutral, system type.
   Loaded by shared/header.js on every page. The header and footer look the same
   everywhere; the games below them keep their own styles. Pages that opt in with
   <body class="zx-site"> (home, leaderboard, stats, privacy) get the full theme. */
:root {
  --zs-bg: #0e1013;
  --zs-surface: #16191e;
  --zs-surface-2: #1c2027;
  --zs-line: #272c35;
  --zs-text: #eef1f4;
  --zs-muted: #98a2ae;
  --zs-brand: #ffb224;
  --zs-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Header ---------- */
.zs-top {
  position: sticky; top: 0; z-index: 50; background: rgba(14, 16, 19, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--zs-line); font-family: var(--zs-font); color: var(--zs-text);
}
.zs-top__in { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 14px; }
.zs-logo { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 6px; color: var(--zs-text) !important; text-decoration: none !important; }
.zs-logo i { font-style: normal; color: var(--zs-brand); }
.zs-logo span { color: var(--zs-muted); font-weight: 500; font-size: 15px; }
.zs-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.zs-nav a, .zs-nav button {
  font: 500 14px/1 var(--zs-font); color: var(--zs-muted) !important; background: none; border: 0; padding: 9px 10px;
  border-radius: 8px; cursor: pointer; text-decoration: none !important; white-space: nowrap; box-shadow: none; letter-spacing: 0; text-transform: none;
}
.zs-nav a:hover, .zs-nav button:hover, .zs-nav a.active { color: var(--zs-text) !important; background: var(--zs-surface-2); }
.zs-nav .zs-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--zs-text); background: var(--zs-surface-2); border: 1px solid var(--zs-line); border-radius: 999px; padding: 5px 10px; margin-right: 4px; }
.zs-nav .zs-lang { border: 1px solid var(--zs-line); color: var(--zs-text) !important; font-weight: 700; padding: 7px 10px; margin-left: 4px; }
.zs-nav .zs-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Footer ---------- */
.zs-foot { margin-top: 36px; border-top: 1px solid var(--zs-line); background: var(--zs-bg); color: var(--zs-muted); font: 14px/1.5 var(--zs-font); }
.zs-foot__in { max-width: 1120px; margin: 0 auto; padding: 24px 20px 36px; display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.zs-foot a { color: var(--zs-muted) !important; text-decoration: none !important; }
.zs-foot a:hover { color: var(--zs-text) !important; }
.zs-foot .zs-sp { margin-left: auto; }
.zs-foot small { flex-basis: 100%; font-size: 12px; opacity: 0.75; }

/* Bottom nav (native wrapper only) */
.zx-bottom-nav { background: var(--zs-surface) !important; border-top: 1px solid var(--zs-line) !important; font-family: var(--zs-font); }
.zx-bottom-nav__item { color: var(--zs-muted) !important; }
.zx-bottom-nav__item.active { color: var(--zs-brand) !important; }

@media (max-width: 640px) {
  .zs-top__in, .zs-foot__in { padding-left: 16px; padding-right: 16px; }
  .zs-nav .zs-hide-s { display: none; }
  .zs-foot .zs-sp { margin-left: 0; flex-basis: 100%; }
}

/* ---------- Portal pages ---------- */
body.zx-site {
  --ink: var(--zs-text); --ink-2: var(--zs-muted); --paper: var(--zs-surface); --cream: var(--zs-surface-2);
  --red: var(--zs-brand); --red-d: #c98a12; --gold: var(--zs-brand); --gold-d: #c98a12;
  --font: var(--zs-font); --shadow-hard: none; --shadow-soft: none;
  background: var(--zs-bg) !important; color: var(--zs-text); font-family: var(--zs-font); line-height: 1.5;
}
body.zx-site .zx-container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
body.zx-site h1, body.zx-site h2 { text-shadow: none !important; transform: none !important; letter-spacing: -0.02em !important; color: var(--zs-text) !important; }
body.zx-site .zx-card { background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: 14px; box-shadow: none; }
body.zx-site .zx-btn { background: var(--zs-brand); color: #14110a; border: 0; border-radius: 10px; box-shadow: none; font-weight: 700; text-transform: none; letter-spacing: 0; }
body.zx-site .zx-btn--ghost { background: transparent; color: var(--zs-text); border: 1px solid var(--zs-line); }
@media (max-width: 640px) { body.zx-site .zx-container { padding: 0 16px; } }

/* Leaderboard and stats pages */
body.zx-site .lb-hero h1, body.zx-site .stats-hero h1 { font-size: clamp(28px, 5vw, 40px) !important; font-weight: 800 !important; line-height: 1.1 !important; }
body.zx-site .lb-hero, body.zx-site .stats-hero { text-align: left !important; padding: 36px 0 8px !important; }
body.zx-site .lb-shell { max-width: 720px; margin: 0; }
body.zx-site .tabs { background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: 10px; }
body.zx-site .tab { color: var(--zs-muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
body.zx-site .tab:hover { color: var(--zs-text); }
body.zx-site .tab--active { background: var(--zs-brand); color: #14110a; box-shadow: none; }
body.zx-site .lb-list, body.zx-site #countriesBox, body.zx-site [class*="stat-card"], body.zx-site [class*="game-stat"], body.zx-site [class*="badge"] {
  background: var(--zs-surface) !important; border: 1px solid var(--zs-line) !important; box-shadow: none !important; border-radius: 12px !important;
}
body.zx-site .lb-row { border-color: var(--zs-line) !important; }
body.zx-site .section-title, body.zx-site h2 { font-size: 20px !important; text-align: left !important; font-weight: 700 !important; text-transform: none; }
body.zx-site .tile, body.zx-site .gs, body.zx-site .ach, body.zx-site .big-name {
  background: var(--zs-surface) !important; border: 1px solid var(--zs-line) !important; box-shadow: none !important; border-radius: 12px !important; color: var(--zs-text);
}
body.zx-site .tile__value { color: var(--zs-brand) !important; text-shadow: none !important; }
body.zx-site .tile__label, body.zx-site .tile__sub, body.zx-site .ach__desc { color: var(--zs-muted) !important; letter-spacing: 0.04em; }
body.zx-site .section-title::after { display: none; }
body.zx-site .gs__title { color: var(--zs-text) !important; }
body.zx-site .gs__row { border-color: var(--zs-line) !important; color: var(--zs-muted); }
body.zx-site .gs__cta { border: 1px solid var(--zs-line) !important; background: transparent !important; color: var(--zs-text) !important; box-shadow: none !important; border-radius: 10px !important; }
body.zx-site .ach--locked { opacity: 0.45; }
body.zx-site .lb-empty { color: var(--zs-muted) !important; }
