/* ============ RelayHub · API 中转站 全站样式 ============ */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-soft: #eef2ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --orange: #d97706;
  --orange-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --code-bg: #0f172a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);
  --maxw: 1120px;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800;
}
.nav-links { display: flex; gap: 24px; margin-left: auto; align-items: center; font-size: 14.5px; color: var(--text-2); }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px; font-size: 14.5px;
  font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: all .18s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--border); color: var(--text); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 12px; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 480px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, .14), transparent);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid #c7d2fe; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: 44px; line-height: 1.25; letter-spacing: -.5px; margin-bottom: 18px; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--primary), #8b5cf6, #0ea5e9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 17px; color: var(--text-2); max-width: 640px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 52px; }

/* ---------- 代码示例卡 ---------- */
.code-demo {
  max-width: 860px; margin: 0 auto; display: grid;
  grid-template-columns: 1.2fr 1fr; gap: 18px; text-align: left;
}
.code-card {
  background: var(--code-bg); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #1e293b;
}
.code-card .code-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; color: #94a3b8; font-size: 13px;
  border-bottom: 1px solid #1e293b; font-family: var(--mono);
}
.code-card .code-head .dots { display: flex; gap: 6px; }
.code-card .code-head .dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-card pre {
  padding: 18px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.8px; line-height: 1.7;
  color: #e2e8f0; white-space: pre;
}
.tok-k { color: #93c5fd; } .tok-s { color: #86efac; } .tok-c { color: #64748b; }
.tok-p { color: #c4b5fd; } .tok-n { color: #fbbf24; }
.resp-meta {
  display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid #1e293b;
  color: #64748b; font-size: 12px; font-family: var(--mono);
}
.resp-meta b { color: #4ade80; font-weight: 600; }

/* ---------- 统计条 ---------- */
.stats { padding: 40px 0 8px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat .num span { font-size: 16px; }
.stat .lbl { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }

/* ---------- 通用 section ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--primary); text-transform: uppercase; margin-bottom: 10px;
}
.section-head h2 { font-size: 32px; letter-spacing: -.4px; margin-bottom: 10px; }
.section-head p { color: var(--text-2); max-width: 560px; margin: 0 auto; }

/* ---------- 支持的应用 ---------- */
.apps-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.app-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 20px; font-size: 14.5px; font-weight: 600;
  box-shadow: var(--shadow); color: var(--text-2);
}
.app-chip .ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; color: #fff; }

/* ---------- 特性网格 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .f-ico {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-size: 19px; margin-bottom: 16px;
}
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-2); }

/* ---------- 三步流程 ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); position: relative;
}
.step .n {
  width: 36px; height: 36px; border-radius: 10px; background: var(--primary);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px;
  margin-bottom: 16px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-2); }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(120deg, #312e81, var(--primary) 55%, #7c3aed);
  border-radius: 20px; color: #fff; text-align: center;
  padding: 56px 32px; box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: 28px; margin-bottom: 12px; }
.cta-band p { color: #c7d2fe; margin-bottom: 26px; }
.cta-band .btn { background: #fff; color: var(--primary); }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0 32px; margin-top: 40px; }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.foot-brand { max-width: 320px; }
.foot-brand .logo { margin-bottom: 10px; }
.foot-brand p { font-size: 13.5px; color: var(--text-3); }
.foot-col h4 { font-size: 14px; margin-bottom: 12px; }
.foot-col a { display: block; font-size: 13.5px; color: var(--text-3); padding: 3px 0; }
.foot-col a:hover { color: var(--primary); }
.foot-bottom { text-align: center; color: var(--text-3); font-size: 12.5px; margin-top: 32px; }

/* ---------- 模型广场 pricing.html ---------- */
.page-hero { padding: 52px 0 30px; text-align: center; }
.page-hero h1 { font-size: 34px; margin-bottom: 8px; }
.page-hero p { color: var(--text-2); }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 26px 0 30px; }
.filter-bar button {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.filter-bar button:hover { border-color: var(--primary); color: var(--primary); }
.filter-bar button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 60px; }
.model-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.model-top { display: flex; align-items: center; gap: 10px; }
.model-top .m-ico {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 800;
}
.model-top .m-name { font-weight: 700; font-size: 14.5px; font-family: var(--mono); word-break: break-all; }
.m-vendor { font-size: 12px; color: var(--text-3); }
.m-desc { font-size: 13px; color: var(--text-2); min-height: 40px; }
.m-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.tag-bill { background: var(--orange-soft); color: var(--orange); }
.tag-ep { background: var(--primary-soft); color: var(--primary); }
.tag-grp { background: var(--green-soft); color: var(--green); }
.m-prices {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 2px;
}
.m-prices .p-item .k { font-size: 11.5px; color: var(--text-3); }
.m-prices .p-item .v { font-size: 14px; font-weight: 700; }
.m-prices .p-item .v small { font-weight: 500; color: var(--text-3); font-size: 11px; }
.price-hint { text-align: center; color: var(--text-3); font-size: 13px; padding-bottom: 48px; }

/* ---------- 文档 docs.html ---------- */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 48px 0 72px; }
.docs-side { position: sticky; top: 88px; align-self: start; }
.docs-side a {
  display: block; padding: 7px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); border-left: 2px solid transparent;
}
.docs-side a:hover { color: var(--primary); background: var(--primary-soft); }
.docs-main h1 { font-size: 30px; margin-bottom: 8px; }
.docs-main .doc-lead { color: var(--text-2); margin-bottom: 28px; }
.docs-main h2 { font-size: 21px; margin: 36px 0 12px; padding-top: 8px; }
.docs-main h3 { font-size: 16.5px; margin: 22px 0 8px; }
.docs-main p { color: var(--text-2); font-size: 14.5px; margin-bottom: 10px; }
.docs-main code.inline {
  font-family: var(--mono); font-size: 13px; background: var(--primary-soft);
  color: var(--primary); padding: 2px 7px; border-radius: 6px;
}
.doc-code {
  background: var(--code-bg); border-radius: 12px; margin: 14px 0;
  overflow: hidden; border: 1px solid #1e293b;
}
.doc-code .dc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid #1e293b;
  color: #64748b; font-size: 12px; font-family: var(--mono);
}
.dc-copy {
  background: transparent; border: 1px solid #334155; color: #94a3b8;
  font-size: 11.5px; padding: 3px 10px; border-radius: 6px; cursor: pointer; font-family: var(--mono);
}
.dc-copy:hover { color: #e2e8f0; border-color: #64748b; }
.doc-code pre {
  padding: 16px 18px; overflow-x: auto; font-family: var(--mono);
  font-size: 12.8px; line-height: 1.7; color: #e2e8f0; white-space: pre;
}
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.doc-table th, .doc-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.doc-table th { background: var(--primary-soft); color: var(--primary); font-size: 13px; }
.doc-table td { color: var(--text-2); }
.callout {
  border-left: 3px solid var(--primary); background: var(--primary-soft);
  padding: 14px 18px; border-radius: 0 10px 10px 0; font-size: 14px;
  color: var(--text-2); margin: 16px 0;
}
.callout.warn { border-color: var(--orange); background: var(--orange-soft); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero h1 { font-size: 32px; }
  .code-demo { grid-template-columns: 1fr; }
  .stats-grid, .feature-grid, .steps-grid, .model-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 600px) {
  .nav-links a:not(.btn) { display: none; }
  .stats-grid, .feature-grid, .steps-grid, .model-grid { grid-template-columns: 1fr; }
}
