* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-light: #e2e8f0;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
  --radius-card: 16px;
  --radius-btn: 40px;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

/* 导航栏 */
.navbar {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
}

.logo i {
  color: var(--primary);
  font-size: 1.9rem;
}

.logo span {
  background: linear-gradient(135deg, #1e293b, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a i {
  font-size: 0.9rem;
  opacity: 0.8;
}

.nav-links a:hover {
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* 主体 */
main {
  flex: 1;
  padding: 40px 0 64px;
}

.page-wrapper {
  max-width: 880px;
  margin: 0 auto;
}

/* 页头 */
.page-header {
  background: white;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 32px;
}

.page-header .page-icon {
  font-size: 2.5rem;
  color: var(--primary);
  background: var(--primary-light);
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* 内容卡片 */
.card {
  background: white;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 32px 36px;
  margin-bottom: 24px;
}

.card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h2 i {
  color: var(--primary);
  font-size: 1.2rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: #1e293b;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.card ul, .card ol {
  margin: 8px 0 16px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card li {
  margin-bottom: 6px;
}

.card a {
  color: var(--primary);
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #1e293b;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8fafc;
  color: var(--text-main);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: white;
}

.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  background: var(--primary-dark);
}

/* API 代码块 */
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  margin: 12px 0 20px;
  line-height: 1.7;
}

.code-block .keyword { color: #93c5fd; }
.code-block .string { color: #86efac; }
.code-block .comment { color: #64748b; }

/* 成功提示 */
.toast {
  display: none;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
  font-weight: 500;
}

.toast.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 页脚 */
footer {
  background: white;
  border-top: 1px solid var(--border-light);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* 响应式 */
@media (max-width: 768px) {
  .navbar .container {
    height: auto;
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .page-header {
    padding: 32px 24px;
  }
  .card {
    padding: 24px;
  }
  .page-header h1 {
    font-size: 1.6rem;
  }
  .container {
    padding: 0 20px;
  }
}