/* ===== API 文档布局 ===== */
.api-docs-wrapper {
  display: flex;
  gap: 40px;
  margin: 40px 0 60px;
  align-items: flex-start;
}

/* 侧边栏导航 */
.api-sidebar {
  flex: 0 0 260px;
  background: white;
  border-radius: 32px;
  padding: 28px 16px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.06);
  position: sticky;
  top: 30px;
  border: 1px solid #edf2f7;
  align-self: flex-start;
}

.api-sidebar .sidebar-title {
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0 12px 16px;
  border-bottom: 2px solid #eef2f6;
}

.api-sidebar ul {
  list-style: none;
  margin-top: 16px;
}

.api-sidebar li {
  margin: 4px 0;
}

.api-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 40px;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s;
  font-weight: 500;
}

.api-sidebar a i {
  color: #64748b;
  width: 20px;
  font-size: 1rem;
}

.api-sidebar a:hover {
  background: #f1f6fd;
  color: #2563eb;
}

.api-sidebar a.active {
  background: #3b82f6;
  color: white;
}
.api-sidebar a.active i {
  color: white;
}




/* 主内容区 */
.api-content {
  flex: 1;
  background: white;
  border-radius: 40px;
  padding: 48px 48px;
  box-shadow: 0 20px 40px -20px rgba(0,30,60,0.15);
  border: 1px solid #ecf3fa;
}

.api-section {
  scroll-margin-top: 30px;
}

.api-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 40px 0 24px;
  padding-bottom: 8px;
  border-bottom: 3px solid #dbeafe;
}

.api-section h2:first-of-type {
  margin-top: 0;
}

.api-section h3 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  color: #0f1825;
}

.api-card {
  background: #f8fafc;
  border-radius: 28px;
  padding: 28px;
  margin: 24px 0;
  border: 1px solid #e9eff6;
}

.endpoint-badge {
  display: inline-block;
  background: #2563eb;
  color: white;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 40px;
  font-size: 0.9rem;
  margin-right: 12px;
}

.endpoint-url {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: #eef2ff;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 1.1rem;
  display: inline-block;
}

.code-block {
  background: #0b1622;
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: 24px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 20px 0;
  line-height: 1.5;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.param-table th {
  text-align: left;
  background: #eef2ff;
  padding: 12px 16px;
  font-weight: 600;
}

.param-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e9eff6;
}

.param-table tr:hover {
  background: #f8fafc;
}

.badge {
  background: #e2e8f0;
  border-radius: 40px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
}

.badge.required {
  background: #fee2e2;
  color: #b91c1c;
}

.badge.string { background: #dbeafe; color:#1e40af; }

.http-method {
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: #2563eb;
  color: white;
  display: inline-block;
  font-size: 0.8rem;
  margin-right: 12px;
}

.lang-tabs {
  display: flex;
  gap: 12px;
  margin: 16px 0 8px;
}

.lang-tab {
  background: #edf2f7;
  border: none;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
}

.lang-tab.active {
  background: #3b82f6;
  color: white;
}
