:root {
  --bg: #070b10;
  --bg-soft: #0d141d;
  --panel: rgba(15, 24, 34, 0.82);
  --line: rgba(145, 180, 210, 0.16);
  --line-strong: rgba(145, 180, 210, 0.3);
  --text: #e8f0f7;
  --muted: #94a8b8;
  --faint: #607485;
  --cyan: #62e6d5;
  --cyan-soft: rgba(98, 230, 213, 0.12);
  --lime: #c7f36b;
  --orange: #ffb86b;
  --danger: #ff7b8a;
  --radius: 18px;
  --max: 1180px;
  --font: "Inter", "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(45, 146, 138, 0.15), transparent 62%),
    radial-gradient(760px 460px at 4% 12%, rgba(45, 86, 145, 0.16), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #9ff8ec; }
img { max-width: 100%; }
code, pre, .mono { font-family: var(--mono); }
::selection { background: rgba(98, 230, 213, 0.25); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.8);
  backdrop-filter: blur(18px);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 760; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: #05110f; font-family: var(--mono); font-weight: 900; font-size: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 0 28px rgba(98, 230, 213, 0.22);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 9px 12px; border-radius: 9px;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--cyan); background: var(--cyan-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 8px 11px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 0 20px; border-radius: 11px;
  border: 1px solid var(--line-strong);
  color: var(--text); font-weight: 700; font-size: 14px;
  background: rgba(255,255,255,0.03); cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); color: var(--text); border-color: var(--cyan); background: rgba(98,230,213,0.08); }
.btn-primary { color: #05110f; background: linear-gradient(135deg, var(--cyan), var(--lime)); border-color: transparent; }
.btn-primary:hover { color: #05110f; background: linear-gradient(135deg, #8cf4e7, #d8ff8e); }
.btn-ghost { border-color: var(--line); color: var(--muted); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--cyan); font-family: var(--mono); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.035em; margin: 0; }
h1 { font-size: clamp(42px, 7vw, 76px); font-weight: 820; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 780; }
h3 { font-size: 21px; font-weight: 740; }
h4 { font-size: 16px; font-weight: 720; }
p { margin: 0; }
.lead { color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.75; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.hero { padding: 76px 0 52px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.hero-grid > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 54px; align-items: center; }
.hero h1 { margin-top: 18px; }
.hero .lead { max-width: 620px; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; color: var(--faint); font-family: var(--mono); font-size: 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

.terminal {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18,30,42,.95), rgba(9,15,22,.98));
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  overflow: hidden;
}
.terminal-bar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2b3a48; }
.terminal-bar i:nth-child(1) { background: #ff6b6b; } .terminal-bar i:nth-child(2) { background: #ffd166; } .terminal-bar i:nth-child(3) { background: #6ee7b7; }
.terminal-title { margin-left: 8px; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.terminal pre { max-width: 100%; margin: 0; padding: 22px; color: #cfe2ef; font-size: 12.5px; line-height: 1.85; overflow-x: auto; }
.terminal .c { color: #5f7a8f; } .terminal .g { color: var(--lime); } .terminal .b { color: var(--cyan); } .terminal .o { color: var(--orange); }

.stats { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.stat { padding: 22px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 28px; letter-spacing: -0.04em; color: var(--cyan); }
.stat span { color: var(--muted); font-size: 13px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16,26,36,.72), rgba(9,15,22,.72));
  padding: 26px;
}
.card:hover { border-color: var(--line-strong); }
.card-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); font-family: var(--mono); font-weight: 700; margin-bottom: 18px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; }
.feature-list { margin: 16px 0 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding: 7px 0 7px 20px; color: var(--muted); font-size: 14px; border-top: 1px solid rgba(255,255,255,.035); }
.feature-list li::before { content: "→"; position: absolute; left: 0; color: var(--cyan); font-family: var(--mono); }

.page-hero { padding: 74px 0 44px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(13,22,32,.55), transparent); }
.page-hero h1 { font-size: clamp(36px, 5vw, 58px); margin-top: 14px; }
.page-hero .lead { max-width: 760px; margin-top: 18px; }
.content { padding: 54px 0 84px; }
.prose { max-width: 860px; }
.prose h2 { margin: 42px 0 14px; font-size: 28px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: #b7c7d4; }
.prose p { margin: 12px 0; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose code { color: #d7fff8; background: rgba(98,230,213,.08); border: 1px solid rgba(98,230,213,.12); border-radius: 5px; padding: 2px 6px; font-size: .9em; }
.codeblock { background: #070d13; border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px; overflow-x: auto; color: #cfe2ef; font-size: 13px; line-height: 1.85; margin: 18px 0; }
.note { border-left: 3px solid var(--cyan); background: rgba(98,230,213,.06); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); margin: 18px 0; font-size: 14px; }
.warn { border-left-color: var(--orange); background: rgba(255,184,107,.06); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; margin: 18px 0; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-weight: 650; background: rgba(255,255,255,.025); }
td { color: #b7c7d4; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

.download-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: stretch; }
.download-box { padding: 34px; }
.download-box .btn { width: 100%; margin-top: 10px; }
.hash { font-family: var(--mono); font-size: 11.5px; color: var(--faint); word-break: break-all; line-height: 1.65; }
.release-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--lime); border: 1px solid rgba(199,243,107,.25); background: rgba(199,243,107,.06); padding: 6px 10px; border-radius: 999px; }

.timeline { border-left: 1px solid var(--line-strong); margin-left: 9px; padding-left: 28px; }
.timeline-item { position: relative; padding: 0 0 32px; }
.timeline-item::before { content: ""; position: absolute; left: -34px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 0 4px rgba(98,230,213,.08); }
.timeline-item h3 { font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.timeline-item .date { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.timeline-item ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.timeline-item li { margin: 4px 0; }

.footer { border-top: 1px solid var(--line); padding: 46px 0 34px; background: rgba(5,9,13,.55); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr .8fr; gap: 30px; }
.footer p { color: var(--faint); font-size: 13px; max-width: 360px; margin-top: 12px; }
.footer h4 { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.footer a { display: block; color: var(--faint); font-size: 13px; padding: 3px 0; }
.footer a:hover { color: var(--cyan); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 34px; padding-top: 20px; color: var(--faint); font-size: 12px; }

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-family: var(--mono); }
.badge.good { color: var(--lime); border-color: rgba(199,243,107,.24); background: rgba(199,243,107,.06); }
.kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--muted); }

.reveal { opacity: 1; transform: none; }


@media (max-width: 980px) {
  .hero-grid, .download-hero { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav { height: 64px; }
  .nav-links {
    display: none; position: absolute; left: 12px; right: 12px; top: 64px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    border: 1px solid var(--line-strong); border-radius: 14px;
    background: #0b131c; box-shadow: 0 20px 50px rgba(0,0,0,.5);
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .nav-actions .btn { display: none; }
  .section { padding: 62px 0; }
  .hero { padding-top: 52px; }
  .g2, .g3, .g4, .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { display: block; }
  .wrap { padding: 0 18px; }
  .nav { padding: 0 18px; }
}

/* Cyan light theme */
:root {
  --bg: #dffbf6;
  --bg-soft: #c8f7ef;
  --panel: rgba(255, 255, 255, 0.78);
  --line: rgba(7, 70, 67, 0.16);
  --line-strong: rgba(7, 70, 67, 0.3);
  --text: #073b3a;
  --muted: #346b68;
  --faint: #4f827e;
  --cyan: #087f78;
  --cyan-soft: rgba(8, 127, 120, 0.1);
  --lime: #3d7a00;
  --orange: #9a5a00;
}
body {
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(8, 127, 120, 0.18), transparent 62%),
    radial-gradient(760px 460px at 4% 12%, rgba(76, 190, 180, 0.22), transparent 62%),
    var(--bg);
}
.site-header { background: rgba(223, 251, 246, 0.86); }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); background: rgba(7, 59, 58, 0.06); }
.card { background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(240,255,252,.7)); }
.card p, .feature-list li { color: var(--muted); }
.page-hero { background: linear-gradient(180deg, rgba(255,255,255,.45), transparent); }
.table-wrap { background: rgba(255,255,255,.5); }
th { background: rgba(7, 59, 58, 0.05); }
td { color: var(--muted); }
.btn { color: var(--text); background: rgba(255,255,255,.6); }
.btn:hover { color: var(--text); background: rgba(255,255,255,.9); }
.btn-primary, .btn-primary:hover { color: #032b29; }
.btn-ghost { color: var(--muted); }
.footer { background: rgba(200, 247, 239, 0.55); }
.footer p, .footer a, .footer-bottom { color: var(--faint); }
.footer h4 { color: var(--muted); }
.codeblock { background: #062b2b; }
.note { color: var(--muted); }
.prose p, .prose li { color: #295f5c; }
.prose code { color: #075c57; background: rgba(8,127,120,.08); border-color: rgba(8,127,120,.16); }
.timeline-item ul { color: var(--muted); }
.badge { color: var(--muted); background: rgba(255,255,255,.42); }
.badge.good { color: #2e6400; border-color: rgba(61,122,0,.28); background: rgba(61,122,0,.07); }
.hash { color: var(--faint); }
.terminal { background: linear-gradient(180deg, rgba(18,30,42,.98), rgba(9,15,22,1)); }
.terminal-title { color: #607485; }

/* Desktop language selector */
.nav-actions { gap: 8px; }
.lang-picker { position: relative; flex: 0 0 auto; }
.lang-button {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.38);
  color: var(--muted); font: 650 12px var(--font); cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.lang-button:hover, .lang-button[aria-expanded="true"] {
  border-color: var(--line-strong); background: rgba(255,255,255,.78); color: var(--text);
}
.flag-icon { width: 18px; height: 13px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(7,59,58,.18); display: block; flex: 0 0 auto; }
.lang-chev { color: var(--faint); font-size: 10px; margin-left: 1px; }
.lang-options {
  display: none; position: absolute; right: 0; top: calc(100% + 9px);
  min-width: 158px; padding: 7px; z-index: 60; list-style: none; margin: 0;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: #f4fffd; box-shadow: 0 18px 38px rgba(7,59,58,.16);
}
.lang-options.open { display: block; }
.lang-options a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: 7px; color: var(--muted); font-size: 12px;
}
.lang-options a:hover, .lang-options a:focus, .lang-options a.current { color: var(--accent); background: var(--accent-soft); outline: 0; }
.lang-options a .flag-icon { width: 20px; height: 14px; }
@media (max-width: 760px) { .lang-picker { display: none; } }

/* RTL */
[dir="rtl"] .lang-options { right: auto; left: 0; }
[dir="rtl"] .lang-options a { flex-direction: row-reverse; }
[dir="rtl"] .terminal pre, [dir="rtl"] .codeblock { direction: ltr; text-align: left; }
[dir="rtl"] .hero-actions, [dir="rtl"] .m-actions { direction: rtl; }


/* More languages entry */
.lang-options .lang-more {
  list-style: none; margin-top: 4px; padding-top: 5px;
  border-top: 1px solid var(--line);
}
.lang-options .lang-more a {
  color: var(--accent); font-weight: 750;
  justify-content: flex-start; gap: 7px;
}
.lang-options .lang-more a span { color: var(--faint); font-size: 10px; }
