:root {
  --primary: #1e9fff;
  --success: #5fb878;
  --warning: #ffb800;
  --danger: #ff5722;
  --dark: #393d49;
  --text: #333;
  --text-muted: #888;
  --muted: #888;
  --border: #e8e8e8;
  --bg: #f7f8fa;
  --bg-card: #fff;
  --card: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

.doc-header {
  background: linear-gradient(135deg, #0070cc 0%, #00b4d8 100%);
  color: #fff;
  padding: 40px 60px;
  position: relative;
  overflow: hidden;
}

.doc-header::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.doc-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
}

.doc-header p {
  font-size: 14px;
  opacity: .88;
  max-width: 880px;
  position: relative;
}

.doc-header .meta {
  margin-top: 16px;
  display: flex;
  gap: 20px;
  font-size: 13px;
  opacity: .78;
  flex-wrap: wrap;
  position: relative;
}

.doc-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.toc-wrap,
.section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 28px;
  overflow: hidden;
}

.toc-wrap {
  padding: 20px 24px;
  margin-bottom: 32px;
}

.toc-wrap h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
  list-style: none;
}

.toc-list a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
}

.toc-list a:hover {
  text-decoration: underline;
}

.section {
  border-radius: 10px;
}

.section-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(to right, #f8fbff, #fff);
}

.section-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-head h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
}

.section-body {
  padding: 24px;
}

.section-body p {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  margin: 6px 0;
}

.subsection-title {
  font-size: 15px;
  color: var(--dark);
  margin: 22px 0 8px;
  font-weight: 600;
}

.callout {
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  border-left: 4px solid;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.callout .label {
  font-weight: 600;
  margin-right: 4px;
}

.callout-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout.info {
  background: #e8f4ff;
  border-color: var(--primary);
  color: #0055aa;
}

.callout.warning {
  background: #fffbe6;
  border-color: var(--warning);
  color: #7d5a00;
}

.callout.danger {
  background: #fff1ee;
  border-color: var(--danger);
  color: #aa2200;
}

.callout.success {
  background: #edfaf2;
  border-color: var(--success);
  color: #1a6b38;
}

.steps {
  counter-reset: step;
}

.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
}

.step-item::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 42px;
  bottom: -10px;
  width: 2px;
  background: #e8eef6;
}

.step-item:last-child::before {
  display: none;
}

.step-num {
  counter-increment: step;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-num::before {
  content: counter(step);
}

.step-content {
  flex: 1;
  padding-top: 6px;
}

.step-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark);
}

.step-content p {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}

.fields-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}

.fields-table th {
  background: #f5f7fa;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.fields-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.fields-table tr:hover td {
  background: #fafbfc;
}

.required-tag,
.optional-tag,
.badge {
  display: inline-block;
  color: #fff;
  vertical-align: middle;
  font-weight: normal;
}

.required-tag,
.optional-tag {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 4px;
}

.required-tag {
  background: #ff5722;
}

.optional-tag {
  background: #8c8c8c;
}

.badge {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
}

.badge-a1,
.badge-blue {
  background: #1e9fff;
}

.badge-a2 {
  background: #0070cc;
}

.badge-b,
.badge-red {
  background: #ff5722;
}

.badge-green {
  background: #5fb878;
}

.badge-orange {
  background: #ffb800;
}

.badge-gray {
  background: #8c8c8c;
}

.screenshot-wrap {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
  background: #fff;
}

.screenshot-caption {
  background: var(--dark);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.win-dots {
  display: flex;
  gap: 5px;
  margin-right: 4px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-r {
  background: #ff5f56;
}

.dot-y {
  background: #ffbd2e;
}

.dot-g {
  background: #27c93f;
}

.screenshot-wrap img {
  display: block;
  width: 100%;
  max-width: 100%;
}

.flow-wrap {
  overflow-x: auto;
  padding: 16px 0;
}

.flow {
  min-width: 760px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-items: stretch;
  margin: 14px 0;
}

.flow-node {
  background: #f8fbff;
  border: 1px solid #d9ecff;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  position: relative;
}

.flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 10px;
  height: 2px;
  background: #b9dcff;
}

.flow-node .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.flow-node .desc {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  padding: 14px 18px;
  background: #f9f9fb;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-q::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 1px;
}

.faq-a {
  padding: 14px 18px 14px 50px;
  font-size: 13px;
  color: #555;
  border-top: 1px solid var(--border);
  line-height: 1.7;
}

.faq-a::before {
  content: "A ";
  font-weight: bold;
  color: var(--success);
}

.tips-list,
.check-list {
  list-style: none;
  padding: 0;
}

.tips-list li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 13px;
  color: #555;
  border-bottom: 1px dashed #f0f0f0;
}

.tips-list li:last-child {
  border: none;
}

.tips-list li::before {
  content: "\25B8";
  position: absolute;
  left: 4px;
  color: var(--primary);
}

.check-list {
  margin: 12px 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.check-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: bold;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0;
}

.feature-card {
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  background: #f0f8ff;
}

.type-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  border-top: 4px solid var(--primary);
}

.feature-card.green {
  border-left-color: var(--success);
  background: #f0fff5;
}

.feature-card.orange {
  border-left-color: var(--warning);
  background: #fffbf0;
}

.type-card.green {
  border-top-color: var(--success);
}

.type-card.orange {
  border-top-color: var(--warning);
}

.feature-card .icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.feature-card .tag,
.type-card .tag {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.feature-card .title,
.type-card .title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.feature-card .desc,
.type-card .desc {
  font-size: 12px;
  color: #666;
  line-height: 1.7;
}

.article-note {
  margin-top: 12px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.annotation-box {
  background: #fffde7;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 13px;
  color: #5d4037;
}

.annotation-box .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 12px 4px 0;
}

code {
  background: #f0f2f5;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #c0392b;
  font-family: Consolas, Monaco, monospace;
}

@media (max-width: 760px) {
  .doc-header {
    padding: 28px 24px;
  }

  .doc-header .meta {
    gap: 10px;
  }

  .section-body {
    padding: 18px;
  }

  .fields-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .card-grid,
  .type-grid,
  .check-list {
    grid-template-columns: 1fr;
  }
}
