:root {
    --bg: #0a0a0d;
    --bg-2: #111116;
    --card: rgba(255, 255, 255, 0.035);
    --card-hi: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.08);
    --line-hi: rgba(255, 140, 40, 0.45);
    --text: #f4f1ec;
    --muted: rgba(244, 241, 236, 0.58);
    --orange: #ff6a00;
    --orange-2: #ff8a1f;
    --yellow: #ffd000;
    --accent: #ff7a2f;
    --grad: linear-gradient(100deg, #ff6a00 0%, #ff9a14 45%, #ffd000 100%);
    --ok: #34d399;
    --err: #ff5d5d;
    --radius: 18px;
    --head: 'Unbounded', 'Manrope', system-ui, sans-serif;
    --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ───── фон ───── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.32; }
.b1 { width: 620px; height: 620px; background: #ff5a00; top: -240px; right: -160px; }
.b2 { width: 520px; height: 520px; background: #ffb400; bottom: -260px; left: -200px; opacity: 0.16; }
.bg-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

/* ───── знак проекта (звезда) в градиенте ───── */
.mark {
    display: inline-block; width: 38px; height: 22px; flex: none;
    background: var(--grad);
    -webkit-mask: url('/assets/mark.png') left center / contain no-repeat;
    mask: url('/assets/mark.png') left center / contain no-repeat;
}
.mark-lg { width: 120px; height: 70px; margin: 0 auto 8px; display: block; }

/* ───── шапка ───── */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 10, 13, 0.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { font-family: var(--head); font-weight: 900; letter-spacing: 0.04em; font-size: 18px; }
.brand-text b { font-weight: 500; margin-left: 4px; color: var(--muted); }
.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.active { color: var(--text); background: var(--card-hi); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.online-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.online-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.online-pill b { color: var(--text); }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 0; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; }
.burger span:first-child { top: 15px; } .burger span:last-child { top: 23px; }

@media (max-width: 820px) {
    .online-pill { display: none; }
    .burger { display: block; }
    .nav {
        position: absolute; top: 68px; left: 0; right: 0; margin: 0;
        flex-direction: column; padding: 12px 16px 16px;
        background: rgba(10,10,13,0.97); border-bottom: 1px solid var(--line);
        display: none;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 14px; }
}

/* ───── кнопки ───── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent;
    font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
    transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #1a0d00; box-shadow: 0 10px 30px -10px rgba(255, 106, 0, 0.7); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(255, 140, 0, 0.9); }
.btn-primary:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--line-hi); background: var(--card-hi); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ───── типографика ───── */
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h1 { font-family: var(--head); font-weight: 700; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; margin: 0 0 12px; }
.h2 { font-family: var(--head); font-weight: 700; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.15; margin: 0 0 24px; }
.lead { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 0 32px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.section { padding: 56px 16px; }
@media (min-width: 720px) { .section { padding: 72px 32px; } }
.page-top { padding-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.more { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ───── карточки ───── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* ───── главная ───── */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: center; padding-top: 72px; padding-bottom: 40px; min-height: calc(100vh - 68px); max-height: 900px; }
.hero h1 { font-family: var(--head); font-weight: 900; font-size: clamp(40px, 7vw, 84px); line-height: 0.98; letter-spacing: -0.01em; margin: 0 0 22px; text-transform: uppercase; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: var(--head); font-size: 30px; font-weight: 700; }
.hero-stats span { font-size: 13px; color: var(--muted); }
.hero-art { position: relative; aspect-ratio: 1; }
.star-big {
    position: absolute; inset: 8%;
    background: var(--grad);
    /* в mark.png справа пустое поле — растягиваем маску, чтобы звезда с хвостом заняла круг */
    -webkit-mask: url('/assets/mark.png') 4% 50% / 168% auto no-repeat;
    mask: url('/assets/mark.png') 4% 50% / 168% auto no-repeat;
    filter: drop-shadow(0 0 40px rgba(255, 120, 0, 0.55));
    animation: float 6s ease-in-out infinite;
}
.ring { position: absolute; border: 1px solid rgba(255, 150, 40, 0.18); border-radius: 50%; }
.r1 { inset: 4%; animation: spin 40s linear infinite; border-style: dashed; }
.r2 { inset: 20%; border-color: rgba(255, 210, 0, 0.12); }
@keyframes float { 50% { transform: translateY(-14px) rotate(-3deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
    .hero-art { display: none; }
}
@media (prefers-reduced-motion: reduce) { .star-big, .r1 { animation: none; } }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat { padding: 26px; transition: border-color .2s, transform .2s; }
.feat:hover { border-color: var(--line-hi); transform: translateY(-3px); }
.feat .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 120, 0, 0.12); color: var(--orange-2); font-size: 22px; margin-bottom: 18px; }
.feat h3, .step h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.feat p, .step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 26px; position: relative; overflow: hidden; }
.step-n { font-family: var(--head); font-weight: 900; font-size: 44px; line-height: 1; display: block; margin-bottom: 14px; color: transparent; -webkit-text-stroke: 1px rgba(255, 150, 40, 0.55); }
.step a { color: var(--accent); }
.copy { margin-top: 16px; display: inline-flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line-hi); background: rgba(255,120,0,0.07); font-weight: 700; }
.copy i { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 600; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ───── наборы ───── */
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pack { padding: 26px; display: flex; flex-direction: column; position: relative; transition: border-color .2s, transform .2s; }
.pack:hover { border-color: var(--line-hi); transform: translateY(-4px); }
.pack.hot { border-color: rgba(255, 140, 30, 0.55); background: linear-gradient(180deg, rgba(255,106,0,0.12), rgba(255,255,255,0.03) 60%); }
.pack-tag { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--grad); color: #1a0d00; }
.pack h3 { font-family: var(--head); font-size: 20px; margin: 0 0 4px; }
.pack-price { font-family: var(--head); font-size: 32px; font-weight: 700; margin: 10px 0 18px; }
.pack-price small { font-size: 16px; color: var(--muted); font-weight: 500; }
.pack ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 9px; flex: 1; }
.pack li { display: flex; gap: 10px; font-size: 15px; }
.pack li::before { content: ''; width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 6px; background: rgba(255,140,30,0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23ff9a14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
@media (max-width: 1080px) { .packs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .packs { grid-template-columns: 1fr; } }

/* ───── вкладки магазина ───── */
.tabs { display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: 1; min-width: max-content; padding: 11px 18px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 700; }
.tab.active { background: var(--grad); color: #1a0d00; }

.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; overflow: hidden; }
.calc-left { padding: 30px; }
.calc-left h3 { margin: 0 0 6px; font-size: 22px; font-family: var(--head); }
.calc-right { padding: 30px; background: rgba(255, 106, 0, 0.07); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.calc-out { font-family: var(--head); font-size: clamp(30px, 4vw, 42px); font-weight: 700; line-height: 1.1; margin-bottom: 10px; word-break: break-word; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } .calc-right { border-left: 0; border-top: 1px solid var(--line); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px; }
.chips button:hover { border-color: var(--line-hi); }

.note { margin: -8px 0 20px; }
.admin-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.adm { padding: 20px; display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.adm:hover { border-color: var(--line-hi); transform: translateY(-3px); }
.adm .lvl { font-family: var(--head); font-size: 34px; font-weight: 900; line-height: 1; }
.adm .lvl-l { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.adm .price { font-weight: 800; font-size: 18px; margin-top: 8px; }
@media (max-width: 980px) { .admin-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .admin-grid { grid-template-columns: repeat(2, 1fr); } }

/* ───── формы ───── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field select {
    height: 48px; padding: 0 14px; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35);
    outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field select option { background: var(--bg-2); }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.18); }
.form-err { color: var(--err); font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.form-ok { color: var(--ok); font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 4px 0 18px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); margin: 2px 0 0; flex: none; }
.check a { color: var(--accent); }

/* ───── вход и кабинет ───── */
.auth { max-width: 440px; margin: 20px auto 40px; padding: 36px 30px; }
.auth form { margin-top: 26px; }
.auth .small { margin-top: 18px; }

.cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.cab-actions { display: flex; gap: 10px; }
.balance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 48px; }
.bal { padding: 22px 24px; }
.bal span { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.bal b { font-family: var(--head); font-size: 30px; font-weight: 700; }
@media (max-width: 640px) { .balance { grid-template-columns: 1fr; } }

.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 48px; }
.char { padding: 22px; }
.char-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.char-name { font-weight: 800; font-size: 18px; }
.char-sid { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(255,140,30,0.14); color: var(--orange-2); margin: 0 6px 6px 0; }
.badge.vip { background: rgba(255, 208, 0, 0.14); color: var(--yellow); }
.badge.adm { background: rgba(255, 93, 93, 0.14); color: #ff8a8a; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 10px; }
.kv div span { display: block; font-size: 12px; color: var(--muted); }
.kv div b { font-weight: 800; }

.table-card { overflow-x: auto; margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.table tr:last-child td { border-bottom: 0; }
.st { font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.st-paid { background: rgba(52, 211, 153, 0.14); color: var(--ok); }
.st-pending, .st-processing { background: rgba(255, 208, 0, 0.12); color: var(--yellow); }
.st-canceled { background: rgba(255, 93, 93, 0.12); color: var(--err); }

/* ───── модальное окно ───── */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 30px 26px; background: var(--bg-2); }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: none; font-size: 22px; line-height: 1; }
.modal .h2 { margin-bottom: 8px; padding-right: 30px; }
.modal #coDesc { margin: 0 0 22px; }
.promo-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.promo-row .btn { margin-bottom: 16px; height: 48px; }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay-methods label { cursor: pointer; }
.pay-methods input { position: absolute; opacity: 0; pointer-events: none; }
.pay-methods span { display: grid; place-items: center; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,0.3); font-weight: 700; font-size: 14px; transition: border-color .15s, background .15s; }
.pay-methods input:checked + span { border-color: var(--accent); background: rgba(255, 122, 47, 0.14); color: var(--text); }
.pay-methods input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.25); }
@media (max-width: 420px) { .pay-methods { grid-template-columns: repeat(2, 1fr); } }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; margin-bottom: 14px; border-top: 1px solid var(--line); }
.co-total b { font-family: var(--head); font-size: 26px; }
.co-total s { color: var(--muted); font-size: 16px; font-weight: 500; margin-right: 6px; }
.req { display: grid; gap: 10px; margin: 18px 0; }
.req-row { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--line); }
.req-row span { color: var(--muted); font-size: 14px; }
.req-row b { font-weight: 800; text-align: right; word-break: break-all; }
.req-row button { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 0 0 0 10px; }

/* ───── соглашение ───── */
.legal { max-width: 820px; }
.legal h3 { color: var(--accent); font-size: 18px; margin: 28px 0 8px; }
.legal p { color: rgba(244, 241, 236, 0.82); margin: 0 0 10px; }

/* ───── подвал и уведомления ───── */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.footer-in p { margin: 0; flex: 1; min-width: 240px; }
.footer-nav { display: flex; gap: 18px; color: var(--muted); font-weight: 600; font-size: 14px; }
.footer-nav a:hover { color: var(--text); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; padding: 14px 20px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-hi); font-weight: 700; box-shadow: 0 20px 50px -20px #000; max-width: calc(100vw - 32px); }

.notice { grid-column: 1 / -1; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); border-color: rgba(255, 208, 0, 0.25); }

.connect-box { display: grid; grid-template-columns: auto auto; gap: 6px 14px; margin-top: 14px; font-size: 15px; }
.connect-box span { color: var(--muted); }
.connect-box b { font-family: var(--head); font-weight: 700; letter-spacing: .02em; }
.hero-ip { display: inline-flex; align-items: center; gap: 10px; margin: -24px 0 36px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line-hi); background: rgba(255,120,0,0.07); font-weight: 700; }
.hero-ip span { color: var(--muted); font-weight: 600; }
.hero-ip button { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 0; }

.skeleton { min-height: 280px; background: linear-gradient(90deg, var(--card) 0%, var(--card-hi) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
