@font-face { font-family: Unbounded; src: url(/fonts/unbounded-cyr.woff2) format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; src: url(/fonts/unbounded-lat.woff2) format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Montserrat; src: url(/fonts/mont-cyr.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: Montserrat; src: url(/fonts/mont-lat.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+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/mono-cyr.woff2) format('woff2'); font-weight: 100 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/mono-lat.woff2) format('woff2'); font-weight: 100 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --tar: #120c08;
    --hull: #1d140e;
    --hull-2: #26190f;
    --rope: #3a2a1e;
    --sand: #f4e7d5;
    --ash: #a08a76;
    --ember: #ff8a1e;
    --flare: #ffb23d;
    --hit: #ff5a3c;
    --grad: linear-gradient(100deg, var(--ember), var(--flare));
    --display: Unbounded, Montserrat, sans-serif;
    --body: Montserrat, system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --r: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tar); color: var(--sand); font: 500 16px/1.6 var(--body); }
a { color: var(--flare); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffd27a; }
:focus-visible { outline: 2px solid var(--flare); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--flare); color: var(--tar); padding: 8px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- шапка ---------- */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding: 12px max(20px, (100% - 1160px) / 2); background: rgba(18, 12, 8, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rope); }
.has-hero .bar { position: absolute; left: 0; right: 0; background: linear-gradient(rgba(18, 12, 8, .8), transparent); border-color: transparent; backdrop-filter: none; }
.brand { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-decoration: none; color: var(--sand); }
.brand .star { grid-row: 1 / 3; width: 40px; height: 40px; }
.brand-net { font: 600 9px/1 var(--body); letter-spacing: .32em; color: var(--ash); align-self: end; }
.brand-name { font: 800 17px/1.1 var(--display); letter-spacing: .02em; align-self: start; }
.nav { display: flex; gap: 4px; margin-right: auto; white-space: nowrap; }
.nav a { color: var(--sand); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; opacity: .78; }
.nav a:hover { opacity: 1; background: rgba(255, 178, 61, .08); color: var(--sand); }
.nav a[aria-current] { opacity: 1; color: var(--flare); }
.who { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.who form { margin: 0; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r); padding: 12px 22px; background: var(--grad); color: #1a0f05; font-weight: 800; font-size: 15px; text-decoration: none; letter-spacing: .01em; box-shadow: 0 6px 22px -8px rgba(255, 138, 30, .7); transition: transform .15s, filter .15s; }
.btn:hover { color: #1a0f05; filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--sand); box-shadow: inset 0 0 0 1px var(--rope); }
.btn-ghost:hover { color: var(--flare); box-shadow: inset 0 0 0 1px var(--ember); }
.link { background: none; border: 0; padding: 0; color: var(--ash); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--sand); }
.link.danger:hover { color: var(--hit); }

/* ---------- первый экран: адрес сервера ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; padding: 120px 0 72px; background: url(/bg.jpg) center 60% / cover; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18, 12, 8, .55) 0%, rgba(18, 12, 8, .35) 40%, rgba(18, 12, 8, .92) 85%, var(--tar) 100%), radial-gradient(ellipse at 20% 80%, rgba(18, 12, 8, .7), transparent 60%); }
.live { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 12px; border-radius: 99px; background: rgba(18, 12, 8, .66); box-shadow: inset 0 0 0 1px rgba(255, 178, 61, .25); font-size: 14px; font-weight: 600; }
.live i { width: 9px; height: 9px; border-radius: 50%; background: #5bdc6b; box-shadow: 0 0 0 0 rgba(91, 220, 107, .6); animation: pulse 2s infinite; }
.live.off i { background: var(--ash); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(91, 220, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 220, 107, 0); } }
.addr { display: block; border: 0; padding: 0; background: none; text-align: left; font: 800 clamp(24px, calc((100vw - 40px) / 13.8), 84px)/.95 var(--display); letter-spacing: -.035em; white-space: nowrap; }
.addr-ip { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.addr-port { color: var(--sand); opacity: .9; }
.addr:hover .addr-port { opacity: 1; color: #fff; }
.addr:focus-visible { outline-offset: 8px; }
.addr.copied .addr-ip { background: none; color: #5bdc6b; transition: color .2s; }
.addr-hint { margin: 18px 0 0; color: var(--ash); font-size: 15px; min-height: 1.6em; }
.addr-hint.ok { color: #5bdc6b; font-weight: 600; }
.hero-lede { max-width: 620px; margin: 22px 0 0; font-size: 18px; line-height: 1.55; color: var(--sand); }

/* ---------- блоки ---------- */
main { padding-bottom: 40px; }
.block { margin: 56px 0; }
.has-hero main .block:first-child { margin-top: 24px; }
.narrow { max-width: 820px; }
.h1 { font: 700 clamp(26px, 4vw, 38px)/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 10px; }
.h2 { display: flex; align-items: baseline; gap: 14px; font: 700 21px/1.2 var(--display); letter-spacing: -.01em; margin: 0 0 18px; }
.h2 small { font: 600 13px var(--body); color: var(--ash); letter-spacing: 0; }
.h2 .more { margin-left: auto; font: 600 14px var(--body); letter-spacing: 0; }
.h3 { font: 700 15px/1.2 var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--ash); margin: 30px 0 12px; }
.lede { color: var(--ash); margin: 0 0 26px; max-width: 70ch; }
.empty { padding: 22px 24px; border: 1px dashed var(--rope); border-radius: var(--r); color: var(--ash); margin: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; }
.grid2 > .block { margin: 56px 0 0; }
.crumbs { margin: 0 0 8px; font-size: 14px; color: var(--ash); }
.crumbs a { color: var(--ash); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* как зайти: настоящая последовательность шагов */
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; counter-reset: s; border-radius: var(--r); overflow: hidden; }
.steps li { counter-increment: s; position: relative; padding: 24px 24px 26px 72px; background: var(--hull); }
.steps li::before { content: counter(s); position: absolute; left: 22px; top: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--display); color: #1a0f05; background: var(--grad); }
.steps b { display: block; font-size: 17px; margin-bottom: 4px; }
.steps span { color: var(--ash); font-size: 15px; }
.help ol { grid-template-columns: 1fr; margin: 28px 0; }
.inline-copy { border: 0; padding: 1px 7px; border-radius: 5px; background: rgba(255, 178, 61, .12); color: var(--flare); font: 600 14px var(--mono); }
.inline-copy:hover { background: rgba(255, 178, 61, .22); }
.inline-copy.copied { color: #5bdc6b; }

/* арены */
.arenas { list-style: none; margin: 0; padding: 0; }
.arena { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'name n' 'cmd n' 'bar bar'; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rope); }
.arena-name { grid-area: name; font-weight: 700; }
.arena-cmd { grid-area: cmd; font: 13px var(--mono); color: var(--ash); }
.arena-n { grid-area: n; align-self: center; font: 700 22px var(--mono); color: var(--ash); opacity: .5; }
.arena.busy .arena-n { color: var(--flare); opacity: 1; }
.arena-bar { grid-area: bar; height: 3px; margin-top: 10px; background: var(--hull-2); border-radius: 2px; overflow: hidden; }
.arena-bar i { display: block; height: 100%; background: var(--grad); }
/* CSP запрещает inline-стили, поэтому ширина полосы — классом с шагом 10% */
.arena-bar .w0 { width: 0%; }
.arena-bar .w1 { width: 10%; }
.arena-bar .w2 { width: 20%; }
.arena-bar .w3 { width: 30%; }
.arena-bar .w4 { width: 40%; }
.arena-bar .w5 { width: 50%; }
.arena-bar .w6 { width: 60%; }
.arena-bar .w7 { width: 70%; }
.arena-bar .w8 { width: 80%; }
.arena-bar .w9 { width: 90%; }
.arena-bar .w10 { width: 100%; }
.kits { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kits li { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 8px; background: var(--hull); box-shadow: inset 0 0 0 1px var(--rope); }
.kits b { font-size: 15px; }
.kits span { font: 12px var(--mono); color: var(--ash); }

/* таблица лидеров */
.score { width: 100%; border-collapse: collapse; font-size: 15px; }
.score th { text-align: left; font: 600 12px var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--ash); padding: 0 10px 10px; border-bottom: 1px solid var(--rope); }
.score td { padding: 11px 10px; border-bottom: 1px solid rgba(58, 42, 30, .55); }
.score tbody tr:hover { background: var(--hull); }
.score .pos { width: 44px; font: 700 14px var(--mono); color: var(--ash); }
.score tr:nth-child(-n+3) .pos { color: var(--flare); }
.score .num { text-align: right; }
.score th:nth-child(n+3) { text-align: right; }
.score .hot { color: var(--sand); font-weight: 700; }

/* ники и роли */
.nick { color: var(--sand); font-weight: 700; text-decoration: none; }
.nick:hover { color: var(--flare); }
.nick.staff { color: var(--flare); }
.role { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 4px; background: rgba(255, 90, 60, .14); color: #ff8b6f; font: 700 10px/1.7 var(--body); text-transform: uppercase; letter-spacing: .08em; vertical-align: 2px; }

/* форум */
.sections, .topics { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rope); }
.section, .topic { display: grid; align-items: center; gap: 20px; padding: 16px 4px; border-bottom: 1px solid var(--rope); }
.section { grid-template-columns: minmax(0, 1fr) 70px 80px minmax(0, 260px); }
.topic { grid-template-columns: minmax(0, 1fr) 80px minmax(0, 170px); }
.section:hover, .topic:hover { background: linear-gradient(90deg, var(--hull), transparent); }
.section-title, .topic-title { display: block; color: var(--sand); font-weight: 700; font-size: 17px; text-decoration: none; }
.section-title:hover, .topic-title:hover { color: var(--flare); }
.topic.pinned .topic-title { color: var(--flare); }
.meta { display: block; font-size: 14px; color: var(--ash); }
.meta a { color: var(--ash); }
.meta .nick { color: var(--sand); }
.section-n, .topic-n { text-align: right; font-size: 18px; font-weight: 700; line-height: 1.1; }
.section-n small, .topic-n small { display: block; font: 500 12px var(--body); color: var(--ash); }
.section-last, .topic-last { font-size: 13px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; }
.section-last a:first-child { color: var(--sand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; vertical-align: bottom; }
.tag { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 4px; background: var(--grad); color: #1a0f05; font: 800 11px/1.6 var(--body); text-transform: uppercase; letter-spacing: .06em; vertical-align: 3px; }
.tag-dim { background: var(--rope); color: var(--sand); }
.topic-h .tag { vertical-align: 6px; }
.mod { display: flex; gap: 8px; margin: 0 0 22px; }
.mod form { margin: 0; }

.posts { display: grid; gap: 14px; margin: 18px 0 28px; }
.post { background: var(--hull); border-radius: var(--r); padding: 18px 22px 8px; box-shadow: inset 0 0 0 1px var(--rope); }
.post:target { box-shadow: inset 0 0 0 1px var(--ember); }
.post-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--rope); }
.post-head .meta { margin-left: auto; text-decoration: none; }
.post-head form { margin: 0; }
.post-body { overflow-wrap: anywhere; }
.post-body p { margin: 12px 0; }

.pager { display: flex; gap: 6px; margin: 20px 0; font: 600 14px var(--mono); }
.pager a, .pager span { min-width: 36px; padding: 6px 10px; text-align: center; border-radius: 6px; text-decoration: none; }
.pager a { color: var(--sand); box-shadow: inset 0 0 0 1px var(--rope); }
.pager a:hover { box-shadow: inset 0 0 0 1px var(--ember); }
.pager [aria-current] { background: var(--grad); color: #1a0f05; }

/* формы */
.compose { display: grid; gap: 8px; max-width: 820px; }
.label { font-weight: 700; font-size: 14px; margin-top: 10px; }
input, textarea { width: 100%; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--rope); background: var(--hull); color: var(--sand); font: 500 16px/1.55 var(--body); }
textarea { resize: vertical; min-height: 130px; }
input:focus, textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255, 138, 30, .18); }
.compose .btn { justify-self: start; margin-top: 12px; }
.err { margin: 4px 0; padding: 11px 14px; border-radius: 8px; background: rgba(255, 90, 60, .12); color: #ffb3a3; border-left: 3px solid var(--hit); font-weight: 600; }
.auth { max-width: 460px; margin-inline: auto; }

/* правила и профиль */
.rules { margin: 0; display: grid; gap: 2px; border-radius: var(--r); overflow: hidden; }
.rules div { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 18px 22px; background: var(--hull); }
.rules dt { font-weight: 800; color: var(--flare); }
.rules dd { margin: 0; }
.profile-name { display: flex; align-items: center; }
.profile-name .nick { font-weight: 700; }
.profile-name .role { font-size: 12px; }
.dot-on { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #5bdc6b; vertical-align: 1px; }
.stats { margin: 0 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border-radius: var(--r); overflow: hidden; }
.stats div { padding: 16px 20px; background: var(--hull); }
.stats dt { font-size: 13px; color: var(--ash); }
.stats dd { margin: 2px 0 0; font-size: 26px; font-weight: 700; }

/* подвал */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 0 40px; border-top: 1px solid var(--rope); color: var(--ash); font-size: 14px; }
.addr-mini { border: 0; background: none; padding: 0; font: 600 14px var(--mono); color: var(--flare); }
.addr-mini.copied { color: #5bdc6b; }

/* ---------- мобильные ---------- */
@media (max-width: 900px) {
    .grid2 { grid-template-columns: 1fr; gap: 0; }
    .steps ol { grid-template-columns: 1fr; }
    .section { grid-template-columns: minmax(0, 1fr) 60px; }
    .section .section-n:nth-of-type(2), .section-last { display: none; }
    .topic { grid-template-columns: minmax(0, 1fr) 60px; }
    .topic-last { display: none; }
}
@media (max-width: 720px) {
    .bar { flex-wrap: wrap; gap: 10px 16px; }
    .nav { order: 3; width: 100%; margin: 0 -10px; overflow-x: auto; }
    .nav a { padding: 8px 10px; font-size: 14px; }
    .who { margin-left: auto; }
    .hero { min-height: 0; padding: 150px 0 48px; }
    .hero-lede { font-size: 16px; }
    .rules div { grid-template-columns: 1fr; gap: 4px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .score .opt { display: none; }
    .score td, .score th { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.dl-note { color: var(--sand); font-size: 14px; margin-left: 12px; opacity: .8; }
