*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --bg-input: #16161f;
  --border: #1e1e2e;
  --border-hover: #2a2a3e;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-glow2: rgba(99, 102, 241, 0.08);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.1);
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
code, pre { font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.logo span { font-weight: 400; }
nav { display: flex; gap: 28px; align-items: center; }
nav a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
nav a:hover, nav a.active { color: var(--text); }
.btn-header {
  padding: 8px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff; transition: all 0.2s; border: none; cursor: pointer;
}
.btn-header:hover { background: var(--accent-light); transform: translateY(-1px); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* Hero */
.hero {
  padding: 100px 0 80px; text-align: center; position: relative;
}
.hero::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 20px;
  background: var(--accent-glow); border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 13px; color: var(--accent-light); margin-bottom: 24px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
h1 { font-size: 56px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
h1 .gradient {
  background: linear-gradient(135deg, var(--accent-light), #a78bfa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero p { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
  padding: 14px 32px; border-radius: 10px; font-size: 16px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff; border: none; cursor: pointer;
  transition: all 0.3s; box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4); }
.btn-secondary {
  padding: 14px 32px; border-radius: 10px; font-size: 16px; font-weight: 600;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.3s;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.btn-sm {
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.btn-sm:hover { border-color: var(--accent); background: var(--accent-glow2); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 60px 0; }
.stat { text-align: center; }
.stat-num {
  font-size: 42px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* Section */
.section { padding: 80px 0; }
.section-title { font-size: 36px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-desc { font-size: 16px; color: var(--text-muted); text-align: center; margin-bottom: 48px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; transition: all 0.3s;
}
.feature:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 20px; background: var(--accent-glow);
}
.feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-muted); }

/* Cards */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; margin-bottom: 24px;
}
.card-sm { padding: 20px; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Models Grid */
.models-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px;
}
.model-tag {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  text-align: center; font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.model-tag:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.model-tag .provider { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; position: relative; transition: all 0.3s;
}
.price-card.featured {
  border-color: var(--accent); box-shadow: 0 0 60px rgba(99, 102, 241, 0.15);
}
.price-card.featured::before {
  content: '推荐'; position: absolute; top: -12px; right: 24px;
  padding: 4px 12px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  font-size: 12px; font-weight: 600; color: #fff;
}
.price-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.price-card .price { font-size: 42px; font-weight: 800; margin: 16px 0; }
.price-card .price span { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.price-card .desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.price-card ul { list-style: none; margin-bottom: 32px; }
.price-card li { padding: 8px 0; font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }
.price-card li::before { content: '\2713'; color: var(--green); font-weight: 700; font-size: 14px; }
.btn-price {
  display: block; width: 100%; padding: 12px; border-radius: var(--radius-sm);
  text-align: center; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); background: transparent;
  color: var(--text); cursor: pointer; transition: all 0.2s;
}
.btn-price:hover { border-color: var(--accent); background: var(--accent-glow); }
.price-card.featured .btn-price {
  background: linear-gradient(135deg, var(--accent), #7c3aed); border: none; color: #fff;
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { text-align: center; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 24px; font-weight: 800;
  background: var(--accent-glow); color: var(--accent-light);
  border: 2px solid var(--accent);
}
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); }
.step code {
  display: block; margin-top: 16px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--accent-light);
  text-align: left; overflow-x: auto;
}

/* CTA */
.cta {
  text-align: center; padding: 80px 0;
  background: linear-gradient(180deg, transparent, var(--accent-glow));
}
.cta h2 { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.cta p { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; }

/* Code Block */
.code-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  margin: 32px auto; max-width: 700px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px; line-height: 1.8; overflow-x: auto;
}
.code-block .comment { color: var(--text-muted); }
.code-block .keyword { color: #c084fc; }
.code-block .string { color: var(--green); }
.code-block .func { color: #60a5fa; }
.code-block .number { color: #f59e0b; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
td { font-size: 14px; }
tr:hover td { background: var(--bg-card-hover); }

/* Tags */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 600;
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-blue { background: rgba(99, 102, 241, 0.1); color: var(--accent-light); }
.tag-amber { background: rgba(245, 158, 11, 0.1); color: var(--amber); }
.tag-red { background: rgba(239, 68, 68, 0.1); color: var(--red); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0; text-align: center;
  font-size: 13px; color: var(--text-muted);
}
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 48px; text-align: left; margin-bottom: 48px; }
.footer-grid h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.footer-grid a { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.footer-grid a:hover { color: var(--text); }

/* Docs Layout */
.docs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 40px 0; min-height: calc(100vh - 64px); }
.docs-sidebar { position: sticky; top: 80px; align-self: start; }
.docs-sidebar h3 { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 20px 0 8px; }
.docs-sidebar h3:first-child { margin-top: 0; }
.docs-sidebar a {
  display: block; padding: 6px 12px; margin: 2px 0; border-radius: 6px;
  font-size: 14px; color: var(--text-muted); transition: all 0.2s;
}
.docs-sidebar a:hover { color: var(--text); background: var(--bg-card); }
.docs-sidebar a.active { color: var(--accent-light); background: var(--accent-glow2); font-weight: 500; }
.docs-content { max-width: 800px; }
.docs-content h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.docs-content h2 { font-size: 22px; font-weight: 600; margin: 40px 0 16px; padding-top: 24px; border-top: 1px solid var(--border); }
.docs-content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.docs-content h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; }
.docs-content p { margin-bottom: 16px; color: var(--text-muted); font-size: 15px; }
.docs-content ul, .docs-content ol { margin: 0 0 16px 24px; color: var(--text-muted); font-size: 15px; }
.docs-content li { margin-bottom: 8px; }
.docs-content code {
  background: var(--bg-card); padding: 2px 6px; border-radius: 4px;
  font-size: 13px; color: var(--accent-light); border: 1px solid var(--border);
}
.docs-content pre {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px; margin: 16px 0;
  overflow-x: auto; font-size: 14px; line-height: 1.7;
}
.docs-content pre code { background: none; padding: 0; border: none; color: var(--text); }
.docs-content table { margin: 16px 0; }
.docs-content .info-box {
  padding: 16px 20px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent); background: var(--accent-glow2);
  margin: 16px 0; font-size: 14px;
}
.docs-content .warn-box {
  padding: 16px 20px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--amber); background: rgba(245, 158, 11, 0.08);
  margin: 16px 0; font-size: 14px;
}
.docs-content .page-nav {
  display: flex; justify-content: space-between; margin-top: 60px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.docs-content .page-nav a {
  padding: 12px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: 14px; transition: all 0.2s;
}
.docs-content .page-nav a:hover { border-color: var(--accent); background: var(--accent-glow2); }

/* Admin Layout */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--bg-card); border-right: 1px solid var(--border);
  padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .logo { padding: 0 24px; margin-bottom: 32px; font-size: 18px; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; font-size: 14px; color: var(--text-muted); transition: all 0.2s;
}
.admin-sidebar a:hover { color: var(--text); background: var(--bg-card-hover); }
.admin-sidebar a.active { color: var(--accent-light); background: var(--accent-glow2); border-right: 2px solid var(--accent); }
.admin-sidebar .sidebar-label { padding: 20px 24px 8px; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.admin-main { padding: 32px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.admin-header h1 { font-size: 24px; font-weight: 700; }

/* Dashboard Cards */
.dash-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.dash-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.dash-card .label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.dash-card .value { font-size: 28px; font-weight: 700; }
.dash-card .change { font-size: 12px; margin-top: 4px; }
.dash-card .change.up { color: var(--green); }
.dash-card .change.down { color: var(--red); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 24px; }
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px;
  border: 1px solid var(--border); transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent); background: var(--accent-glow2); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Empty state */
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  padding: 12px 20px; border-radius: var(--radius-sm);
  background: var(--green); color: #fff; font-size: 14px; font-weight: 500;
  transform: translateY(100px); opacity: 0; transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* Responsive */
@media (max-width: 1024px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  h1 { font-size: 36px; }
  .features, .pricing, .steps, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  nav { display: none; }
  nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-card); padding: 16px 24px; border-bottom: 1px solid var(--border); gap: 12px; }
  .mobile-toggle { display: block; }
  .hero { padding: 60px 0 40px; }
  .section { padding: 48px 0; }
  .dash-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
