/* ==========================================================
   SteamSNG — дизайн-система
   Светлая «стальная» основа + тёмный платёжный терминал.
   Unbounded — заголовки и цифры, Onest — текст.
   ========================================================== */

:root {
  color-scheme: dark;
  --bg: #0d1120;
  --section: #111628;
  --paper: #171c30;
  --text: #eef0f7;
  --muted: #9aa1b9;
  --faint: #6d7491;
  --line: rgba(255, 255, 255, .1);
  --line-soft: rgba(255, 255, 255, .06);
  --ink: #1b2137;
  --ink-2: #252c47;
  --ink-3: #323a5d;
  --ink-line: rgba(255, 255, 255, .08);
  --on-ink: #f3f4f8;
  --on-ink-muted: #a3a9be;
  --accent: #5f5dff;
  --accent-hover: #7473ff;
  --accent-text: #9a98ff;
  --accent-soft: rgba(95, 93, 255, .16);
  --ok: #5ad69b;
  --ok-soft: rgba(90, 214, 155, .12);
  --warn: #f2bf62;
  --warn-soft: rgba(242, 191, 98, .1);
  --err: #ff8a7f;
  --err-soft: rgba(255, 138, 127, .12);

  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --wrap: 1180px;
  --shadow-pop: 0 30px 70px -24px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main, body > .page { flex: 1 0 auto; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Типографика ---------- */
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; word-spacing: .04em; }
h2.section-title { font-size: clamp(1.45rem, 2.8vw, 2.1rem); margin-bottom: 12px; }
.section-lead { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 28px; border-radius: var(--r-md);
  font-weight: 600; font-size: 1rem; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex-shrink: 0; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:disabled { background: var(--ink-3); color: var(--faint); cursor: not-allowed; }
.btn--ghost { border: 1.5px solid var(--line); color: var(--text); background: var(--paper); }
.btn--ghost:hover { border-color: var(--muted); }

/* совместимость со старыми классами в шаблонах/JS */
.submit-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 56px; padding: 0 24px; border-radius: var(--r-md);
  background: var(--accent); color: #fff; font-weight: 600; font-size: 1rem;
  transition: background-color .15s;
}
.submit-btn:hover { background: var(--accent-hover); }
.submit-btn:disabled { background: var(--ink-3); color: var(--faint); cursor: not-allowed; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 48px; border-radius: var(--r-md);
  color: var(--muted); font-weight: 500;
}
.btn-secondary:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 32, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: -.03em; }
.logo__mark { width: 34px; height: 34px; flex-shrink: 0; }
.logo__bg { fill: var(--accent); }
.logo__bar { fill: #fff; opacity: .55; }
.logo b { font-weight: 600; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav .nav__support { margin-left: 8px; color: var(--text); border: 1.5px solid var(--line); background: var(--paper); display: inline-flex; gap: 8px; align-items: center; }
.nav .nav__support:hover { border-color: var(--muted); background: var(--paper); }

.cart-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; margin-left: 8px;
  border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); color: var(--on-ink); font-weight: 600; font-size: .92rem;
}
.cart-chip__count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); display: inline-grid; place-items: center; font-size: .78rem; }
.cart-chip:disabled { display: none; }

.mobile-menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.mobile-menu-btn span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav { display: flex; flex-direction: column; padding: 8px 24px 20px; border-bottom: 1px solid var(--line); }
.mobile-nav a { padding: 14px 0; font-weight: 500; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); }
.mobile-nav a:last-child { border-bottom: 0; color: var(--accent-text); }

/* ==========================================================
   HERO: копия + терминал
   ========================================================== */
.hero { padding: 40px 0 96px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; align-items: start; }
.hero__copy { padding-top: 48px; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 600; max-width: 12ch; word-spacing: .06em; }
.hero__lead { margin-top: 24px; font-size: 1.15rem; color: var(--muted); max-width: 40ch; }

.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin-top: 40px; border-top: 1px solid var(--line); }
.facts > div { padding: 18px 32px 0 0; margin-right: 32px; border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; margin-right: 0; }
.facts dt { font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.facts dd { font-family: var(--display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }

.hero__safe { display: flex; gap: 12px; align-items: flex-start; margin-top: 40px; max-width: 44ch; font-size: .95rem; color: var(--muted); }
.hero__safe svg { flex-shrink: 0; margin-top: 2px; color: var(--ok); }
.hero__safe strong { color: var(--text); font-weight: 600; }

/* ---------- Терминал ---------- */
.terminal {
  background: var(--ink); color: var(--on-ink);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.terminal__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; border-bottom: 1px solid var(--ink-line); }
.terminal__title { font-family: var(--body); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.terminal__sbp { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--on-ink-muted); }
.terminal__sbp img { height: 18px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.terminal form { padding: 24px 28px 28px; }

.t-field { margin-top: 24px; }
.t-field:first-child { margin-top: 0; }
.promo-toggle + .t-field { margin-top: 20px; }
.t-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .9rem; color: var(--on-ink-muted); margin-bottom: 10px; }
.t-label a, .t-label button { color: var(--on-ink); font-size: .85rem; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.t-label a:hover, .t-label button:hover { text-decoration-color: currentColor; }

.t-input {
  width: 100%; height: 54px; padding: 0 18px;
  background: var(--ink-2); border: 1.5px solid transparent; border-radius: var(--r-md);
  color: var(--on-ink); font-size: 1.05rem; font-weight: 500;
  transition: border-color .15s, background-color .15s;
}
.t-input::placeholder { color: #6e7591; font-weight: 400; }
.t-input:hover { background: var(--ink-3); }
.t-input:focus { outline: none; border-color: var(--accent); background: var(--ink-2); }

.t-help { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--ink-2); font-size: .88rem; color: var(--on-ink-muted); line-height: 1.5; }
.t-help b { color: var(--on-ink); font-weight: 600; }

.field-error, .promo-hint { display: block; font-size: .85rem; margin-top: 8px; min-height: 0; }
.field-error { color: #ff8a7f; }
.field-error:empty, .promo-hint:empty { display: none; }
.promo-hint { color: #6be3a0; }
.promo-hint.is-invalid { color: #ff8a7f; }

/* Сумма — главный элемент страницы */
.amount-field {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 0 14px;
  border-bottom: 2px solid var(--ink-3);
  transition: border-color .15s;
}
.amount-field:focus-within { border-bottom-color: var(--accent); }
.amount-input {
  flex: 1; min-width: 0; width: 100%;
  background: none; border: 0; outline: none;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.5rem, 5.5vw, 3.5rem); line-height: 1.1; letter-spacing: -.03em;
  color: #fff; font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}
.amount-input::placeholder { color: #4a5272; }
.currency-label { font-family: var(--display); font-size: clamp(1.7rem, 3.6vw, 2.3rem); font-weight: 500; color: var(--on-ink-muted); }

.amount-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.amount-btn {
  height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--ink-2); color: var(--on-ink);
  font-size: .92rem; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: background-color .15s, color .15s;
}
.amount-btn:hover { background: var(--ink-3); }
.amount-btn.active { background: var(--on-ink); color: var(--ink); }
.min-amount-hint { display: block; margin-top: 12px; font-size: .85rem; color: #7c839d; }

.promo-toggle { margin-top: 20px; font-size: .9rem; color: var(--on-ink-muted); text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.promo-toggle:hover { color: var(--on-ink); }

.calc-display { margin-top: 24px; padding: 18px 20px; border-radius: var(--r-md); background: var(--ink-2); }
.calc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: .95rem; padding: 4px 0; }
.calc-label { color: var(--on-ink-muted); }
.calc-value { font-variant-numeric: tabular-nums; font-weight: 500; }
.calc-row.total-row { margin-top: 10px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.16); }
.calc-row.total-row .calc-label { color: var(--on-ink); font-weight: 500; }
.calc-value.total { font-family: var(--display); font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; }
.terminal .submit-btn { margin-top: 20px; height: 60px; font-size: 1.05rem; }
.terminal__note { margin-top: 14px; text-align: center; font-size: .82rem; color: #7c839d; }
.terminal__note a { color: var(--on-ink-muted); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================
   Секции
   ========================================================== */
.section { padding: 96px 0; }
.section--paper { background: var(--section); border-block: 1px solid var(--line-soft); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }

/* ---------- Каталог ---------- */
.games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.game { display: flex; flex-direction: column; gap: 14px; color: var(--text); }
.game__cover {
  position: relative; aspect-ratio: 460 / 215; border-radius: var(--r-md); overflow: hidden;
  background: var(--ink-2);
}
.game__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.game:hover .game__cover img { transform: scale(1.04); }
.game__badge {
  position: absolute; top: 10px; left: 10px;
  height: 26px; padding: 0 10px; border-radius: 8px;
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff; font-size: .8rem; font-weight: 600;
}
.game__badge--soon { background: #fff; color: #0d1120; }
.game__row { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.game__title { font-family: var(--body); font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.game__sub { display: block; margin-top: 2px; font-size: .86rem; color: var(--muted); }
.game__price { text-align: right; white-space: nowrap; }
.game__price strong { display: block; font-family: var(--display); font-weight: 600; font-size: 1.08rem; letter-spacing: -.03em; }
.game__price s { font-size: .82rem; color: var(--faint); }
.game:hover .game__title { color: var(--accent-text); }

/* обложки-заглушки, если картинка не загрузилась */
.game-cover--gta6 { background: linear-gradient(135deg, #ff6aa8, #6a3bff); }
.game-cover--rust { background: #5a2f1f; }
.game-cover--gta5 { background: #1f3b2c; }
.game-cover--rdr2 { background: #6b1d14; }
.game-cover--forza { background: #133a6a; }
.game-cover--cs2 { background: #2c3240; }
.game-cover--dayz { background: #2b3324; }
.game-cover--ets2 { background: #1d3557; }
.game-cover--sims { background: #1d6b4a; }

/* ---------- Плавающая корзина ---------- */
.cart-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 20px;
  padding: 10px 10px 10px 22px; border-radius: 18px;
  background: var(--ink); border: 1px solid var(--ink-line); color: var(--on-ink); box-shadow: var(--shadow-pop);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s;
  max-width: calc(100% - 32px);
  visibility: hidden;
}
.cart-bar.is-visible { transform: translate(-50%, 0); visibility: visible; }
.cart-bar__text { font-size: .95rem; color: var(--on-ink-muted); white-space: nowrap; }
.cart-bar__text strong { color: var(--on-ink); font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.cart-bar .btn { height: 46px; padding: 0 20px; border-radius: 12px; }

/* ---------- Как это работает ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 28px 32px 0 0; border-top: 2px solid var(--text); position: relative; }
.steps li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 40px;
  font-family: var(--display); font-weight: 600; font-size: 3rem; line-height: 1; letter-spacing: -.03em;
  color: var(--accent-text);
}
.steps h3 { font-family: var(--body); font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.steps p { color: var(--muted); max-width: 32ch; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 64px; align-items: start; }
.faq-aside p { color: var(--muted); margin-top: 12px; max-width: 32ch; }
.faq-aside .btn { margin-top: 28px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0; text-align: left; font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em;
}
.faq-question::after {
  content: ""; width: 14px; height: 14px; flex-shrink: 0;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
  transition: transform .2s;
}
.faq-question[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-question:hover { color: var(--accent-text); }
.faq-answer { padding: 0 48px 26px 0; color: var(--muted); max-width: 62ch; }

/* ---------- SEO-текст ---------- */
.seo { padding: 72px 0 88px; }
.seo__inner { max-width: 760px; }
.seo h2 { font-size: 1.35rem; margin-bottom: 16px; }
.seo p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; max-width: 70ch; }
.seo p strong { color: var(--text); font-weight: 600; }
.seo-games-list { list-style: none; margin: 24px 0; columns: 2; column-gap: 40px; }
.seo-games-list li { break-inside: avoid; font-size: .9rem; color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line); }
.seo-games-list a { color: var(--text); font-weight: 600; }
.seo-games-list a:hover { color: var(--accent-text); }

/* ---------- Подвал ---------- */
.footer { background: #090c18; border-top: 1px solid var(--line-soft); color: var(--on-ink-muted); padding: 64px 0 32px; font-size: .92rem; }
.footer-content { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.footer .logo { color: var(--on-ink); }
.footer-desc { margin-top: 14px; max-width: 30ch; }
.footer h4 { font-family: var(--body); color: var(--on-ink); font-size: .95rem; font-weight: 600; margin-bottom: 14px; }
.footer-col a:not(.logo) { display: block; padding: 4px 0; }
.footer-col a:not(.logo):hover { color: var(--on-ink); }
.footer-col p a:not(.logo) { display: inline; padding: 0; color: var(--on-ink); }
.footer-bottom { margin-top: 56px; font-size: .85rem; color: #7c839d; }
.footer-bottom p { padding-top: 24px; border-top: 1px solid var(--ink-line); }

/* ==========================================================
   Модалки
   ========================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay { position: absolute; inset: 0; background: rgba(4, 6, 14, .72); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-content {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  animation: rise .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(13, 17, 32, .78); color: var(--text);
}
.modal-x:hover { background: var(--bg); }
.modal-body { padding: 36px 28px 28px; text-align: center; }
.modal-body h3 { font-size: 1.3rem; margin-bottom: 8px; }
.modal-body p { color: var(--muted); margin-bottom: 20px; }
.modal-body .submit-btn + .btn-secondary { margin-top: 8px; }
.modal-error-icon, .qr-success-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 999px; display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; }
.modal-error-icon { background: var(--err-soft); color: var(--err); }
.qr-success-icon { background: var(--ok-soft); color: var(--ok); }
.qr-image-container { width: 220px; margin: 0 auto 12px; padding: 12px; background: #fff; border-radius: var(--r-md); }
.qr-hint { font-size: .9rem; }
.spinner { width: 44px; height: 44px; margin: 0 auto 20px; border-radius: 999px; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Карточка игры */
.game-modal-content { max-width: 560px; }
.gm-cover { aspect-ratio: 16 / 7; background: var(--ink-2); overflow: hidden; }
.gm-cover img { width: 100%; height: 100%; object-fit: cover; }
.gm-body { padding: 24px 28px 28px; }
.gm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.gm-tag { height: 26px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; background: var(--bg); color: var(--muted); font-size: .8rem; font-weight: 500; }
.gm-tag--soon { background: var(--accent-soft); color: var(--accent-text); }
.gm-title { font-size: 1.4rem; margin-bottom: 12px; }
.gm-desc { color: var(--muted); font-size: .98rem; }
.gm-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.gm-price { display: flex; flex-direction: column; }
.gm-price-current { font-family: var(--display); font-size: 1.7rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.game-price-old { color: var(--faint); text-decoration: line-through; font-size: .9rem; }
.gm-foot .submit-btn { width: auto; flex-shrink: 0; }
.submit-btn.is-in-cart { background: var(--ok-soft); color: var(--ok); }

/* Корзина */
.cart-modal-content { max-width: 480px; }
.cart-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 18px; border-bottom: 1px solid var(--line-soft); }
.cart-modal-head h3 { font-size: 1.25rem; }
.cart-modal-head .modal-x { position: static; background: var(--bg); }
.cart-empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.cart-empty svg { margin: 0 auto 14px; color: var(--faint); }
.cart-empty p { color: var(--text); font-weight: 600; }
.cart-items { padding: 8px 24px; }
.cart-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-cover { width: 92px; aspect-ratio: 460 / 215; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.cart-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item-title { font-weight: 600; font-size: .95rem; }
.cart-item-price { color: var(--muted); font-size: .9rem; }
.cart-item-remove { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--faint); }
.cart-item-remove:hover { color: var(--err); background: var(--err-soft); }
.cart-modal-foot { padding: 20px 24px 24px; background: var(--bg); }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 16px; }
.cart-total-row strong { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; }
.cart-modal-foot .btn-secondary { margin-top: 6px; }

/* Поля на светлом фоне */
.form-label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.form-input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r-md);
  background: var(--paper); border: 1.5px solid var(--line); font-size: 1rem;
  transition: border-color .15s;
}
.form-input:focus { outline: none; border-color: var(--accent); }

/* Оверлей «Подготовка к оплате» */
.payment-loading-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(4, 6, 14, .78); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.payment-loading-overlay.is-active { opacity: 1; visibility: visible; }
.payment-loading-content { width: 100%; max-width: 400px; padding: 32px 28px; border-radius: var(--r-lg); border: 1px solid var(--ink-line); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-pop); }
.payment-loading-spinner { width: 40px; height: 40px; border-radius: 999px; border: 3px solid var(--ink-3); border-top-color: var(--accent); animation: spin .8s linear infinite; margin-bottom: 22px; }
.payment-loading-title { font-size: 1.3rem; margin-bottom: 6px; }
.payment-loading-text { color: var(--on-ink-muted); font-size: .95rem; margin-bottom: 22px; }
.payment-loading-steps { display: flex; flex-direction: column; gap: 2px; }
.payment-loading-step { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: #6e7591; font-size: .95rem; transition: color .2s; }
.payment-loading-step-icon { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--ink-3); flex-shrink: 0; position: relative; transition: border-color .2s, background-color .2s; }
.payment-loading-step.is-active { color: var(--on-ink); }
.payment-loading-step.is-active .payment-loading-step-icon { border-color: var(--accent); border-top-color: transparent; animation: spin .7s linear infinite; }
.payment-loading-step.is-complete { color: var(--on-ink-muted); }
.payment-loading-step.is-complete .payment-loading-step-icon { border-color: var(--accent); background: var(--accent); }
.payment-loading-step.is-complete .payment-loading-step-icon::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ==========================================================
   Внутренние страницы: оплата, статус, игра
   ========================================================== */
.page { padding: 48px 0 96px; }
.page-head { margin-bottom: 36px; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.page-head p { margin-top: 10px; color: var(--muted); font-size: 1.05rem; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; color: var(--muted); font-weight: 500; font-size: .95rem; }
.back-link:hover { color: var(--text); }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.panel { background: var(--paper); border-radius: var(--r-lg); padding: 32px; }
.panel h2 { font-size: 1.15rem; margin-bottom: 20px; letter-spacing: -.02em; }
.panel + .panel { margin-top: 20px; }

/* Чек */
.receipt { display: flex; flex-direction: column; }
.receipt__row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.receipt__row:first-child { padding-top: 0; }
.receipt__label { color: var(--muted); }
.receipt__value { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.receipt__row:has(+ .receipt__row--total) { border-bottom: 0; }
.receipt__row--total { border-bottom: 0; padding-top: 22px; margin-top: 8px; border-top: 2px solid var(--text); }
.receipt__row--total .receipt__label { color: var(--text); font-weight: 600; }
.receipt__row--total .receipt__value { font-family: var(--display); font-size: 1.75rem; letter-spacing: -.025em; }

.method { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-md); border: 2px solid var(--accent); background: var(--accent-soft); margin-bottom: 24px; }
.method__logo { width: 52px; height: 52px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
.method__logo img { width: 38px; height: auto; }
.method__name { font-weight: 600; }
.method__desc { font-size: .9rem; color: var(--muted); }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); color: var(--muted); font-size: .92rem; margin-top: 20px; }
.notice svg { flex-shrink: 0; margin-top: 2px; color: var(--accent-text); }
.notice--warn { background: var(--warn-soft); color: var(--warn); }
.notice--warn svg { color: var(--warn); }

.checkbox-wrapper { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; cursor: pointer; font-size: .95rem; color: var(--muted); }
.checkbox-wrapper input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox-custom { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; border: 2px solid rgba(255,255,255,.28); background: var(--bg); position: relative; transition: background-color .15s, border-color .15s; }
.checkbox-wrapper input:focus-visible + .checkbox-custom { outline: 3px solid var(--accent); outline-offset: 2px; }
.checkbox-wrapper input:checked + .checkbox-custom { background: var(--accent); border-color: var(--accent); }
.checkbox-wrapper input:checked + .checkbox-custom::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox-text a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.checkbox-wrapper.has-error .checkbox-custom { border-color: var(--err); }
.agree-error { color: var(--err); font-size: .9rem; margin-top: 8px; padding-left: 34px; }

.payment-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }

.assurance { list-style: none; }
.assurance li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: .95rem; color: var(--muted); }
.assurance li:last-child { border-bottom: 0; padding-bottom: 0; }
.assurance li:first-child { padding-top: 0; }
.assurance svg { flex-shrink: 0; margin-top: 3px; color: var(--ok); }
.assurance a { color: var(--accent-text); }

/* Статус-страницы (успех / ожидание) */
.status { max-width: 520px; margin: 0 auto; }
.status__card { background: var(--paper); border-radius: var(--r-lg); padding: 40px 36px 36px; }
.status__icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 24px; }
.status__icon--ok { background: var(--ok-soft); color: var(--ok); }
.status__icon--err { background: var(--err-soft); color: var(--err); }
.status__icon--wait { background: var(--accent-soft); color: var(--accent-text); }
.status h1 { font-size: clamp(1.5rem, 3.4vw, 1.9rem); margin-bottom: 12px; }
.status__lead { color: var(--muted); font-size: 1.02rem; margin-bottom: 28px; }
.status .receipt { margin-bottom: 24px; }
.status__eta { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r-md); background: var(--bg); color: var(--on-ink); margin-bottom: 24px; }
.status__eta strong { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.status__eta .pulse { width: 10px; height: 10px; border-radius: 999px; background: #6be3a0; flex-shrink: 0; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.status__actions { display: flex; flex-direction: column; gap: 6px; }
.status__foot { margin-top: 20px; font-size: .9rem; color: var(--muted); text-align: center; }
.status__foot a { color: var(--accent-text); }
.progress { height: 4px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 8px 0 24px; }
.progress span { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 999px; animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Страница игры */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--faint); margin-bottom: 28px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.game-detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.game-detail__media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink-2); }
.game-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.game-detail__media .game__badge { top: 16px; left: 16px; height: 30px; font-size: .88rem; }
.game-detail h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 14px 0 10px; }
.game-detail__platform { color: var(--muted); }
.game-detail__desc { margin-top: 20px; color: var(--muted); max-width: 56ch; }
.buybox { margin-top: 28px; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--ink-line); background: var(--ink); color: var(--on-ink); }
.buybox__price { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.buybox__price strong { font-family: var(--display); font-size: 2.2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.buybox__price s { color: var(--on-ink-muted); }
.buybox ul { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; color: var(--on-ink-muted); }
.buybox li { display: flex; gap: 10px; align-items: flex-start; }
.buybox li svg { flex-shrink: 0; margin-top: 3px; color: #6be3a0; }

.game-seo { margin-top: 88px; max-width: 760px; }
.game-seo h2 { font-size: 1.35rem; margin-bottom: 14px; }
.game-seo p { color: var(--muted); margin-bottom: 14px; max-width: 70ch; }
.other-games { margin-top: 72px; }
.other-games h2 { font-size: 1.6rem; margin-bottom: 28px; }

/* Юридические страницы */
.legal-page { max-width: 720px; margin: 0 auto; padding: 48px 24px 96px; }
.legal-page h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 10px; }
.legal-page h2 { font-family: var(--body); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; margin: 36px 0 10px; }
.legal-page p { color: var(--muted); margin-bottom: 8px; max-width: 70ch; }
.legal-page p strong { color: var(--text); }
.legal-page a { color: var(--accent-text); }
.legal-back { display: inline-block; margin-bottom: 28px; color: var(--muted) !important; font-weight: 500; }
.legal-back:hover { color: var(--text) !important; }
.legal-date { color: var(--faint) !important; margin-bottom: 32px !important; }

/* ==========================================================
   Адаптив
   ========================================================== */
@media (max-width: 1080px) {
  .hero__grid { gap: 40px; }
}

@media (max-width: 920px) {
  .hero { padding: 16px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { padding-top: 16px; }
  .hero h1 { max-width: 14ch; }
  .terminal { max-width: 560px; }
  .faq-layout, .checkout, .game-detail { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 72px 0; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0 28px; border-left: 0; display: grid; grid-template-columns: 72px 1fr; column-gap: 8px; }
  .steps li + li { border-top: 1px solid var(--line); }
  .steps li::before { grid-row: span 2; margin: 0; font-size: 2.6rem; }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-content .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .header__inner { height: 64px; }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .game__row { flex-direction: column; gap: 4px; }
  .game__price { text-align: left; }
  .seo-games-list { columns: 1; }
}

@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.95rem; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts > div { padding-right: 12px; margin-right: 12px; }
  .facts dd { font-size: .98rem; }
  .terminal { border-radius: 18px; margin: 0 -4px; }
  .terminal__head, .terminal form { padding-left: 20px; padding-right: 20px; }
  .terminal__sbp { font-size: 0; gap: 0; }
  .terminal__sbp img { height: 20px; }
  .panel, .status__card { padding: 24px 20px; }
  .gm-foot { flex-direction: column; align-items: stretch; }
  .gm-foot .submit-btn { width: 100%; }
  .cart-bar { left: 16px; right: 16px; transform: translateY(140%); max-width: none; justify-content: space-between; gap: 12px; padding-left: 16px; }
  .cart-bar.is-visible { transform: translateY(0); }
  .footer-content { grid-template-columns: 1fr; }
  .receipt__row--total .receipt__value { font-size: 1.6rem; }
}
.min-amount-hint.is-error { color: #ff8a7f; }
.err-state { display: none; }
.has-error .wait-state { display: none; }
.has-error .err-state { display: block; }
.game-detail .gm-tag { background: var(--paper); }
.game__fallback { position: absolute; z-index: 0; inset: auto 16px 14px 16px; font-family: var(--display); font-weight: 600; font-size: 1.1rem; letter-spacing: -.03em; line-height: 1.1; color: rgba(255,255,255,.88); }
.game__cover img { position: relative; z-index: 1; }
.game__badge { z-index: 2; }
/* Обложка без логотипа: название поверх картинки */
.game__cover--titled::after { content: ""; position: absolute; inset: 40% 0 0; z-index: 1; background: linear-gradient(transparent, rgba(5, 8, 18, .78)); pointer-events: none; }
.game__cover--titled .game__fallback { z-index: 2; color: #fff; font-size: 1.25rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }

/* Промо-полоса над шапкой */
.promo {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 44px; padding: 8px 20px;
  background: var(--accent); color: #fff; font-size: .92rem; text-align: center;
  transition: background-color .15s;
}
.promo:hover { background: var(--accent-hover); }
.promo__tag {
  flex-shrink: 0; height: 22px; padding: 0 8px; border-radius: 6px;
  display: inline-flex; align-items: center;
  background: #fff; color: var(--accent); font-size: .74rem; font-weight: 700;
}
.promo__text b { font-weight: 600; }
.promo__price { white-space: nowrap; }
.promo__cta { flex-shrink: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.55); }
.promo:focus-visible { outline-offset: -3px; outline-color: #fff; }
@media (max-width: 600px) {
  .promo { gap: 10px; font-size: .86rem; }
  .promo__more { display: none; }
}

/* ===== SEO-блоки: FAQ на странице игры, каталог, 404 ===== */
.game-faq { margin-top: 48px; }
.game-faq h2 { margin-bottom: 16px; }
.game-faq .faq-list { max-width: 860px; }
.catalog-seo { margin-top: 48px; max-width: 860px; color: var(--muted, #9aa0b8); line-height: 1.65; }
.catalog-seo h2 { color: var(--on-ink, #fff); margin-bottom: 12px; }
.catalog-seo p + p { margin-top: 12px; }
.notfound { text-align: center; padding: 40px 0 8px; }
.notfound__code { font-family: Unbounded, sans-serif; font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: #5F5DFF; }
.notfound p { margin: 12px auto 24px; max-width: 520px; }
.notfound__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.section-more { margin-top: 28px; text-align: center; }
