:root {
  --bg: #090b12;
  --bg2: #10131d;
  --card: rgba(22, 26, 40, .78);
  --card-solid: #161a28;
  --line: rgba(227, 182, 92, .16);
  --line2: rgba(255, 255, 255, .07);
  --text: #ebe6da;
  --muted: #9c98aa;
  --gold: #e3b65c;
  --gold2: #f6d995;
  --ember: #ff7a3d;
  --ok: #5fd39a;
  --bad: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 122, 61, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(90, 80, 200, .12), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0 0 .4em; line-height: 1.15; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 22px; }
.muted { color: var(--muted); }
.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px);
  background: rgba(9, 11, 18, .72); border-bottom: 1px solid var(--line2);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: .28em; color: var(--text); display: flex; align-items: center; gap: 10px; }
.logo svg { width: 28px; height: 28px; }
.logo span { background: linear-gradient(180deg, var(--gold2), var(--gold) 55%, #a87a2c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; transition: .2s; }
.nav a:hover, .nav a.on { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.btn, .nav a.btn:hover { color: #1b1307; background: linear-gradient(180deg, var(--gold2), var(--gold)); margin-left: 6px; }
.nav .bal { color: var(--gold2); display: inline-flex; gap: 6px; align-items: center; }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line2); color: var(--text); border-radius: 9px; width: 42px; height: 38px; font-size: 18px; cursor: pointer; }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; background: rgba(9, 11, 18, .97); border-bottom: 1px solid var(--line2); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------- кнопки, поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font: 700 14px var(--body); letter-spacing: .02em;
  padding: 12px 22px; border-radius: 11px; transition: transform .15s, box-shadow .2s, background .2s;
  color: #1b1307; background: linear-gradient(180deg, var(--gold2), var(--gold)); box-shadow: 0 8px 26px rgba(227, 182, 92, .25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 34px rgba(227, 182, 92, .38); color: #1b1307; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn.danger { background: rgba(255, 107, 107, .12); color: var(--bad); border: 1px solid rgba(255, 107, 107, .3); box-shadow: none; }
.btn.okb { background: rgba(95, 211, 154, .14); color: var(--ok); border: 1px solid rgba(95, 211, 154, .35); box-shadow: none; }
.btn.big { padding: 16px 30px; font-size: 16px; }

label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line2);
  background: rgba(0, 0, 0, .28); color: var(--text); font: 15px var(--body); outline: none; transition: border .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(227, 182, 92, .55); box-shadow: 0 0 0 3px rgba(227, 182, 92, .12); }
select option { background: var(--card-solid); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }

/* ---------- карточки ---------- */
.card {
  background: var(--card); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); position: relative;
}
.card.gold { border-color: var(--line); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: 12px; font-weight: 700; color: var(--ember); margin-bottom: 8px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: rgba(227, 182, 92, .12); color: var(--gold2); border: 1px solid var(--line); }
.tag.ok { background: rgba(95, 211, 154, .12); color: var(--ok); border-color: rgba(95, 211, 154, .3); }
.tag.bad { background: rgba(255, 107, 107, .1); color: var(--bad); border-color: rgba(255, 107, 107, .3); }
.tag.dim { background: rgba(255, 255, 255, .05); color: var(--muted); border-color: var(--line2); }

/* ---------- главный экран ---------- */
.hero { position: relative; overflow: hidden; padding: 110px 0 120px; border-bottom: 1px solid var(--line2); }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(700px 380px at 50% 105%, rgba(255, 122, 61, .32), transparent 70%),
    radial-gradient(900px 500px at 50% 120%, rgba(227, 182, 92, .18), transparent 70%),
    linear-gradient(180deg, #0b0e1a, #0d0f19 60%, #120f12);
}
.hero .mount { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 46%; z-index: -1; }
.hero .inner { text-align: center; }
.hero h1 {
  font-size: clamp(64px, 13vw, 150px); letter-spacing: .18em; margin: 0 0 6px; padding-left: .18em;
  background: linear-gradient(180deg, #fff6dc 10%, var(--gold2) 40%, var(--gold) 70%, #8d6420);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 40px rgba(227, 182, 92, .25));
}
.hero .sub { font-family: var(--display); font-size: clamp(20px, 3vw, 28px); color: #d8d0bd; font-style: italic; margin-bottom: 30px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 99px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); font-size: 14px; margin-bottom: 26px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(95, 211, 154, .6); animation: pulse 2s infinite; }
.dot.off { background: var(--bad); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(95, 211, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 211, 154, 0); } }

.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px 2px rgba(255, 122, 61, .7); opacity: 0; animation: rise linear infinite; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx), -110vh); opacity: 0; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: -48px; position: relative; z-index: 2; }
.stat { background: var(--card-solid); border: 1px solid var(--line2); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--gold2); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }

.steps { counter-reset: s; }
.step { padding-top: 78px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 22px; left: 24px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #1b1307; background: linear-gradient(135deg, var(--gold2), var(--ember)); }

/* ---------- новости ---------- */
.news-card { display: flex; flex-direction: column; gap: 10px; transition: transform .2s, border-color .2s; }
.news-card:hover { transform: translateY(-3px); border-color: var(--line); }
.news-card .meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.news-card p { margin: 0; color: #cfc9bb; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.article { margin-bottom: 18px; }
.article .body p { margin: 0 0 .9em; color: #d6d0c2; }

/* ---------- классы ---------- */
.cls { overflow: hidden; }
.cls .glyph { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-size: 26px; font-weight: 700; color: #1b1307; background: linear-gradient(135deg, var(--gold2), var(--ember)); margin-bottom: 14px; }
.cls p { color: #c9c3b5; font-size: 14px; margin: 8px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); color: var(--muted); cursor: default; }
button.chip { cursor: pointer; font: 600 13px var(--body); padding: 8px 14px; }
button.chip.on { background: rgba(227, 182, 92, .14); color: var(--gold2); border-color: var(--line); }

/* ---------- таблицы ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--line2); }
td { padding: 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.tbl { overflow-x: auto; }
.rank { font-family: var(--display); font-size: 20px; color: var(--gold); width: 40px; }
.plus { color: var(--ok); font-weight: 700; }
.minus { color: var(--bad); font-weight: 700; }

/* ---------- магазин ---------- */
.prod { display: flex; flex-direction: column; gap: 10px; transition: transform .2s, border-color .2s; }
.prod:hover { transform: translateY(-3px); border-color: var(--line); }
.prod .ico { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, rgba(246, 217, 149, .25), rgba(227, 182, 92, .05)); border: 1px solid var(--line); }
.prod .ico svg { width: 34px; height: 34px; }
.iic { display: inline-block; flex: none; background-repeat: no-repeat; border-radius: 6px; vertical-align: middle; }
.prod .ico .iic { border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.bundle { margin: 0; padding: 0; list-style: none; font-size: 13px; color: #cfc9bb; display: grid; gap: 4px; }
.bundle li { display: flex; align-items: center; gap: 8px; }
.prod h3 { font-size: 20px; margin: 4px 0 0; }
.prod .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; }
.price { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--gold2); display: inline-flex; align-items: center; gap: 6px; }
.gem { width: 16px; height: 16px; display: inline-block; vertical-align: -2px; }

.pack { text-align: center; cursor: pointer; transition: transform .2s, border-color .2s; }
.pack:hover { transform: translateY(-4px); border-color: rgba(227, 182, 92, .5); }
.pack .amount { font-family: var(--display); font-size: 44px; font-weight: 700; color: var(--gold2); line-height: 1; margin: 10px 0 4px; }
.pack .rub { font-size: 20px; font-weight: 800; margin-top: 14px; }
.pack .bonus { position: absolute; top: 12px; right: 12px; }

/* ---------- кабинет ---------- */
.balance { background: linear-gradient(135deg, rgba(227, 182, 92, .18), rgba(255, 122, 61, .08)); border-color: var(--line); }
.balance .num { font-family: var(--display); font-size: 52px; font-weight: 700; color: var(--gold2); line-height: 1; }
.char { display: flex; gap: 14px; align-items: center; }
.char .av { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2b2f45, #1a1d2b); border: 1px solid var(--line); font-family: var(--display); font-size: 22px; color: var(--gold2); flex: none; }
.char .lv { margin-left: auto; text-align: right; }
.char .lv b { font-family: var(--display); font-size: 26px; color: var(--gold2); display: block; line-height: 1; }

/* ---------- вход ---------- */
.auth { max-width: 440px; margin: 60px auto; }
.tabs { display: flex; gap: 6px; padding: 5px; background: rgba(0, 0, 0, .3); border-radius: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.tabs button { flex: 1; border: 0; background: none; color: var(--muted); font: 700 14px var(--body); padding: 10px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: rgba(227, 182, 92, .14); color: var(--gold2); }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 10px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ---------- окно и уведомления ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(3, 4, 8, .7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal .card { width: min(480px, 100%); max-height: 90vh; overflow: auto; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100% - 32px); }
.toast { background: var(--card-solid); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: slide .25s; max-width: 380px; }
.toast.bad { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }
@keyframes slide { from { transform: translateY(12px); opacity: 0; } }

.code { font-family: ui-monospace, Consolas, monospace; font-size: 26px; letter-spacing: .12em; color: var(--gold2); background: rgba(0, 0, 0, .35); padding: 12px 18px; border-radius: 10px; border: 1px dashed var(--line); text-align: center; margin: 14px 0; user-select: all; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.page { padding: 48px 0 80px; min-height: 60vh; }
.loader { text-align: center; padding: 80px; color: var(--muted); }

footer { border-top: 1px solid var(--line2); padding: 34px 0; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
