:root {
  --bg: #0b0f14;
  --bg-soft: #121821;
  --panel: rgba(18, 24, 33, 0.92);
  --panel-strong: #161d27;
  --line: rgba(223, 193, 116, 0.18);
  --line-strong: rgba(223, 193, 116, 0.35);
  --text: #edf2f7;
  --muted: #97a3b6;
  --accent: #d4a94c;
  --accent-2: #7ab8ff;
  --danger: #dd6b6b;
  --success: #6fcf97;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(122, 184, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(212, 169, 76, 0.14), transparent 24%),
    linear-gradient(180deg, #0b0f14 0%, #0f141b 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
code, pre { font-family: "SFMono-Regular", Consolas, monospace; }

.app-shell { min-height: 100vh; }
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 72px; }
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); background: rgba(11, 15, 20, 0.75); border-bottom: 1px solid rgba(255,255,255,0.05); }
.topbar__inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; flex-direction: column; gap: 4px; }
.brand__eyebrow { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.brand__name { font-size: 22px; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav .button-link { color: var(--text); }
.button-link, .button, button {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(212, 169, 76, 0.18), rgba(212, 169, 76, 0.06));
  color: var(--text);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover, button:hover, .button-link:hover { transform: translateY(-1px); border-color: rgba(212,169,76,0.55); }
.button--ghost { background: rgba(122, 184, 255, 0.08); border-color: rgba(122, 184, 255, 0.28); }
.button--muted { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.button--danger { background: rgba(221, 107, 107, 0.12); border-color: rgba(221, 107, 107, 0.4); }
.button--small { padding: 8px 12px; font-size: 12px; }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; margin-top: 12px; }
.hero__copy, .hero__card, .card, .narrow-card {
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.hero__copy { padding: 40px; }
.hero__copy h1 { margin: 8px 0 14px; font-size: clamp(38px, 7vw, 62px); line-height: .95; }
.hero__card { padding: 26px; display: grid; gap: 16px; align-content: start; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; }
.lede, .muted { color: var(--muted); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.grid { display: grid; gap: 24px; margin-top: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .narrow-card { padding: 28px; }
.narrow-card { width: min(540px, 100%); margin: 24px auto 0; }
.page-heading { margin: 8px 0 24px; }
.page-heading h1 { margin: 0 0 8px; font-size: 34px; }
.metric, .status-list div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.metric:last-child, .status-list div:last-child { border-bottom: 0; }
.good { color: var(--success); }
.bad { color: var(--danger); }
.stack { display: grid; gap: 14px; }
.plain-list { margin: 0; padding-left: 18px; color: var(--muted); }
.code-block { background: rgba(0,0,0,0.25); padding: 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); overflow: auto; }
.alert { padding: 14px 16px; border-radius: 14px; margin: 0 0 16px; }
.alert--error { background: rgba(221, 107, 107, 0.12); border: 1px solid rgba(221, 107, 107, 0.3); }
.alert--success { background: rgba(111, 207, 151, 0.12); border: 1px solid rgba(111, 207, 151, 0.28); }
.alert--warning { background: rgba(212, 169, 76, 0.12); border: 1px solid rgba(212, 169, 76, 0.3); }
.filters, .inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.subnav { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.subnav a { padding: 8px 12px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,0.03); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
input, select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}
textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}
label { display: grid; gap: 8px; color: var(--muted); }
hr { border: 0; border-top: 1px solid rgba(255,255,255,0.06); margin: 18px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.stat-card strong { font-size: 34px; display: block; margin-top: 8px; }
.nav-toggle { display: none; }
.news-list { display: grid; gap: 16px; }
.news-item { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.news-item:last-child { border-bottom: 0; }
.news-item--stack { display: grid; }
.article-body { line-height: 1.7; white-space: pre-wrap; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
.news-admin-list { display: grid; gap: 12px; }
.news-admin-item { padding-top: 6px; }
.inline-form--end { justify-content: flex-end; }
.continent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.continent-card { display: grid; gap: 16px; }
.continent-metrics { display: grid; gap: 6px; text-align: right; color: var(--muted); }
.zone-list { display: grid; gap: 14px; }
.zone-item { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); }
.zone-item__head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.zone-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: rgba(111, 207, 151, 0.14); color: var(--success); font-size: 12px; }
.badge--muted { background: rgba(255,255,255,0.06); color: var(--muted); }
.badge--real { background: rgba(122, 184, 255, 0.14); color: var(--accent-2); }
.badge--bot { background: rgba(212, 169, 76, 0.14); color: var(--accent); }
.zone-chars { display: flex; gap: 8px; flex-wrap: wrap; }
.char-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,0.04); color: var(--text); border: 1px solid rgba(255,255,255,0.06); }
.char-pill small { color: var(--muted); }
.char-pill--online { border-color: rgba(111, 207, 151, 0.28); background: rgba(111, 207, 151, 0.08); }
.char-pill--bot { border-color: rgba(212, 169, 76, 0.28); background: rgba(212, 169, 76, 0.08); }
.char-pill--real { border-color: rgba(122, 184, 255, 0.2); }

@media (max-width: 920px) {
  .hero, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .continent-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 76px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(12, 17, 24, 0.98);
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
  }
  .nav.is-open { display: flex; }
  .news-item { display: grid; }
  .zone-item__head { display: grid; }
}
