:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #0d1420;
  --panel-2: #121b29;
  --text: #eef4ff;
  --muted: #99a6ba;
  --line: #223049;
  --accent: #39c5bb;
  --accent-2: #f2b84b;
  --accent-3: #7ca7ff;
  --code-bg: #050811;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(57, 197, 187, .16), transparent 34%),
    radial-gradient(circle at 80% 8%, rgba(242, 184, 75, .12), transparent 30%),
    var(--bg);
  color: var(--text);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
  padding: 0 6vw;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(7, 11, 18, .82);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.main-nav a,
.lang-button,
.theme-toggle {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.main-nav a {
  padding: 10px 14px;
}

.main-nav a:hover,
.main-nav a.active,
.lang-button:hover {
  color: var(--text);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
}

.lang-button {
  padding: 9px 12px;
  white-space: nowrap;
}

.theme-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  padding: 48px 6vw 64px;
}

.hero-inner { max-width: 1120px; margin: 0 auto; width: 100%; }
.hero-kicker { color: var(--accent); font-weight: 700; margin: 0 0 18px; }
.hero h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: .95;
  letter-spacing: 0;
}
.hero p {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
  margin: 38px 0;
}
.stat,
.doc-card,
.content-card,
.sidebar,
.code-block {
  border: 1px solid var(--line);
  background: rgba(13, 20, 32, .82);
  border-radius: 8px;
}
.stat { padding: 18px; }
.stat strong { display: block; font-size: 24px; color: var(--text); }
.stat span { color: var(--muted); }

.hero-actions, .card-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #041010;
  font-weight: 800;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 42px;
}
.doc-card {
  display: block;
  padding: 22px;
  min-height: 150px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.doc-card:hover { transform: translateY(-2px); border-color: rgba(57,197,187,.6); background: rgba(18,27,41,.9); }
.doc-card h3 { margin: 0 0 10px; font-size: 20px; }
.doc-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.doc-card span { color: var(--accent); font-weight: 700; }

.doc-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 6vw 90px;
}

.doc-header { grid-column: 1 / -1; }
.doc-header h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); letter-spacing: 0; }
.doc-header p { margin: 14px 0 0; color: var(--muted); font-size: 17px; }

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 16px;
}
.sidebar h3 { margin: 0 0 12px; font-size: 16px; }
.sidebar button {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 4px 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.sidebar button:hover,
.sidebar button.active { color: var(--text); background: rgba(255,255,255,.07); }

.content-card {
  padding: 30px;
  min-height: 560px;
}
.content-card h2 { margin: 0 0 22px; font-size: 32px; }
.content-card h3 { margin: 26px 0 12px; font-size: 22px; }
.content-card h4 { margin: 22px 0 10px; font-size: 17px; color: var(--accent-2); }
.content-card p, .content-card li { color: var(--muted); line-height: 1.75; }
.content-card ul, .content-card ol { padding-left: 22px; }

.step-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(57,197,187,.18);
  color: var(--accent);
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.feature {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.feature strong { display: block; margin-bottom: 8px; }
.feature span { color: var(--muted); line-height: 1.6; }

.code-block {
  overflow: auto;
  padding: 16px;
  background: var(--code-bg);
  color: #d9e6ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.row { display: grid; grid-template-columns: 170px 1fr; }
.row > div { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.row:last-child > div { border-bottom: 0; }
.row > div:first-child { color: var(--text); background: rgba(255,255,255,.04); }
.row > div:last-child { color: var(--muted); }

.light {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --text: #111827;
  --muted: #5d6778;
  --line: #dce3ee;
  --code-bg: #101826;
  background: #f5f7fb;
}
.light .topbar { background: rgba(255,255,255,.86); }
.light .stat,
.light .doc-card,
.light .content-card,
.light .sidebar { background: rgba(255,255,255,.92); }

@media (max-width: 860px) {
  .topbar { padding: 12px 18px; flex-wrap: wrap; gap: 10px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .hero { padding: 36px 18px 56px; }
  .stats, .card-grid, .feature-grid { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; padding: 38px 18px 80px; }
  .sidebar { position: static; }
  .content-card { padding: 22px; }
  .row { grid-template-columns: 1fr; }
}
