/* THEKAM - Games Tracker — thekam.net visual identity (dark, amber → orange gradient). */
:root {
  --bg: #0a0b10;
  --bg-2: #11131b;
  --card: #151823;
  --card-2: #1b1f2c;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #e9ebf2;
  --muted: #9097a8;
  --accent: #ffb21e;
  --accent-2: #ff5e3a;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --glow: rgba(255, 178, 30, .35);
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, .12);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, .12);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, .12);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --font-body: Inter, system-ui, sans-serif;
  --font-head: "Space Grotesk", sans-serif;
  --container: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

html[dir="rtl"] {
  --font-body: "IBM Plex Sans Arabic", Inter, system-ui, sans-serif;
  --font-head: "IBM Plex Sans Arabic", "Space Grotesk", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* Components that set display (grid/flex) must still disappear when the hidden attribute is set. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #ffc95a; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 8px; top: 8px; z-index: 1000; background: var(--accent); color: #111; padding: 8px 14px; border-radius: 8px; transform: translateY(-300%); }
.skip-link:focus { transform: none; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 11, 16, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #111; box-shadow: 0 6px 20px var(--glow); }
.brand__sub { color: var(--accent); }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a { white-space: nowrap; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: .925rem; font-weight: 500; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav a.is-active { color: var(--text); background: rgba(255, 255, 255, .06); box-shadow: inset 0 -2px 0 var(--accent); }

.header-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.header-actions form { margin: 0; }

.nav-toggle { display: none; }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; align-items: stretch; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; }
  .header-actions .hide-sm { display: none; }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 .925rem/1 var(--font-body); cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s;
  touch-action: manipulation; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--grad); color: #111; box-shadow: 0 8px 24px -8px var(--glow); }
.btn--primary:hover { color: #111; box-shadow: 0 10px 30px -6px var(--glow); }
.btn--ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn--danger { background: var(--bad-bg); border-color: rgba(248, 113, 113, .3); color: var(--bad); }
.btn--danger:hover { background: rgba(248, 113, 113, .2); color: #fca5a5; }
.btn--ok { background: var(--ok-bg); border-color: rgba(52, 211, 153, .3); color: var(--ok); }
.btn--ok:hover { background: rgba(52, 211, 153, .2); color: #6ee7b7; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn--block { width: 100%; }
.btn--icon { width: 42px; padding: 0; }
.btn[disabled], .btn.is-loading { opacity: .5; pointer-events: none; }

/* ------------------------------------------------------------------ cards / layout */
.section { padding: 40px 0; }
.section--tight { padding: 24px 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.card__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card__title i { color: var(--accent); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .layout-side { grid-template-columns: minmax(0, 1fr); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: .5; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; text-align: center; }
.hero::before, .hero::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(110px); opacity: .35; pointer-events: none; }
.hero::before { background: #ff9d00; top: -260px; inset-inline-end: -120px; }
.hero::after { background: #ff3b1f; bottom: -320px; inset-inline-start: -180px; opacity: .22; }
.hero > .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); margin-bottom: 16px; }
.hero p.lead { max-width: 620px; margin: 0 auto 28px; color: var(--muted); font-size: 1.075rem; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .825rem; color: var(--muted); background: rgba(255, 255, 255, .03); margin-bottom: 22px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.search-bar { display: flex; gap: 8px; max-width: 620px; margin: 0 auto; }
.search-bar .input { flex: 1; min-height: 48px; }

.stats-row { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; margin-top: 40px; }
.stat { text-align: center; }
.stat__value { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-size: .85rem; }

/* ------------------------------------------------------------------ game cards */
.game-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--text); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; overflow: hidden; }
.game-card:hover { color: var(--text); transform: translateY(-3px); border-color: rgba(255, 178, 30, .4); box-shadow: 0 18px 40px -18px var(--glow); }
.game-card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--game) 18%, transparent); color: var(--game); }
.game-card__name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.game-card__meta { display: flex; gap: 18px; color: var(--muted); font-size: .875rem; }
.game-card__meta b { color: var(--text); font-variant-numeric: tabular-nums; }

.game-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; font-size: .75rem; font-weight: 600; background: color-mix(in srgb, var(--game) 16%, transparent); color: var(--game); white-space: nowrap; }

/* ------------------------------------------------------------------ status / badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--bad { background: var(--bad-bg); color: var(--bad); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--muted { background: rgba(255, 255, 255, .06); color: var(--muted); }
.badge--accent { background: rgba(255, 178, 30, .14); color: var(--accent); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot--ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot--bad { background: var(--bad); }
.dot--muted { background: var(--muted); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.table th { text-align: start; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table .rank { font-family: var(--font-head); font-weight: 700; color: var(--muted); width: 56px; }
.table .rank--top { color: var(--accent); }
.server-name { color: var(--text); font-weight: 600; display: block; max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-name:hover { color: var(--accent); }
.server-sub { font-size: .8rem; color: var(--muted); }
.td-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.td-actions form { margin: 0; }

.players-bar { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.players-bar__track { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.players-bar__fill { height: 100%; background: var(--grad); border-radius: 3px; }
.players-bar__text { font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.td-map { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 700px) {
  .table .hide-sm { display: none; }
  .server-name { max-width: 220px; }
}

/* ------------------------------------------------------------------ filters / forms */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { min-height: 42px; }
.toolbar .grow { flex: 1; min-width: 200px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: .85rem; font-weight: 500; background: transparent; cursor: pointer; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .25); }
.chip.is-active { background: rgba(255, 178, 30, .12); border-color: rgba(255, 178, 30, .5); color: var(--accent); }

.field { margin-bottom: 18px; }
.field__label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.field__label .req { color: var(--accent-2); }
.field__hint { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }

.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: 400 1rem/1.4 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 120px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #626a7d; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 178, 30, .18); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 36px; }
html[dir="rtl"] .select { background-position: 18px 52%, 13px 52%; }
.input-validation-error { border-color: var(--bad) !important; }
.field-validation-error { display: block; color: var(--bad); font-size: .825rem; margin-top: 6px; }
.validation-summary-errors { background: var(--bad-bg); color: #fca5a5; border: 1px solid rgba(248, 113, 113, .3); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; font-size: .9rem; }
.validation-summary-errors ul { margin: 0; padding-inline-start: 18px; }
.validation-summary-valid { display: none; }

.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .925rem; min-height: 32px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ------------------------------------------------------------------ alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; border: 1px solid; font-size: .925rem; }
.alert i { margin-top: 3px; }
.alert--ok { background: var(--ok-bg); border-color: rgba(52, 211, 153, .3); color: #a7f3d0; }
.alert--warn { background: var(--warn-bg); border-color: rgba(251, 191, 36, .3); color: #fde68a; }
.alert--info { background: var(--info-bg); border-color: rgba(96, 165, 250, .3); color: #bfdbfe; }
.alert--bad { background: var(--bad-bg); border-color: rgba(248, 113, 113, .3); color: #fecaca; }

.flash { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 200; max-width: 420px; background: var(--card-2); border: 1px solid var(--line-2); border-inline-start: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 44px 14px 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: flash-in .25s var(--ease); }
html[dir="rtl"] .flash { padding: 14px 16px 14px 44px; }
.flash__close { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; }
.flash__close:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
@keyframes flash-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ server page */
.server-hero { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-bottom: 1px solid var(--line); padding: 28px 0; }
.server-hero h1 { font-size: clamp(1.35rem, 2.6vw, 2rem); word-break: break-word; }
.server-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; color: var(--muted); font-size: .925rem; }
.server-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: .925rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

.big-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.big-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.big-stat__label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.big-stat__value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; direction: ltr; unicode-bidi: plaintext; text-align: start; }
.big-stat__sub { color: var(--muted); font-size: .8rem; }
@media (max-width: 800px) { .big-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.chart-box { position: relative; height: 280px; }
.chart-tabs { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.chart-tabs button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 8px; font: 600 .8rem var(--font-body); cursor: pointer; min-height: 32px; }
.chart-tabs button.is-active { background: rgba(255, 178, 30, .14); color: var(--accent); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; text-align: center; padding: 20px; }

.copy-field { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 6px 6px 14px; }
html[dir="rtl"] .copy-field { padding: 6px 14px 6px 6px; }
.copy-field code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }

.rank-ring { display: flex; align-items: center; gap: 16px; }
.rank-ring__num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; line-height: 1; }

/* ------------------------------------------------------------------ verify page */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 178, 30, .14); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.token { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; font-weight: 700; padding: 6px 14px; border-radius: 10px; border: 1px dashed rgba(255, 178, 30, .6); background: rgba(255, 178, 30, .08); color: var(--accent); letter-spacing: .03em; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }

/* ------------------------------------------------------------------ panel / admin */
.side-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.side-nav a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: .9rem; }
.side-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.side-nav a.is-active { color: var(--accent); background: rgba(255, 178, 30, .1); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty i { font-size: 2.2rem; color: var(--accent); opacity: .7; margin-bottom: 12px; display: block; }
.empty h3 { color: var(--text); }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--muted); font-size: .9rem; }
.pager a:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.pager .is-active { background: rgba(255, 178, 30, .14); border-color: rgba(255, 178, 30, .5); color: var(--accent); }

details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu__panel { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; min-width: 260px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); display: grid; gap: 8px; }
.menu__panel form { margin: 0; display: grid; gap: 8px; }

/* ------------------------------------------------------------------ auth */
.auth { display: grid; place-items: center; padding: 56px 16px; }
.auth__card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.auth__card--wide { max-width: 620px; }
.auth__title { font-size: 1.6rem; margin-bottom: 6px; }
.auth__sub { color: var(--muted); margin-bottom: 24px; }
.auth__alt { text-align: center; margin: 18px 0 0; color: var(--muted); font-size: .9rem; }
.qr-panel { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.qr-panel img { width: 170px; height: 170px; border-radius: 12px; background: #fff; padding: 8px; }
.secret { display: block; margin-top: 6px; padding: 8px 12px; border-radius: 8px; background: var(--bg-2); font-size: .85rem; word-break: break-all; direction: ltr; }
.otp-input { font-size: 1.4rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; direction: ltr; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.codes li { font-family: ui-monospace, Consolas, monospace; background: var(--bg-2); border-radius: 8px; padding: 8px; text-align: center; direction: ltr; }
@media (max-width: 560px) { .qr-panel { flex-direction: column; align-items: center; } .auth__card { padding: 24px 20px; } }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0; margin-top: 48px; color: var(--muted); font-size: .875rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

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

@media (max-width: 560px) {
  .site-header .container { gap: 10px; }
  .header-actions { gap: 6px; }
  .lang-label, .cta-label { display: none; }
  .brand { font-size: .95rem; }
  .brand__mark { width: 30px; height: 30px; }
  .search-bar { flex-direction: column; }
  .stats-row { gap: 20px 32px; }
  .hero { padding: 48px 0 40px; }
}

/* ------------------------------------------------------------------ header games menu */
.nav-games > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: .925rem; font-weight: 500; white-space: nowrap; transition: color .2s, background .2s; }
.nav-games > summary:hover, .nav-games[open] > summary { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav-games > summary.is-active { color: var(--text); background: rgba(255, 255, 255, .06); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-games__panel { inset-inline-end: auto; inset-inline-start: 0; min-width: 240px; gap: 2px; }
.nav-games__panel a { display: flex; align-items: center; gap: 10px; }
.nav-games__panel a.is-active { color: var(--accent); background: rgba(255, 178, 30, .1); box-shadow: none; }
@media (max-width: 1100px) {
  .nav-games__panel { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 12px; min-width: 0; }
  .nav-games > summary { padding: 12px; }
}

@media (max-width: 400px) {
  .site-header .container { gap: 8px; }
  .brand { font-size: .85rem; gap: 8px; }
  .brand__mark { width: 28px; height: 28px; }
  .header-actions .btn--sm { padding: 0 10px; }
}

/* ---- flags, tags, votes, rules (phase 2/3) ---- */
.fi.flag { width: 1.2em; line-height: 1em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); vertical-align: -.1em; margin-inline-end: 6px; }
.tag-list { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-inline-start: 6px; vertical-align: middle; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid var(--line); }
a.tag:hover { color: var(--accent); border-color: rgba(255, 178, 30, .45); }
.tag.is-active { background: rgba(255, 178, 30, .14); color: var(--accent); border-color: rgba(255, 178, 30, .5); }
.server-cover { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 18px; display: block; }
.vote-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.vote-box__count { font-family: var(--font-head); font-size: 2rem; font-weight: 700; line-height: 1; }
.mod-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mod-list a { display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font-size: .8rem; }
.rules-table { max-height: 360px; overflow: auto; }
.rules-table td { font-size: .82rem; word-break: break-all; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-inline-end: 6px; box-shadow: 0 0 0 3px var(--ok-bg); }

/* ---- TeamSpeak channel tree ---- */
.voice-tree { direction: ltr; text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 0; max-height: 640px; overflow: auto; font-size: .9rem; }
.voice-row { display: flex; align-items: center; gap: 8px; padding: 3px 10px; min-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-row bdi { overflow: hidden; text-overflow: ellipsis; }
.voice-row:hover { background: rgba(255, 255, 255, .03); }
.voice-row--spacer { display: block; color: var(--muted); font-weight: 600; }
.voice-row--client { color: var(--text); }
.voice-row--line { min-height: 14px; padding: 6px 12px; }
.voice-row--line::after { content: ""; display: block; width: 100%; border-top: 2px solid var(--line-2); }
.voice-line--dotted::after { border-top-style: dotted; }
.voice-line--dashdot::after, .voice-line--dashdotdot::after { border-top-style: dashed; }
.voice-line--thick::after { border-top-width: 3px; }
.voice-icon { width: 16px; text-align: center; color: var(--muted); flex: none; }
.voice-icon--on { color: var(--ok); }
.voice-icon--away { color: var(--warn); }
.voice-icon--deaf, .voice-icon--muted { color: var(--bad); }
.voice-flag { color: var(--accent); font-size: .75rem; }

/* ---- admin scan-interval bar ---- */
.interval-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; }
.interval-bar > span { flex: 1; min-width: 200px; color: var(--muted); }

/* ------------------------------------------------------------------ transfer + password reveal */
.transfer-code { font-size: 1.35rem; letter-spacing: .3em; font-weight: 700; text-transform: uppercase; }
input.transfer-code { text-align: center; direction: ltr; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-inline-end: 44px; }
.pw-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--text); }

/* ------------------------------------------------------------------ admin ownership history */
.own-now { display: grid; gap: 4px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; }
.own-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-height: 420px; overflow: auto; }
.own-ev { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.own-ev > i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--bg-2); color: var(--muted); margin-top: 1px; }
.own-ev--ok > i { background: var(--ok-bg); color: #6ee7b7; }
.own-ev--bad > i { background: var(--bad-bg); color: #fca5a5; }
.own-ev--info > i { background: var(--info-bg); color: #93c5fd; }
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ------------------------------------------------------------------ favorites */
.fav-form { display: inline; margin: 0; }
.fav-btn.is-on { color: var(--accent); border-color: rgba(255, 178, 30, .5); background: rgba(255, 178, 30, .1); }
.fav-star { background: none; border: 0; padding: 2px 4px; margin-inline-end: 4px; cursor: pointer; color: var(--muted); font-size: .95rem; line-height: 1; vertical-align: middle; border-radius: 6px; transition: color .15s, transform .15s; }
.fav-star:hover { color: var(--accent); transform: scale(1.15); }
.fav-star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fav-star.is-on { color: var(--accent); }
.nav-star { color: var(--accent); margin-inline-end: 6px; font-size: .85em; }
.fav-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
