:root {
  --bg: #040714;
  --panel: rgba(11, 20, 43, 0.62);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text-main: #f5f8ff;
  --text-soft: rgba(221, 229, 255, 0.78);
  --text-dim: rgba(221, 229, 255, 0.55);
  --accent: #ff5e73;
  --accent-2: #49d8ff;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Inter", "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 20% -10%, rgba(255, 94, 115, 0.2), transparent 40%),
    radial-gradient(circle at 85% 8%, rgba(73, 216, 255, 0.15), transparent 35%),
    var(--bg);
}

a {
  color: #a6d7ff;
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: #d7ebff;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 7, 20, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text-main);
}

.brand:hover {
  color: var(--text-main);
}

.brand-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text-soft);
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Docs nav item: icon + label, shown in a brighter accent color */
.nav-docs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-docs-icon {
  flex: none;
}

.nav-links a.nav-docs,
.mobile-menu a.nav-docs {
  color: var(--accent-2);
}

.nav-links a.nav-docs:hover,
.mobile-menu a.nav-docs:hover {
  color: #8fe7ff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: color 0.18s ease, transform 0.16s ease;
}

.nav-github:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(166, 215, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang-btn.is-active {
  background: linear-gradient(140deg, rgba(255, 94, 115, 0.32), rgba(73, 216, 255, 0.32));
  color: #fff;
}

/* ---- Mobile hamburger + drawer (hidden on desktop) ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(166, 215, 255, 0.25);
  border-radius: 10px;
  background: rgba(11, 20, 43, 0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--text-main);
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.nav.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 18px;
}

.mobile-menu > a {
  color: var(--text-soft);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 13px 6px;
  border-radius: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu > a:last-of-type {
  border-bottom: none;
}

.mobile-menu > a:active {
  background: rgba(166, 215, 255, 0.08);
}

.mobile-menu-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-cta {
  margin-top: 12px;
  color: #0a0f1f;
  font-size: 1rem;
  padding: 14px 22px;
}

.mobile-menu-cta:hover {
  color: #0a0f1f;
}

@keyframes menuDrop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn-primary {
  color: #0a0f1f;
  background: linear-gradient(120deg, var(--accent) 0%, #ff8aa0 45%, var(--accent-2) 100%);
  box-shadow: 0 12px 30px rgba(255, 94, 115, 0.28);
}

.btn-primary:hover {
  color: #0a0f1f;
  box-shadow: 0 16px 40px rgba(73, 216, 255, 0.32);
}

.btn-ghost {
  color: var(--text-main);
  border: 1px solid rgba(166, 215, 255, 0.3);
  background: rgba(11, 20, 43, 0.5);
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: rgba(166, 215, 255, 0.6);
}

.nav-cta {
  padding: 9px 16px;
  font-size: 0.88rem;
}

/* ============ HERO ============ */
.hero {
  text-align: center;
  padding: 90px 0 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(166, 215, 255, 0.78);
}

.title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 800;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.title-line {
  display: block;
}

.title-accent {
  background: linear-gradient(100deg, var(--accent) 10%, #ff8aa0 40%, var(--accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.title-mark {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-text {
  max-width: 720px;
  margin: 24px auto 0;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

.hero-command {
  margin-top: 30px;
  width: min(640px, 100%);
}

.hero-stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(820px, 100%);
}

.stat {
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(17, 33, 68, 0.6), rgba(8, 14, 30, 0.7));
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(100deg, #ff8aa0, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ============ SECTIONS ============ */
.section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 44px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 18px auto 0;
  max-width: 640px;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ============ GRID / CARDS ============ */
.grid {
  display: grid;
  gap: 18px;
}

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

.card {
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(17, 33, 68, 0.72), rgba(8, 14, 30, 0.8));
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.feature {
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(166, 215, 255, 0.32);
}

.feature-icon {
  font-size: 1.7rem;
  margin-bottom: 14px;
}

.feature h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.feature p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 0.97rem;
}

/* ============ STEPS ============ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 30px;
}

.step-num {
  position: absolute;
  top: -18px;
  left: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0a0f1f;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(255, 94, 115, 0.3);
}

.step h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ============ AGENTS ============ */
.agent-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.agent-chip {
  border: 1px solid rgba(166, 215, 255, 0.22);
  background: rgba(11, 20, 43, 0.55);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: transform 0.16s ease, border-color 0.18s ease, color 0.18s ease;
}

.agent-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 215, 255, 0.5);
  color: var(--text-main);
}

/* ============ INSTALL ============ */
.install-panel {
  text-align: center;
  padding: 44px 30px;
}

.install-panel .kicker,
.community .kicker {
  /* kicker already centered by parent text-align */
}

.command-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  border: 1px solid rgba(166, 215, 255, 0.28);
  border-radius: 14px;
  background: rgba(3, 8, 24, 0.7);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 640px;
  margin: 28px auto 0;
}

.command-row code {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding: 14px 18px;
  font-family: "SFMono-Regular", "JetBrains Mono", "Menlo", monospace;
  font-size: 0.95rem;
  color: #dcf1ff;
}

.command-row-sm {
  margin-top: 14px;
}

.copy-btn {
  flex: none;
  border: none;
  border-left: 1px solid rgba(166, 215, 255, 0.2);
  background: linear-gradient(140deg, rgba(255, 94, 115, 0.22), rgba(73, 216, 255, 0.22));
  color: #f7fbff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 22px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.copy-btn:hover {
  background: linear-gradient(140deg, rgba(255, 94, 115, 0.38), rgba(73, 216, 255, 0.38));
}

.install-note {
  margin: 26px 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ============ COMMUNITY ============ */
.community {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 36px;
  align-items: center;
  padding: 40px 38px;
}

.community-text .kicker {
  text-align: left;
}

.community .section-title,
.community .section-sub {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.qr {
  margin: 0;
  text-align: center;
}

.qr img {
  width: 220px;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow);
}

.qr figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ============ FOOTER ============ */
.footer-site {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 40px;
  padding: 26px 0 36px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text-soft);
}

.footer-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: none;
}

.footer-tag {
  color: var(--text-dim);
}

/* ============ BACKGROUND DECOR ============ */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
}

.bg-glow {
  position: fixed;
  z-index: -1;
  width: 44vw;
  max-width: 540px;
  height: 44vw;
  max-height: 540px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.28;
}

.glow-left {
  top: -120px;
  left: -90px;
  background: rgba(255, 85, 110, 0.55);
}

.glow-right {
  top: -100px;
  right: -130px;
  background: rgba(70, 208, 255, 0.5);
}

/* ============ RESPONSIVE ============ */

/* ---- Tablet / small laptop: swap desktop nav for the hamburger ---- */
@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none; /* the CTA lives inside the mobile drawer instead */
  }

  .nav-toggle {
    display: flex;
  }

  .nav.is-open .mobile-menu {
    display: flex;
    animation: menuDrop 0.22s ease;
  }

  .grid-3,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .community-text .kicker,
  .community .section-title,
  .community .section-sub {
    text-align: center;
  }
}

/* ---- Phone: a dedicated single-column layout (no content removed) ---- */
@media (max-width: 600px) {
  html {
    scroll-padding-top: 70px;
  }

  .container {
    width: 90vw;
  }

  /* Nav */
  .nav-inner {
    padding: 11px 0;
    gap: 12px;
  }

  .nav-actions {
    gap: 10px;
  }

  .brand {
    font-size: 1.05rem;
  }

  /* Hero */
  .hero {
    padding: 48px 0 44px;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: 0.68rem;
    letter-spacing: 0.26em;
  }

  .title {
    font-size: clamp(2rem, 9vw, 2.9rem);
    line-height: 1.08;
  }

  .hero-text {
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-cta {
    margin-top: 28px;
    gap: 12px;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    padding: 14px 22px;
  }

  .hero-command {
    margin-top: 24px;
  }

  /* Stats become compact rows rather than tall stacked cards */
  .hero-stats {
    grid-template-columns: 1fr;
    margin-top: 36px;
    gap: 12px;
  }

  .stat {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 16px 18px;
  }

  .stat-num {
    flex: none;
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  /* Sections */
  .section {
    padding: 46px 0;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .section-sub {
    font-size: 0.98rem;
  }

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

  .card {
    padding: 22px 20px;
  }

  .feature-icon {
    font-size: 1.6rem;
  }

  .step {
    padding-top: 32px;
  }

  /* Install: stack the command and copy button so the full line is readable */
  .install-panel {
    padding: 32px 22px;
  }

  .command-row {
    flex-direction: column;
    align-items: stretch;
  }

  .command-row code {
    padding: 14px 16px;
    font-size: 0.82rem;
  }

  .copy-btn {
    border-left: none;
    border-top: 1px solid rgba(166, 215, 255, 0.2);
    padding: 13px;
  }

  /* Community */
  .community {
    padding: 30px 22px;
    gap: 28px;
  }

  /* Footer */
  .footer-inner {
    justify-content: center;
    text-align: center;
    gap: 10px;
  }
}
