/* ChatHub 官网统一样式：清爽科技风，适配桌面与移动端 */
:root {
  --ink: #1a1d2e;
  --muted: #5c6377;
  --line: #e7e9f2;
  --brand: #4d6bfe;
  --brand-2: #7b5cff;
  --bg: #ffffff;
  --soft: #f6f7fc;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(38, 51, 110, 0.08);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(100% - 40px, var(--maxw)); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.5px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-size: 18px;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-cta {
  padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.nav-cta:hover { opacity: 0.92; }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink); }

/* ---------- 通用区块 ---------- */
section { padding: 72px 0; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand);
  background: #eef1ff; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.2; letter-spacing: -1.5px; margin: 0 0 20px; }
h2 { font-size: clamp(26px, 3.5vw, 40px); line-height: 1.3; letter-spacing: -0.8px; margin: 0 0 16px; }
h3 { font-size: 19px; margin: 0 0 10px; }
p { color: var(--muted); margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 720px; }
.grad-text { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 700; border: 0; cursor: pointer; transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 24px rgba(77,107,254,0.28); }
.btn-ghost { color: var(--ink); background: var(--soft); border: 1px solid var(--line); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 60px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 60px); }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.tag { font-size: 13px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; }
.tag b { color: var(--ink); }
.hero-visual {
  border-radius: 22px; background: var(--soft); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 18px; min-height: 380px;
}
.chat-demo { display: flex; flex-direction: column; gap: 14px; }
.chat-top { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat-dot { width: 10px; height: 10px; border-radius: 50%; }
.chat-title { font-size: 13px; color: var(--muted); margin-left: auto; }
.bubble { max-width: 86%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.65; }
.bubble.user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: #eef0fb; color: var(--ink); border-bottom-left-radius: 4px; }
.chat-input {
  margin-top: auto; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px;
}
.chat-send { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; }

/* ---------- 特性网格 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 40px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  box-shadow: 0 4px 18px rgba(38,51,110,0.04);
}
.card:hover { box-shadow: var(--shadow); }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #eef1ff; color: var(--brand); font-size: 20px; margin-bottom: 16px;
}
.card p { font-size: 14px; margin: 0; }

/* ---------- 模型表 ---------- */
.table-wrap { overflow-x: auto; margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { background: var(--soft); color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #eef1ff; color: var(--brand); font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* ---------- 定价卡 ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.price-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; font-size:12px; font-weight:700; padding:5px 16px; border-radius:999px; }
.price-credits { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.price-unit { color: var(--muted); font-size: 14px; }
.price-amount { font-size: 28px; font-weight: 800; color: var(--brand); margin: 14px 0 4px; }
.price-note { font-size: 13px; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 0; }
.price-card li { font-size: 14px; color: var(--muted); padding: 7px 0 7px 24px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.price-card .btn { margin-top: auto; width: 100%; justify-content: center; }

/* ---------- 公式条 ---------- */
.formula {
  margin-top: 28px; padding: 22px 26px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; color: var(--ink); text-align: center;
}
.formula small { display: block; font-family: inherit; color: var(--muted); margin-top: 8px; font-size: 13px; }

/* ---------- 步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; display:grid; place-items:center; font-weight:800; margin-bottom:14px; }
.step h3 { font-size: 16px; }
.step p { font-size: 13px; margin: 0; }

/* ---------- FAQ ---------- */
.faq { margin-top: 36px; }
details { border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 12px; background: #fff; }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 15px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--brand); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { font-size: 14px; padding-bottom: 18px; margin: 0; }

/* ---------- CTA ---------- */
.cta-band { background: linear-gradient(135deg, #f0f3ff, #f7f2ff); border-radius: 24px; padding: 54px 40px; text-align: center; margin: 20px 0 0; }
.cta-band h2 { margin-bottom: 12px; }

/* ---------- 法律/文章页 ---------- */
.doc-header { padding: 60px 0 30px; border-bottom: 1px solid var(--line); }
.doc-header h1 { font-size: clamp(30px,4vw,44px); }
.doc-meta { color: var(--muted); font-size: 14px; }
.doc-body { padding: 40px 0 80px; }
.doc-layout { display: grid; grid-template-columns: 230px 1fr; gap: 50px; }
.toc { position: sticky; top: 90px; align-self: start; }
.toc-title { font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.toc a { display: block; font-size: 14px; color: var(--muted); padding: 7px 0; border-left: 2px solid var(--line); padding-left: 12px; }
.toc a:hover { color: var(--brand); border-color: var(--brand); }
.article h2 { font-size: 22px; margin: 36px 0 14px; padding-top: 10px; }
.article h2:first-child { margin-top: 0; }
.article p, .article li { font-size: 15px; color: var(--muted); }
.article ul { padding-left: 22px; }
.article li { margin-bottom: 9px; }
.note { background: #eef1ff; border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 20px 0; font-size: 14px; color: var(--ink); }
.note.warn { background: #fff8ea; border-color: #f5a623; }
.contact-box { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; margin: 20px 0; }
.contact-box a { color: var(--brand); font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer { background: #161a2b; color: #c8ccdb; padding: 52px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; }
.footer-desc { font-size: 14px; color: #9aa0b5; margin-top: 14px; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 16px; }
.footer-col a { display: block; font-size: 14px; color: #9aa0b5; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 36px; padding-top: 22px; font-size: 13px; color: #8b90a5; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 16px 20px; gap: 14px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .hero-grid, .grid-3, .grid-2, .price-grid, .steps, .footer-grid { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; }
  section { padding: 52px 0; }
  .hero { padding: 56px 0 40px; }
}
