:root {
  --bg:#121212; --bg2:#181818; --card:#1b1b1d; --line:#2a2a2e; --text:#e6e6e8; --muted:#9a9aa3;
  --red:#d9262c; --red2:#a81a1f; --ok:#52b788; --err:#ff6b6b; --radius:14px;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; min-height:100vh; background:var(--bg); color:var(--text);
  font-family:-apple-system,"Segoe UI",Roboto,Inter,sans-serif; line-height:1.5;
  background-image:radial-gradient(900px 420px at 50% -120px, rgba(217,38,44,.16), transparent 70%);
  background-repeat:no-repeat;
}
a { color:inherit; text-decoration:none; }
.wrap { width:100%; max-width:960px; margin:0 auto; padding:0 16px; }

/* header */
header#hdr { position:sticky; top:0; z-index:20; background:rgba(18,18,18,.82); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.hdr-in { max-width:960px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.brand { display:flex; align-items:center; gap:9px; font-weight:700; color:#fff; letter-spacing:.2px; }
.brand svg { width:30px; height:30px; fill:#fff; }
nav.main { display:flex; gap:4px; margin-left:8px; }
nav.main a { padding:7px 12px; border-radius:9px; color:var(--muted); font-size:14.5px; transition:.15s; }
nav.main a:hover { color:#fff; background:rgba(255,255,255,.06); }
nav.main a.active { color:#fff; background:rgba(217,38,44,.18); }
.hdr-r { margin-left:auto; display:flex; align-items:center; gap:10px; }
.langs { display:flex; border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.langs button { background:transparent; border:0; color:var(--muted); padding:6px 9px; font-size:12.5px; cursor:pointer; }
.langs button.active { background:var(--red); color:#fff; }

/* buttons & inputs */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:0; cursor:pointer; width:100%; padding:13px 16px; border-radius:10px; font-size:16px; font-weight:600; color:#fff; background:linear-gradient(180deg,var(--red),var(--red2)); transition:.15s; }
.btn:hover { filter:brightness(1.1); }
.btn:disabled { opacity:.5; cursor:not-allowed; filter:none; }
.btn.ghost { background:transparent; border:1px solid var(--line); color:var(--text); }
.btn.ghost:hover { border-color:var(--red); }
.btn.sm { width:auto; padding:8px 14px; font-size:14px; border-radius:9px; }
input { width:100%; padding:12px 13px; margin-bottom:10px; border-radius:10px; border:1px solid #38383d; background:#222226; color:#fff; font-size:16px; outline:none; }
input:focus { border-color:var(--red); }

/* hero */
.hero { text-align:center; padding:34px 0 10px; }
.hero .logo svg { width:128px; height:128px; fill:#fff; filter:drop-shadow(0 6px 26px rgba(217,38,44,.35)); }
.hero h1 { margin:8px 0 4px; font-size:30px; color:#fff; letter-spacing:.3px; }
.hero p.tag { margin:0 0 18px; color:var(--muted); }
.hero .cta { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }

/* cards */
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:20px; margin:16px 0; }
.card h2 { margin:0 0 6px; font-size:18px; color:#fff; }
.card p { margin:0 0 12px; color:#b7b7c0; font-size:14.5px; }
.hint { color:var(--muted); font-size:13px; margin:0 0 12px; }
.hint a, .link { color:#ff7a7f; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.feat { display:flex; gap:12px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--bg2); }
.feat .ic { font-size:22px; }
.feat b { display:block; color:#fff; font-size:15px; }
.feat span { color:var(--muted); font-size:13.5px; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

/* result boxes */
.box { padding:13px; border-radius:10px; font-size:14.5px; word-break:break-word; margin-top:12px; }
.box.ok { background:#16281e; border:1px solid #2d6a4f; color:var(--ok); }
.box.err { background:#341a1b; border:1px solid #782929; color:var(--err); }
.box code, .code { display:block; margin:6px 0; padding:9px 10px; background:#0f0f10; border-radius:8px; color:var(--ok); user-select:all; font-family:ui-monospace,Consolas,monospace; white-space:pre-wrap; }
.box p { margin:5px 0; color:inherit; }

/* auth */
.auth-card { max-width:420px; margin:36px auto; }
.tabs { display:flex; gap:8px; margin:12px 0 16px; }
.tabs button { flex:1; padding:10px; border-radius:10px; border:1px solid var(--line); background:transparent; color:var(--muted); cursor:pointer; font-size:15px; }
.tabs button.active { color:#fff; border-color:var(--red); background:rgba(217,38,44,.14); }
.center { text-align:center; }
.mini-logo svg { width:64px; height:64px; fill:#fff; }

/* cabinet */
.bal { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.bal .num { font-size:42px; font-weight:800; color:#fff; line-height:1; }
.bal .lbl { color:var(--muted); font-size:13px; margin-bottom:4px; }
.tiers { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.tier { border:1px solid var(--line); background:var(--bg2); border-radius:12px; padding:14px; text-align:center; }
.tier .pct { font-size:26px; font-weight:800; color:#fff; }
.tier .cost { color:var(--muted); font-size:13px; margin:2px 0 10px; }
.promo { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--bg2); margin-bottom:8px; }
.promo code { font-family:ui-monospace,Consolas,monospace; color:#fff; font-size:15px; }
.promo small { color:var(--muted); }
.badge { font-size:12px; padding:2px 8px; border-radius:20px; background:rgba(82,183,136,.15); color:var(--ok); }
.badge.off { background:rgba(255,255,255,.07); color:var(--muted); }
.hist div { display:flex; justify-content:space-between; padding:8px 0; border-top:1px solid var(--line); font-size:14px; color:#c9c9d0; }
.hist div b { color:var(--ok); }

footer { text-align:center; padding:26px 0 40px; color:#5f5f68; font-size:12.5px; }

@media (max-width:640px) {
  .grid2, .two { grid-template-columns:1fr; }
  nav.main { order:3; width:100%; margin:0; }
  nav.main a { flex:1; text-align:center; }
  .hero .logo svg { width:104px; height:104px; }
  .hero h1 { font-size:26px; }
}

/* support widget */
.sup-btn { position:fixed; right:18px; bottom:calc(18px + env(safe-area-inset-bottom)); z-index:30; width:52px; height:52px; border-radius:50%; border:0; cursor:pointer; background:linear-gradient(180deg,var(--red),var(--red2)); color:#fff; font-size:26px; font-weight:700; box-shadow:0 6px 22px rgba(217,38,44,.45); }
.sup-btn.dot::after { content:""; position:absolute; top:4px; right:4px; width:13px; height:13px; border-radius:50%; background:#ffd24a; border:2px solid var(--bg); }
.sup-panel { position:fixed; right:18px; bottom:calc(82px + env(safe-area-inset-bottom)); z-index:30; width:min(360px, calc(100vw - 36px)); max-height:72vh; display:none; flex-direction:column; background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 40px rgba(0,0,0,.55); overflow:hidden; }
.sup-panel.open { display:flex; }
.sup-head { display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-bottom:1px solid var(--line); color:#fff; }
.sup-x { background:none; border:0; color:var(--muted); font-size:22px; cursor:pointer; }
.sup-body { padding:12px 14px; overflow-y:auto; flex:1; min-height:90px; }
.sup-msg { margin:8px 0; padding:8px 10px; border-radius:10px; font-size:14px; word-break:break-word; white-space:pre-wrap; }
.sup-msg small { display:block; color:var(--muted); font-size:11.5px; margin-bottom:2px; }
.sup-msg.usr { background:#26262b; margin-left:28px; }
.sup-msg.adm { background:rgba(217,38,44,.16); margin-right:28px; }
.sup-foot { padding:10px 12px 12px; border-top:1px solid var(--line); }
.sup-foot input, .sup-foot textarea { width:100%; margin-bottom:8px; padding:9px 10px; border-radius:9px; border:1px solid #38383d; background:#222226; color:#fff; font-size:14px; font-family:inherit; resize:none; outline:none; }
.sup-foot .btn { width:100%; }
