/* 28 Dayz Later: The ReZZurection — palette and shapes follow the 28_UI / PVM Groups mods. */
@font-face { font-family: "Chakra Petch"; src: url(/fonts/ChakraPetch-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(/fonts/ChakraPetch-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(/fonts/ChakraPetch-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(/fonts/ChakraPetch-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/IBMPlexMono-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/IBMPlexMono-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --accent: #20e3c7;
  --accent-deep: #129684;
  --line-soft: #aad6de;
  --backdrop: #020612;
  --panel-rgb: 6, 22, 36;
  --text: #f2f2f2;
  --muted: #c4d4e6;
  --success: #3ae07c;
  --gold: #ffc42e;
  --warn: #ff8c28;
  --danger: #ff4d5e;
  --discord: #5865f2;
  --fill: rgba(var(--panel-rgb), .34);
  --well: rgba(var(--panel-rgb), .55);
  --header: rgba(var(--panel-rgb), .62);
  --solid: rgba(var(--panel-rgb), .92);
  --outline: rgba(32, 227, 199, .38);
  --tile: rgba(32, 227, 199, .08);
  --track: rgba(255, 255, 255, .18);
  --bracket: rgba(255, 255, 255, .32);
  --ui: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--backdrop) radial-gradient(1200px 600px at 50% -10%, rgba(32, 227, 199, .09), transparent 70%) no-repeat;
  color: var(--text); font: 400 17px/1.6 var(--ui);
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, .num, .addr code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--accent); color: #012; padding: 8px 14px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.r { text-align: right; }
.plain { list-style: none; margin: 0; padding: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.empty { color: var(--muted); border: 1px dashed var(--outline); padding: 22px; text-align: center; background: var(--fill); }
.alert { border: 1px solid var(--danger); background: rgba(255, 77, 94, .12); padding: 12px 16px; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 8px var(--gutter); background: var(--solid); border-bottom: 1px solid var(--outline);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img:first-child { width: 40px; height: 40px; border-radius: 50%; }
.brand-word { height: 22px; width: auto; max-width: 176px; object-fit: cover; object-position: left; }
.nav nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav nav a:not(.btn) {
  color: var(--muted); text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: .86rem;
  letter-spacing: .06em; padding: 8px 10px; border-bottom: 2px solid transparent;
}
.nav nav a:not(.btn):hover { color: #fff; }
.nav nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.nav-me { display: inline-flex; align-items: center; gap: 6px; }
.nav-me img { border-radius: 2px; }

/* ── Buttons ── */
.btn, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 600 .95rem/1 var(--ui); text-transform: uppercase; letter-spacing: .07em; text-decoration: none;
  color: var(--text); background: rgba(170, 214, 222, .07); border: 1px solid var(--line-soft);
  padding: 13px 22px; border-radius: 0; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: rgba(170, 214, 222, .18); color: #fff; }
.btn:active { border-color: var(--accent-deep); }
.btn-primary { background: rgba(32, 227, 199, .16); border-color: var(--accent); color: var(--accent); }
.btn-primary:hover { background: var(--accent); color: #021b17; }
.btn-discord { background: rgba(88, 101, 242, .22); border-color: var(--discord); color: #fff; }
.btn-discord:hover { background: var(--discord); }
.btn-danger { background: rgba(255, 77, 94, .12); border-color: var(--danger); color: var(--danger); margin-top: 18px; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm, .nav-toggle { padding: 8px 14px; font-size: .8rem; }
.nav .nav-toggle { display: none; margin-left: auto; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.center .cta, .hero .cta { justify-content: center; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .86rem; text-decoration: underline; cursor: pointer; }
form.inline { display: inline; }

/* ── Hero ── */
.hero { position: relative; background: #000; border-bottom: 1px solid var(--outline); text-align: center; }
.hero-art { display: block; width: 100%; height: min(56.25vw, 78vh); min-height: 300px; object-fit: cover; object-position: center 42%; }
.hero-in { position: relative; margin: -70px auto 0; padding: 70px var(--gutter) clamp(28px, 5vh, 56px); max-width: 780px; background: linear-gradient(to bottom, transparent, #000 70px); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--backdrop)); pointer-events: none; }
.hero-in > * { position: relative; z-index: 1; }
.hero-tag { font-size: clamp(1.25rem, 3.2vw, 1.9rem); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4em; text-shadow: 0 1px 0 #000; }
.hero-intro { color: var(--muted); font-size: 1.08rem; text-shadow: 0 1px 0 #000; }

/* ── Page head ── */
.phead { position: relative; padding: clamp(44px, 9vw, 96px) 0 clamp(24px, 4vw, 40px); background: #000 var(--bg) center 78% / cover no-repeat; border-bottom: 1px solid var(--outline); }
.phead::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(2, 6, 18, .55), rgba(2, 6, 18, .93)); }
.phead .wrap { position: relative; }
.phead h1 { margin-bottom: .25em; overflow-wrap: anywhere; }
.phead h1::before { content: ""; display: block; width: 46px; height: 3px; background: var(--accent); margin-bottom: 14px; }
.phead p { color: var(--muted); margin: 0; max-width: 60ch; }

/* ── Sections ── */
.sec { padding: clamp(36px, 6vw, 68px) 0; }
.sec.band { background: var(--fill); border-block: 1px solid rgba(255, 255, 255, .08); }
.sec-h { color: var(--accent); text-transform: uppercase; font-size: 1.05rem; letter-spacing: .14em; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.sec-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--outline), transparent); }
.grid { display: grid; gap: 18px; }
.grid.servers { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid.feats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: 18px; }
.stack { display: grid; gap: 16px; }
.split { display: grid; gap: clamp(28px, 5vw, 56px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.more { font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .86rem; text-decoration: none; display: inline-block; margin-top: 14px; }
.more::after { content: " →"; }
.more.back::after { content: none; }
.more.back::before { content: "← "; }
.join { position: relative; background: #000 var(--bg) center / cover no-repeat; border-top: 1px solid var(--outline); }
.join::before { content: ""; position: absolute; inset: 0; background: rgba(2, 6, 18, .82); }
.join .wrap { position: relative; }
.join h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); text-transform: uppercase; }

/* ── Cards: see-through navy, 1px teal outline, corner brackets ── */
.card { position: relative; background: var(--header); border: 1px solid var(--outline); padding: 22px; }
.card::before, .card::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--bracket); pointer-events: none; }
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.ico { display: inline-block; width: 28px; height: 28px; background: var(--accent); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; flex: none; }
.feat .ico { width: 34px; height: 34px; margin-bottom: 12px; }
.feat p { margin: 0; }

/* Servers */
.server { display: grid; gap: 14px; align-content: start; }
.server-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.server-h h3 { font-size: 1.35rem; margin: 0 0 2px; }
.server-h p, .server-blurb, .server > p { margin: 0; }
.server-blurb { color: var(--muted); }
.state { font: 500 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; border: 1px solid; white-space: nowrap; }
.state::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 7px; }
.state.on { color: var(--success); }
.state.off { color: var(--danger); }
.pop-n { display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.pop-n b { font: 500 2rem/1 var(--mono); color: var(--accent); }
.bar, .share { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar i, .share i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.addr { display: flex; align-items: center; gap: 10px; background: var(--well); border: 1px solid var(--accent-deep); padding: 8px 8px 8px 14px; }
.addr code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .98rem; color: #fff; }

/* News */
.tag-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: .86rem; }
.tag { font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; padding: 5px 8px; border: 1px solid var(--accent); color: var(--accent); background: var(--tile); }
.tag-wipe { border-color: var(--danger); color: var(--danger); background: rgba(255, 77, 94, .1); }
.tag-event { border-color: var(--gold); color: var(--gold); background: rgba(255, 196, 46, .1); }
.tag-update { border-color: var(--line-soft); color: var(--line-soft); background: rgba(170, 214, 222, .08); }
.news-card h3 { font-size: 1.3rem; }
.news-card h3 a { color: #fff; text-decoration: none; }
.news-card h3 a:hover { color: var(--accent); }
.news-card p:last-child { margin: 0; }
.post { font-size: 1.08rem; max-width: 68ch; overflow-wrap: anywhere; }
.post h3 { color: var(--accent); margin-top: 1.4em; text-transform: uppercase; letter-spacing: .06em; }
.post ul { padding-left: 1.2em; }
.post li::marker { color: var(--accent); }

/* Rules, steps, mods */
.rules h2 { font-size: 1.3rem; display: flex; align-items: baseline; gap: 12px; text-transform: uppercase; }
.num, .rules .num { font-family: var(--mono); color: var(--accent); font-weight: 500; }
.rules ol, .steps { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }
.rules li::marker, .steps li::marker { color: var(--accent); font-family: var(--mono); }
.steps { margin-bottom: 18px; font-size: 1.08rem; }
.mod { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mod h3, .mod p { margin: 0; }

/* Killfeed */
.kills { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kill { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 12px; align-items: center; background: var(--well); border-left: 2px solid var(--accent); padding: 9px 12px; }
.kill.new { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(32, 227, 199, .35); } }
.kill-k { font-weight: 600; text-align: right; }
.kill-k, .kill-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kill-v a { color: var(--danger); }
.kill-w { display: inline-flex; align-items: center; gap: 7px; font: 500 .8rem/1.2 var(--mono); color: var(--muted); text-align: center; }
.kill-w .ico { width: 16px; height: 16px; background: var(--muted); }
.kill-w em { font-style: normal; color: var(--gold); }
.kill-t { grid-column: 1 / -1; text-align: center; }
.pl { text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.pl:hover { text-decoration: underline; }

/* Stat tiles and the survivor record */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 22px 0 0; }
.tiles div { background: var(--tile); border: 1px solid var(--outline); padding: 12px 14px; }
.tiles dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tiles dd { margin: 4px 0 0; font: 500 1.3rem/1.2 var(--mono); }
.record { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 40px); align-items: center; margin-bottom: 36px; }
.record-kd { text-align: center; padding: 0 clamp(8px, 2vw, 24px); }
.record-kd span { display: block; color: var(--muted); letter-spacing: .2em; font-size: .86rem; }
.record-kd b { font: 500 clamp(3rem, 9vw, 5rem)/1 var(--mono); color: var(--accent); }
.share { height: 12px; background: var(--danger); margin: 0; }
.share i { border-radius: 0; }
.share-l { display: flex; justify-content: space-between; font: 500 .86rem var(--mono); margin: 6px 0 0; }
.share-l .k { color: var(--accent); }
.share-l .d { color: var(--danger); }
.weapons { display: grid; gap: 6px; }
.weapons li { display: flex; justify-content: space-between; gap: 12px; background: var(--well); padding: 9px 12px; border-left: 2px solid var(--accent-deep); }
.weapons b { font-family: var(--mono); color: var(--accent); }

/* Leaderboard */
.board-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
.sec .wrap > .tabs { margin-bottom: 18px; }
.tabs a { text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: .8rem; letter-spacing: .07em; color: var(--muted); padding: 8px 12px; border: 1px solid rgba(170, 214, 222, .3); background: var(--fill); }
.tabs a:hover { color: #fff; border-color: var(--line-soft); }
.tabs a[aria-current] { color: #021b17; background: var(--accent); border-color: var(--accent); }
.search { display: flex; gap: 6px; margin-left: auto; }
input, select, textarea { font: inherit; color: var(--text); background: var(--well); border: 1px solid var(--line-soft); padding: 9px 12px; border-radius: 0; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
.search input { width: min(220px, 50vw); }
.found { margin-bottom: 18px; }
.found-list { display: grid; gap: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--outline); background: var(--header); }
.board { width: 100%; border-collapse: collapse; min-width: 560px; }
.board th { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--outline); background: var(--well); white-space: nowrap; }
.board th.r { text-align: right; }
.board td { padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.board tbody tr:last-child td { border-bottom: 0; }
.board tbody tr:hover { background: var(--tile); }
.board td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.board .rank { font-family: var(--mono); color: var(--muted); width: 1%; }
.board .kd { color: var(--accent); }
.board .top-1 .rank, .board .top-1 .pl { color: var(--gold); }
.board .top td:first-child { box-shadow: inset 2px 0 var(--accent); }
.board .top-1 td:first-child { box-shadow: inset 2px 0 var(--gold); }
.board .ico { width: 16px; height: 16px; background: var(--gold); vertical-align: -2px; margin-right: 6px; }

/* Forms */
.form { display: grid; gap: 8px; margin-bottom: 8px; }
.form label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 10px; }
.form textarea { font-family: var(--mono); font-size: .95rem; resize: vertical; }
.form .check { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); }
.form .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form .cta { margin-top: 12px; }

/* Live map */
.map-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); align-items: start; }
.map { padding: 8px; }
.map canvas { display: block; width: 100%; height: auto; background: #03101a; }
.map-side ol { display: grid; gap: 4px; max-height: 70vh; overflow: auto; }
.map-side li { display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.map-side li span:last-child { font-family: var(--mono); color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* Footer */
.foot { border-top: 1px solid var(--outline); background: var(--solid); padding: 30px 0; margin-top: auto; }
.foot-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-grid > div { max-width: 620px; }
.foot-name { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.foot p { margin-bottom: 8px; }
.partner { display: grid; gap: 6px; text-decoration: none; text-align: center; }
.partner img { width: 160px; border: 1px solid var(--outline); display: block; }
.partner:hover img { border-color: var(--accent); }

@media (max-width: 900px) {
  .nav .nav-toggle { display: inline-flex; }
  .nav { flex-wrap: wrap; }
  .nav nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; margin: 0; gap: 0; padding: 8px 0; }
  .nav nav.open { display: flex; }
  .nav nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav nav .btn { margin-top: 12px; }
  .map-grid { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .record { grid-template-columns: 1fr; }
  .kill { grid-template-columns: 1fr; text-align: center; }
  .kill-k { text-align: center; }
  .kill-w { justify-content: center; }
  .mod { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
