/* ==========================================================================
   San Andreas: Gang Wars — редизайн в духе open.mp
   Чистая тёмная ахроматическая база (graphite-on-black), спокойная типографика,
   никаких неоновых свечений и декоративных полос. Фирменные цвета проекта
   работают только как точечные сигналы: HIGHLIGHT-янтарь — ключевые числа и IP,
   ADMIN-красный — война/действия, DARK_GREEN — онлайн/успех, DISCORD-индиго —
   ссылки и вторичные акценты. Карточки — тонкий кант + мягкая тень, радиус 10px.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* База open.mp: почти чёрный фон, графитовые панели, светлый текст */
  --bg: #0d0f12;
  --bg-alt: #0b0d0f;
  --panel: #14171c;
  --panel-2: #1a1e24;
  --panel-3: #22262e;
  --glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f2f4f6;
  --text-muted: #a9b1bc;
  --text-dim: #6b7482;

  /* Сигнальные цвета = игровая палитра проекта */
  --admin: #c0392b;         /* действия, «война», ошибки */
  --discord: #5865f2;       /* ссылки, информация, secondary */
  --highlight: #fac51c;     /* только ключевые слова: IP, деньги, K/D */
  --dg: #34c924;            /* онлайн, успех, скопировано */
  --on-accent: #ffffff;
  --scrim: rgba(13, 15, 18, 0.82);

  /* Совместимость старых имён переменных */
  --blood: var(--admin);
  --ember: var(--highlight);
  --gold: var(--highlight);
  --live: var(--dg);
  --orange: var(--discord);
  --red: var(--admin);
  --yellow: var(--highlight);
  --green: var(--dg);
  --purple: var(--discord);
  --blue: var(--discord);

  /* Редкость предметов */
  --rarity-common: #9aa0a6;
  --rarity-rare: #4fa3e3;
  --rarity-epic: #c86bff;
  --rarity-legendary: var(--highlight);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);

  /* Типографика: Inter — основной текст, Oswald — только цифры и вывески */
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  /* Едва заметная «пыль» — лёгкий шум поверх фона, без свечений */
  background-image: radial-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 3px 3px;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow { max-width: 780px; }
.wrap-narrow-center { max-width: 780px; margin-left: auto; margin-right: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 12px;
}

p { margin: 0 0 12px; color: var(--text-muted); }

.icon-png {
  display: inline-block;
  flex: none;
  background-color: currentColor;
  -webkit-mask-image: var(--icon-src);
  mask-image: var(--icon-src);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.icon { width: 20px; height: 20px; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 13px; height: 13px; }
.icon-lg { width: 34px; height: 34px; }
.icon-flip { transform: scaleX(-1); }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 10px;
}
.section-kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--highlight);
}

/* ---------- Buttons: чистые плоские кнопки, без свечения ---------- */
.btn-solid, .btn-solid-sm, .btn-ghost, .btn-ghost-sm, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.btn-solid, .btn-solid-sm {
  background: var(--admin);
  color: var(--on-accent);
}
.btn-solid:hover, .btn-solid-sm:hover { background: #d0453a; }
.btn-secondary {
  background: var(--panel-2);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover { background: var(--panel-3); border-color: var(--discord); color: #8b96ff; }
.btn-solid:active, .btn-solid-sm:active, .btn-secondary:active { transform: translateY(1px); }
.btn-solid:disabled, .btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-ghost, .btn-ghost-sm {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-muted);
}
.btn-ghost:hover, .btn-ghost-sm:hover { border-color: var(--text-muted); color: var(--text); }
.btn-solid, .btn-ghost, .btn-secondary { padding: 13px 26px; font-size: 15px; }
.btn-solid-sm, .btn-ghost-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

:focus-visible { outline: 2px solid var(--discord); outline-offset: 2px; }

/* ---------- Header: чистая панель, аккуратно прячется при скролле вниз ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--scrim);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.28s ease;
}
.site-header.header-hidden { transform: translateY(-100%); }

.header-inner { display: flex; align-items: center; gap: 8px; height: 64px; }
.header-inner .site-nav { margin-left: 8px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-badge { width: 32px; height: 32px; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand-text em { font-style: normal; color: var(--admin); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.site-nav > a {
  position: relative;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-muted);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  transition: color 0.12s ease, background-color 0.12s ease;
}
.site-nav > a:hover { color: var(--text); background: var(--glass); }
.site-nav > a.active { color: var(--text); background: var(--glass); }
.site-nav > a.active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--highlight);
}
.nav-badge {
  display: inline-block;
  background: var(--admin);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  vertical-align: middle;
}

.nav-account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.balance-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--highlight);
}
.balance-pill .icon { color: var(--highlight); }
.account-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.account-pill:hover { border-color: var(--discord); }

/* ---------- Flash messages ---------- */
.flash-stack { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 14px;
  font-weight: 500;
}
.flash-success { border-color: var(--dg); }
.flash-danger { border-color: var(--admin); }
.flash-warning { border-color: var(--highlight); }
.flash-info { border-color: var(--discord); }
.flash-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; line-height: 1; }

/* ---------- Hero: чистая центрированная вывеска в духе open.mp ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  /* Одна мягкая «заря» сверху по центру — единственный декоративный приём */
  background:
    radial-gradient(ellipse 55% 60% at 50% -10%, rgba(88, 101, 242, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 45% at 50% 0%, rgba(250, 197, 28, 0.05), transparent 65%);
  pointer-events: none;
}
.hero-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.0;
  margin-bottom: 20px;
}
.hero-title span {
  display: inline-block;
  color: #fff;
  background: var(--admin);
  padding: 0.02em 0.16em 0.06em;
  border-radius: var(--radius-sm);
}
.hero-sub {
  max-width: 520px;
  margin: 0 auto 12px;
  color: var(--text-muted);
  font-size: 16.5px;
}
.hero-ip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 30px auto 0;
  padding: 16px 34px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hero-ip:hover,
.hero-ip:focus-visible {
  border-color: var(--highlight);
  box-shadow: var(--shadow-sm);
}
.hero-ip code {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--highlight);
}
.hero-ip-hint {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 500;
}
.hero-ip.copied { border-color: var(--dg); }
.hero-ip.copied .hero-ip-hint-text { color: var(--dg); }
.hero-join {
  margin-top: 16px;
  padding: 13px 42px;
  font-size: 15.5px;
}
.hero-dl-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.12s ease;
}
.hero-dl-link:hover { color: var(--discord); }
.hero-dl-link .icon { color: currentColor; }

/* ---------- Игровые режимы ---------- */
.modes { padding: 72px 0 8px; }
.modes h2 { font-size: 28px; margin: 0; }
.mode-hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.mode-hero-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.mode-hero-card::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  border-radius: 2px;
}
.mode-hero-card--freeroam::before { background: var(--discord); }
.mode-hero-card--dm::before       { background: var(--admin); }
.mode-hero-card--gw::before       { background: var(--highlight); }
.mode-hero-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.mode-hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mode-hero-icon {
  width: 38px; height: 38px;
  padding: 9px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.mode-hero-card--freeroam .mode-hero-icon { color: var(--discord); }
.mode-hero-card--dm .mode-hero-icon       { color: var(--admin); }
.mode-hero-card--gw .mode-hero-icon       { color: var(--highlight); }
.mode-hero-card h3 { font-size: 18px; margin: 0; }
.mode-hero-card > p { font-size: 14.5px; line-height: 1.6; margin-bottom: 16px; }
.mode-hero-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mode-hero-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.mode-hero-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 2px;
  border-radius: 2px;
}
.mode-hero-card--freeroam .mode-hero-list li::before { background: var(--discord); }
.mode-hero-card--dm .mode-hero-list li::before       { background: var(--admin); }
.mode-hero-card--gw .mode-hero-list li::before       { background: var(--highlight); }
@media (max-width: 980px) {
  .mode-hero-grid { grid-template-columns: 1fr; max-width: 560px; }
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-online { background: var(--dg); box-shadow: 0 0 8px rgba(52, 201, 36, 0.6); }

/* Иконка-плашка (детальное фото новости) */
.feature-icon {
  width: 42px; height: 42px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(192, 57, 43, 0.12);
  border: 1px solid rgba(192, 57, 43, 0.4);
  color: var(--admin);
}

/* ---------- News ---------- */
.latest-news { padding: 64px 0 88px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.section-head-row h2 { font-size: 28px; margin: 0; }
.news-title { color: var(--text); font-size: 28px; margin: 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-grid-full { margin-top: 8px; }
.news-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: block;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.news-card:hover { border-color: var(--border-strong); background: var(--panel-2); transform: translateY(-2px); }
.news-card-icon { width: 26px; height: 26px; color: var(--discord); margin-bottom: 14px; }
.news-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.news-card p { font-size: 14px; margin-bottom: 14px; }
.news-date { font-size: 12px; color: var(--text-dim); }

.page-header { padding: 56px 0 32px; }
.page-header h1 { font-size: clamp(30px, 4vw, 44px); max-width: 18ch; }
.page-header-sub { max-width: 560px; }
.page-header .btn-solid-sm { margin-top: 10px; }

.news-list-section { padding: 48px 0 80px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 40px; }
.page-indicator { font-size: 14px; color: var(--text-dim); }

.post-detail-section { padding: 56px 0 90px; }
.post-detail-icon { width: 46px; height: 46px; color: var(--discord); margin-bottom: 18px; }
.post-detail-section h1 { font-size: 32px; }
.post-detail-meta { font-size: 13px; color: var(--text-dim); margin-bottom: 28px; }
.post-body { white-space: normal; font-size: 16px; color: var(--text); line-height: 1.75; }
.post-body h2, .post-body h3 { margin: 26px 0 10px; }
.post-body h2 { font-size: 23px; }
.post-body h3 { font-size: 18px; }
.post-body p { margin: 0 0 14px; color: inherit; }
.post-body ul, .post-body ol { margin: 0 0 14px; padding-left: 22px; color: var(--text-muted); }
.post-body li { margin-bottom: 6px; }
.post-body a { color: var(--discord); font-weight: 600; text-decoration: underline; }
.post-body code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: 14px;
  color: var(--highlight);
}
.post-body pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
}
.post-body pre code { background: none; border: none; padding: 0; color: var(--text); }
.post-body blockquote {
  margin: 0 0 14px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--highlight);
  color: var(--text-muted);
}
.back-link { margin-bottom: 20px; }

.empty-state { text-align: center; padding: 40px 0; color: var(--text-dim); }

/* ---------- Auth forms ---------- */
.auth-section { padding: 64px 0 100px; }
.auth-wrap { display: flex; justify-content: center; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.auth-card-wide { max-width: 620px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-sub { margin-bottom: 26px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 6px; color: var(--text-muted); }
.label-hint { font-weight: 400; color: var(--text-dim); }
.auth-card input, .auth-card textarea, .auth-card select {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
.auth-card input:focus, .auth-card textarea:focus, .auth-card select:focus {
  outline: none;
  border-color: var(--discord);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.22);
}
.auth-card textarea { resize: vertical; }
.auth-submit { width: 100%; justify-content: center; margin-top: 24px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; }
.auth-switch a { color: var(--discord); font-weight: 700; }

/* ---------- Profile ---------- */
.profile-section { padding: 56px 0 90px; }
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.profile-avatar {
  width: 68px; height: 68px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--discord);
  flex: none;
}
.profile-avatar.avatar-sm { width: 36px; height: 36px; }
.profile-header h1 { font-size: 28px; margin-bottom: 4px; }
.profile-meta { font-size: 14px; margin: 0; }
.profile-edit-btn { margin-left: auto; }
.badge-admin {
  display: inline-block;
  background: var(--admin);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}
.badge-sm { margin-left: 6px; }

.profile-balance-strip {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 26px;
  margin-bottom: 26px;
}
.profile-balance-strip .balance-amount {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--highlight);
}
.profile-balance-strip .balance-amount .icon { width: 26px; height: 26px; }
.profile-balance-strip p { margin: 0; font-size: 13.5px; }

/* ---------- Profile: статистика по игровым режимам ---------- */
.mode-stats { display: grid; grid-template-columns: 1fr; gap: 22px; }

.mode-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px 30px;
}

.mode-block--freeroam { border-top: 2px solid var(--discord); }
.mode-block--dm     { border-top: 2px solid var(--admin); }
.mode-block--gw     { border-top: 2px solid var(--highlight); }

.mode-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.mode-icon { width: 34px; height: 34px; flex: none; }
.mode-block--freeroam .mode-icon { color: var(--discord); }
.mode-block--dm .mode-icon       { color: var(--admin); }
.mode-block--gw .mode-icon       { color: var(--highlight); }
.mode-head h2 { font-family: var(--font-display); font-size: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; margin: 0; }

.mode-subhead {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 26px 0 12px;
}

.mode-figures { display: flex; gap: 14px; margin-bottom: 22px; }
.mode-figure {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
}
.mode-figure-num {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.mode-figure-cap { display: block; margin-top: 4px; font-size: 12px; color: var(--text-dim); }
.num-hl { color: var(--highlight); }

.mode-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.mode-dl-item {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}
.mode-dl dt { font-size: 13px; color: var(--text-muted); }
.mode-dl dd { margin: 0; font-weight: 700; font-size: 14px; text-align: right; word-break: break-word; font-variant-numeric: tabular-nums; }

/* GangWar: убийства по бандам — компактный список «банд — число» */
.gang-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; }
.gang-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}
.gang-name { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gang-kills { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.gang-kills.zero { color: var(--text-dim); font-weight: 500; }

.profile-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.profile-section-head h2 { font-size: 22px; margin-bottom: 0; }

/* ---------- Stats bar (homepage) ---------- */
.stats-bar { padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-item .stat-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-item .stat-label { font-size: 13px; color: var(--text-dim); }

/* ---------- Forum ---------- */
.forum-section { padding: 40px 0 90px; }
.forum-cat-list, .topic-list { display: flex; flex-direction: column; gap: 12px; }
.forum-cat-row, .topic-row {
  display: flex; align-items: center; gap: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.forum-cat-row:hover, .topic-row:hover { border-color: var(--border-strong); }
.forum-cat-icon { width: 26px; height: 26px; color: var(--discord); flex: none; }
.forum-cat-info { flex: 1; }
.forum-cat-info h3 { font-size: 17px; margin-bottom: 4px; }
.forum-cat-info p { font-size: 14px; margin: 0; }
.forum-cat-stats { display: flex; gap: 18px; font-size: 13px; color: var(--text-dim); flex: none; }
.forum-cat-stats strong { color: var(--text); }

.topic-row-main { flex: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.topic-row-main h3 { font-size: 16px; margin: 0; }
.topic-row-main p { font-size: 13px; margin: 0; width: 100%; }
.topic-pin, .topic-lock { width: 15px; height: 15px; color: var(--highlight); flex: none; }
.topic-row-stats { font-size: 13px; color: var(--text-dim); flex: none; }
.topic-row-stats strong { color: var(--text); }

.forum-post { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 14px; }
.forum-post-author { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.forum-post-date { margin-left: auto; font-size: 12px; color: var(--text-dim); }
.forum-post-body { white-space: pre-wrap; color: var(--text); }

.reply-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-top: 24px; }
.reply-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.reply-form textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
  margin-bottom: 14px;
}
.reply-form textarea:focus { outline: none; border-color: var(--discord); }

/* ---------- Cases ---------- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case-card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.case-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.case-card::before {
  content: "";
  position: absolute; inset: -40% -40% auto auto;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--case-glow, var(--admin));
  opacity: 0.12;
  filter: blur(14px);
}
.case-card-icon {
  position: relative; z-index: 1;
  width: 56px; height: 56px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--case-glow, var(--admin));
  color: var(--on-accent);
  margin-bottom: 18px;
}
.case-card h3 { position: relative; z-index: 1; font-size: 19px; margin-bottom: 6px; }
.case-card p { position: relative; z-index: 1; font-size: 13.5px; }
.case-card-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.case-price { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--highlight); }
.case-price .icon { width: 18px; height: 18px; }

.theme-street { --case-glow: var(--dg); }
.theme-weapon { --case-glow: var(--admin); }
.theme-premium { --case-glow: var(--highlight); }

.case-detail-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; }
.case-detail-icon {
  width: 64px; height: 64px;
  padding: 15px;
  border-radius: var(--radius);
  background: var(--case-glow, var(--admin));
  color: var(--on-accent);
  flex: none;
}
.case-open-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin: 28px 0 40px;
  text-align: center;
}
.case-balance-note { font-size: 13.5px; margin-bottom: 20px; }
.case-balance-note strong { color: var(--highlight); }

.roulette-viewport {
  position: relative;
  height: 150px;
  margin: 0 auto 24px;
  max-width: 640px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: none;
}
.roulette-viewport.active { display: block; }
.roulette-marker {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: var(--highlight);
  box-shadow: 0 0 12px rgba(250, 197, 28, 0.5);
  z-index: 3;
  transform: translateX(-50%);
}
.roulette-marker::before, .roulette-marker::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  border: 7px solid transparent;
}
.roulette-marker::before { top: -1px; border-top-color: var(--highlight); }
.roulette-marker::after { bottom: -1px; border-bottom-color: var(--highlight); }
.roulette-track {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  will-change: transform;
}
.roulette-item {
  flex: none;
  width: 108px; height: 126px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--item-color, var(--rarity-common));
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 60%), var(--panel-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 8px;
  text-align: center;
}
.roulette-item .icon { width: 30px; height: 30px; color: var(--item-color, var(--rarity-common)); }
.roulette-item span { font-size: 11px; font-weight: 700; line-height: 1.2; }

.case-result {
  display: none;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--item-color, var(--rarity-common));
  background: var(--panel-2);
}
.case-result.active { display: flex; animation: resultPop 0.4s ease; }
.case-result .icon { width: 40px; height: 40px; color: var(--item-color, var(--rarity-common)); }
.case-result-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.case-result-rarity { font-size: 13px; font-weight: 700; color: var(--item-color, var(--rarity-common)); }
@keyframes resultPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.case-error { color: var(--admin); font-size: 14px; font-weight: 600; margin-top: 12px; display: none; }
.case-error.active { display: block; }

.case-items-heading { font-size: 20px; margin-bottom: 16px; }
.item-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.item-card {
  background: var(--panel);
  border: 1.5px solid var(--item-color, var(--rarity-common));
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}
.item-card .icon { width: 30px; height: 30px; color: var(--item-color, var(--rarity-common)); margin: 0 auto 10px; }
.item-card-name { font-size: 13px; font-weight: 700; margin-bottom: 6px; min-height: 34px; }
.item-card-rarity { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: var(--item-color, var(--rarity-common)); }
.item-card-value { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.rarity-common { --item-color: var(--rarity-common); }
.rarity-rare { --item-color: var(--rarity-rare); }
.rarity-epic { --item-color: var(--rarity-epic); }
.rarity-legendary { --item-color: var(--rarity-legendary); }

/* ---------- Inventory ---------- */
.inventory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.inventory-card {
  background: var(--panel);
  border: 1.5px solid var(--item-color, var(--rarity-common));
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
}
.inventory-card .icon { width: 32px; height: 32px; color: var(--item-color, var(--rarity-common)); margin: 0 auto 10px; }
.inventory-card-name { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.inventory-card-rarity { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--item-color, var(--rarity-common)); margin-bottom: 10px; }
.inventory-card-date { font-size: 11px; color: var(--text-dim); margin-bottom: 12px; }
.sell-form { margin: 0; }
.sell-btn {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}
.sell-btn:hover { border-color: var(--admin); color: var(--admin); }

/* ---------- Error pages ---------- */
.error-section { padding: 120px 0; text-align: center; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(96px, 16vw, 170px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--admin);
  margin: 0;
  line-height: 0.9;
  letter-spacing: 0.02em;
}
.error-section h1 { font-size: 30px; }
.error-section p { max-width: 420px; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
.site-footer { padding-top: 56px; border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 36px; }
.brand-footer { margin-bottom: 12px; }
.footer-tag { font-size: 13px; max-width: 280px; }
.footer-col h4 { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.footer-col a:hover { color: var(--discord); }
.footer-ip { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--highlight); margin-bottom: 10px; }
.footer-legal { border-top: 1px solid var(--border); padding: 20px 0; }
.footer-legal p { font-size: 12px; color: var(--text-dim); margin: 0 0 12px; }
.footer-legal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal-links a { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.footer-legal-links a:hover { color: var(--discord); }

/* ---------- Ссылки ---------- */
.inline-link { display: inline-flex; align-items: center; gap: 6px; color: var(--discord); font-weight: 700; font-size: 14px; }
.inline-link:hover { color: #7a86ff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .mode-hero-grid, .news-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .mode-stats { grid-template-columns: 1fr; gap: 22px; }
  .item-grid { grid-template-columns: repeat(3, 1fr); }
  .inventory-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .header-inner .site-nav { display: none; }
  .header-inner .nav-account { display: none; }
  .site-nav {
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 6px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav.open .nav-account {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    margin-top: 8px;
  }
  .hero { padding: 64px 0 56px; }
  .hero-title { font-size: 40px; }
  .mode-hero-grid, .news-grid, .case-grid { grid-template-columns: 1fr; }
  .mode-dl, .gang-list { grid-template-columns: 1fr; }
  .mode-figures { flex-direction: column; }
  .item-grid, .inventory-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .profile-edit-btn { margin-left: 0; }
  .profile-balance-strip { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
