:root {
  --bg-0: #050608;
  --bg-1: #0b0d12;
  --bg-2: #12161f;
  --fg: #f5f7fb;
  --muted: #a7afbd;
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.05);
  --card-strong: rgba(255, 255, 255, 0.07);
  --primary: #f5f7fb;
  --primary-2: #7dd3fc;
  --danger: #ff8f8f;
  --maxw: 1120px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  font-size: 18px;
}

body {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  color: var(--fg);
  background: radial-gradient(circle at 50% -20%, #1a2233 0%, var(--bg-2) 30%, var(--bg-1) 65%, var(--bg-0) 100%);
  line-height: 1.62;
  letter-spacing: -0.003em;
}

#fx-bg,
.noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#fx-bg {
  z-index: -3;
}

.noise {
  z-index: -2;
  opacity: 0.02;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.4px, transparent 0.4px);
  background-size: 3px 3px;
}

.container {
  width: min(var(--maxw), calc(100% - 2.4rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  backdrop-filter: blur(6px) saturate(110%);
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand {
  font-weight: 620;
  color: var(--fg);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.topbar nav {
  display: flex;
  gap: 0.95rem;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.topbar nav a:hover {
  color: var(--fg);
}

.lang-switch {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
  border: 0;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 560;
  font-size: 0.8rem;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--fg);
}

main {
  padding-bottom: 7.5rem;
}

section {
  margin-top: 6.2rem;
}

.hero {
  margin-top: 3.3rem;
  padding: 4.4rem 0 3rem;
}

main > section {
  min-height: 66svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

main > section.hero {
  justify-content: flex-start;
}

.tag {
  margin: 0 0 0.65rem;
  color: var(--primary-2);
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  text-transform: uppercase;
  font-weight: 560;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  letter-spacing: -0.045em;
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  margin-bottom: 1rem;
  letter-spacing: -0.035em;
  font-weight: 650;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.subtitle {
  max-width: 840px;
  color: #c5ccda;
  font-size: 1.24rem;
}

.card {
  background: linear-gradient(160deg, var(--card-strong), var(--card));
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 1.9rem;
  backdrop-filter: blur(16px) saturate(120%);
}

.hero-node {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 1.25rem;
  min-width: min(100%, 420px);
}

.hero-node-label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#hero-node-count {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  color: var(--fg);
  font-weight: 650;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.76rem 1.16rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--line);
  font-weight: 580;
  font-size: 0.9rem;
  transition: transform 170ms ease, background-color 170ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  color: #0b0d12;
  border-color: transparent;
}

.btn.ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.03);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.grid-3 .card {
  min-height: 258px;
}

ol {
  margin: 0;
  padding-left: 1.28rem;
}

pre {
  margin: 1rem 0 0;
  padding: 0.94rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.muted {
  color: var(--muted);
}

.install-tabs {
  margin-top: 1rem;
  display: inline-flex;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.26rem;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn {
  border: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 10px;
  padding: 0.5rem 0.82rem;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.12);
}

.tab-panel {
  margin-top: 1rem;
}

.cmd-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.78rem 0.84rem;
}

.cmd-box code {
  overflow-x: auto;
  white-space: nowrap;
}

.copy-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.copy-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.copy-btn.copied {
  border-color: rgba(125, 211, 252, 0.7);
  color: var(--primary-2);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}

.stat .label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.stat strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.74rem;
  font-weight: 640;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 560;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 1.6rem;
}

.error {
  min-height: 1.4rem;
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 0.65rem;
}

.metric-note {
  margin: 0.78rem 0 0;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.join {
  margin-top: 4.1rem;
}

.footer {
  padding: 2.6rem 0 3.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  html {
    font-size: 17px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
  }

  section {
    margin-top: 2.3rem;
  }

  main > section {
    min-height: auto;
    display: block;
  }

  .card {
    padding: 1.4rem;
  }
}

@media (max-width: 680px) {
  html {
    font-size: 16px;
  }

  .topbar nav {
    display: none;
  }

  .topbar {
    padding: 0.78rem 0;
  }

  .topbar-right {
    margin-left: auto;
  }

  .hero {
    margin-top: 0.9rem;
    padding-top: 1.4rem;
  }

  .container {
    width: min(var(--maxw), calc(100% - 1rem));
  }

  h1 {
    font-size: clamp(2.4rem, 11vw, 3.2rem);
  }

  h2 {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
  }

  section {
    margin-top: 1.45rem;
  }

  .card {
    padding: 1rem;
    border-radius: 18px;
  }

  .hero-node {
    width: 100%;
    min-width: 0;
  }

  .cta-row {
    width: 100%;
  }

  .cta-row .btn {
    width: 100%;
  }

  .install-tabs {
    width: 100%;
  }

  .tab-btn {
    flex: 1 1 0;
    text-align: center;
  }

  .cmd-box {
    flex-wrap: wrap;
  }

  .copy-btn {
    margin-left: auto;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody tr {
    display: block;
    margin-bottom: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.65rem;
  }

  tbody td {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.42rem 0.1rem;
    border: 0;
    font-size: 0.9rem;
  }

  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  td.empty {
    display: block;
    text-align: center;
    padding: 1rem 0.4rem;
  }

  td.empty::before {
    content: none;
  }

  .cmd-box code {
    font-size: 0.84rem;
    white-space: normal;
    word-break: break-word;
  }
}

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

  .btn,
  .btn:hover {
    transform: none;
    transition: none;
  }
}
