:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-tint: #f0f4ff;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-mid: #475467;
  --text-soft: #98a2b3;
  --brand: #2f5cff;
  --brand-dark: #1e40d6;
  --brand-soft: #e8eeff;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; height: 60px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800;
}
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--text-mid); margin-left: auto; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; transition: all 0.15s; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: var(--border-strong); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-mid); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-outline { background: var(--bg); border: 1px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--bg-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fee4e2; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 68px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 460px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(47, 92, 255, 0.11) 0%, transparent 68%);
}
.hero-inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
h1 { font-size: 50px; line-height: 1.1; letter-spacing: -0.035em; font-weight: 800; margin-bottom: 20px; }
h1 .grad {
  background: linear-gradient(100deg, var(--brand) 10%, #7c3aed 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: var(--text-mid); margin-bottom: 32px; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 14px; }
.hero-note { font-size: 13px; color: var(--text-soft); }

.code-block {
  max-width: 620px; margin: 44px auto 0; text-align: left;
  background: #0d1117; border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.code-head { display: flex; gap: 6px; margin-bottom: 14px; align-items: center; }
.code-dot { width: 11px; height: 11px; border-radius: 50%; }
.code-block pre { font-family: var(--mono); font-size: 13px; line-height: 1.85; overflow-x: auto; }
.c-key { color: #79c0ff; }
.c-str { color: #a5d6ff; }
.c-cmt { color: #6e7681; }

/* ---------- 区块 ---------- */
section { padding: 68px 0; }
.sec-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.sec-eyebrow {
  font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 12px;
}
h2 { font-size: 34px; letter-spacing: -0.028em; font-weight: 750; margin-bottom: 14px; line-height: 1.25; }
.sec-head p { color: var(--text-mid); font-size: 16px; }

.grid { display: grid; gap: 20px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .g3, .g4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: all 0.18s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 19px; margin-bottom: 16px;
}
.card h3 { font-size: 16px; font-weight: 650; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { font-size: 14px; color: var(--text-mid); line-height: 1.65; }

.bg-soft { background: var(--bg-soft); }

/* ---------- 模型卡 ---------- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 14px; }
.model-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  background: var(--bg); transition: all 0.16s;
}
.model-card:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.model-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 10px; }
.model-name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.model-vendor { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.model-price { text-align: right; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: nowrap; }
.model-price .in { color: var(--text); }
.model-price .out { color: var(--text-mid); }
.tagrow { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 11px; }
.tag {
  font-size: 11.5px; padding: 2px 7px; border-radius: 5px;
  background: var(--bg-soft); color: var(--text-mid); border: 1px solid var(--border);
}
.tag-rec { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; font-weight: 600; }

/* ---------- 价格 ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--border); border-radius: 14px; padding: 28px; background: var(--bg); position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.price-flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.price-amt { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 4px; }
.price-amt small { font-size: 15px; font-weight: 600; color: var(--text-mid); letter-spacing: 0; }
.price-desc { font-size: 14px; color: var(--text-mid); margin-bottom: 22px; }
.price-card ul { list-style: none; margin-bottom: 24px; display: grid; gap: 11px; }
.price-card li { display: flex; gap: 9px; font-size: 14px; color: var(--text-mid); align-items: flex-start; }
.price-card li::before { content: '✓'; color: var(--ok); font-weight: 700; flex-shrink: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; padding: 19px 0; font-weight: 600; font-size: 15.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q:hover { color: var(--brand); }
.faq-a { padding: 0 0 20px; color: var(--text-mid); font-size: 14.5px; line-height: 1.75; }
.faq-arrow { transition: transform 0.2s; color: var(--text-soft); flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.foot { border-top: 1px solid var(--border); padding: 36px 0; font-size: 13.5px; color: var(--text-soft); }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.notice-strip {
  background: var(--warn-soft); border: 1px solid #fedf89; border-radius: var(--radius);
  padding: 18px 22px; display: flex; gap: 13px; align-items: flex-start;
}
.notice-strip p { font-size: 14px; color: #93370d; line-height: 1.65; }

/* ---------- 应用 ---------- */
.app-shell { display: flex; min-height: 100vh; }
.side {
  width: 226px; flex-shrink: 0; border-right: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg);
}
.side .logo { padding: 0 10px 18px; }
.side-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-mid); font-weight: 500; width: 100%; text-align: left;
}
.side-item:hover { background: var(--bg-soft); color: var(--text); }
.side-item.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.side-ico { width: 17px; text-align: center; font-size: 15px; flex-shrink: 0; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
  padding: 0 28px; gap: 16px; position: sticky; top: 0; background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px); z-index: 20;
}
.topbar h1 { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
.bal-pill {
  margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px;
  padding: 0 13px; border-radius: 999px; background: var(--bg-tint);
  border: 1px solid #d6e0ff; font-size: 13.5px; font-weight: 600; color: var(--brand-dark);
}
.content { padding: 28px; flex: 1; }
.content-narrow { max-width: 940px; }

.panel {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px;
}
.panel-title { font-size: 15.5px; font-weight: 650; margin-bottom: 4px; letter-spacing: -0.01em; }
.panel-sub { font-size: 13.5px; color: var(--text-mid); margin-bottom: 18px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--text-soft); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; padding: 11px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.mono { font-family: var(--mono); font-size: 13px; }

.radio-row { display: flex; gap: 10px; }
.radio-card {
  flex: 1; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 13px; cursor: pointer; transition: all 0.15s; background: var(--bg);
}
.radio-card:hover { background: var(--bg-soft); }
.radio-card.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.radio-card .rc-t { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.radio-card .rc-d { font-size: 12.5px; color: var(--text-mid); }

.alert {
  padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px;
  margin-bottom: 16px; line-height: 1.6; display: flex; gap: 10px; align-items: flex-start;
}
.alert-err { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecdc9; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #abefc6; }
.alert-info { background: var(--bg-tint); color: var(--brand-dark); border: 1px solid #d6e0ff; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #fedf89; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-soft);
  padding: 0 12px 11px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.03em;
}
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { font-family: var(--mono); font-size: 13px; }

/* ---------- 对话 ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 60px - 56px); min-height: 460px; }
.chat-head { padding: 13px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: var(--bg); }
.chat-head select { width: auto; min-width: 172px; height: 34px; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 13px; max-width: 780px; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.avatar { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.avatar.ai { background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff; }
.avatar.human { background: var(--bg-tint); color: var(--brand-dark); border: 1px solid #d6e0ff; }
.bubble { padding: 12px 15px; border-radius: 13px; font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.msg.me .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai .bubble { background: var(--bg-soft); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble-meta { font-size: 11.5px; color: var(--text-soft); margin-top: 6px; }
.chat-empty { margin: auto; text-align: center; color: var(--text-soft); }
.chat-empty .ce-icon { font-size: 34px; margin-bottom: 12px; }
.chat-foot { border-top: 1px solid var(--border); padding: 14px 20px; background: var(--bg); }
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-row textarea { flex: 1; min-height: 44px; max-height: 160px; }
.cursor::after { content: '▋'; color: var(--brand); animation: blink 1s step-end infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 132px; padding-top: 18px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.chart-bar { width: 100%; background: var(--brand-soft); border-radius: 3px 3px 0 0; min-height: 2px; transition: background 0.15s; position: relative; }
.chart-col:hover .chart-bar { background: var(--brand); }
.chart-x { font-size: 10px; color: var(--text-soft); font-family: var(--mono); }
.chart-tip {
  position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%);
  background: #101828; color: #fff; font-size: 11.5px; padding: 4px 8px; border-radius: 5px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 5;
}
.chart-col:hover .chart-tip { opacity: 1; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr; } }
.stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--bg); }
.stat-label { font-size: 12.5px; color: var(--text-soft); margin-bottom: 6px; }
.stat-value { font-size: 25px; font-weight: 700; letter-spacing: -0.025em; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--text-mid); }
.progress { height: 6px; background: var(--bg-soft); border-radius: 3px; overflow: hidden; margin-top: 9px; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 3px; }

.modal-mask { position: fixed; inset: 0; background: rgba(16, 24, 40, 0.5); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--bg); border-radius: 14px; padding: 26px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 18px; font-weight: 650; margin-bottom: 7px; letter-spacing: -0.015em; }
.modal-sub { font-size: 14px; color: var(--text-mid); margin-bottom: 20px; }
.copy-box { font-family: var(--mono); font-size: 13px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; word-break: break-all; line-height: 1.7; margin-bottom: 14px; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 400px; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.auth-logo { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 750; margin-bottom: 24px; letter-spacing: -0.02em; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--text-mid); margin-top: 18px; }
.auth-switch button { color: var(--brand); font-weight: 600; }

.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner.dark { border-color: var(--border-strong); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.muted { color: var(--text-mid); } .small { font-size: 13px; }
.mono { font-family: var(--mono); }
.empty { text-align: center; padding: 42px 20px; color: var(--text-soft); }