/* ── Reset & tokens ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-pixel: 'Press Start 2P', 'JetBrains Mono', monospace;

  --bg: #0a0f0d;
  --bg-2: #0e1512;
  --panel: #121a16;
  --panel-2: #16201b;
  --border: #1f2c25;
  --border-2: #2a3b31;
  --fg: #e7f0ea;
  --muted: #8aa295;
  --muted-2: #5f766b;
  --accent: #43d17a;
  --accent-dim: #2a8c54;
  --accent-glow: rgba(67, 209, 122, 0.18);
  --danger: #ef5a5a;
  --warn: #f0b429;
  --info: #58a6ff;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1180px;
  font-size: clamp(14px, 1.4vw, 17px);
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(67,209,122,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(67,209,122,0.06), transparent 55%),
    var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; }
.small-note { font-size: .82rem; margin-top: .3rem; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,15,13,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1.3rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-head); font-weight: 700; }
.brand-mark { color: var(--accent); font-size: 1.35rem; }
.brand-name { font-size: 1.25rem; letter-spacing: -.02em; }
.brand-name.small { font-size: 1.1rem; }
.nav { display: flex; gap: 1.15rem; margin-left: .5rem; }
.nav a { color: var(--muted); font-weight: 500; transition: color .15s; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--fg); }
.header-live {
  margin-left: auto; display: flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .82rem; color: var(--muted); white-space: nowrap;
}
.header-live #header-players { color: var(--accent); font-weight: 700; }
.pulse {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite;
}
.lang-toggle {
  padding: .4rem .7rem; min-width: 42px;
  background: var(--panel); border: 1px solid var(--border-2); color: var(--fg);
  border-radius: 8px; font-family: var(--font-mono); font-size: .8rem; font-weight: 700;
  letter-spacing: .03em; transition: border-color .15s, color .15s;
}
.lang-toggle:hover { border-color: var(--accent-dim); color: var(--accent); }
.header-add { white-space: nowrap; padding: .5rem .9rem; font-size: .88rem; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(67,209,122,0.5); }
  70% { box-shadow: 0 0 0 9px rgba(67,209,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,209,122,0); }
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero { padding: clamp(2.2rem, 5vw, 4rem) 0 1rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 700; letter-spacing: -.03em; }
.hero h1 .accent { text-shadow: 0 0 30px var(--accent-glow); }
.hero p.lead { color: var(--muted); font-size: 1.08rem; max-width: 52ch; margin-top: 1rem; }
.hero-search { margin-top: 1.7rem; display: flex; gap: .6rem; max-width: 560px; }
.hs-box { position: relative; flex: 1; }
.hero-search input {
  width: 100%; padding: .85rem 1.05rem; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--border-2); color: var(--fg);
  font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.hero-search input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-glow); }

.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  overflow: hidden; display: none; box-shadow: 0 18px 40px -18px rgba(0,0,0,.9);
}
.suggest.show { display: block; }
.sug-item {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; cursor: pointer;
  border-bottom: 1px solid var(--border); font-size: .9rem;
}
.sug-item:last-child { border-bottom: 0; }
.sug-item:hover { background: var(--panel); }
.sug-name { font-weight: 600; }
.sug-host { color: var(--muted-2); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; flex: 1; white-space: nowrap; }
.sug-players { color: var(--accent); font-family: var(--font-mono); font-size: .8rem; font-weight: 700; }

.hero-chart { padding: 1rem 1.1rem; }
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hc-head h3 { font-size: .95rem; color: var(--muted); font-weight: 600; }
.hc-head .mono { font-size: .74rem; }
.chart-wrap { position: relative; margin-top: .6rem; }
.chart-wrap canvas { width: 100%; height: 190px; }
.chart-wrap.tall canvas { height: 260px; }
.chart-tip {
  position: absolute; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: #0b120e; border: 1px solid var(--border-2); color: var(--fg);
  border-radius: 7px; padding: .3rem .55rem; font-family: var(--font-mono); font-size: .74rem;
  white-space: nowrap; z-index: 5;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  padding: .85rem 1.3rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; transition: transform .12s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #04130a; }
.btn-primary:hover { background: #54e389; }
.btn-ghost { background: var(--panel); border-color: var(--border-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent-dim); }
.btn-static { cursor: default; }

/* ── Stat strip ─────────────────────────────────────────────────────────────── */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.stat-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}
.stat-card .num { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--fg); }
.stat-card .num.accent { color: var(--accent); }
.stat-card .label { color: var(--muted); font-size: .82rem; margin-top: .25rem; text-transform: uppercase; letter-spacing: .06em; }

/* ── Sections ───────────────────────────────────────────────────────────────── */
.section { margin-top: 3rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 1.2rem; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { font-size: 1.6rem; }
.section-head p { color: var(--muted); font-size: .92rem; }
.link-more { color: var(--accent); font-weight: 600; font-size: .9rem; }

/* ── Filters bar ────────────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.4rem; }
.filters input, .filters select {
  padding: .65rem .85rem; border-radius: var(--radius-sm); background: var(--panel);
  border: 1px solid var(--border-2); color: var(--fg); font: inherit; outline: none;
}
.filters input { flex: 1 1 220px; min-width: 200px; }
.filters select { flex: 0 1 auto; }
.filters input:focus, .filters select:focus { border-color: var(--accent-dim); }

/* ── Server rows ────────────────────────────────────────────────────────────── */
.server-list { display: flex; flex-direction: column; gap: .6rem; }
.server-row {
  display: grid; grid-template-columns: 52px 46px minmax(0, 1fr) 150px 168px;
  gap: .9rem; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .75rem .95rem; cursor: pointer;
  transition: transform .13s, border-color .13s, box-shadow .13s;
}
.server-row:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: 0 12px 30px -18px rgba(0,0,0,.8); }
.server-row.is-off { opacity: .62; }
.sr-rank { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.sr-rank span { font-family: var(--font-mono); font-weight: 700; font-size: .92rem; color: var(--muted); }
.trend { font-style: normal; font-family: var(--font-mono); font-size: .68rem; }
.trend.up { color: var(--accent); }
.trend.down { color: var(--danger); }
.trend.flat { color: var(--muted-2); }
.sr-main { min-width: 0; }
.sr-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-family: var(--font-head); }
.sr-title b { font-size: 1.02rem; font-weight: 600; }
.sr-live { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.sr-players { font-family: var(--font-mono); font-size: .92rem; color: var(--muted); white-space: nowrap; }
.sr-players b { color: var(--accent); font-size: 1.05rem; }
.spark { width: 96px; height: 26px; opacity: .9; }
.sr-meta { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.sr-ping { display: inline-flex; align-items: center; font-family: var(--font-mono); }
.copy-ip {
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--muted);
  padding: .3rem .55rem; border-radius: 7px; font-family: var(--font-mono); font-size: .74rem;
  transition: color .15s, border-color .15s;
}
.copy-ip:hover { color: var(--accent); border-color: var(--accent-dim); }

/* MOTD block — mimics the vanilla server-list entry */
.motd {
  margin-top: .3rem; padding: .35rem .6rem; border-radius: 6px;
  background: #121212; border: 1px solid #202020;
  font-family: var(--font-mono); font-size: .78rem; line-height: 1.5;
  overflow: hidden; white-space: nowrap;
}
.motd-line { display: block; overflow: hidden; text-overflow: ellipsis; }
.mc-obf { animation: obf .18s steps(2) infinite; }
@keyframes obf { 50% { opacity: .2; } }

/* Icons */
.sc-icon {
  width: 44px; height: 44px; border-radius: 8px; flex: none; position: relative;
  overflow: hidden; border: 1px solid var(--border-2); display: block;
}
.sc-icon canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.sc-icon i {
  position: absolute; inset: 0; display: grid; place-items: center; font-style: normal;
  font-family: var(--font-pixel); font-size: 15px; color: #eaffee;
  text-shadow: 2px 2px 0 rgba(0,0,0,.65);
}
.sc-icon.sm { width: 30px; height: 30px; border-radius: 6px; }
.sc-icon.sm i { font-size: 10px; text-shadow: 1px 1px 0 rgba(0,0,0,.65); }

/* Badges & tags */
.badge {
  font-size: .68rem; font-weight: 700; padding: .16rem .5rem; border-radius: 6px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border-2); color: var(--fg);
  letter-spacing: .02em; white-space: nowrap;
}
.badge-prem { background: rgba(240,180,41,.12); border-color: rgba(240,180,41,.5); color: var(--warn); }
.badge-ok { background: rgba(67,209,122,.1); border-color: var(--accent-dim); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-size: .72rem; padding: .18rem .5rem; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
}
.tag.ver { color: var(--accent); border-color: var(--accent-dim); font-family: var(--font-mono); font-size: .68rem; }

/* ── Banners (procedural pixel art) ─────────────────────────────────────────── */
.banner { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-2); }
.banner canvas { width: 100%; height: auto; image-rendering: pixelated; }
.banner-text {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 1rem; gap: .45rem; pointer-events: none;
}
.banner-text .bn {
  font-family: var(--font-pixel); font-size: clamp(10px, 1.9vw, 15px); color: #fff;
  text-shadow: 2px 2px 0 rgba(0,0,0,.8); letter-spacing: .04em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.banner-text .bn.big { font-size: clamp(13px, 2.6vw, 22px); }
.banner-text .bh {
  font-family: var(--font-pixel); font-size: clamp(7px, 1.1vw, 9px); color: #ffe97a;
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
}
.detail-banner { margin-top: 1rem; }
.detail-banner .banner-text { padding: 0 1.6rem; }
.banner-badges { position: absolute; right: .8rem; bottom: .7rem; display: flex; gap: .4rem; }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.featured-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2);
  margin-bottom: .5rem;
}
#featured-wrap { margin-bottom: 1.4rem; }
.featured-card {
  cursor: pointer; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  transition: transform .14s, border-color .14s;
}
.featured-card:hover { transform: translateY(-3px); border-color: var(--accent-dim); }
.featured-card .banner { border: 0; border-radius: 0; }
.fc-foot { display: flex; align-items: center; justify-content: space-between; padding: .6rem .8rem; }
.fc-foot .players { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); }
.fc-foot .players .on { color: var(--accent); font-weight: 700; }
.fc-tags { display: flex; gap: .3rem; }

/* ── Home columns: feed + versions ──────────────────────────────────────────── */
.home-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; align-items: start; }
.feed { margin-top: .8rem; display: flex; flex-direction: column; max-height: 380px; overflow: hidden; }
.feed-live {
  display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono);
  font-size: .68rem; font-weight: 700; color: var(--accent); letter-spacing: .12em;
}
.feed-item {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .2rem;
  border-bottom: 1px dashed var(--border); font-size: .88rem; cursor: pointer;
}
.feed-item:hover { background: rgba(255,255,255,.02); }
.feed-item:last-child { border-bottom: 0; }
.feed-new { animation: feedIn .5s ease; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); background: rgba(67,209,122,.08); } }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.feed-dot.ok { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.feed-dot.bad { background: var(--danger); }
.feed-dot.warn { background: var(--warn); }
.feed-dot.info { background: var(--info); }
.feed-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.feed-text b { color: var(--fg); font-weight: 600; }
.feed-time { flex: none; font-size: .7rem; color: var(--muted-2); }

.ver-bars { margin-top: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.vb-row { display: grid; grid-template-columns: 64px 1fr 52px; align-items: center; gap: .7rem; }
.vb-ver { font-size: .78rem; color: var(--fg); }
.vb-bar { height: 10px; border-radius: 5px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--border); }
.vb-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 5px; }
.vb-count { font-size: .74rem; color: var(--muted); text-align: right; }

/* Gamemode cloud */
.mode-cloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.mode-chip {
  display: flex; flex-direction: column; gap: .05rem; padding: .55rem .95rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .14s, transform .14s;
}
.mode-chip:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.mode-chip b { font-family: var(--font-head); font-size: .95rem; }
.mode-chip span { font-size: .74rem; color: var(--muted-2); }

/* CTA */
.cta-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(67,209,122,.1), transparent 55%), var(--panel);
  border: 1px solid var(--border-2); border-radius: var(--radius); padding: 1.8rem 2rem;
}
.cta-panel h2 { font-size: 1.5rem; }
.cta-panel p { max-width: 52ch; margin-top: .4rem; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pagination button {
  min-width: 38px; padding: .5rem .7rem; border-radius: 8px; background: var(--panel);
  border: 1px solid var(--border-2); color: var(--fg); font-family: var(--font-mono); font-size: .85rem;
}
.pagination button:hover:not(:disabled) { border-color: var(--accent-dim); }
.pagination button.active { background: var(--accent); color: #04130a; border-color: var(--accent); }
.pagination button:disabled { opacity: .4; cursor: default; }

/* ── Server detail ──────────────────────────────────────────────────────────── */
.detail-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; }
.detail-actions .copy-host { margin-bottom: 0; flex: 1 1 260px; }
.tile-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; margin-top: 1rem; }
.tile {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .8rem .95rem;
}
.tile .num { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.tile .num small { font-size: .7rem; color: var(--muted); margin-left: .15rem; }
.tile .label { color: var(--muted-2); font-size: .72rem; margin-top: .15rem; text-transform: uppercase; letter-spacing: .05em; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; align-items: start; margin-top: 1.2rem; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.panel h3 { font-size: 1.1rem; margin-bottom: .6rem; }
.kv { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px dashed var(--border); font-size: .92rem; gap: 1rem; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--font-mono); text-align: right; }
.copy-host {
  display: flex; gap: .5rem; align-items: center; background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: .7rem .9rem; font-family: var(--font-mono);
}
.copy-host code { flex: 1; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-host button { background: var(--panel-2); border: 1px solid var(--border-2); color: var(--fg); padding: .4rem .7rem; border-radius: 7px; font-size: .8rem; }

.range-toggle { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; }
.range-toggle button {
  background: transparent; border: 0; color: var(--muted); padding: .35rem .8rem;
  font-size: .78rem; font-family: var(--font-mono);
}
.range-toggle button.active { background: var(--accent); color: #04130a; font-weight: 700; }

.uptime-days { display: flex; gap: 2px; margin-top: .5rem; }
.uptime-days i, .uptime-legend i { flex: 1; height: 26px; border-radius: 2px; display: block; }
.ud-0 { background: var(--accent-dim); }
.ud-1 { background: var(--warn); }
.ud-2 { background: var(--danger); }
.uptime-legend { display: flex; gap: 1.2rem; margin-top: .7rem; font-size: .76rem; color: var(--muted-2); }
.uptime-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.uptime-legend i { width: 12px; height: 12px; flex: none; }

.desc-text { color: var(--muted); font-size: .95rem; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: .4rem; }
.shot {
  width: 100%; border-radius: 8px; border: 1px solid var(--border-2); cursor: zoom-in;
  image-rendering: pixelated; transition: transform .14s, border-color .14s;
}
.shot:hover { transform: scale(1.02); border-color: var(--accent-dim); }

.similar { display: flex; flex-direction: column; gap: .5rem; }
.sim-row {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .14s;
}
.sim-row:hover { border-color: var(--accent-dim); }
.sim-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sim-main b { font-size: .88rem; font-weight: 600; }
.sim-main span { font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-players { font-family: var(--font-mono); font-size: .82rem; color: var(--accent); font-weight: 700; }

/* ── Overlays: modal & lightbox ─────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(4,8,6,.8); backdrop-filter: blur(6px); animation: fade .2s ease;
  padding: 1rem;
}
.modal {
  position: relative; width: min(430px, 100%); background: var(--panel);
  border: 1px solid var(--border-2); border-radius: var(--radius); padding: 1.6rem;
}
.modal h3 { margin-bottom: 1rem; }
.modal-close {
  position: absolute; top: .8rem; right: .8rem; background: transparent; border: 0;
  color: var(--muted); font-size: 1rem;
}
.modal-close:hover { color: var(--fg); }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field span { font-size: .84rem; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--bg-2);
  border: 1px solid var(--border-2); color: var(--fg); font: inherit; outline: none; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-dim); }
.lightbox .lb-inner { width: min(960px, 96vw); }
.lightbox canvas { width: 100%; border-radius: 10px; border: 1px solid var(--border-2); image-rendering: pixelated; cursor: zoom-out; }
.lb-caption { margin-top: .6rem; text-align: center; color: var(--muted-2); font-size: .78rem; }

/* ── API / status pages ─────────────────────────────────────────────────────── */
.api-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
.api-table th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-2); padding: .5rem .6rem; border-bottom: 1px solid var(--border-2);
}
.api-table td { padding: .6rem; border-bottom: 1px dashed var(--border); vertical-align: middle; }
.api-table tr:last-child td { border-bottom: 0; }
.api-table .mono { font-size: .82rem; color: var(--accent); }
.method {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700; color: var(--info);
  background: rgba(88,166,255,.1); border: 1px solid rgba(88,166,255,.35);
  padding: .12rem .45rem; border-radius: 5px;
}
.code-block {
  background: #0b120e; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .9rem 1rem; font-size: .78rem; line-height: 1.6; color: #b8d9c3;
  overflow-x: auto; margin-top: .8rem; white-space: pre;
}
.status-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.status-ok {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--accent);
  background: rgba(67,209,122,.08); border: 1px solid var(--accent-dim);
  padding: .45rem .9rem; border-radius: 999px; font-size: .88rem;
}
.incident { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px dashed var(--border); }
.incident:last-child { border-bottom: 0; }
.inc-main { flex: 1; display: flex; flex-direction: column; }
.inc-main b { font-size: .92rem; }
.inc-main .muted { font-size: .78rem; }

/* ── Add form ───────────────────────────────────────────────────────────────── */
.form-section { max-width: 640px; }
.add-form { margin-top: 1.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.add-success { text-align: center; padding: 2.4rem; margin-top: 1.4rem; }
.add-success .ic { font-size: 2.2rem; }
.add-success h2 { margin: .6rem 0; }
.add-success p { max-width: 46ch; margin: 0 auto 1.2rem; }

/* ── About ──────────────────────────────────────────────────────────────────── */
.prose { max-width: 70ch; margin-top: 1.4rem; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .8rem; }
.prose p { color: var(--muted); margin-bottom: 1rem; }
.prose ul { color: var(--muted); margin: 0 0 1rem 1.2rem; }
.prose li { margin-bottom: .4rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; margin-top: 1.4rem; }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.feature .ic { font-size: 1.5rem; }
.feature h4 { margin: .6rem 0 .35rem; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .88rem; }

/* ── Toast ──────────────────────────────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 200;
  background: var(--panel-2); border: 1px solid var(--accent-dim); color: var(--fg);
  padding: .7rem 1.2rem; border-radius: 10px; font-family: var(--font-mono); font-size: .84rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.8);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Utility / states ───────────────────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-row { height: 86px; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.back-link { color: var(--muted); font-size: .9rem; display: inline-flex; gap: .4rem; margin: 1.4rem 0 .4rem; }
.back-link:hover { color: var(--fg); }
.fade-in { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--border); background: var(--bg-2); padding: 2.4rem 0 1.4rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-inner .muted { max-width: 38ch; margin-top: .5rem; font-size: .88rem; }
.footer-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-cols h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: .7rem; }
.footer-cols a { display: block; color: var(--muted); font-size: .9rem; margin-bottom: .4rem; }
.footer-cols a:hover { color: var(--accent); }
.copy { margin-top: 2rem; color: var(--muted-2); font-size: .82rem; font-family: var(--font-mono); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .tile-row { grid-template-columns: repeat(3, 1fr); }
  .server-row { grid-template-columns: 44px 46px minmax(0,1fr) 130px; }
  .sr-meta { display: none; }
  .header-add { display: none; }
}
@media (max-width: 880px) {
  .detail-grid, .home-cols { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .featured-grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .hero-search { flex-direction: column; }
  .header-live { display: none; }
  .server-row { grid-template-columns: 40px minmax(0,1fr) 108px; padding: .7rem .8rem; }
  .server-row .sc-icon { display: none; }
  .spark { display: none; }
  .tile-row { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
}
