:root {
  --bg: #05060f;
  --bg-2: #0a0d1c;
  --panel: rgba(14, 18, 34, .72);
  --panel-solid: #0d1122;
  --line: rgba(232, 194, 122, .14);
  --line-strong: rgba(232, 194, 122, .3);
  --gold: #e8c27a;
  --gold-2: #f6e3b8;
  --gold-3: #b98b4d;
  --text: #eef1ff;
  --muted: #8b93b8;
  --danger: #ff7a8a;
  --ok: #7ce6a8;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .55);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: radial-gradient(1200px 800px at 80% -10%, rgba(232, 194, 122, .09), transparent 60%), var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

a { color: inherit; text-decoration: none; }

code, kbd {
  font-family: var(--mono);
  font-size: .88em;
  background: rgba(232, 194, 122, .1);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .45em;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(5, 6, 15, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .14em; }
.brand-planet { width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(232, 194, 122, .45)); }
.brand-name { font-size: 14px; }
.brand-name b { color: var(--gold); }

.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--gold-2); }

.nav-account { display: flex; align-items: center; gap: 10px; }

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
}
.account-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 10px 18px;
  font-size: 14px;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary {
  color: #21160a;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
  box-shadow: 0 10px 30px rgba(232, 194, 122, .25);
}
.btn.primary:hover { box-shadow: 0 14px 40px rgba(232, 194, 122, .4); }
.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, .03);
  border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--line-strong); background: rgba(232, 194, 122, .07); }
.btn.big { padding: 14px 26px; font-size: 15px; border-radius: 14px; }
.btn.tiny { padding: 4px 10px; font-size: 12px; border-radius: 8px; background: rgba(232, 194, 122, .1); color: var(--gold-2); border-color: var(--line); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 130px) 24px 40px;
  text-align: center;
}
.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line-strong);
  background: rgba(232, 194, 122, .06);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.gold {
  background: linear-gradient(120deg, var(--gold-2), var(--gold), var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub { color: var(--muted); font-size: clamp(15px, 2vw, 18px); max-width: 620px; margin: 18px auto 0; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-stats { display: flex; gap: clamp(24px, 6vw, 70px); justify-content: center; margin-top: 54px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 24px; color: var(--gold-2); font-weight: 700; }
.stat span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- sections ---------- */
.section { max-width: 1140px; margin: 0 auto; padding: 70px 24px; }
.section h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.01em; margin-bottom: 34px; text-align: center; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(10px);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(232, 194, 122, .08) inset; }
.card h3 { font-size: 17px; margin: 16px 0 8px; }
.card p { color: var(--muted); font-size: 14px; }
.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(232, 194, 122, .16), rgba(232, 194, 122, .04));
  border: 1px solid var(--line);
  color: var(--gold);
}
.icon svg { width: 22px; height: 22px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.step-num {
  position: absolute;
  top: -16px;
  left: 22px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 800;
  color: #21160a;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  box-shadow: 0 8px 24px rgba(232, 194, 122, .3);
}
.step h3 { margin: 14px 0 8px; font-size: 16px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- download ---------- */
.download-card {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(160deg, rgba(232, 194, 122, .08), rgba(14, 18, 34, .85) 45%), var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.download-card h2 { text-align: left; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 14px; }
.meta { display: flex; gap: 34px; margin: 22px 0 18px; }
.meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.meta dd { font-size: 15px; font-weight: 600; color: var(--gold-2); margin-top: 3px; }
.sha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sha code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.download-action { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.hint { font-size: 13px; color: var(--muted); }
progress { width: 100%; height: 8px; border: none; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .06); }
progress::-webkit-progress-bar { background: rgba(255, 255, 255, .06); }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); }
progress::-moz-progress-bar { background: var(--gold); }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* ---------- footer ---------- */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 44px 24px 34px;
  border-top: 1px solid var(--line);
}

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 10, .72); backdrop-filter: blur(6px); }
.modal-box {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 30px 28px;
  box-shadow: var(--shadow);
  animation: pop .22s ease-out;
}
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-box h2 { font-size: 22px; margin-bottom: 18px; }

.tabs { display: flex; gap: 6px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tab {
  flex: 1;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tab.active { background: linear-gradient(135deg, rgba(232, 194, 122, .2), rgba(232, 194, 122, .08)); color: var(--gold-2); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form[hidden] { display: none; }
.auth-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.auth-form input {
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-form input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(232, 194, 122, .12); }
.form-hint { font-size: 12px; color: var(--muted); }
.form-error { margin-top: 14px; font-size: 13px; color: var(--danger); }
.form-error[hidden] { display: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: pop .2s ease-out;
}
.toast.error { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .download-card { grid-template-columns: 1fr; }
  .download-card h2 { text-align: center; }
  .meta { justify-content: center; }
  .sha { justify-content: center; }
  .section h2 { text-align: center; }
}
