:root {
  --bg: #111214;
  --bg-2: #1e1f22;
  --panel: #2b2d31;
  --panel-2: #313338;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f3f5;
  --muted: #b5bac1;
  --faint: #80848e;
  --blurple: #5865f2;
  --blurple-2: #4752c4;
  --gold: #f0b24a;
  --gold-2: #ffd36a;
  --green: #23a559;
  --red: #da373c;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: Inter, system-ui, sans-serif;
  --display: Manrope, Inter, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, .cmd {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(88, 101, 242, 0.22), transparent 60%),
    radial-gradient(700px 380px at 90% 0%, rgba(240, 178, 74, 0.12), transparent 55%),
    linear-gradient(#111214, #0b0c0e);
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(17, 18, 20, 0.78);
  border-bottom: 1px solid var(--line);
}
.header-inner, .nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-inner { justify-content: space-between; min-height: 68px; position: relative; }
.brand img { border-radius: 10px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
  text-decoration: none;
}
.nav { gap: 4px; }
.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); background: rgba(255,255,255,.05); text-decoration: none; }
.nav-cta {
  background: var(--blurple);
  color: #fff !important;
  margin-left: 6px;
}
.nav-cta:hover { background: var(--blurple-2); }
.lang {
  display: flex;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}
.lang a.is-active { background: var(--panel); color: var(--text); }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--panel);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 10px;
  background: #fff;
}

.hero { padding: 72px 0 40px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.hero h1, .page-head h1, .legal h1 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 12px 0 16px;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  max-width: 16ch;
}
.lead, .page-head p { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.note {
  max-width: 62ch;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(240, 178, 74, 0.08);
  color: var(--muted);
  border-radius: 0 12px 12px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blurple); color: #fff; }
.btn-primary:hover { background: var(--blurple-2); }
.btn-gold { background: var(--gold); color: #2a1b08; }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }

.section { padding: 28px 0 64px; }
.section h2, .page-head h1 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.grid-3, .grid-4, .how-grid, .cmd-grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.how-grid { grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-family: var(--display); }
.card p { margin: 0; color: var(--muted); }
.step-num {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(88, 101, 242, 0.18);
  color: #cdd2ff;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-head { padding: 48px 0 12px; }
.page-head h1 { max-width: none; font-size: clamp(1.8rem, 4vw, 2.6rem); }

.cmd-group { margin: 18px 0 28px; }
.cmd-group h2 { font-size: 1.2rem; margin-bottom: 12px; }
.cmd-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cmd-row:nth-child(odd) { background: rgba(255,255,255,.02); }
.cmd {
  display: inline-block;
  background: #1a1b1e;
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 8px;
  color: #dee0fc;
}
.cmd.ru { color: var(--gold-2); }
.cmd-desc { color: var(--muted); }

.acc-item { border-bottom: 1px solid var(--line); }
.acc-item button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  font: 700 1.05rem var(--display);
  padding: 18px 0;
  cursor: pointer;
}
.acc-item div { display: none; color: var(--muted); padding: 0 0 16px; }
.acc-item.is-open div { display: block; }

.form, .thread { max-width: 760px; }
label { display: block; font-weight: 650; margin: 16px 0 6px; }
.req { color: var(--red); }
input, select, textarea {
  width: 100%;
  background: #1a1b1e;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}
textarea { min-height: 160px; resize: vertical; }
.hint { color: var(--faint); font-size: 0.88rem; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; }
.flash {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 16px 0;
}
.flash-ok { background: rgba(35, 165, 89, 0.16); color: #8be3af; }
.flash-err { background: rgba(218, 55, 60, 0.16); color: #ffb4b6; }
.status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(88,101,242,.18);
  color: #c9ceff;
}
.status-closed { background: rgba(128,132,142,.2); color: var(--muted); }
.status-in_progress { background: rgba(240,178,74,.16); color: var(--gold-2); }
.status-waiting { background: rgba(35,165,89,.16); color: #8be3af; }

.msg {
  background: var(--panel);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0;
}
.msg.staff { border-left: 3px solid var(--blurple); }
.msg.user { border-left: 3px solid var(--gold); }
.msg small { color: var(--faint); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.table a { color: var(--text); font-weight: 700; }

.legal { padding-bottom: 72px; }
.legal h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--blurple);
}
.legal h3 { font-size: 1.02rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--panel); color: var(--text); width: 34%; }
.meta-box, .toc {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 18px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 42px 0 24px;
  background: #0d0e10;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}
.footer-grid a, .footer-grid span { display: block; color: var(--muted); margin: 6px 0; text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-copy { color: var(--faint); margin-top: 28px; font-size: 0.9rem; }

.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 22px; }
.admin-nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.admin-nav a.is-active, .admin-nav a:hover { background: var(--panel); color: #fff; }

.cmd-search {
  position: relative;
  max-width: 560px;
  margin-top: 22px;
}
.cmd-search input {
  width: 100%;
  background: #1a1b1e;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
}
.cmd-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 320px;
  overflow: auto;
  z-index: 12;
  box-shadow: var(--shadow);
}
.cmd-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
}
.cmd-suggest button:hover,
.cmd-suggest button.is-active { background: var(--panel); }
.cmd-suggest small { display: block; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .grid-3, .how-grid, .footer-grid, .cmd-row { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    inset: 68px 16px auto;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .nav.is-open { display: flex; }
  .lang { margin: 8px 0 0; width: fit-content; }
}
