/* ==========================================================================
   cs16.etozhestas.ru — новогодний сервер CS 1.6
   ========================================================================== */

/* ---------- Шрифты (локальные, OFL) ---------- */
@font-face { font-family: "Inter"; src: url("/fonts/inter-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-cyrillic-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Токены: зимняя ночь ---------- */
:root {
  --bg: #0b1220;
  --bg-2: #0e1729;
  --surface: #121c2f;
  --surface-2: #17233a;
  --line: #23314b;
  --ink: #f2f6fb;
  --text: #cdd7e5;
  --mute: #8d9cb3;
  --ice: #9fd3ff;
  --gold: #f0c36a;
  --gold-ink: #1d1505;
  --green: #6fd39a;
  --red: #ff7a6b;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 8px;
  --max: 880px;
  --gutter: clamp(1rem, 4vw, 1.5rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(159, 211, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(240, 195, 106, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; }
ul, ol { list-style: none; }
code, kbd { font-family: var(--font-mono); font-size: 0.92em; }
code { color: var(--ice); }
kbd { padding: 0.05em 0.4em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; color: var(--ink); background: var(--surface-2); }

h1, h2, h3 { font-family: var(--font-mono); font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--gold); color: var(--gold-ink); }

.wrap { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: var(--gutter); top: -3rem; z-index: 100;
  background: var(--gold); color: var(--gold-ink);
  padding: 0.5rem 0.9rem; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.85rem; text-decoration: none;
}
.skip-link:focus { top: 0.6rem; }

/* ---------- Снег: только CSS, два слоя ---------- */
.snow, .snow::after {
  position: fixed; inset: -10% 0 0 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(2px 2px at 140px 80px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 90px 160px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(2.5px 2.5px at 200px 210px, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 260px 40px, rgba(255,255,255,.5), transparent 60%);
  background-size: 300px 260px;
  animation: snow 18s linear infinite;
  opacity: 0.55;
}
.snow::after {
  content: ""; inset: 0;
  background-size: 420px 360px;
  animation-duration: 28s;
  opacity: 0.7;
  filter: blur(0.6px);
}
@keyframes snow { from { background-position: 0 0; } to { background-position: 60px 260px; } }

.topbar, main, .footer { position: relative; z-index: 1; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max); margin: 0 auto; padding: 0.8rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1.2rem;
  font-family: var(--font-mono); font-size: 0.85rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.brand .flake { color: var(--gold); }
.main-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; }
.main-nav a { color: var(--mute); text-decoration: none; padding: 0.35rem 0; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.8rem, 8vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.kicker { font-family: var(--font-mono); font-size: 0.9rem; color: var(--ice); margin-bottom: 0.8rem; }
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.8rem); max-width: 16ch; }
.sub { margin-top: 1rem; max-width: 52ch; font-size: clamp(1rem, 2.2vw, 1.15rem); }

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
}
.server { margin-top: 2.2rem; padding: clamp(1.1rem, 3.5vw, 1.6rem); box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.8); }

.addr-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.addr { font-size: clamp(1.05rem, 3.6vw, 1.45rem); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.addr-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.6rem 1.05rem;
  font: 500 0.88rem var(--font-mono);
  color: var(--ink); text-decoration: none; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--ice); background: rgba(159, 211, 255, 0.08); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: #f6d48f; border-color: #f6d48f; color: var(--gold-ink); }

.copy-hint { min-height: 1.4em; margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--green); }

.status {
  display: flex; align-items: center; gap: 0.65rem;
  margin-top: 0.6rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.92rem; color: var(--ink);
}
.status .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--mute); }
.status[data-state="online"] .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(111, 211, 154, 0.18); animation: pulse 2.4s ease-in-out infinite; }
.status[data-state="offline"] .dot { background: var(--red); }
.status[data-state="offline"] { color: var(--red); }
.status[data-state="unknown"] { color: var(--mute); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(111, 211, 154, 0.05); } }

.players { margin-top: 1rem; }
.players table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.players th { text-align: left; font: 500 0.75rem var(--font-mono); color: var(--mute); text-transform: lowercase; padding: 0 0 0.4rem; border-bottom: 1px solid var(--line); }
.players td { padding: 0.45rem 0; border-bottom: 1px solid rgba(35, 49, 75, 0.6); color: var(--ink); overflow-wrap: anywhere; }
.players .num { text-align: right; font-family: var(--font-mono); color: var(--text); white-space: nowrap; padding-left: 1rem; }
.note { margin-top: 0.6rem; font-size: 0.82rem; color: var(--mute); }
.updated { margin-top: 0.8rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--mute); }

.countdown {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem;
  margin-top: 1.2rem; padding: 0.9rem 1.2rem;
  border: 1px dashed rgba(240, 195, 106, 0.4); border-radius: var(--radius);
  font-family: var(--font-mono);
}
.cd-label { color: var(--mute); font-size: 0.85rem; }
.cd-value { color: var(--gold); font-size: clamp(1.05rem, 3.2vw, 1.3rem); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Секции ---------- */
.block { padding: clamp(2.4rem, 6vw, 3.6rem) 0; border-top: 1px solid var(--line); }
.block h2 { font-size: clamp(1.45rem, 3.6vw, 1.9rem); margin-bottom: 1.4rem; }
.block h2::before { content: "❄ "; color: var(--gold); font-size: 0.8em; }
.block h3 { font-size: 1.1rem; margin: 2.2rem 0 1rem; }
.lead { color: var(--mute); margin: -0.6rem 0 1.4rem; }

.steps { counter-reset: s; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.8rem; max-width: 66ch; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); color: var(--gold); padding-top: 0.05rem; }
.steps strong { color: var(--ink); }
.aside { margin-top: 1.6rem; font-size: 0.92rem; color: var(--mute); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface); padding: 0.9rem 1.1rem; }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; color: var(--mute); }
.facts dd { color: var(--ink); margin-top: 0.15rem; }

.cmds { display: grid; gap: 0.7rem; }
.cmds li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.8rem; align-items: baseline; }
.cmds li > code { color: var(--gold); }

.maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 0.6rem; counter-reset: m; }
.maps li {
  counter-increment: m;
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.maps li::before { content: counter(m); font-family: var(--font-mono); font-size: 0.75rem; color: var(--mute); width: 1rem; }
.maps code { color: var(--ink); flex: 1 1 auto; }
.tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--mute); border: 1px solid var(--line); border-radius: 100px; padding: 0.1rem 0.55rem; }
.tag-gold { color: var(--gold); border-color: rgba(240, 195, 106, 0.4); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 2rem 0 2.6rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--mute); }
.footer a { color: var(--ice); text-underline-offset: 3px; padding: 0.3rem 0; }

/* ---------- Адаптив ---------- */
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .addr-actions { width: 100%; }
  .addr-actions .btn { flex: 1 1 auto; }
  .cmds li { grid-template-columns: 1fr; gap: 0.1rem; }
}

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