:root {
  --docs-font: "Source Han Sans SC", "思源黑体", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  --docs-bg: #06101f;
  --docs-panel: rgba(12, 27, 53, 0.72);
  --docs-panel-strong: rgba(17, 39, 75, 0.9);
  --docs-border: rgba(106, 156, 230, 0.26);
  --docs-cyan: #6fe7ff;
  --docs-pink: #ff6f9a;
  --docs-green: #42e6b7;
  --docs-yellow: #ffd166;
  --docs-text: #f4f8ff;
  --docs-muted: #9fb3da;
  --docs-soft: #c8d8f4;
}

.docs-body {
  min-width: 0;
  font-family: var(--docs-font);
  font-weight: 400;
  background:
    radial-gradient(900px 680px at 12% 0%, rgba(36, 91, 138, 0.38), transparent 70%),
    radial-gradient(780px 700px at 92% 10%, rgba(117, 72, 160, 0.26), transparent 70%),
    linear-gradient(180deg, #06101f 0%, #071426 46%, #06101f 100%);
}

.docs-app {
  min-height: 100vh;
  padding: 132px 44px 80px;
}

.docs-nav.nav-glass {
  min-width: min(1354px, calc(100vw - 64px));
  width: calc(100vw - 64px);
}

.docs-nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 500;
}

.docs-hero {
  position: relative;
  max-width: 1480px;
  min-height: 360px;
  margin: 0 auto 34px;
  padding: 44px 44px 36px;
  overflow: hidden;
  border: 1px solid rgba(111, 231, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(9, 22, 45, 0.92), rgba(11, 26, 52, 0.82) 48%, rgba(24, 23, 58, 0.76)),
    radial-gradient(600px 220px at 80% 18%, rgba(111, 231, 255, 0.13), transparent 70%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.docs-hero-image {
  position: absolute;
  right: -130px;
  top: -90px;
  width: 720px;
  height: 520px;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.18);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 82%, transparent 100%);
}

.docs-hero-copy {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.docs-kicker {
  margin: 0 0 10px;
  color: var(--docs-cyan);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.docs-hero h1 {
  margin: 0;
  color: var(--docs-text);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.docs-hero p:not(.docs-kicker) {
  margin: 18px 0 0;
  color: var(--docs-soft);
  font-size: 18px;
  line-height: 1.7;
}

.docs-search {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: min(720px, 100%);
  height: 58px;
  margin-top: 34px;
  padding: 0 16px 0 20px;
  border: 1px solid rgba(111, 231, 255, 0.24);
  border-radius: 8px;
  background: rgba(4, 12, 26, 0.68);
}

.docs-search span {
  color: var(--docs-cyan);
  font-size: 14px;
}

.docs-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--docs-text);
  font: inherit;
  font-size: 16px;
  background: transparent;
}

.docs-search input::placeholder {
  color: rgba(200, 216, 244, 0.58);
}

.docs-search kbd {
  min-width: 46px;
  padding: 5px 8px;
  border: 1px solid rgba(143, 167, 212, 0.22);
  border-radius: 6px;
  color: var(--docs-muted);
  text-align: center;
  font: inherit;
  font-size: 12px;
  background: rgba(8, 18, 36, 0.8);
}

.docs-hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.docs-hero-stats span {
  padding: 8px 11px;
  border: 1px solid rgba(143, 167, 212, 0.18);
  border-radius: 8px;
  color: var(--docs-muted);
  background: rgba(5, 14, 30, 0.48);
}

.docs-hero-stats strong {
  color: var(--docs-text);
  font-weight: 500;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 238px;
  gap: 22px;
  max-width: 1480px;
  margin: 0 auto;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 118px;
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow: auto;
  border: 1px solid var(--docs-border);
  border-radius: 8px;
  background: rgba(8, 18, 36, 0.72);
  backdrop-filter: blur(18px);
}

.docs-sidebar {
  padding: 16px;
}

.docs-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--docs-muted);
  font-size: 13px;
}

.docs-sidebar-head a {
  color: var(--docs-cyan);
}

.docs-group {
  padding: 12px 0;
  border-top: 1px solid rgba(143, 167, 212, 0.12);
}

.docs-group:first-child {
  border-top: 0;
}

.docs-group-title {
  margin-bottom: 8px;
  color: var(--docs-soft);
  font-size: 13px;
}

.docs-side-link,
.docs-toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--docs-muted);
  font-size: 14px;
  line-height: 1.45;
}

.docs-side-link:hover,
.docs-side-link.is-active,
.docs-toc a:hover {
  color: #ffffff;
  background: rgba(111, 231, 255, 0.08);
}

.docs-main {
  min-width: 0;
}

.docs-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.docs-toolbar h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
}

.docs-toolbar span {
  color: var(--docs-muted);
  font-size: 14px;
}

.docs-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.docs-card,
.docs-article,
.docs-empty {
  border: 1px solid var(--docs-border);
  border-radius: 8px;
  background: var(--docs-panel);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.docs-card {
  display: grid;
  gap: 10px;
  min-height: 168px;
  padding: 18px;
}

.docs-card:hover {
  border-color: rgba(111, 231, 255, 0.46);
  transform: translateY(-1px);
}

.docs-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.docs-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--docs-cyan)) 46%, transparent);
  border-radius: 6px;
  color: var(--accent, var(--docs-cyan));
  font-size: 12px;
  background: color-mix(in srgb, var(--accent, var(--docs-cyan)) 10%, transparent);
}

.docs-card h3 {
  margin: 0;
  color: var(--docs-text);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.docs-card p {
  margin: 0;
  color: var(--docs-muted);
  font-size: 14px;
  line-height: 1.65;
}

.docs-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(200, 216, 244, 0.7);
  font-size: 12px;
}

.docs-article-stack {
  display: grid;
  gap: 20px;
}

.docs-article {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(17, 39, 75, 0.86), rgba(8, 18, 36, 0.8)),
    var(--docs-panel);
}

.docs-article-head {
  padding: 28px 30px 22px;
  border-bottom: 1px solid rgba(143, 167, 212, 0.14);
}

.docs-article-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  margin-top: 16px;
  padding: 0 13px;
  border: 1px solid rgba(111, 231, 255, 0.26);
  border-radius: 8px;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  background: rgba(111, 231, 255, 0.1);
  cursor: pointer;
}

.docs-article-head h2 {
  margin: 10px 0 12px;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.18;
}

.docs-article-head p {
  margin: 0;
  color: var(--docs-soft);
  font-size: 16px;
  line-height: 1.75;
}

.docs-source {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.docs-source span {
  padding: 5px 8px;
  border: 1px solid rgba(143, 167, 212, 0.18);
  border-radius: 6px;
  color: var(--docs-muted);
  font-size: 12px;
  background: rgba(5, 14, 30, 0.42);
}

.docs-section {
  padding: 26px 30px;
  border-top: 1px solid rgba(143, 167, 212, 0.1);
}

.docs-section:first-of-type {
  border-top: 0;
}

.docs-section h3 {
  margin: 0 0 12px;
  color: var(--docs-text);
  font-size: 23px;
  font-weight: 500;
}

.docs-section p {
  margin: 0 0 14px;
  color: var(--docs-soft);
  font-size: 15.5px;
  line-height: 1.85;
}

.docs-section ul,
.docs-section ol {
  margin: 0;
  padding-left: 20px;
  color: var(--docs-soft);
  font-size: 15px;
  line-height: 1.8;
}

.docs-section li + li {
  margin-top: 8px;
}

.docs-callout {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(111, 231, 255, 0.2);
  border-radius: 8px;
  color: var(--docs-soft);
  line-height: 1.7;
  background: rgba(111, 231, 255, 0.06);
}

.docs-data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.docs-metric {
  min-height: 136px;
  padding: 16px;
  border: 1px solid rgba(143, 167, 212, 0.18);
  border-radius: 8px;
  background: rgba(4, 13, 29, 0.48);
}

.docs-metric-value {
  display: block;
  color: var(--accent, var(--docs-cyan));
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.docs-metric-label {
  display: block;
  margin-top: 8px;
  color: var(--docs-text);
  font-size: 15px;
}

.docs-metric p {
  margin: 9px 0 0;
  color: var(--docs-muted);
  font-size: 13px;
  line-height: 1.65;
}

.docs-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid rgba(143, 167, 212, 0.18);
  border-radius: 8px;
  background: rgba(4, 13, 29, 0.42);
}

.docs-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.docs-table th,
.docs-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(143, 167, 212, 0.12);
  color: var(--docs-soft);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  color: var(--docs-text);
  font-weight: 500;
  background: rgba(111, 231, 255, 0.06);
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.docs-tree {
  margin-top: 18px;
  overflow-x: auto;
  padding: 16px 18px;
  border: 1px solid rgba(111, 231, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(111, 231, 255, 0.05), transparent 40%),
    rgba(3, 10, 22, 0.56);
}

.docs-tree ul {
  position: relative;
  margin: 0;
  padding-left: 24px;
  list-style: none;
}

.docs-tree > ul {
  padding-left: 0;
}

.docs-tree li {
  position: relative;
  margin: 0;
  padding: 0 0 10px 22px;
}

.docs-tree > ul > li {
  padding-left: 0;
}

.docs-tree li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 14px;
  height: 1px;
  background: rgba(111, 231, 255, 0.32);
}

.docs-tree > ul > li::before {
  display: none;
}

.docs-tree li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(111, 231, 255, 0.18);
}

.docs-tree > ul > li::after,
.docs-tree li:last-child::after {
  display: none;
}

.docs-tree-node {
  display: inline-block;
  min-width: 230px;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid rgba(143, 167, 212, 0.2);
  border-radius: 8px;
  background: rgba(8, 19, 40, 0.82);
}

.docs-tree-node span {
  color: var(--docs-text);
  font-size: 15px;
  font-weight: 500;
}

.docs-tree-node p {
  margin: 5px 0 0;
  color: var(--docs-muted);
  font-size: 13px;
  line-height: 1.55;
}

.docs-reference-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.docs-reference-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(143, 167, 212, 0.18);
  border-radius: 8px;
  background: rgba(4, 13, 29, 0.5);
}

.docs-reference-item:hover {
  border-color: rgba(111, 231, 255, 0.42);
  background: rgba(111, 231, 255, 0.07);
}

.docs-reference-item span {
  color: var(--docs-text);
  font-size: 15px;
  font-weight: 500;
}

.docs-reference-item p {
  margin: 0;
  color: var(--docs-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.docs-code {
  position: relative;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(111, 231, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 9, 20, 0.78);
}

.docs-code button {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(143, 167, 212, 0.22);
  border-radius: 6px;
  color: var(--docs-soft);
  font-size: 12px;
  background: rgba(10, 24, 46, 0.92);
}

.docs-code pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #d9e9ff;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.docs-toc {
  padding: 16px;
}

.docs-toc .docs-kicker {
  margin-bottom: 12px;
}

.docs-empty {
  margin-bottom: 22px;
  padding: 30px;
  color: var(--docs-muted);
  text-align: center;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1240px) {
  .docs-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }

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

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

@media (max-width: 860px) {
  .docs-app {
    padding: 126px 12px 42px;
  }

  .docs-nav.nav-glass {
    left: 10px;
    right: 10px;
    width: calc(100vw - 24px);
    min-width: 0;
  }

  .docs-nav-action {
    display: none;
  }

  .docs-layout {
    display: block;
  }

  .docs-sidebar {
    position: sticky;
    top: auto;
    max-height: none;
    z-index: 2;
    margin-bottom: 12px;
    padding: 8px;
    overflow: hidden;
  }

  .docs-sidebar-head,
  .docs-group-title {
    display: none;
  }

  #docsSidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #docsSidebar::-webkit-scrollbar {
    display: none;
  }

  .docs-group {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    padding: 0;
    border-top: 0;
  }

  .docs-side-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
    padding: 8px 11px;
    font-size: 13px;
  }

  .docs-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }

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

  .docs-hero {
    min-height: 0;
    margin-bottom: 16px;
    padding: 20px;
  }

  .docs-hero-image {
    right: -210px;
    top: -150px;
    width: 580px;
    height: 410px;
    opacity: 0.24;
  }

  .docs-hero h1 {
    font-size: 34px;
    line-height: 1.14;
  }

  .docs-hero p:not(.docs-kicker) {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.58;
  }

  .docs-search {
    grid-template-columns: 1fr;
    height: 46px;
    margin-top: 18px;
    padding: 0 13px;
  }

  .docs-search span,
  .docs-search kbd {
    display: none;
  }

  .docs-hero-stats {
    margin-top: 12px;
    gap: 8px;
  }

  .docs-hero-stats span {
    padding: 6px 8px;
    font-size: 13px;
  }

  .docs-toolbar {
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .docs-toolbar h2 {
    font-size: 22px;
  }

  .docs-card {
    min-height: 116px;
    padding: 12px;
    gap: 8px;
  }

  .docs-card h3 {
    font-size: 16px;
    line-height: 1.25;
  }

  .docs-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12.5px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .docs-card-meta {
    gap: 6px;
    font-size: 11px;
  }

  .docs-article-stack {
    gap: 14px;
  }

  .docs-article-head {
    padding: 20px 18px 16px;
  }

  .docs-article-toggle {
    display: inline-flex;
  }

  .docs-article-body {
    display: none;
  }

  .docs-article.is-open .docs-article-body {
    display: block;
  }

  .docs-article:not(.is-open) .docs-article-head {
    border-bottom: 0;
  }

  .docs-article-head h2 {
    font-size: 26px;
  }

  .docs-article-head p {
    font-size: 14.5px;
    line-height: 1.62;
  }

  .docs-section {
    padding: 18px;
  }

  .docs-section h3 {
    font-size: 20px;
  }

  .docs-section p,
  .docs-section ul,
  .docs-section ol {
    line-height: 1.68;
  }

  .docs-metric {
    min-height: 118px;
    padding: 12px;
  }

  .docs-metric p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 420px) {
  .docs-nav.nav-glass {
    width: auto;
  }
}
