:root {
    --bg: #07080a;
    --bg-2: #0e1013;
    --panel: #14161a;
    --panel-2: #1b1e23;
    --line: #262a31;
    --line-2: #343943;
    --text: #f2f3f5;
    --muted: #9aa1ac;
    --dim: #6b727d;
    --accent: #5fe3d6;
    --gold: #f2c03f;
    --ok: #4fd18b;
    --bad: #ff6b6b;
    --radius: 14px;
    --wrap: 1200px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ── Шапка ── */
.header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(7, 8, 10, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .14em; font-size: 15px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 22px; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .02em; transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.account-chip {
    display: flex; align-items: center; gap: 8px; text-decoration: none;
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2);
    font-size: 14px; font-weight: 600; max-width: 240px;
}
.account-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip:hover { border-color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }

/* ── Кнопки ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 24px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 700; font-size: 15px; letter-spacing: .02em; text-decoration: none;
    cursor: pointer; transition: transform .12s, background .15s, border-color .15s, opacity .15s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-primary { background: var(--text); color: #08090b; }
.btn-primary:hover { background: #fff; }
.btn-accent { background: var(--accent); color: #061210; }
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); background: rgba(255, 255, 255, .08); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ── Главный экран ── */
.hero {
    position: relative; overflow: hidden;
    min-height: 620px; display: flex; align-items: flex-end;
    padding: 120px 0 80px;
    background: var(--bg-2) center/cover no-repeat;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 8, 10, .92) 0%, rgba(7, 8, 10, .55) 55%, rgba(7, 8, 10, .25) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(7, 8, 10, 0) 45%);
}
.hero .wrap { position: relative; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.hero h1 { font-size: clamp(44px, 8vw, 96px); line-height: .95; margin: 0 0 22px; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: #c9ced6; max-width: 560px; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--dim); }

/* ── Секции ── */
.section { padding: 84px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0; font-weight: 850; letter-spacing: -.01em; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 560px; }
.section-alt { background: var(--bg-2); border-top: 1px solid rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .04); }

/* ── Карточки игр ── */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
[id] { scroll-margin-top: 80px; }
.game-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--card-accent, var(--line-2)); box-shadow: 0 18px 40px -18px var(--card-accent, #000); }
.game-art { position: relative; aspect-ratio: 16 / 10; background: #111 center/cover no-repeat; display: grid; place-items: center; overflow: hidden; }
.game-art .logo { width: 52%; max-height: 78%; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .6)); }
.game-art.has-cover .logo { display: none; }
.game-art .badge { position: absolute; top: 12px; left: 12px; }
.game-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-body h3 { margin: 0; font-size: 20px; font-weight: 800; }
.game-genre { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.game-tagline { color: var(--muted); font-size: 14px; margin: 4px 0 0; flex: 1; }
.game-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { font-weight: 800; font-size: 18px; }
.price.free { color: var(--ok); }
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    background: rgba(7, 8, 10, .72); border: 1px solid rgba(255, 255, 255, .14); color: var(--text);
    backdrop-filter: blur(6px); white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge.owned { background: rgba(79, 209, 139, .16); border-color: rgba(79, 209, 139, .45); color: var(--ok); }

/* ── Delta Hub ── */
.hub { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hub-visual {
    position: relative; border-radius: 20px; border: 1px solid var(--line); overflow: hidden;
    background: radial-gradient(circle at 30% 20%, #1d2228, #0b0c0f 70%);
    aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.hub-visual img { width: 34%; border-radius: 22%; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.app-visual { background: radial-gradient(circle at 50% 45%, rgba(95, 227, 214, .28), #0b0c0f 65%); }
.app-visual img { width: 42%; border-radius: 0; box-shadow: none; filter: drop-shadow(0 0 28px rgba(95, 227, 214, .55)); }
.hub-icons { position: absolute; inset: auto 0 22px; display: flex; justify-content: center; gap: 12px; }
.hub-icons img { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; box-shadow: none; border: 1px solid var(--line-2); background: #111; }
.steps { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: flex; gap: 14px; align-items: flex-start; color: #c9ced6; }
.steps li::before {
    counter-increment: step; content: counter(step);
    flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 800; font-size: 14px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text);
}

/* ── Аккаунт (промо) ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { margin: 12px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line-2); }
.feature .icon svg { width: 20px; height: 20px; }

/* ── Страница игры ── */
.game-hero {
    position: relative; overflow: hidden; padding: 110px 0 60px; min-height: 560px;
    display: flex; align-items: flex-end; background: var(--bg-2) center/cover no-repeat;
}
.game-hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 8, 10, .94) 0%, rgba(7, 8, 10, .6) 50%, rgba(7, 8, 10, .2) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(7, 8, 10, 0) 50%);
}
.game-hero.no-cover { background: radial-gradient(ellipse at 75% 40%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%), var(--bg-2); }
.game-hero.no-cover::before { background: linear-gradient(0deg, var(--bg) 0%, rgba(7, 8, 10, 0) 50%); }
.game-hero.pattern { background-size: 128px; background-repeat: repeat; background-position: 0 0; image-rendering: pixelated; }
.game-hero.pattern::before { background: linear-gradient(90deg, rgba(7, 8, 10, .95) 0%, rgba(7, 8, 10, .75) 55%, rgba(7, 8, 10, .45) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(7, 8, 10, 0) 50%); }
.game-hero .wrap { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; }
.game-hero .side-logo { justify-self: center; width: min(360px, 80%); filter: drop-shadow(0 20px 50px rgba(0, 0, 0, .7)); }
.game-hero h1 { font-size: clamp(40px, 6.4vw, 78px); line-height: .98; margin: 0 0 16px; font-weight: 900; text-transform: uppercase; }
.game-hero .eyebrow { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.buy-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.buy-box .price-big { font-size: 30px; font-weight: 900; margin-right: 8px; }
.buy-box .price-big.free { color: var(--ok); }
.buy-hint { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 560px; }
.game-content { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.about p { color: #c9ced6; font-size: 17px; margin: 0 0 14px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; }
.check-list li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); flex: none; }

/* ── DLC и наборы ── */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.shop-card {
    position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; display: flex; flex-direction: column; gap: 8px;
}
.shop-card.highlight { border-color: color-mix(in srgb, var(--gold) 60%, transparent); background: linear-gradient(180deg, rgba(242, 192, 63, .08), var(--panel) 60%); }
.shop-card h3 { margin: 0; font-size: 19px; }
.shop-card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.shop-card .tag { position: absolute; top: -11px; right: 16px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--gold); color: #1a1405; }
.shop-card .tag.cyan { background: var(--accent); color: #061210; }
.shop-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.diamonds { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 900; }
.diamonds svg { width: 26px; height: 26px; flex: none; }
.bonus { font-size: 13px; font-weight: 700; color: var(--ok); }
.wallet-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
    padding: 16px 20px; margin-bottom: 22px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
}

/* ── Аккаунт ── */
.auth-box { max-width: 440px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.auth-box h1 { margin: 0 0 6px; font-size: 28px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--bg); border-radius: 10px; margin: 22px 0; }
.auth-tabs button { border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 7px; font-weight: 700; cursor: pointer; }
.auth-tabs button.active { background: var(--panel-2); color: var(--text); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input {
    width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg);
    color: var(--text); font: inherit; outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.form-error { color: var(--bad); font-size: 14px; min-height: 20px; margin: 4px 0 10px; }
.profile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.profile h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); word-break: break-all; }
.uid { font-family: Consolas, "SF Mono", monospace; color: var(--muted); font-size: 14px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.lib-item { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.lib-item:hover { border-color: var(--line-2); }
.lib-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #111; flex: none; }
.lib-item .t { font-weight: 700; }
.lib-item .s { font-size: 13px; color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-2); border-radius: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--dim); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
.st { font-weight: 700; }
.st.paid { color: var(--ok); }
.st.pending { color: var(--gold); }
.st.canceled { color: var(--dim); }
.notice { padding: 14px 18px; border-radius: 12px; margin-bottom: 26px; border: 1px solid var(--line-2); background: var(--panel); }
.notice.ok { border-color: rgba(79, 209, 139, .5); background: rgba(79, 209, 139, .08); }
.notice.warn { border-color: rgba(242, 192, 63, .5); background: rgba(242, 192, 63, .08); }
.notice.bad { border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .08); }

/* ── Модальное окно ── */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.modal-box { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 28px; }
.modal-box h3 { margin: 0 0 6px; font-size: 22px; }
.modal-box .sum { font-size: 34px; font-weight: 900; margin: 16px 0; }
.modal-box .small { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ── Документы ── */
.doc { max-width: 820px; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.doc h2 { font-size: 20px; margin: 34px 0 10px; }
.doc p, .doc li { color: #c9ced6; }
.doc .fill { color: var(--gold); }

/* ── Подвал ── */
.footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--dim); font-size: 14px; margin-top: 40px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

@media (max-width: 900px) {
    .hub, .game-content, .game-hero .wrap { grid-template-columns: 1fr; }
    .game-hero .side-logo { display: none; }
    .nav { display: none; }
    .header .wrap { justify-content: space-between; }
}
@media (max-width: 560px) {
    .wrap { padding: 0 16px; }
    .hero { min-height: 560px; padding-top: 90px; }
    .section { padding: 60px 0; }
    .hero-actions .btn, .buy-box .btn { width: 100%; }
    .account-chip span { max-width: 110px; }
    .auth-box { padding: 22px; }
}
