/* ==========================================================================
   Hurvest Skins — общий дизайн-слой
   Графит + сталь, один янтарный акцент, волосяные линии, сетка 4px.
   ========================================================================== */

:root {
  /* Поверхности: нейтральная рампа, шаги вместо теней */
  --bg: #0c0c0d;
  --surface: #131315;
  --surface-2: #17171a;
  --surface-3: #1d1d21;
  --line: #26262b;
  --line-strong: #33333a;

  /* Три роли текста */
  --text: #e9e9ec;
  --text-2: #a3a3ab;
  --text-3: #6e6e78;

  /* Единственный акцент */
  --accent: #f0b054;
  --accent-hover: #d99b3d;
  --accent-ink: #171104;

  /* Семантика — приглушённая */
  --ok: #6fbf8b;
  --warn: #d9a94f;
  --bad: #d9776f;

  /* Редкости CS2 — цвета как в инвентаре Steam.
     Каждая карточка светится своим цветом редкости, а не общим янтарным. */
  --rar-common: #b0c3d9;      /* Ширпотреб */
  --rar-uncommon: #5e98d9;    /* Промышленное */
  --rar-rare: #4b69ff;        /* Армейское */
  --rar-mythical: #8847ff;    /* Запрещённое */
  --rar-legendary: #d32ce6;   /* Засекреченное */
  --rar-ancient: #eb4b4b;     /* Тайное */
  --rar-contraband: #e4ae39;  /* Контрабанда */

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .6, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------- Каркас ---------------------------------- */

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 12, 13, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
}

.brand .mark {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
  color: var(--text-2);
}

.nav a { transition: color .15s var(--ease); }
.nav a:hover { color: var(--text); }

.nav .nav-cta {
  padding: 8px 16px;
  border-radius: var(--r-s);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  transition: background-color .15s var(--ease);
}

.nav .nav-cta:hover { background: var(--accent-hover); color: var(--accent-ink); }

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .topbar-in { gap: 16px; height: 56px; }
  .nav { gap: 16px; font-size: 13px; }
  .nav .nav-hide { display: none; }
}

/* -------------------------------- Кнопки --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
  white-space: nowrap;
}

.btn:hover { background: var(--surface-3); border-color: #3d3d45; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn-quiet:hover { background: var(--surface-2); color: var(--text); }

.btn:disabled { opacity: .5; cursor: default; }

/* -------------------------------- Текст ---------------------------------- */

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }

h1 { font-size: 40px; }
h2 { font-size: 22px; }
h3 { font-size: 16px; font-weight: 500; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0;
}

.lead { color: var(--text-2); font-size: 17px; line-height: 1.55; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }

.num { font-variant-numeric: tabular-nums; }

/* ------------------------------- Секции ---------------------------------- */

/* Вертикальные отступы задаются по отдельности: шорткат padding обнулял
   боковые отступы .wrap, и на узких экранах текст прилипал к краю окна. */
.section { padding-block: 64px; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head p { color: var(--text-2); font-size: 14px; }

/* -------------------------------- Герой ---------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  padding-block: 72px 80px;
}

.hero h1 { font-size: 44px; margin-bottom: 20px; }
.hero .lead { max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-3);
}

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 48px 56px; }
  .hero h1 { font-size: 32px; }
  .hero .lead { font-size: 16px; }
}

/* --------------------------- Полка предметов ----------------------------- */
/* Момент экрана: реальные предметы с ценой и полосой редкости.           */

.shelf {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
}

.shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.shelf-head .title { font-size: 14px; font-weight: 500; }
.shelf-head .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
  flex-shrink: 0;
}

.shelf-rows { padding: 8px; }

/* Карточка предмета: цвет задаётся редкостью через --rar из разметки.
   Градиент редкости идёт по всей строке, как плитка предмета в cs.money. */
.item-row {
  --rar: var(--rar-common);
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--r-m);
  border: 1px solid color-mix(in srgb, var(--rar) 30%, var(--line));
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--rar) 20%, transparent) 0,
      color-mix(in srgb, var(--rar) 7%, transparent) 42%,
      transparent 72%),
    var(--surface-2);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.item-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rar);
  opacity: .05;
  pointer-events: none;
  transition: opacity .18s var(--ease);
}

.item-row::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--rar), color-mix(in srgb, var(--rar) 45%, transparent));
}

.item-row > * { position: relative; z-index: 1; }

.item-row + .item-row { margin-top: 4px; }

.item-row:hover {
  border-color: color-mix(in srgb, var(--rar) 62%, var(--line-strong));
  box-shadow: 0 12px 30px -18px color-mix(in srgb, var(--rar) 60%, transparent);
}

.item-row:hover::before { opacity: .09; }

/* Миниатюра без своей плашки: предмет лежит прямо на свечении редкости. */
.item-row .thumb-box {
  position: relative;
  width: 64px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.item-row .thumb-box::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 104%;
  height: 92%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--rar);
  opacity: .34;
  filter: blur(13px);
  pointer-events: none;
}

.item-row .thumb {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45));
}

.item-row .name {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-row .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Плашка редкости — свой цвет у каждой, текст набирается моно.
   Подложка тёмная, иначе светлый цвет редкости сливается с фоном карточки. */
.item-row .rar {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--rar);
  border: 1px solid color-mix(in srgb, var(--rar) 45%, transparent);
  border-radius: 4px;
  padding: 1px 6px;
  background: color-mix(in srgb, #0a0a0c 80%, var(--rar));
  white-space: nowrap;
}

.item-row .price {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.shelf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
}

.shelf-foot .rate { color: var(--text-2); }

/* ------------------------------- Карточки -------------------------------- */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 940px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 24px;
}

.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 14px; }
.card p + p { margin-top: 10px; }

.card-link { transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.card-link:hover { border-color: var(--line-strong); background: var(--surface-2); }

.list { list-style: none; margin-top: 16px; }
.list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 8px;
}
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--line-strong);
}

/* -------------------------------- Шаги ----------------------------------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.step {
  border-left: 1px solid var(--line);
  padding: 4px 0 4px 20px;
}

.step .idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}

.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 14px; }

/* -------------------------------- Таблицы -------------------------------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface-2);
}

tr:last-child td { border-bottom: 0; }
td { color: var(--text-2); }

/* ------------------------------- Топ-листы ------------------------------- */

.ranks { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 940px) { .ranks { grid-template-columns: minmax(0, 1fr); } }

.rank-row {
  display: grid;
  grid-template-columns: 28px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.rank-row:last-child { border-bottom: 0; }

.rank-row .pos {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}

.rank-row .ava {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line);
  object-fit: cover;
}

.rank-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .val { font-family: var(--mono); font-size: 13px; color: var(--text-2); }

.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.compact-row:last-child { border-bottom: 0; }
.compact-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.compact-row .val { font-family: var(--mono); font-size: 13px; color: var(--text); }

.empty-note { color: var(--text-3); font-size: 13px; padding: 16px 0; }

/* ------------------------------- Аккордеон ------------------------------- */

details {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px 18px;
  background: var(--surface);
}

details + details { margin-top: 8px; }

details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

details summary::-webkit-details-marker { display: none; }

details summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--text-3);
  font-size: 14px;
  width: 12px;
}

details[open] summary::before { content: "−"; }

details p { margin-top: 12px; color: var(--text-2); font-size: 14px; }

/* ------------------------------- Контент --------------------------------- */

.prose { max-width: 74ch; }
.prose h1 { font-size: 34px; margin-bottom: 20px; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; }
.prose h3 { margin: 28px 0 10px; }
.prose p { color: var(--text-2); margin-bottom: 14px; }
.prose .lead {
  color: var(--text);
  font-size: 17px;
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin-bottom: 28px;
}
.prose ul, .prose ol { margin: 0 0 18px 20px; color: var(--text-2); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 500; }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(240, 176, 84, .35); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--text);
}

.cta-block { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 8px; }

/* -------------------------------- Футер ---------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--text-3);
}

.foot .sep { color: var(--line-strong); }
.foot a { color: var(--text-2); transition: color .15s var(--ease); }
.foot a:hover { color: var(--text); }
.foot .end { margin-left: auto; display: flex; align-items: center; gap: 16px; }

@media (max-width: 620px) {
  .foot .end { margin-left: 0; }
}

/* ----------------------------- Шапка страниц ----------------------------- */

.page-head { padding: 48px 0 32px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 32px; }
.page-head p { color: var(--text-2); margin-top: 12px; max-width: 68ch; }

/* ------------------------------- Формы ----------------------------------- */

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); }

.input {
  height: 40px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s var(--ease);
}

.input:focus { outline: none; border-color: var(--accent); }

/* ------------------------------- Скелетон -------------------------------- */

.skeleton {
  height: 12px;
  border-radius: 4px;
  background: var(--surface-3);
}

/* ------------------------------ Утилиты ---------------------------------- */

.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* --------------------- Заглушки: баны и техработы ------------------------ */
/* Одна раскладка на две страницы: карточка по центру, факты списком,
   действия внизу. Янтарный акцент — обычный режим, приглушённый красный —
   бан, чтобы состояние читалось без текста. */

.guard-page {
  display: flex;
  justify-content: center;
  padding: 56px 0 72px;
}

.guard-card {
  width: 100%;
  max-width: 560px;
  padding: 36px 36px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--r-l);
}

.guard-card--ban { border-top-color: var(--bad); }

.guard-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.guard-card--ban .guard-badge { color: var(--bad); }

.guard-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.guard-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.25;
  margin-bottom: 12px;
}

.guard-text {
  color: var(--text-2);
  font-size: 15px;
}

.guard-facts {
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
}

.guard-facts > div {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.guard-facts dt {
  flex: 0 0 128px;
  font-size: 13px;
  color: var(--text-3);
}

.guard-facts dd {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.guard-note {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-left: 2px solid var(--line-strong);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: 13px;
  color: var(--text-2);
}

.guard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.guard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r-s);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}

.guard-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.guard-btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-2);
}

.guard-btn--ghost:hover {
  background: var(--surface-2);
  border-color: #3d3d45;
  color: var(--text);
}

@media (max-width: 620px) {
  .guard-page { padding: 32px 0 48px; }
  .guard-card { padding: 26px 20px 24px; }
  .guard-title { font-size: 22px; }
  .guard-facts dt { flex-basis: 96px; }
  .guard-actions { flex-direction: column; }
  .guard-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}