:root {
  --bg: #070b14;
  --bg-elev: #0e1424;
  --surface: rgba(20, 27, 45, 0.78);
  --surface-solid: #141b2d;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f3f6fc;
  --text-muted: #9aa7bf;
  --gold: #dfb96b;
  --gold-soft: rgba(223, 185, 107, 0.14);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.14);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg: #f3f6fb;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --text: #0f172a;
  --text-muted: #475569;
  --gold: #a16207;
  --gold-soft: rgba(161, 98, 7, 0.1);
  --blue: #1d4ed8;
  --blue-soft: rgba(29, 78, 216, 0.1);
  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.1);
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
}
.bg-glow-1 {
  width: 520px; height: 520px;
  top: -160px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}
.bg-glow-2 {
  width: 420px; height: 420px;
  bottom: -140px; right: -100px;
  background: radial-gradient(circle, #dfb96b 0%, transparent 70%);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.nav-logo {
  width: 40px; height: 40px;
  object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.2px; }
.brand-sub { font-size: 0.72rem; color: var(--gold); font-weight: 600; }

.nav-links {
  display: flex;
  gap: 22px;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

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

.lang-switcher {
  display: flex;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
  transition: transform 0.2s;
}
.icon-btn:hover { transform: scale(1.06); }

/* Hero */
.hero {
  text-align: center;
  padding: 64px 20px 44px;
}
.hero-emblem-wrap {
  position: relative;
  width: 190px; height: 190px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
}
.emblem-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 185, 107, 0.28) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.65; }
  50% { transform: scale(1.06); opacity: 1; }
}
.hero-logo {
  position: relative;
  width: 184px; height: 184px;
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.55));
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
.badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.badge-gold { background: var(--gold-soft); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.badge-blue { background: var(--blue-soft); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.badge-green { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.badge-free { background: var(--surface-solid); color: var(--text); }

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text) 35%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 42px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}
.btn-secondary {
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.btn-block { width: 100%; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 880px;
  margin: 0 auto;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 14px;
  box-shadow: var(--shadow);
}
.stat-val { font-size: 1.45rem; font-weight: 900; color: var(--gold); }
.stat-lbl { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Sections */
.section { padding: 54px 20px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 8px;
}
.section-title { font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 800; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.card-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.92rem; }

/* Devices */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.device-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.device-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.codename {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 2px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.device-top h3 { font-size: 1.35rem; font-weight: 800; }
.status-pill {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.spec-list strong { color: var(--text); }

/* Changelog */
.changelog-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.changelog-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.ver-badge {
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-right: 10px;
}
.ver-date, .ver-author { color: var(--text-muted); font-size: 0.88rem; font-weight: 600; }

.changelog-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.chg-group {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
}
.chg-group h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--gold);
}
.chg-group ul {
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Install */
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 18px;
}
.steps-list {
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.steps-list code {
  background: var(--blue-soft);
  color: var(--blue);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.84rem;
}

.alert-box {
  background: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 16px;
  padding: 18px 22px;
  font-size: 0.92rem;
}
.alert-box strong { color: var(--gold); display: block; margin-bottom: 4px; }
.alert-box p { color: var(--text); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 30px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 38px; height: 38px; object-fit: contain; }
.footer-copy, .footer-note { font-size: 0.85rem; color: var(--text-muted); }
.footer-copy a { color: var(--gold); text-decoration: none; font-weight: 700; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .devices-grid, .changelog-groups, .install-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .lang-btn { padding: 5px 7px; font-size: 0.72rem; }
}
