/* =============================================================
   TOKEN — магазин цифровых товаров
   Тёмная витрина с фиолетово-голубым акцентом, спокойные кнопки,
   карточки игр с мягкой подсветкой цвета игры.
   ============================================================= */
:root {
  color-scheme: dark;
  --bg: #0b0c18;
  --bg2: #10122a;
  --panel: #151834;
  --panel2: #1e2249;
  --line: #282d5a;
  --text: #eef0fb;
  --muted: #9ba1c4;
  --accent: #7c5cff;
  --accent-hi: #a08bff;
  --accent2: #22d3ee;
  --ink: #ffffff;
  --ok: #34d399;
  --bad: #ff6b7d;

  --f-display: "Manrope", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(800px 500px at -10% 30%, rgba(61,225,255,.10), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; }
.wrap {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin: 0; line-height: 1.15; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent2); margin: 0 0 10px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(62,227,122,.2); }

/* ---------- Логотип ---------- */
.logo-mark { width: 32px; height: 32px; flex-shrink: 0; display: block; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 0;
  font-family: var(--f-display); font-weight: 700; font-size: 14px;
  transition: transform .08s, box-shadow .08s, filter .15s;
  position: relative; white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5b8cff);
  box-shadow: 0 10px 26px -10px rgba(124,92,255,.7);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 15px 26px; font-size: 15px; }
.full { width: 100%; }
button:focus-visible, a:focus-visible, .card:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent2); outline-offset: 3px;
}

/* ---------- Плашка тестового режима ---------- */
.test-banner { background: #f6c453; color: #2b1a00; text-align: center; font-weight: 700; font-size: 14px; padding: 8px max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- Шапка ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(15,11,36,.78); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(52,42,117,.7);
}
.topbar-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -.03em; }
.nav { display: flex; gap: 24px; margin-left: auto; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); }

/* ---------- Первый экран ---------- */
.hero { position: relative; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding-block: 64px 48px; }
.hero-text { min-width: 0; }
h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.1; font-weight: 800; margin: 0 0 18px; }
.hl {
  display: block;
  background: linear-gradient(90deg, var(--accent-hi), var(--accent2));
  width: fit-content;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: 18px; max-width: 34em; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.perks { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.perks li {
  display: flex; align-items: center; gap: 8px;
  background: rgba(28,21,68,.7); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px 7px 8px; font-size: 14px; color: var(--muted);
}
.perks b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--panel2); font-size: 13px; }

.hero-loot { position: relative; height: 400px; }
.loot {
  position: absolute; display: grid; place-items: center; overflow: hidden;
  width: 160px; height: 160px; border-radius: 26px;
  font-family: var(--f-display); font-weight: 800; font-size: 44px; color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  animation: bob 7s ease-in-out infinite;
}
.loot img { width: 100%; height: 100%; object-fit: cover; }
.l1 { left: 8%; top: 14%; width: 200px; height: 200px; rotate: -4deg; background: #5ce344; z-index: 2; }
.l2 { left: 54%; top: 4%; rotate: 4deg; background: #b97a10; animation-delay: -2s; }
.l3 { left: 58%; top: 52%; rotate: -3deg; background: #4a8fe6; animation-delay: -4s; }
.l4 { left: 26%; top: 64%; width: 124px; height: 124px; rotate: 5deg; background: #c3d5f4; animation-delay: -5s; z-index: 3; }
@keyframes bob { 50% { translate: 0 -10px; } }

/* ---------- Каталог ---------- */
.catalog-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin: 64px 0 26px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.tabs button.active { background: var(--accent); color: #fff; }
#search { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 11px 16px; border-radius: 14px; min-width: 240px; font: inherit; font-size: 15px; }
#search::placeholder { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.card {
  --c: var(--accent);
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); border-radius: var(--r);
  display: flex; flex-direction: column; cursor: pointer; position: relative;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 18px 44px -18px var(--c); }
.card-art {
  height: 168px; margin: 8px 8px 0; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; position: relative;
  font-family: var(--f-display); font-size: 54px; font-weight: 800; color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.card-art .tag {
  position: absolute; top: 10px; left: 10px; text-shadow: none;
  font-family: var(--f-body); font-size: 11px; font-weight: 700;
  background: rgba(15,11,36,.75); color: #fff; padding: 5px 9px; border-radius: 8px; backdrop-filter: blur(4px);
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.card-body h3 { margin: 0; font-size: 18px; font-weight: 800; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; }
.from { font-family: var(--f-display); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.from small { color: var(--muted); font-family: var(--f-body); font-weight: 500; font-size: 13px; }
.card-foot .btn { padding: 9px 16px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); background: rgba(124,92,255,.15); }
.empty { text-align: center; color: var(--muted); padding: 40px; }

/* ---------- Шаги и FAQ ---------- */
.section { margin: 96px 0; }
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; position: relative; overflow: hidden; }
.steps li::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.22), transparent 70%); }
.steps b {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  font-family: var(--f-display); font-size: 18px; color: var(--accent-hi);
  background: rgba(124,92,255,.18);
}
.steps h3 { margin: 16px 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); }
#faq h2 { margin-bottom: 18px; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-top: 10px; max-width: 860px; }
details[open] { border-color: var(--panel2); background: linear-gradient(180deg, var(--panel2), var(--panel)); }
summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--f-display); color: var(--accent-hi); font-size: 20px; line-height: 1; transition: rotate .2s; }
details[open] summary::after { rotate: 45deg; }
details p { color: var(--muted); margin: 12px 0 0; }

.footer { border-top: 1px solid var(--line); background: var(--bg2); padding-block: 32px; color: var(--muted); font-size: 14px; }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0; max-width: 720px; }
.footer a { color: var(--accent2); font-weight: 700; }

/* ---------- Окна ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8,5,22,.72); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal-box {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); border-radius: 24px;
  width: 100%; max-width: 540px; max-height: 92vh; overflow: auto; position: relative; padding: 26px;
  box-shadow: 0 40px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  animation: pop .2s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.close { position: absolute; top: 16px; right: 16px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: 12px; font-size: 22px; line-height: 1; z-index: 1; }
.close:hover { border-color: var(--accent); }
.modal-box h3 { font-weight: 800; }
.p-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.p-icon {
  width: 72px; height: 72px; border-radius: 18px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 26px; color: #fff;
  border: 2px solid rgba(255,255,255,.18);
}
.p-head h3 { margin: 0; font-size: 22px; padding-right: 44px; }
.p-head p { margin: 2px 0 0; color: var(--muted); }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 5px; margin: 0 0 12px; }
.subtabs button { flex: 1 1 auto; background: none; border: 0; color: var(--muted); padding: 10px 14px; border-radius: 10px; font-family: var(--f-display); font-weight: 700; font-size: 14px; }
.subtabs button.active { color: #fff; background: var(--accent); }
.desc { color: var(--muted); font-size: 15px; margin: 0; }
.label { font-weight: 700; margin: 20px 0 10px; display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.opt {
  background: var(--bg); border: 2px solid var(--line); color: var(--text);
  padding: 12px; border-radius: 16px; text-align: left; min-width: 0;
  transition: border-color .15s, transform .1s;
}
.opt:hover { border-color: #4b3fa0; }
.opt:active { transform: scale(.97); }
.opt b { display: block; font-size: 15px; }
.opt span { color: var(--accent-hi); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.opt:disabled { opacity: .45; cursor: not-allowed; }
.opt:disabled span { color: var(--muted); }
.opt.active { border-color: var(--accent); background: rgba(124,92,255,.12); box-shadow: 0 0 0 3px rgba(124,92,255,.2); }
.opt-img { display: grid; place-items: center; aspect-ratio: 1; max-width: 100%; border-radius: 12px; margin-bottom: 10px; font-family: var(--f-display); font-size: 30px; font-weight: 800; color: #fff; }
input[type=text], input[type=email], select {
  width: 100%; background: var(--bg); border: 2px solid var(--line); color: var(--text);
  padding: 13px 15px; border-radius: 14px; font: inherit;
}
input[type=text]:focus, input[type=email]:focus { border-color: var(--accent); outline: none; }
input::placeholder { color: #6f68a3; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 4px; }
.qty b { min-width: 36px; text-align: center; font-family: var(--f-display); }
.qty button { width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--panel2); color: var(--text); font-size: 20px; }
.buy-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); }
.buy-row .sum { font-family: var(--f-display); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.buy-row .btn { padding: 14px 30px; font-size: 15px; }

.ci { display: flex; gap: 12px; align-items: center; padding: 14px; margin: 14px 0 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; }
.ci .p-icon { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; }
.ci-info { flex: 1; min-width: 0; }
.ci-info b { display: block; }
.ci-info span { color: var(--muted); font-size: 13px; }
.ci > b { font-family: var(--f-display); font-variant-numeric: tabular-nums; }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pay-methods label { background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 13px 8px; text-align: center; cursor: pointer; font-weight: 700; }
.pay-methods input { position: absolute; opacity: 0; pointer-events: none; }
.pay-methods label:has(input:checked) { border-color: var(--accent); background: rgba(124,92,255,.12); }
.pay-methods label:has(input:focus-visible) { outline: 3px solid var(--accent2); outline-offset: 2px; }
.channel-hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; margin-top: 18px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }
.err { color: var(--bad); font-size: 14px; margin-top: 6px; min-height: 1em; }
.success { text-align: center; padding: 12px 0; }
.success .big { font-size: 60px; }
.order-no { font-family: var(--f-display); font-size: 14px; background: var(--bg); border: 1px dashed var(--accent); color: var(--accent-hi); padding: 8px 14px; border-radius: 10px; display: inline-block; margin: 8px 0 12px; }

.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ok); color: #04210f; font-weight: 700; padding: 12px 20px; border-radius: 12px; transition: transform .3s; z-index: 100; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding-block: 40px 32px; }
  .hero-loot { height: 260px; max-width: 420px; width: 100%; margin: 0 auto; }
  .loot { width: 116px; height: 116px; font-size: 32px; border-radius: 20px; }
  .l1 { width: 146px; height: 146px; }
  .l4 { width: 92px; height: 92px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .topbar-in .btn-sm { margin-left: auto; }
  #search { min-width: 0; flex: 1 1 100%; }
  .filters { width: 100%; }
  .tabs { flex: 1 1 100%; }
  .tabs button { flex: 1; padding: 9px 8px; }
  .lead { font-size: 16px; }
  .modal-box { padding: 20px; }
  .buy-row .btn { padding: 14px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.product-region {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel2);
  font-size: 16px;
  font-weight: 700;
}
