:root {
  --primary: #1677ff;
  --primary-bg: #e8f3ff;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-2: #666666;
  --text-3: #999999;
  --border: #eef0f3;
  --up: #00b42a;
  --down: #f53f3f;
  --gold: #fa8c16;
  --radius: 12px;
  --max-w: 1160px;
  --header-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ── 顶部导航 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.site-logo-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5a 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: #f2f3f5; color: var(--text); }
.site-nav a.active { background: var(--primary-bg); color: var(--primary); font-weight: 500; }

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-default { background: #fff; color: var(--text); border: 1px solid #e5e7eb; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── 小程序引流按钮 ── */
.miniapp-btn {
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  color: #fff;
}

/* ── 卡片 ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── 徽章 ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  background: #f0f2f5;
  color: var(--text-2);
  white-space: nowrap;
}
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: #e6f7ee; color: var(--up); }
.badge-warning { background: #fff7e6; color: var(--gold); }
.badge-danger { background: #ffece8; color: var(--down); }
.badge-purple { background: #f0e8ff; color: #722ed1; }
.badge-gold { background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%); color: #fff; }

/* ── 文本工具 ── */
.muted { color: var(--text-3); }
.muted-2 { color: var(--text-2); }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.up { color: var(--up); }
.down { color: var(--down); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }

.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 页面容器 ── */
.page { padding: 16px 0 40px; }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.page-sub { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.page-head { margin-bottom: 16px; }

/* ── 榜单切换 tabs ── */
.board-tabs {
  display: flex;
  gap: 6px;
  background: #fff;
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.board-tabs::-webkit-scrollbar { display: none; }
.board-tab {
  flex: 1;
  min-width: 76px;
  text-align: center;
  padding: 8px 14px;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.board-tab:hover { background: #f2f3f5; }
.board-tab.active { background: var(--primary); color: #fff; font-weight: 600; }
.board-tab.active:hover { background: var(--primary); }

/* ── 榜单头部 ── */
.board-head { margin-bottom: 12px; }
.board-head-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.board-desc { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ── 横向 chips ── */
.hscroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-bottom: 12px;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .chip { flex-shrink: 0; }

/* ── 筛选面板 ── */
.filter-panel { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.filter-panel .field-label { margin-top: 12px; }
.filter-panel .field-label:first-child { margin-top: 0; }
.filter-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ── 领奖台 ── */
.podium { margin-bottom: 12px; }
.podium-champion {
  display: block;
  background: linear-gradient(135deg, #fff8e6 0%, #fff1cc 100%);
  border: 1px solid #ffe58f;
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.podium-champion:hover { box-shadow: 0 6px 20px rgba(250, 140, 22, 0.18); }
.podium-kicker { font-size: 12px; color: #ad6800; font-weight: 600; margin-bottom: 6px; }
.podium-name { font-size: 20px; font-weight: 700; }
.podium-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.podium-metrics { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 12px; }
.podium-metric-label { font-size: 12px; color: var(--text-3); }
.podium-metric-value { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.podium-champion .compare-btn { background: rgba(255, 255, 255, 0.9); }
.podium-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.podium-card .podium-metrics { gap: 8px 16px; }
.podium-card .podium-metric-label { font-size: 11px; }
.podium-card .podium-metric-value { font-size: 13px; }
.podium-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.podium-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.podium-rank { font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; }
.podium-card.silver .podium-rank { color: #94a3b8; }
.podium-card.bronze .podium-rank { color: #cd7f32; }

/* ── 榜单卡片 ── */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.model-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.model-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.model-row { display: flex; align-items: center; gap: 12px; }
.provider-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.model-score { text-align: right; flex-shrink: 0; }
.divider { height: 1px; background: var(--border); margin: 10px 0; }
.price-line { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.price-label { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.price-value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.compare-btn { margin-left: auto; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.rank-item:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.rank-no {
  width: 28px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  text-align: center;
}
.rank-no.top1 { color: #ffb400; }
.rank-no.top2 { color: #94a3b8; }
.rank-no.top3 { color: #cd7f32; }
.rank-model-name { font-size: 15px; font-weight: 600; }
.rank-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.rank-score { text-align: right; flex-shrink: 0; }
.rank-score-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ── 表格 ── */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-2);
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #fafbfc; }
.num { font-variant-numeric: tabular-nums; }

/* ── 表单 ── */
.input, .select, .textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.textarea { resize: vertical; min-height: 100px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; display: block; }

/* 分段控制 */
.segmented {
  display: inline-flex;
  background: #f0f2f5;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.segmented button {
  padding: 5px 12px;
  font-size: 13px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.segmented button.active { background: #fff; color: var(--text); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ── 筛选条 ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-bar .select { width: auto; min-width: 110px; }

/* ── 加载与空态 ── */
.state-box {
  padding: 48px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}
.spinner {
  width: 22px; height: 22px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 顶部横幅（订阅推送引流） ── */
.banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}
.banner-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.banner-sub { font-size: 12px; color: rgba(255, 255, 255, 0.85); }

/* ── 小程序码弹层 ── */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  animation: pop 0.2s ease;
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-card img { width: 200px; height: 200px; margin: 0 auto; border-radius: 12px; }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }

/* ── 底部 ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 24px 0;
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-3);
}
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--primary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }

/* ── 移动端底部 Tab ── */
.tabbar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 90;
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-3);
  cursor: pointer;
}
.tabbar-item.active { color: var(--primary); }
.tab-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--down);
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
}

/* ── 移动端引导条 ── */
.miniapp-bar {
  display: none;
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(7, 193, 96, 0.35);
  z-index: 89;
  cursor: pointer;
}
.miniapp-bar .close {
  margin-left: auto;
  opacity: 0.8;
  padding: 4px;
}

/* ── 详情页 ── */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.stat-cell { background: #fafbfc; border-radius: 10px; padding: 12px; }
.stat-label { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.stat-value { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 2px; }

/* ── 对比页 ── */
.compare-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip.active { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); font-weight: 500; }

/* ── 文章 ── */
.article-body { font-size: 15px; line-height: 1.8; color: #333; }
.article-body h1 { font-size: 20px; margin: 20px 0 10px; }
.article-body h2 { font-size: 17px; margin: 18px 0 8px; }
.article-body h3 { font-size: 15px; margin: 14px 0 6px; }
.article-body p { margin: 6px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.article-body th, .article-body td { border: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; }
.article-body code {
  background: #f6f7f9;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--down);
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.article-body pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 10px 0;
}
.article-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 8px 12px;
  background: #f0f7ff;
  border-radius: 0 6px 6px 0;
  margin: 8px 0;
}

/* ── ChatGPT 重置提醒 ── */
.reset-hero {
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(135deg, #c9eadd 0%, #edf8f3 100%);
}
.reset-hero-icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  background: linear-gradient(140deg, #2b8a6e, #1f6f59);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.reset-hero-title { font-size: 22px; font-weight: 750; color: #1c4a3d; }
.reset-hero-desc { font-size: 13px; color: #5b7d72; line-height: 1.6; margin-top: 4px; }
.reset-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  background: #258169;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.reset-hero-cta:hover { background: #1f6f59; }
.reset-hero-note { font-size: 12px; color: #6d8c82; }

/* 首页的 Tibo 动态条 */
.tibo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e6f6ef 0%, #f4fbf8 100%);
  border: 1px solid #cfeade;
  transition: box-shadow 0.15s;
}
.tibo-banner:hover { box-shadow: 0 4px 14px rgba(43, 138, 110, 0.14); }
.tibo-banner-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(43, 138, 110, 0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.reset-latest {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  border-left: 3px solid #2b8a6e;
  padding: 16px 18px;
  margin-top: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.reset-latest:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.reset-latest-summary { font-size: 16px; font-weight: 600; line-height: 1.6; margin-top: 12px; }
.reset-latest-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #edf8f3;
  color: #1f6f59;
  font-size: 13px;
  font-weight: 600;
}

.conf-bar { display: flex; align-items: center; gap: 8px; }
.conf-bar-track { width: 90px; height: 5px; border-radius: 3px; background: #f0f2f5; overflow: hidden; }
.conf-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.conf-bar-text { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── 工作负载/成本结果条 ── */
.cost-highlight {
  background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px;
}

/* ── 响应式 ── */
@media (max-width: 768px) {
  .tabbar { display: flex; }
  .site-nav { display: none; }
  .miniapp-bar { display: flex; }
  .page { padding-bottom: 140px; }
  .model-card { padding: 10px 12px; }
  .model-row { gap: 8px; }
  .provider-avatar { width: 30px; height: 30px; font-size: 12px; }
  .rank-item { padding: 10px 12px; gap: 8px; }
  .rank-no { width: 22px; font-size: 14px; }
  .rank-model-name { font-size: 14px; }
  .rank-score-value { font-size: 15px; }
  .price-line { gap: 14px; }
  .compare-btn { margin-left: auto; }
  .desktop-only { display: none !important; }
  .site-footer { padding-bottom: 80px; }
}

@media (min-width: 769px) {
  .mobile-only { display: none !important; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
