:root {
  --bg: #0B0B0E;
  --surface: #14141A;
  --surface-2: #1A1A21;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #E8E8EC;
  --muted: #8A8A95;
  --accent: #0FFBC8;
  --accent-soft: rgba(15, 251, 200, 0.10);
  --max: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ─── Topbar ─────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.brand-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.22em;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.lang-btn {
  background: none;
  border: 0;
  padding: 4px 2px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: color 120ms ease;
}

.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--text); }
.lang-sep { opacity: 0.4; }

/* ─── Download hero ──────────────────────────────────────────── */

main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 28px 80px;
}

.download-hero {
  text-align: center;
}

.hero-logo {
  display: flex;
  justify-content: center;
  margin: 0 auto 28px;
}

.hero-logo img {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 8px 40px rgba(255, 255, 255, 0.10)) drop-shadow(0 0 80px rgba(15, 251, 200, 0.08));
}

.download-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.download-hero .lede {
  margin: 14px auto 36px;
  font-size: 16px;
  color: var(--muted);
}

/* ─── Version card ───────────────────────────────────────────── */

.version-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  text-align: left;
  margin: 0 auto 32px;
  max-width: 480px;
}

.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.version-tag {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(15, 251, 200, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.version-date {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.changelog {
  margin: 0;
  padding-left: 18px;
  color: #C7C7CD;
  font-size: 14.5px;
  line-height: 1.6;
}

.changelog li { margin-bottom: 6px; }
.changelog li:last-child { margin-bottom: 0; }

/* ─── Archived (prior) version card ──────────────────────────── */

.prior-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  margin: 28px auto 18px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.prior-divider::before,
.prior-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.version-card.archived {
  background: transparent;
  border-color: var(--border);
  padding: 18px 20px;
  margin-bottom: 28px;
  opacity: 0.78;
}

.version-tag.archived {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.version-card.archived .changelog {
  color: var(--muted);
  font-size: 13.5px;
}

/* ─── Download button ────────────────────────────────────────── */

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 140ms ease, box-shadow 160ms ease;
  margin-bottom: 18px;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(15, 251, 200, 0.25);
}

.download-btn svg { stroke: currentColor; }

.install-hint {
  margin: 0 auto 36px;
  font-size: 13px;
  color: var(--muted);
  max-width: 420px;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 4px;
  transition: color 140ms ease;
}

.back-link:hover { color: var(--accent); }

/* ─── Footer ─────────────────────────────────────────────────── */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 24px 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--text);
}

.footer-brand img { width: 22px; height: 22px; }

.footer-links { display: inline-flex; gap: 22px; }
.footer-links a { transition: color 140ms ease; }
.footer-links a:hover { color: var(--text); }

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 520px) {
  .topbar { padding: 18px 20px; }
  main { padding: 36px 20px 56px; }
  .version-card { padding: 18px 18px; }
  .download-btn { width: 100%; padding: 16px; }
  footer { flex-direction: column; gap: 14px; padding: 20px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 18px; }
}
