:root {
  color-scheme: light;
  --bg: #102033;
  --bg-deep: #07111f;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.18);
  --line-dark: rgba(16, 32, 51, 0.12);
  --text: #101828;
  --muted: #667085;
  --white: #ffffff;
  --blue: #1d75ff;
  --green: #0f9f6e;
  --orange: #f0783c;
  --shadow: 0 24px 80px rgba(4, 12, 25, 0.22);
  --radius: 8px;
  --font-sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  background:
    radial-gradient(circle at 18% 12%, rgba(29, 117, 255, 0.38), transparent 28%),
    radial-gradient(circle at 82% 6%, rgba(15, 159, 110, 0.32), transparent 22%),
    linear-gradient(145deg, var(--bg-deep), var(--bg) 48%, #172c44);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
}

.site-brand,
.site-nav {
  display: inline-flex;
  align-items: center;
}

.site-brand {
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0;
}

.site-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.site-nav {
  gap: 8px;
}

.site-nav a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.home {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 88px;
}

.hero,
.home-hero {
  color: var(--white);
  animation: rise-in 420ms ease both;
}

.eyebrow {
  margin: 0 0 18px;
  color: #9fd7ff;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1,
.home-hero h1,
.docs-hero h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.22;
  font-weight: 500;
}

.hero h1,
.home-hero h1 {
  max-width: 780px;
  font-size: clamp(2.1rem, 5.6vw, 4.2rem);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 32px;
  align-items: center;
}

.home-hero-demo {
  min-width: 0;
}

.home-hero-demo .mock-window {
  min-height: 420px;
  box-shadow: 0 24px 80px rgba(4, 12, 25, 0.32);
}

.hero-text {
  max-width: 660px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.8;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  gap: 14px;
  margin-top: 34px;
}

.download-button {
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.download-button:hover {
  transform: translateY(-2px);
}

.download-button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.72;
}

.download-button-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), #0756d8);
}

.download-button-secondary {
  color: #0d2238;
  background: linear-gradient(135deg, #ffffff, #dcecff);
}

.help-link {
  display: inline-block;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.help-link:hover {
  color: var(--white);
}

.button-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.button-main strong {
  font-size: 1.08rem;
}

.button-sub {
  color: currentColor;
  opacity: 0.72;
  font-size: 0.9rem;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 680ms linear infinite;
}

.is-loading .spinner {
  display: inline-block;
}

.quick-start {
  margin-top: 72px;
  color: var(--white);
}

.home-section {
  margin-top: 72px;
  color: var(--white);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 18px;
}

.section-heading h2,
.home-bottom h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.2;
}

.home-section .doc-steps article,
.home-section .feature-grid article,
.home-section .checklist article,
.home-section .trouble-grid article,
.home-section .doc-callout {
  border-color: var(--line);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.home-section .doc-steps h3,
.home-section .feature-grid h3 {
  color: var(--white);
}

.home-section .doc-steps p,
.home-section .feature-grid p,
.home-section .checklist p,
.home-section .trouble-grid p,
.home-section .doc-callout p {
  color: rgba(255, 255, 255, 0.76);
}

.home-bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.link-grid a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.link-grid a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.quick-start h2 {
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.steps article,
.docs-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps article {
  padding: 20px;
  color: var(--text);
}

.steps span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--green);
  font-weight: 700;
}

.steps h3 {
  margin: 18px 0 8px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.docs-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.docs-toc a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.docs-toc a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.docs-content {
  overflow: hidden;
}

.docs-content section,
.docs-footer {
  padding: 34px 42px;
  border-top: 1px solid var(--line-dark);
}

.docs-content section:first-child {
  border-top: 0;
}

.docs-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 86% 12%, rgba(240, 120, 60, 0.26), transparent 24%),
    linear-gradient(135deg, #102033, #163d60);
}

.docs-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.docs-hero p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  line-height: 1.8;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.docs-content h2 {
  margin: 0 0 16px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: 0;
  line-height: 1.35;
}

.docs-content h3 {
  margin: 22px 0 8px;
}

.docs-content p,
.docs-content li {
  color: var(--muted);
  line-height: 1.9;
}

.docs-content ol,
.docs-content ul {
  padding-left: 1.25rem;
}

.doc-steps,
.feature-grid,
.checklist,
.trouble-grid {
  display: grid;
  gap: 14px;
}

.doc-steps,
.feature-grid,
.checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trouble-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-steps article,
.feature-grid article,
.checklist article,
.trouble-grid article,
.doc-callout {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: #f7fbff;
  padding: 16px;
}

.doc-steps article {
  background: #ffffff;
}

.doc-steps span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--blue);
  font-weight: 700;
}

.doc-steps h3,
.feature-grid h3,
.checklist h3,
.trouble-grid h3 {
  margin: 14px 0 6px;
}

.doc-steps p,
.feature-grid p,
.checklist p,
.trouble-grid p,
.doc-callout p {
  margin: 0;
}

.interface-figure {
  margin: 0 0 24px;
}

.mock-window {
  min-height: 330px;
  display: grid;
  grid-template-columns: 168px 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #07111f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mock-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.mock-sidebar span {
  height: 34px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.mock-sidebar span:first-child {
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.mock-thread {
  padding: 22px;
  color: var(--white);
}

.mock-title {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.68);
}

.mock-bubble,
.mock-panel {
  max-width: 560px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
}

.mock-bubble.user {
  margin-left: auto;
  color: #0d2238;
  background: #dcecff;
}

.mock-bubble.ai {
  background: rgba(255, 255, 255, 0.12);
}

.mock-panel {
  background: rgba(15, 159, 110, 0.16);
  border: 1px solid rgba(15, 159, 110, 0.28);
}

.mock-panel strong,
.mock-panel i {
  display: block;
}

.mock-panel i {
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.mock-panel i:last-child {
  width: 62%;
}

.interface-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.flow div {
  position: relative;
  min-height: 124px;
  padding: 18px;
  border-radius: var(--radius);
  color: var(--white);
  background: linear-gradient(135deg, #123a61, #0f9f6e);
}

.flow strong,
.flow span {
  display: block;
}

.flow span {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.doc-callout {
  margin-top: 14px;
  background: #fff7ed;
}

.docs-content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: var(--radius);
  color: #d8ecff;
  background: #07111f;
}

.example-list {
  display: grid;
  gap: 10px;
}

.example-list p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  color: var(--text);
  background: #f7fbff;
}

.text-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.docs-hero .text-link {
  color: #a8dcff;
}

.docs-footer {
  background: #f7fbff;
}

.docs-footer p {
  margin-top: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 820px) {
  .home {
    padding-top: 46px;
  }

  .download-grid,
  .steps,
  .home-hero,
  .home-bottom,
  .docs-layout,
  .doc-steps,
  .feature-grid,
  .checklist,
  .trouble-grid,
  .flow {
    grid-template-columns: 1fr;
  }

  .download-grid {
    max-width: 420px;
  }

  .home-hero {
    gap: 28px;
  }

  .docs-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-content section,
  .docs-footer {
    padding: 26px 20px;
  }

  .mock-window {
    grid-template-columns: 1fr;
  }

  .mock-sidebar {
    grid-template-columns: repeat(3, 1fr);
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
}

@media (max-width: 560px) {
  .site-header,
  .home,
  .docs-layout {
    width: min(100% - 24px, 100%);
  }

  .site-header {
    padding: 12px 0;
  }

  .site-nav a {
    padding: 8px 10px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .home-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .docs-toc {
    grid-template-columns: 1fr;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}
