/* spxrk.org UI: тёмная «стеклянная» тема с неоновыми акцентами. Общая для кабинета и админки. */
:root {
  color-scheme: dark;
  --bg: #06070b; --ink: #f5f5f7; --muted: #9a9cab; --line: rgba(255, 255, 255, .1);
  --glass: rgba(255, 255, 255, .055); --glass-2: rgba(255, 255, 255, .09);
  --accent: #8b6cff; --accent-2: #22d3ee; --pink: #ff4fd8;
  --ok: #3ddc97; --bad: #ff6b81; --warn: #ffc857;
  --grad: linear-gradient(135deg, #8b6cff 0%, #5b8cff 45%, #22d3ee 100%);
  --glow: 0 10px 36px rgba(124, 92, 255, .45);
  --radius: 22px; --ease: cubic-bezier(.2, .8, .2, 1);
  font-size: 17px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
/* неоновое «северное сияние» на фоне */
body::before { content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none; filter: blur(70px);
  background:
    radial-gradient(38% 34% at 18% 22%, rgba(139, 108, 255, .42), transparent 70%),
    radial-gradient(34% 32% at 82% 16%, rgba(34, 211, 238, .30), transparent 70%),
    radial-gradient(40% 36% at 62% 88%, rgba(255, 79, 216, .22), transparent 70%);
  animation: drift 26s var(--ease) infinite alternate; }
@keyframes drift { to { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }

[hidden] { display: none !important; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 2.3rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin: 0 0 24px; }
h2 { font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; margin: 40px 0 14px; }
h3 { font-size: 1.12rem; font-weight: 650; margin: 0; letter-spacing: -.015em; }
p { margin: 0 0 12px; }

/* шапка */
header.top { position: sticky; top: 0; z-index: 10; height: 72px; padding: 0 28px; display: flex; align-items: center; gap: 20px;
  background: rgba(8, 9, 14, .62); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--line); }
.brand { font-weight: 750; font-size: 1.55rem; display: inline-flex; align-items: center; letter-spacing: -.03em; white-space: nowrap; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav.tabs { display: flex; gap: 4px; margin: 0 auto; padding: 5px; border-radius: 99px; background: var(--glass);
  border: 1px solid var(--line); overflow-x: auto; }
nav.tabs button { min-height: 40px; padding: 0 20px; border: 0; border-radius: 99px; background: none; color: var(--muted);
  font-weight: 550; box-shadow: none; white-space: nowrap; }
nav.tabs button:hover { color: var(--ink); background: none; transform: none; }
nav.tabs button.on { color: #fff; background: var(--glass-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 0 22px rgba(139, 108, 255, .35); }
.who { color: var(--muted); white-space: nowrap; }
.balance { white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; padding: 9px 16px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--line); }
.balance small { color: var(--muted); font-weight: 500; margin-right: 6px; }

main { max-width: 1240px; margin: 0 auto; padding: 44px 28px 80px; }
#view > * { animation: rise .5s var(--ease) both; }
#view > *:nth-child(2) { animation-delay: .05s; } #view > *:nth-child(3) { animation-delay: .1s; }
#view > *:nth-child(n+4) { animation-delay: .15s; }

/* стеклянные поверхности */
.panel, .card, .scroll, .pcard, .hero, .orow {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.panel { padding: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 28px; }
.card { padding: 20px 22px; transition: transform .3s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .2); }
.card .k { color: var(--muted); font-size: .9rem; }
.card .v { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.bar .grow, .grow { flex: 1; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 980px) { .cols { grid-template-columns: 1fr; } header.top { padding: 0 14px; gap: 10px; } main { padding: 28px 14px 60px; } h1 { font-size: 1.9rem; } }

/* главный блок баланса */
.hero { position: relative; overflow: hidden; padding: 34px 36px; margin-bottom: 8px; }
.hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--grad); opacity: .8;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.hero .k { color: var(--muted); }
.hero .big { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.05; margin: 6px 0 10px;
  background: linear-gradient(120deg, #fff 30%, #b9a8ff 60%, #7be8f7); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums; }

/* каталог */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chips button { border-radius: 99px; min-height: 42px; padding: 0 18px; color: var(--muted); }
.chips button.on { color: #fff; border-color: transparent; background: var(--grad); box-shadow: var(--glow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.pcard { padding: 24px; display: flex; flex-direction: column; gap: 10px; min-height: 210px; position: relative; overflow: hidden;
  animation: pop .5s var(--ease) both; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.pcard:nth-child(2) { animation-delay: .04s; } .pcard:nth-child(3) { animation-delay: .08s; } .pcard:nth-child(4) { animation-delay: .12s; }
.pcard:nth-child(5) { animation-delay: .16s; } .pcard:nth-child(6) { animation-delay: .2s; } .pcard:nth-child(n+7) { animation-delay: .24s; }
.pcard::before { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 108, 255, .5), transparent 70%); opacity: .35; transition: opacity .35s, transform .5s var(--ease); }
.pcard:hover { transform: translateY(-6px); border-color: rgba(139, 108, 255, .55); box-shadow: 0 18px 50px rgba(88, 70, 220, .35); }
.pcard:hover::before { opacity: .8; transform: scale(1.25); }
.pcard .cat { font-size: .82rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.pcard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }
.price { font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* заказы */
.list { display: grid; gap: 12px; }
.orow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 18px; align-items: center; padding: 18px 22px;
  animation: pop .45s var(--ease) both; transition: border-color .3s; }
.orow:hover { border-color: rgba(255, 255, 255, .2); }
@media (max-width: 720px) { .orow { grid-template-columns: 1fr auto; } }

/* таблицы */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; }
tr.click { cursor: pointer; }
tbody tr:hover td { background: rgba(255, 255, 255, .035); }
td.num, th.num, .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.act { text-align: right; white-space: nowrap; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .86em; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* кнопки и поля */
button, .btn { font: inherit; font-weight: 550; min-height: 46px; padding: 0 20px; border-radius: 14px; cursor: pointer; color: var(--ink);
  background: var(--glass-2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .3s, filter .2s; }
button:hover, .btn:hover { background: rgba(255, 255, 255, .14); transform: translateY(-1px); }
button:active { transform: scale(.97); }
button.primary { border: 0; color: #fff; font-weight: 650; background: var(--grad); box-shadow: var(--glow); }
button.primary:hover { background: var(--grad); filter: brightness(1.12); box-shadow: 0 14px 44px rgba(124, 92, 255, .6); }
button.danger { color: var(--bad); }
button.ghost { background: none; border-color: transparent; color: var(--muted); }
button.ghost:hover { color: var(--ink); }
button.sm { min-height: 36px; padding: 0 14px; font-size: .9rem; border-radius: 11px; }
button.wide { width: 100%; min-height: 54px; font-size: 1.05rem; border-radius: 16px; }
button:disabled { opacity: .4; cursor: default; transform: none; filter: none; box-shadow: none; }
input, select, textarea { font: inherit; color: var(--ink); min-height: 50px; padding: 12px 16px; max-width: 100%;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .2s, box-shadow .25s, background .2s; }
input::placeholder, textarea::placeholder { color: #6f7182; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 4px rgba(139, 108, 255, .28), 0 0 28px rgba(139, 108, 255, .25); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
label { display: block; font-size: .9rem; color: var(--muted); margin: 16px 0 7px; }
form .row { display: flex; gap: 12px; }
form .row > * { flex: 1; min-width: 0; }
form input, form select, form textarea { width: 100%; }
form .actions, .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.search { flex: 1; max-width: 420px; }
.stepper { display: flex; gap: 8px; align-items: center; }
.stepper input { text-align: center; font-weight: 650; font-size: 1.1rem; }
.stepper button { flex: 0 0 50px; min-height: 50px; padding: 0; font-size: 1.3rem; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; font-size: .84rem; font-weight: 600;
  background: rgba(255, 255, 255, .08); color: #c9cbd6; white-space: nowrap; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.tag.ok { background: rgba(61, 220, 151, .13); color: var(--ok); }
.tag.bad { background: rgba(255, 107, 129, .13); color: var(--bad); }
.tag.warn { background: rgba(255, 200, 87, .13); color: var(--warn); }

dialog { color: var(--ink); border: 1px solid var(--line); border-radius: 28px; padding: 32px; width: min(520px, 94vw);
  background: rgba(20, 21, 30, .88); backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .6), 0 0 80px rgba(139, 108, 255, .2); }
dialog[open] { animation: pop .4s var(--ease); }
dialog::backdrop { background: rgba(3, 4, 8, .6); backdrop-filter: blur(6px); }
dialog h2 { margin-top: 0; font-size: 1.5rem; }
.secret { background: rgba(139, 108, 255, .12); border: 1px dashed rgba(139, 108, 255, .7); border-radius: 14px; padding: 14px 16px;
  word-break: break-all; margin: 12px 0; }
#toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 50; max-width: 90vw; padding: 14px 22px;
  border-radius: 99px; font-weight: 550; background: rgba(30, 32, 44, .9); border: 1px solid var(--line);
  backdrop-filter: blur(24px); box-shadow: 0 16px 50px rgba(0, 0, 0, .5); animation: rise .35s var(--ease); }
#toast.bad { border-color: rgba(255, 107, 129, .6); color: #ffd0d7; box-shadow: 0 0 40px rgba(255, 107, 129, .25); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .panel { width: min(430px, 100%); padding: 40px; animation: pop .6s var(--ease); box-shadow: 0 0 90px rgba(139, 108, 255, .22); }
.login h1 { font-size: 2rem; margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── логотип spxrk.org: молния, неоновая «x», бегущий блик, искры по клику ── */
.logo { position: relative; display: inline-flex; align-items: center; gap: .32em; cursor: pointer; user-select: none;
  font-weight: 800; letter-spacing: -.045em; line-height: 1; -webkit-tap-highlight-color: transparent; }
.logo .bolt { width: 1.15em; height: 1.15em; flex: none; overflow: visible;
  filter: drop-shadow(0 0 .28em rgba(139, 108, 255, .9)) drop-shadow(0 0 .7em rgba(34, 211, 238, .55));
  animation: bolt-pulse 2.6s ease-in-out infinite; transform-origin: 50% 60%; }
.logo .word { display: inline-flex; }
.logo .word i { display: inline-block; font-style: normal; color: transparent;
  background: linear-gradient(90deg, #fff 0%, #cfc4ff 20%, #8b6cff 40%, #22d3ee 60%, #fff 80%, #fff 100%) 0 0 / 600% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: sheen 5s linear infinite; animation-delay: calc(var(--i) * -.22s); transition: transform .4s var(--ease); }
/* «x» — неоновая вывеска, которая иногда подмигивает */
.logo .word i.x { background: linear-gradient(135deg, #22d3ee, #ff4fd8) 0 0 / 100% 100%; -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 .18em rgba(255, 79, 216, .95)) drop-shadow(0 0 .5em rgba(34, 211, 238, .7));
  animation: neon 6s linear infinite; transform: skewX(-8deg) scale(1.12); margin: 0 .02em; }
.logo .tld { font-size: .5em; font-weight: 700; letter-spacing: .02em; padding: .28em .6em; border-radius: 99px; align-self: center;
  color: #dcd6ff; background: rgba(139, 108, 255, .16); border: 1px solid rgba(139, 108, 255, .5);
  box-shadow: 0 0 1.2em rgba(139, 108, 255, .35); transition: transform .4s var(--ease), box-shadow .4s, background .4s; }
/* наведение: буквы идут волной, молния бьёт, домен подпрыгивает */
.logo:hover .word i { animation: sheen 1.6s linear infinite, wave .7s var(--ease) calc(var(--i) * 60ms) 1; }
.logo:hover .word i.x { animation: neon 1.2s linear infinite, wave .7s var(--ease) calc(var(--i) * 60ms) 1; }
.logo:hover .bolt { animation: bolt-strike .6s var(--ease) 1, bolt-pulse 2.6s ease-in-out .6s infinite; }
.logo:hover .tld { transform: translateY(-2px) rotate(-3deg); background: rgba(34, 211, 238, .2); box-shadow: 0 0 1.6em rgba(34, 211, 238, .6); }
.logo:active { transform: scale(.96); }
.logo.zap .bolt { animation: bolt-strike .5s var(--ease) 1; }
.logo.zap .word i { animation: sheen .5s linear infinite, wave .5s var(--ease) calc(var(--i) * 40ms) 1; }
/* искры */
.logo .sparkle { position: absolute; left: .55em; top: 50%; width: .16em; height: .16em; border-radius: 50%; pointer-events: none;
  background: var(--c, #fff); box-shadow: 0 0 .5em .12em var(--c, #fff); animation: fly var(--t, .7s) cubic-bezier(.1, .8, .3, 1) forwards; }
/* появление на экране входа: молния ударяет, буквы падают по одной */
.login .logo { font-size: 3.1rem; margin-bottom: 6px; }
.login .logo .bolt { animation: bolt-intro .9s var(--ease) both, bolt-pulse 2.6s ease-in-out .9s infinite; }
.login .logo .word i { animation: drop .7s var(--ease) calc(.25s + var(--i) * 80ms) both, sheen 5s linear calc(1s + var(--i) * -.22s) infinite; }
.login .logo .word i.x { animation: drop .7s var(--ease) calc(.25s + var(--i) * 80ms) both, neon 6s linear 1.2s infinite; }
.login .logo .tld { animation: pop .6s var(--ease) .85s both; }
/* перегрузка: много кликов по логотипу подряд */
body.overcharge::before { animation: drift 26s var(--ease) infinite alternate, hue 2.4s linear 1; }
body.overcharge .logo .bolt { animation: bolt-strike .3s linear 8; }

@keyframes sheen { to { background-position: -600% 0; } }
@keyframes wave { 40% { transform: translateY(-.28em) rotate(-6deg) scale(1.12); } 70% { transform: translateY(.06em); } }
@keyframes neon { 0%, 61%, 63%, 66%, 100% { opacity: 1; } 62%, 65% { opacity: .35; } 64% { opacity: .8; } }
@keyframes bolt-pulse { 50% { transform: scale(1.1) rotate(-4deg); filter: drop-shadow(0 0 .45em rgba(139, 108, 255, 1)) drop-shadow(0 0 1.1em rgba(34, 211, 238, .9)); } }
@keyframes bolt-strike { 0% { transform: scale(1); } 20% { transform: scale(1.5) rotate(-16deg); filter: drop-shadow(0 0 1em #fff) brightness(1.8); }
  45% { transform: scale(.9) rotate(10deg); } 70% { transform: scale(1.15) rotate(-4deg); } 100% { transform: scale(1); } }
@keyframes bolt-intro { 0% { opacity: 0; transform: translateY(-1.6em) scale(2.2) rotate(-25deg); filter: drop-shadow(0 0 1.2em #fff) brightness(2.5); }
  55% { opacity: 1; transform: translateY(.1em) scale(.85) rotate(8deg); } 100% { transform: none; } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-.9em) rotate(-14deg) scale(1.4); } 60% { opacity: 1; transform: translateY(.1em) rotate(3deg); } 100% { transform: none; } }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
@keyframes hue { 0% { filter: blur(70px) hue-rotate(0) brightness(1.5); } 100% { filter: blur(70px) hue-rotate(360deg) brightness(1); } }
.logo .word i.x { will-change: opacity; }

/* ════════ Кабинет v3: иконки, обложки игр, свет под курсором, шаги заказа ════════ */
.ic { width: 1.25em; height: 1.25em; flex: none; }
.ic.lg { width: 1.7em; height: 1.7em; }

/* скользящая подсветка вкладок */
nav.tabs { position: relative; }
nav.tabs .ind { position: absolute; left: 5px; top: 5px; bottom: 5px; width: 0; border-radius: 99px; pointer-events: none;
  background: linear-gradient(135deg, rgba(139, 108, 255, .5), rgba(34, 211, 238, .32));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 0 26px rgba(139, 108, 255, .5);
  transition: transform .5s var(--ease), width .5s var(--ease); }
nav.tabs.slide button { position: relative; gap: 9px; }
nav.tabs.slide button.on { background: none; box-shadow: none; }
nav.tabs button .ic { transition: transform .4s var(--ease); }
nav.tabs button.on .ic { transform: scale(1.15); }
.balance { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; transition: border-color .3s, box-shadow .3s, transform .2s var(--ease); }
.balance:hover { border-color: rgba(139, 108, 255, .7); box-shadow: 0 0 26px rgba(139, 108, 255, .35); transform: translateY(-1px); }
.balance .ic { color: var(--accent-2); }

/* на телефоне вкладки уезжают вниз, как в приложениях */
@media (max-width: 720px) {
  nav.tabs { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; margin: 0; justify-content: space-around;
    background: rgba(14, 15, 22, .82); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); box-shadow: 0 16px 50px rgba(0, 0, 0, .6); }
  nav.tabs button { flex: 1; flex-direction: column; gap: 3px !important; min-height: 54px; padding: 0 6px; font-size: .74rem; }
  nav.tabs button .ic { width: 1.6em; height: 1.6em; }
  main { padding-bottom: 120px !important; }
  header.top { justify-content: space-between; }
}

/* заголовок раздела */
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 28px; }
.head h1 { margin: 0; }
.head .sub { color: var(--muted); margin-top: 6px; }
.searchbox { position: relative; flex: 1; max-width: 440px; margin-left: auto; }
.searchbox .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbox input { width: 100%; padding-left: 48px; border-radius: 99px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); background: none; border: 0; padding: 0; min-height: 0;
  font-weight: 550; margin-bottom: 14px; }
.backlink:hover { color: var(--ink); background: none; transform: translateX(-3px); }

/* свет под курсором */
.glow { position: relative; isolation: isolate; }
.glow::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 108, 255, .28), rgba(34, 211, 238, .1) 45%, transparent 70%);
  transition: opacity .4s; }
.glow:hover::after { opacity: 1; }
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease), box-shadow .35s, border-color .35s; }

/* обложки игр */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.game { --a: hsl(var(--h) 88% 62%); --b: hsl(calc(var(--h) + 55) 92% 46%);
  aspect-ratio: 4 / 3; min-height: 0; padding: 22px; border-radius: 26px; overflow: hidden; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4px;
  background: linear-gradient(140deg, var(--a), var(--b)); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  box-shadow: 0 14px 40px hsl(var(--h) 80% 40% / .35); animation: pop .55s var(--ease) both; animation-delay: calc(var(--n, 0) * 55ms); }
.game:hover { background: linear-gradient(140deg, var(--a), var(--b)); box-shadow: 0 22px 60px hsl(var(--h) 85% 50% / .6); border-color: rgba(255, 255, 255, .55);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.02); }
.game::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 70% at 85% 10%, rgba(255, 255, 255, .38), transparent 60%), linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .45)); }
.game::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), transparent 65%); }
.game .letters { position: absolute; right: 14px; top: 2px; font-size: 5.4rem; font-weight: 800; letter-spacing: -.07em; line-height: 1;
  color: rgba(255, 255, 255, .2); transition: transform .6s var(--ease), color .4s; }
.game:hover .letters { transform: scale(1.18) rotate(-7deg) translate(-6px, 6px); color: rgba(255, 255, 255, .34); }
.game .gname { font-size: 1.28rem; font-weight: 720; letter-spacing: -.025em; line-height: 1.15; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.game .gmeta { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; opacity: .9; }
.game .gmeta .ic { transition: transform .4s var(--ease); }
.game:hover .gmeta .ic { transform: translateX(6px); }
.game.all { --a: rgba(255, 255, 255, .1); --b: rgba(255, 255, 255, .03); box-shadow: none; border-style: dashed; }
.banner { --a: hsl(var(--h) 88% 62%); --b: hsl(calc(var(--h) + 55) 92% 46%); position: relative; overflow: hidden; border-radius: 28px; padding: 30px 32px;
  margin-bottom: 26px; background: linear-gradient(120deg, var(--a), var(--b)); box-shadow: 0 18px 60px hsl(var(--h) 80% 45% / .4); }
.banner h1 { margin: 0; text-shadow: 0 2px 18px rgba(0, 0, 0, .3); }
.banner .letters { position: absolute; right: 24px; top: -18px; font-size: 9rem; font-weight: 800; letter-spacing: -.07em; color: rgba(255, 255, 255, .18); line-height: 1; }
.banner .sub { color: rgba(255, 255, 255, .88); margin-top: 6px; }

.pcard { border-radius: 24px; }
.pcard::before { z-index: -1; }
.pcard .foot button .ic { transition: transform .35s var(--ease); }
.pcard .foot button:hover .ic { transform: rotate(-12deg) scale(1.2); }

/* заказы */
.ocard { background: var(--glass); border: 1px solid var(--line); border-radius: 24px; padding: 22px 24px; backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px); animation: pop .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 50ms);
  transition: border-color .3s, transform .3s var(--ease); }
.ocard:hover { border-color: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.ohead { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.ofoot { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 16px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding-top: 22px; font-size: .86rem; color: var(--muted); text-align: center; }
.steps li:first-child { text-align: left; } .steps li:last-child { text-align: right; }
.steps li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); }
.steps li::after { content: ""; position: absolute; top: 5px; left: 0; height: 4px; width: 0; border-radius: 4px; background: var(--grad);
  box-shadow: 0 0 14px rgba(139, 108, 255, .8); transition: width 1s var(--ease) .2s; }
.steps li.done { color: var(--ink); } .steps li.done::after { width: 100%; }
.steps li.now { color: var(--ink); font-weight: 600; } .steps li.now::after { width: 55%; animation: breathe 1.8s ease-in-out infinite; }
.steps.ok li::after { background: linear-gradient(90deg, #22d3ee, #3ddc97); box-shadow: 0 0 14px rgba(61, 220, 151, .8); }
@keyframes breathe { 50% { opacity: .45; } }

/* профиль */
.idcard { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.avatar { width: 76px; height: 76px; flex: none; border-radius: 26px; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; color: #fff;
  background: var(--grad); box-shadow: var(--glow); animation: pop .6s var(--ease) both; }
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 26px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; color: var(--muted); min-height: 42px; border-radius: 12px; white-space: nowrap; }
.seg button.on { color: #fff; background: var(--glass-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.hero .stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 18px; }
.hero .stats b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.hero .orb { position: absolute; right: -60px; top: -80px; width: 300px; height: 300px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(139, 108, 255, .55), rgba(34, 211, 238, .2) 50%, transparent 70%); filter: blur(10px); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translate(-26px, 22px) scale(1.12); } }
.ops { display: grid; gap: 10px; }
.op { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
  animation: rise .45s var(--ease) both; animation-delay: calc(var(--n, 0) * 35ms); transition: background .25s, transform .25s var(--ease); }
.op:hover { background: var(--glass-2); transform: translateX(4px); }
.op .bub { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--muted); }
.op.in .bub { background: rgba(61, 220, 151, .15); color: var(--ok); } .op.out .bub { background: rgba(139, 108, 255, .18); color: #b9a8ff; }
.op .amt { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op.in .amt { color: var(--ok); }
.keyrow { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 10px; animation: rise .4s var(--ease) both; }
.keyrow .bub { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: rgba(34, 211, 238, .14); color: var(--accent-2); }

/* заглушки на время загрузки */
.sk { border-radius: 24px; background: linear-gradient(100deg, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .05) 70%) 0 0 / 250% 100%;
  animation: shimmer 1.3s linear infinite; }
.sk.game-sk { aspect-ratio: 4 / 3; } .sk.card-sk { height: 210px; } .sk.row-sk { height: 120px; margin-bottom: 12px; }
@keyframes shimmer { to { background-position: -250% 0; } }

/* окно покупки и успех */
.buyhead { --a: hsl(var(--h) 88% 62%); --b: hsl(calc(var(--h) + 55) 92% 46%); margin: -32px -32px 22px; padding: 26px 32px; border-radius: 28px 28px 0 0;
  background: linear-gradient(120deg, var(--a), var(--b)); position: relative; overflow: hidden; }
.buyhead h2 { margin: 4px 0 0; text-shadow: 0 2px 14px rgba(0, 0, 0, .3); }
.buyhead .letters { position: absolute; right: 16px; top: -10px; font-size: 6rem; font-weight: 800; color: rgba(255, 255, 255, .18); line-height: 1; letter-spacing: -.07em; }
.success { text-align: center; padding: 18px 0 6px; }
.success svg { width: 104px; height: 104px; filter: drop-shadow(0 0 22px rgba(61, 220, 151, .7)); }
.success circle { stroke-dasharray: 214; stroke-dashoffset: 214; animation: draw .7s var(--ease) forwards; }
.success path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .45s var(--ease) .55s forwards; }
.success h2 { margin: 18px 0 6px; animation: rise .5s var(--ease) .7s both; } .success p { animation: rise .5s var(--ease) .8s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* волна от нажатия на главную кнопку */
button.primary { position: relative; overflow: hidden; }
button.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease); }
button.primary:hover::after { transform: translateX(120%); }

/* обложки категорий от поставщика, коды подарочных карт */
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease); }
.game:hover .cover { transform: scale(1.08); }
.game.has-img .letters { display: none; }
.game.has-img::before { background: linear-gradient(180deg, rgba(0, 0, 0, .05) 35%, rgba(0, 0, 0, .78)); }
.banner, .buyhead { isolation: isolate; }
.banner .cover, .buyhead .cover { z-index: -1; filter: blur(18px) brightness(.55) saturate(1.3); transform: scale(1.25); }
.codes { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: rgba(61, 220, 151, .08); border: 1px dashed rgba(61, 220, 151, .5); }
.code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.code code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 1.02rem; word-break: break-all; }

/* ════════ Кабинет v4: три раздела каталога и регионы ════════ */

/* большие кнопки-разделы: Пополнение Steam / Пополнение игр / Гифт-карты */
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 28px; }
.section { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 22px; text-align: left;
  background: var(--glass); border: 1px solid var(--line); color: var(--ink); min-height: 86px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .35s, background .3s; animation: pop .5s var(--ease) both; }
.section:hover { transform: translateY(-3px); border-color: rgba(139, 108, 255, .6); box-shadow: 0 14px 44px rgba(88, 70, 220, .3); }
.section .bub { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, rgba(139, 108, 255, .9), rgba(34, 211, 238, .75));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 8px 24px rgba(124, 92, 255, .4);
  transition: transform .35s var(--ease); }
.section:hover .bub { transform: scale(1.08) rotate(-4deg); }
.section b { display: block; font-size: 1.06rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.section small { display: block; color: var(--muted); font-size: .82rem; margin-top: 3px; line-height: 1.35; }
.section.on { border-color: transparent; background: linear-gradient(135deg, rgba(139, 108, 255, .22), rgba(34, 211, 238, .12));
  box-shadow: inset 0 0 0 1.5px rgba(139, 108, 255, .8), var(--glow); }
.section.on::before { content: ""; position: absolute; right: 14px; top: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.section { position: relative; }
@media (max-width: 720px) { .sections { grid-template-columns: 1fr; } .section { min-height: 74px; padding: 14px 16px; } }

/* регион на карточке товара */
.pcard .cat { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard .reg { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 10px; border-radius: 99px;
  font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: #c9c4e8;
  background: rgba(139, 108, 255, .16); border: 1px solid rgba(139, 108, 255, .4); }
.pcard .reg .ic { width: 1em; height: 1em; color: var(--accent-2); }

/* чипы регионов над сеткой товаров */
.chips.reg { margin: -8px 0 24px; }
.chips.reg button { gap: 7px; }
.chips.reg button .ic { width: 1.05em; height: 1.05em; color: var(--accent-2); }
.chips.reg button.on .ic { color: #fff; }
