/*
 * 精简 AI API 服务门户 — 共享样式（原型）
 * 视觉基线：参考本机 New API (new-api/web) 的语义色与组件密度。
 * 令牌来源：src/styles/theme.css（oklch 语义色、--radius: 1rem、3rem 顶栏）。
 * 本文件为独立实现，仅对齐视觉令牌，未复制其业务代码。
 */

/* ---------- 主题令牌（对齐 New API theme.css） ---------- */
:root {
  --radius: 1rem;
  --app-header-height: 3rem;

  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.692 0.141 243.716);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0 0);
  --secondary-foreground: oklch(0.42 0.16 250);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.49 0 0);
  --accent: color-mix(in oklch, var(--primary) 12%, var(--background));
  --accent-foreground: oklch(0.145 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0 0);
  --success: oklch(0.596 0.145 163.225);
  --success-foreground: oklch(0.985 0 0);
  --warning: oklch(0.681 0.162 75.834);
  --warning-foreground: oklch(0.145 0 0);
  --info: oklch(0.588 0.158 241.966);
  --info-foreground: oklch(0.985 0 0);
  --border: oklch(0.93 0 0);
  --input: oklch(0.93 0 0);
  --ring: oklch(0.708 0.16 249.003);
  --table-header: color-mix(in oklch, var(--foreground) 1.5%, var(--background));
  --table-header-hover: color-mix(in oklch, var(--foreground) 3%, var(--background));
  --code-bg: color-mix(in oklch, var(--foreground) 3%, var(--background));

  --radius-sm: calc(var(--radius) * 0.5);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);

  --shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-pop: 0 8px 30px rgb(0 0 0 / 0.12);
  --font-sans: 'Public Sans Variable', 'Public Sans', -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'Roboto', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, 'JetBrains Mono', monospace;
}

.dark {
  color-scheme: dark;
  --background: oklch(0.235 0 0);
  --foreground: oklch(0.965 0 0);
  --card: oklch(0.285 0 0);
  --card-foreground: oklch(0.965 0 0);
  --popover: oklch(0.305 0 0);
  --popover-foreground: oklch(0.965 0 0);
  --primary: oklch(0.54 0.142 248.516);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.335 0 0);
  --secondary-foreground: oklch(0.9 0.05 250);
  --muted: oklch(0.305 0 0);
  --muted-foreground: oklch(0.78 0 0);
  --accent: color-mix(in oklch, var(--primary) 20%, var(--background));
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.985 0 0);
  --success: oklch(0.696 0.17 162.48);
  --success-foreground: oklch(0.145 0 0);
  --warning: oklch(0.769 0.188 70.08);
  --warning-foreground: oklch(0.145 0 0);
  --info: oklch(0.613 0.14 239.919);
  --info-foreground: oklch(0.145 0 0);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 17%);
  --ring: oklch(0.554 0.148 250.726);
  --table-header: color-mix(in oklch, var(--foreground) 6%, var(--background));
  --table-header-hover: color-mix(in oklch, var(--foreground) 9%, var(--background));
  --code-bg: oklch(0.225 0 0);
  --shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-pop: 0 8px 30px rgb(0 0 0 / 0.45);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; border-color: var(--border); }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
code, pre { font-family: var(--font-mono); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--app-header-height);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 85%, transparent);
  backdrop-filter: blur(10px);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklch, var(--primary) 55%, oklch(0.7 0.12 280)));
  display: grid;
  place-items: center;
  color: var(--primary-foreground);
  font-size: 12px;
  font-weight: 800;
}
.main-nav { display: flex; align-items: center; gap: 0.25rem; flex: 1; }
.main-nav a {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { color: var(--foreground); background: var(--muted); }
.main-nav a.active { color: var(--foreground); background: transparent; font-weight: 650; position: relative; }
.main-nav a.active::after { content: ''; position: absolute; left: 0.75rem; right: 0.75rem; bottom: -3px; height: 2px; border-radius: 2px; background: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 88%, black); }
.btn-outline { background: var(--background); border-color: var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { background: color-mix(in oklch, var(--secondary) 85%, var(--foreground)); }
.btn-ghost { background: transparent; color: var(--muted-foreground); }
.btn-ghost:hover { background: var(--muted); color: var(--foreground); }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-lg { height: 2.75rem; padding: 0 1.5rem; font-size: 15px; }
.btn .icon { width: 15px; height: 15px; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-success { background: color-mix(in oklch, var(--success) 14%, var(--background)); color: var(--success); border-color: color-mix(in oklch, var(--success) 30%, transparent); }
.badge-warning { background: color-mix(in oklch, var(--warning) 16%, var(--background)); color: color-mix(in oklch, var(--warning) 80%, var(--foreground)); border-color: color-mix(in oklch, var(--warning) 32%, transparent); }
.badge-neutral { background: var(--muted); color: var(--muted-foreground); border-color: var(--border); }
.badge-info { background: color-mix(in oklch, var(--info) 13%, var(--background)); color: var(--info); border-color: color-mix(in oklch, var(--info) 28%, transparent); }
.badge-destructive { background: color-mix(in oklch, var(--destructive) 12%, var(--background)); color: var(--destructive); border-color: color-mix(in oklch, var(--destructive) 28%, transparent); }
.badge-demo { background: color-mix(in oklch, var(--destructive) 10%, var(--background)); color: var(--destructive); border-color: color-mix(in oklch, var(--destructive) 30%, transparent); border-style: dashed; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* 类别徽章（对话/图片/视频） */
.badge-cat { border-radius: var(--radius-sm); font-family: var(--font-mono); font-weight: 600; }
.badge-cat.chat  { background: color-mix(in oklch, var(--info) 13%, var(--background)); color: var(--info); }
.badge-cat.image { background: color-mix(in oklch, var(--primary) 14%, var(--background)); color: var(--primary); }
.badge-cat.video { background: color-mix(in oklch, oklch(0.62 0.16 300) 14%, var(--background)); color: oklch(0.55 0.2 300); }
.dark .badge-cat.video { color: oklch(0.75 0.14 300); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 1.25rem 1.5rem; }

/* ---------- Tabs（shadcn 风格分段控件） ---------- */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--muted);
  border-radius: var(--radius-md);
}
.tabs .tab {
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: calc(var(--radius-md) - 0.25rem);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.tabs .tab:hover { color: var(--foreground); }
.tabs .tab.active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-card);
}
.tabs .tab .count { margin-left: 0.35rem; font-size: 11px; color: var(--muted-foreground); }

/* ---------- 表格 ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 860px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--table-header);
  text-align: left;
  font-weight: 600;
  color: var(--muted-foreground);
  font-size: 12.5px;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: var(--muted); }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table .model-name { font-weight: 600; }
.data-table .model-id { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.cell-muted { color: var(--muted-foreground); font-size: 12.5px; }
.cell-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-actions { display: flex; gap: 0.4rem; }

/* 能力标签 */
.cap-list { display: flex; flex-wrap: wrap; gap: 0.3rem; max-width: 320px; }
.cap {
  font-size: 11px;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ---------- 空状态 ---------- */
.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  background: color-mix(in oklch, var(--muted) 50%, var(--background));
}
.empty-state .empty-icon {
  width: 44px; height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  background: var(--muted);
  display: grid; place-items: center;
  color: var(--muted-foreground);
}
.empty-state h4 { font-size: 15px; margin-bottom: 0.35rem; }
.empty-state p { color: var(--muted-foreground); font-size: 13px; max-width: 420px; margin: 0 auto; }

/* ---------- 抽屉（模型详情） ---------- */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgb(0 0 0 / 0.45);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  background: var(--background);
  border-left: 1px solid var(--border);
  z-index: 61;
  transform: translateX(102%);
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-pop);
}
body.drawer-open .drawer-mask { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { transform: translateX(0); }
.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem 2rem; }
.drawer-section { margin-bottom: 1.5rem; }
.drawer-section > h4 {
  font-size: 13px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.drawer-close {
  width: 2rem; height: 2rem;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted-foreground);
  cursor: pointer; display: grid; place-items: center;
  flex-shrink: 0;
}
.drawer-close:hover { background: var(--muted); color: var(--foreground); }

/* 详情键值表 */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.25rem;
  font-size: 13px;
}
.kv-grid .kv { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--border); }
.kv-grid .kv .k { color: var(--muted-foreground); white-space: nowrap; }
.kv-grid .kv .v { font-weight: 500; text-align: right; }
.kv-grid .kv .v.mono { font-family: var(--font-mono); font-size: 12.5px; }

/* ---------- 代码块 ---------- */
.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.65;
}
.code-block pre { margin: 0; white-space: pre; }
.code-copy {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  width: 1.9rem; height: 1.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--muted-foreground);
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.code-block:hover .code-copy { opacity: 1; }
.code-copy:hover { color: var(--foreground); }

/* 价格表 */
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table th, .price-table td { padding: 0.45rem 0.75rem; border: 1px solid var(--border); text-align: left; }
.price-table th { background: var(--table-header); font-weight: 600; font-size: 12.5px; color: var(--muted-foreground); }
.price-table td { font-variant-numeric: tabular-nums; }
.price-unknown { color: var(--muted-foreground); font-style: italic; }

/* ---------- 提示条 ---------- */
.note {
  display: flex;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid color-mix(in oklch, var(--warning) 35%, transparent);
  background: color-mix(in oklch, var(--warning) 9%, var(--background));
  color: color-mix(in oklch, var(--warning) 70%, var(--foreground));
}
.note.info {
  border-color: color-mix(in oklch, var(--info) 30%, transparent);
  background: color-mix(in oklch, var(--info) 8%, var(--background));
  color: color-mix(in oklch, var(--info) 75%, var(--foreground));
}
.note .note-icon { flex-shrink: 0; margin-top: 0.1rem; }

/* 原型演示横幅 */
.proto-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.45rem 1.5rem;
  font-size: 12px;
  background: color-mix(in oklch, var(--warning) 10%, var(--background));
  border-bottom: 1px solid color-mix(in oklch, var(--warning) 25%, transparent);
  color: color-mix(in oklch, var(--warning) 65%, var(--foreground));
}
.proto-banner .spacer { flex: 1; }
.proto-banner label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; user-select: none; font-weight: 500; }
.proto-banner input[type='checkbox'] { accent-color: var(--primary); width: 14px; height: 14px; }

/* ---------- 通用节区 ---------- */
.section { padding: 3.5rem 0; }
.section-head { margin-bottom: 1.75rem; }
.section-head .kicker {
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.section-head h2 { font-size: 26px; margin-bottom: 0.5rem; }
.section-head p { color: var(--muted-foreground); font-size: 14.5px; max-width: 640px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; margin-top: 2rem; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; }
.site-footer h5 { font-size: 13px; margin: 0 0 0.6rem; color: var(--foreground); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-footer li a, .site-footer li span { color: var(--muted-foreground); font-size: 13px; }
.site-footer li a:hover { color: var(--foreground); }
.footer-meta { margin-top: 2rem; color: var(--muted-foreground); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 4.5rem 0 3.5rem; }
.hero-inner { max-width: 760px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 12.5px;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 { font-size: 40px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 1rem; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary), color-mix(in oklch, var(--primary) 60%, oklch(0.66 0.18 300)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { color: var(--muted-foreground); font-size: 16.5px; line-height: 1.7; max-width: 620px; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* 能力卡片 */
.cap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cap-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.cap-card:hover { border-color: color-mix(in oklch, var(--primary) 45%, var(--border)); transform: translateY(-2px); box-shadow: 0 6px 24px rgb(0 0 0 / 0.07); }
.cap-card .cap-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 0.25rem;
}
.cap-card h3 { font-size: 16px; }
.cap-card p { color: var(--muted-foreground); font-size: 13.5px; flex: 1; }
.cap-card .cap-link { color: var(--primary); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 0.25rem; }
.cap-card .count-note { font-size: 12px; color: var(--muted-foreground); }

/* 推荐模型卡 */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.rec-card { padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; }
.rec-card .rec-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.rec-card .rec-name { font-weight: 650; font-size: 15px; }
.rec-card .rec-id { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.rec-card p.desc { color: var(--muted-foreground); font-size: 13px; flex: 1; }
.rec-card .rec-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.25rem; }
.rec-card .price-entry { font-size: 13px; font-weight: 600; }

/* 三步接入 */
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.step-card { padding: 1.25rem 1.4rem; position: relative; }
.step-num {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: color-mix(in oklch, var(--primary) 14%, var(--background));
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  margin-bottom: 0.75rem;
}
.step-card h3 { font-size: 14.5px; margin-bottom: 0.3rem; }
.step-card p { color: var(--muted-foreground); font-size: 13px; }

/* ---------- 模型列表页 ---------- */
.page-head { padding-top: 2rem; padding-bottom: 1.25rem; }
.page-head h1 { font-size: 24px; margin-bottom: 0.4rem; }
.page-head p { color: var(--muted-foreground); font-size: 14px; }
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.search-box { position: relative; margin-left: auto; }
.search-box input {
  height: 2.25rem;
  width: 240px;
  padding: 0 0.75rem 0 2.1rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 25%, transparent); }
.search-box .search-icon {
  position: absolute; left: 0.65rem; top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  width: 15px; height: 15px;
  pointer-events: none;
}

/* 手机端模型卡列表 */
.mobile-cards { display: none; grid-template-columns: 1fr; gap: 0.75rem; }
.m-card { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.m-card .m-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.m-card .m-name { font-weight: 600; font-size: 14.5px; }
.m-card .m-id { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); }
.m-card .m-fee { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted-foreground); }
.m-card .m-actions { display: flex; gap: 0.5rem; margin-top: 0.25rem; }

/* 图标 */
.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .cap-grid, .steps-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 3rem 0 2.5rem; }
}
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--app-header-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 0.75rem;
    gap: 0.15rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.55rem 0.75rem; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn span.hide-sm { display: none; }
  /* 手机端顶栏防溢出：登录/退出/用户名收进控制台，压缩间距与品牌字号 */
  .site-header .container { gap: 0.6rem; }
  .mt-brand { font-size: 15px; min-width: 0; }
  .header-actions { min-width: 0; }
  .header-actions > a.btn-ghost,
  .header-actions > .cell-muted,
  .header-actions > #logoutBtn2 { display: none; }
  .data-table-wrap { display: none; }
  .mobile-cards { display: grid; }
  .search-box { margin-left: 0; width: 100%; }
  .search-box input { width: 100%; }
  .list-toolbar { align-items: stretch; }
  .list-toolbar .tabs { width: 100%; justify-content: space-between; overflow-x: auto; }
  .section { padding: 2.25rem 0; }
  .section-head h2 { font-size: 21px; }
  .kv-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
}

/* ---------- 控制台补充 ---------- */
.auth-wrap { max-width: 400px; margin: 4rem auto 5rem; }
.auth-card { padding: 2rem 2rem 1.75rem; }
.auth-card h1 { font-size: 20px; margin-bottom: 0.35rem; }
.auth-card .sub { color: var(--muted-foreground); font-size: 13px; margin-bottom: 1.5rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 0.35rem; }
.field input {
  width: 100%; height: 2.5rem; padding: 0 0.75rem;
  border: 1px solid var(--input); border-radius: var(--radius-md);
  background: var(--background); color: var(--foreground);
  font-family: inherit; font-size: 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 25%, transparent); }
.field .err { color: var(--destructive); font-size: 12.5px; margin-top: 0.35rem; min-height: 1.1em; }
.btn-block { width: 100%; height: 2.5rem; font-size: 14px; }

.console-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 1.25rem; }
.console-head h1 { font-size: 22px; }
.console-head .who { display: flex; align-items: center; gap: 0.6rem; color: var(--muted-foreground); font-size: 13px; }
.balance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { padding: 1.1rem 1.4rem; }
.stat-card .label { color: var(--muted-foreground); font-size: 12.5px; margin-bottom: 0.3rem; }
.stat-card .value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-card .value small { font-size: 14px; font-weight: 500; color: var(--muted-foreground); margin-left: 0.25rem; }
.stat-card .hint { color: var(--muted-foreground); font-size: 12px; margin-top: 0.25rem; }

.toolbar-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar-row .spacer { flex: 1; }
.table-footer { display: flex; align-items: center; justify-content: space-between; color: var(--muted-foreground); font-size: 12.5px; padding: 0.75rem 0.25rem 0; }

/* 弹窗（创建 Key 展示一次） */
.modal-mask { position: fixed; inset: 0; background: rgb(0 0 0 / 0.45); z-index: 70; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-mask.open { display: flex; }
.modal { width: min(520px, 100%); background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); padding: 1.5rem; }
.modal h3 { font-size: 16px; margin-bottom: 0.5rem; }
.modal .modal-body { font-size: 13.5px; color: var(--muted-foreground); margin-bottom: 1rem; }
.modal .key-reveal {
  font-family: var(--font-mono); font-size: 13px; padding: 0.75rem 0.9rem;
  background: var(--code-bg); border: 1px dashed color-mix(in oklch, var(--warning) 45%, transparent);
  border-radius: var(--radius-md); word-break: break-all; margin-bottom: 1rem;
}
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

.tone-success { color: var(--success); }
.tone-error { color: var(--destructive); }
.tone-muted { color: var(--muted-foreground); }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.amount-pos { color: var(--success); font-variant-numeric: tabular-nums; }
.amount-neg { color: var(--foreground); font-variant-numeric: tabular-nums; }
.filter-select {
  height: 2.25rem; padding: 0 0.6rem; border: 1px solid var(--input); border-radius: var(--radius-md);
  background: var(--background); color: var(--foreground); font-family: inherit; font-size: 13px; outline: none;
}
.empty-inline { padding: 2.5rem 1rem; text-align: center; color: var(--muted-foreground); font-size: 13px; }

/* ==================== MediaTalk 品牌层（2026-10-30 品牌改造） ==================== */
:root {
  --navy-950: #061020;
  --navy-900: #081426;
  --navy-800: #0b1b33;
  --navy-700: #0e2a4d;
  --navy-line: #17335c;
  --cyan-glow: #22d3ee;
  --sky-glow: #38bdf8;
  --blue-accent: #60a5fa;
  --brand-font: 'Sora', 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ---- 模型 Logo 组件 ---- */
.model-logo {
  border-radius: 6px;
  background: color-mix(in oklch, var(--muted) 55%, transparent);
  padding: 3px;
  flex: none;
  box-sizing: content-box;
}
.model-cell { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.model-cell .model-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-cell .model-id { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); }
.model-id-inline { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }

/* 未定价中性标签 */
.tag-unpriced {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500;
  color: var(--muted-foreground);
  background: color-mix(in oklch, var(--muted) 60%, transparent);
  border: 1px solid var(--border);
}

/* ---- 全屏沉浸式 3D Hero（固定深海军蓝，不随主题）—— 中轴沉浸构图 ---- */
.mt-hero {
  position: relative;
  --hero-copy-top: 50svh;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  background:
    radial-gradient(ellipse at 64% 30%, rgba(31, 117, 167, 0.17), transparent 58%),
    radial-gradient(ellipse at 50% 100%, rgba(53, 99, 161, 0.10), transparent 65%),
    linear-gradient(168deg, var(--navy-950) 0%, var(--navy-900) 48%, var(--navy-800) 100%);
  color: #e6f1fb;
  overflow: clip; /* 3D 场景/阴影绝不制造横向滚动 */
  padding: 0 1.5rem;
}
.mt-hero::before { /* 细网格（低对比，避免干扰主体） */
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.032) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(1200px 640px at 50% 34%, #000 16%, transparent 74%);
  pointer-events: none;
}

/* -- 背景层：3D 画布（渐进加载）+ 完整静态替代画面（默认可见，杜绝空白首屏） -- */
.mt-hero-bg { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.mt-hero-bg canvas {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  display: block; opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-3d .mt-hero-bg canvas { opacity: 1; }
.mt-static-fallback {
  position: absolute; inset: 120px 0 calc(100% - var(--hero-copy-top) + 38px);
  display: grid; place-items: center;
  transition: opacity 0.5s ease;
}
.mt-static-fallback svg { width: min(84vw, 1480px); max-height: 100%; height: auto; display: block; }
.hero-3d .mt-static-fallback { opacity: 0; visibility: hidden; }
/* 静态降级构图：主视觉居中偏上（与中轴 3D 构图一致），为前景文案让位 */
.hero-static .mt-static-fallback { align-items: center; justify-items: center; }
.hero-static .mt-fade { animation: none; opacity: 1; transform: none; }
.hero-static .mt-scroll-hint { animation: none; transform: translateX(-50%); }

/* -- 前景：品牌文案（中轴，衬暗保证可读） -- */
.mt-fg-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(56% 46% at 50% 64%, rgba(6, 16, 32, 0.55), rgba(6, 16, 32, 0.2) 55%, transparent 76%);
}
.mt-hero-fg {
  position: absolute; z-index: 2;
  top: var(--hero-copy-top); left: 1.5rem; right: 1.5rem;
  max-width: 840px; margin: 0 auto;
  text-align: center;
  will-change: transform, opacity;
}
.mt-hero h1 {
  font-family: var(--brand-font);
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 800;
  margin: 0 0 0.8rem;
  background: linear-gradient(100deg, #f2f9ff 30%, #9bd8f5 75%, #5cc8e8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 26px rgba(4, 12, 24, 0.4);
}
.mt-hero .slogan { font-size: clamp(1.12rem, 1.9vw, 1.4rem); font-weight: 700; color: #dbeeff; margin: 0 0 0.5rem; letter-spacing: 0.01em; text-shadow: 0 2px 18px rgba(4, 12, 24, 0.65); }
.mt-hero .sub { font-size: 15px; color: #a8c2dc; margin: 0 auto 1.7rem; max-width: 40rem; line-height: 1.7; text-shadow: 0 1px 14px rgba(4, 12, 24, 0.6); }
.mt-hero .hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.mt-hero .btn-hero-primary {
  height: 3rem; padding: 0 1.6rem; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #04121f; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
}
.mt-hero .btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(34, 211, 238, 0.4); }
.mt-hero .btn-hero-ghost {
  height: 3rem; padding: 0 1.5rem; border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.35); color: #cfe8fb;
  background: rgba(14, 42, 77, 0.5); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.mt-hero .btn-hero-ghost:hover { border-color: rgba(125, 211, 252, 0.7); background: rgba(23, 51, 92, 0.6); }
.mt-hero .hero-note { margin-top: 1.4rem; font-size: 12.5px; color: #6f8db0; text-shadow: 0 1px 10px rgba(4, 12, 24, 0.6); }

/* 初版的标题装饰与紧凑层级；与悬浮导航样式独立。 */
.mt-eyebrow { display:flex; align-items:center; justify-content:center; gap:0.8rem; margin:0 0 1.4rem; color:#7dd3fc; font:600 11px/1.4 var(--brand-font); letter-spacing:0.15em; }
.mt-eyebrow::before, .mt-eyebrow::after { content:''; width:24px; height:1px; background:#22d3ee; opacity:0.8; }
.mt-hero .hero-note { margin-top:1.35rem; font-size:11.5px; color:#7797b7; }
@media(max-width:900px) { .mt-eyebrow { font-size:9px; letter-spacing:0.10em; gap:0.5rem; margin-bottom:1.1rem; } .mt-eyebrow::before, .mt-eyebrow::after { width:14px; } .mt-hero .hero-note { margin-top:1rem; font-size:10px; } }
@media(max-height:650px) { .mt-eyebrow { font-size:9px; margin-bottom:0.75rem; } .mt-hero .hero-note { margin-top:0.75rem; font-size:10px; } }

/* -- 滚动提示 -- */
.mt-scroll-hint {
  position: absolute; left: 50%; bottom: 1.9rem; z-index: 2;
  color: rgba(125, 211, 252, 0.75);
  animation: mt-hint 2.6s ease-in-out infinite;
  transition: color 0.15s ease;
}
.mt-scroll-hint:hover { color: #bfe9ff; }
@keyframes mt-hint {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50% { transform: translate(-50%, 7px); opacity: 1; }
}

/* -- 3D 节点悬停 tooltip（位置由 hero3d.js 每帧投影更新） -- */
.mt3d-tip {
  position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none;
  transform: translate(-50%, calc(-100% - 20px));
  background: rgba(6, 16, 32, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  line-height: 1.5;
  color: #cfe8fb;
  box-shadow: 0 10px 30px rgba(2, 12, 28, 0.5);
  white-space: nowrap;
}
.mt3d-tip b { display: block; color: #7dd3fc; font-size: 13px; font-weight: 700; }
.mt3d-tip span { color: #8fb6d9; font-size: 11.5px; }

/* -- 帧率徽标（仅 ?heroStats=1 调试/测试用） -- */
.mt3d-stats {
  position: fixed; left: 10px; bottom: 10px; z-index: 90;
  font: 600 11px/1.4 var(--font-mono);
  color: #7dd3fc;
  background: rgba(6, 16, 32, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 4px 8px;
  pointer-events: none;
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
}

/* 静态层节点呼吸与渐入（静态替代画面仍在用） */
.mt-node { animation: mt-breathe 5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.mt-node.n2 { animation-delay: -1.6s; } .mt-node.n3 { animation-delay: -3.2s; }
@keyframes mt-breathe { 0%, 100% { opacity: 0.82; } 50% { opacity: 1; } }

.mt-fade { opacity: 0; transform: translateY(14px); animation: mt-fade-in 0.9s ease forwards; }
.mt-fade.f1 { animation-delay: 0.05s; } .mt-fade.f2 { animation-delay: 0.18s; }
.mt-fade.f3 { animation-delay: 0.32s; } .mt-fade.f4 { animation-delay: 0.46s; }
@keyframes mt-fade-in { to { opacity: 1; transform: none; } }

/* 页面不可见时暂停持续动画 */
body.mt-paused .mt-node, body.mt-paused .mt-fade,
body.mt-paused .mt-orbit, body.mt-paused .mt-scroll-hint { animation-play-state: paused !important; }

/* 降级：减少动态（静态替代画面完整呈现、前景文字直接可见） */
@media (prefers-reduced-motion: reduce) {
  .mt-node, .mt-fade, .mt-orbit, .mt-scroll-hint { animation: none !important; }
  .mt-fade { opacity: 1; transform: none; }
  .site-header.overlay .container { transition: none; }
}
@media (max-width: 900px) {
  .mt-hero { --hero-copy-top: 50svh; min-height: 620px; padding: 0 1.25rem; }
  .mt-hero-fg { left: 1rem; right: 1rem; }
  .mt-hero h1 { font-size: clamp(2.15rem, 9.5vw, 3.1rem); letter-spacing: -0.035em; margin-bottom: 1rem; }
  .mt-hero .slogan { font-size: clamp(1rem, 4.3vw, 1.2rem); }
  .mt-hero .sub { font-size: 13px; margin: 0.65rem auto 1.5rem; }
  .mt-hero .hero-cta { gap: 0.65rem; }
  .mt-hero .btn-hero-primary, .mt-hero .btn-hero-ghost { padding: 0 1.15rem; height: 2.8rem; font-size: 14px; }
  .mt-static-fallback { inset: 94px -45vw calc(100% - var(--hero-copy-top) + 30px); }
  .mt-static-fallback svg { width: 190vw; max-height: 100%; max-width: none; }
  .mt-fallback-outer { display: none; }
  .mt-scroll-hint { bottom: 1.2rem; }
}
@media (max-height: 650px) {
  .mt-hero { --hero-copy-top: 275px; min-height: 560px; }
  .mt-hero h1 { font-size: clamp(1.9rem, 8.8vw, 2.6rem); margin-bottom: 0.65rem; }
  .mt-hero .slogan { font-size: 1rem; }
  .mt-hero .sub { font-size: 12px; margin-bottom: 1rem; }
  .mt-hero .btn-hero-primary, .mt-hero .btn-hero-ghost { height: 2.6rem; font-size: 13px; }
  .mt-scroll-hint { bottom: 0.8rem; }
}

/* ---- 沉浸式顶栏（首页）：悬浮玻璃容器，滚动后平滑收紧 ---- */
.site-header.overlay {
  position: fixed; left: 0; right: 0; top: 0;
  height: auto; background: transparent; border-bottom: none; backdrop-filter: none;
}
.site-header.overlay .container {
  max-width: 1200px;
  height: 68px;
  margin: 20px auto 0;
  padding: 0 1.4rem;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(15, 44, 80, 0.42), rgba(8, 20, 38, 0.5));
  border: 1px solid rgba(125, 211, 252, 0.12);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(2, 10, 24, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: height 0.32s ease, margin 0.32s ease, background 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}
.site-header.overlay.scrolled .container {
  height: 58px; margin-top: 12px;
  background: linear-gradient(165deg, rgba(10, 28, 52, 0.78), rgba(6, 16, 32, 0.82));
  border-color: rgba(125, 211, 252, 0.1);
  box-shadow: 0 8px 28px rgba(2, 10, 24, 0.38);
}
.site-header.overlay .mt-brand { color: #e6f1fb; }
.site-header.overlay .main-nav { justify-content: center; }
.site-header.overlay .main-nav a { color: #9db8d4; padding: 0.4rem 0.95rem; }
.site-header.overlay .main-nav a:hover { color: #fff; background: rgba(125, 211, 252, 0.1); }
.site-header.overlay .main-nav a.active { color: #fff; background: transparent; }
.site-header.overlay .main-nav a.active::after { background: var(--cyan-glow); }
.site-header.overlay .btn-ghost { color: #9db8d4; }
.site-header.overlay .btn-ghost:hover { background: rgba(125, 211, 252, 0.1); color: #e6f1fb; }
.site-header.overlay .nav-toggle { border-color: rgba(125, 211, 252, 0.35); color: #cfe8fb; }
@media (max-width: 768px) {
  .site-header.overlay .container {
    max-width: calc(100% - 24px);
    height: 58px; margin-top: 12px; border-radius: 16px; padding: 0 1rem; gap: 0.75rem;
  }
  .site-header.overlay .main-nav {
    top: 78px; left: 12px; right: 12px;
    background: color-mix(in srgb, var(--navy-950) 94%, transparent);
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 14px;
    backdrop-filter: blur(14px);
  }
  .site-header.overlay.scrolled .main-nav { top: 76px; }
}

/* 窄手机保留主题、控制台和菜单，压缩尺寸而非隐藏功能。 */
@media (max-width: 380px) {
  .site-header.overlay .container { padding: 0 0.7rem; gap: 0.4rem; }
  .site-header.overlay .mt-brand { font-size: 14px; gap: 0.4rem; }
  .site-header.overlay .mt-brand img { width: 24px; height: 24px; }
  .site-header.overlay .header-actions { gap: 0.2rem; flex-shrink: 0; }
  .site-header.overlay .header-actions .btn { height: 30px; padding: 0 0.45rem; font-size: 11.5px; }
  .site-header.overlay .header-actions button { width: 24px; min-width: 24px; padding: 0; }
  .site-header.overlay .nav-toggle { width: 30px; height: 30px; flex-shrink: 0; }
}

/* ---- 深色模式模型 Logo 对比度修复 ----
   Logo 为 fill=currentColor 的单色 SVG，经 <img> 引用时无法继承页面颜色而呈黑色，
   深色背景下不可读：统一改用近白衬底，黑色 Logo 在浅衬底上保持锐利对比。 */
.dark img.model-logo { background: #eef4fa; }
.dark .mt-brands .brand-chip img { background: #eef4fa; }

/* ---- 品牌导航 ---- */
.mt-brand { display: flex; align-items: center; gap: 0.55rem; font-family: var(--brand-font); font-weight: 800; letter-spacing: -0.005em; font-size: 17px; color: var(--foreground); text-decoration: none; white-space: nowrap; }
.mt-brand img { width: 30px; height: 30px; border-radius: 8px; flex: none; }

/* ---- 模型品牌墙 ---- */
.mt-brands { border-bottom: 1px solid var(--border); background: var(--card); }
.mt-brands-inner { max-width: 1200px; margin: 0 auto; padding: 1.6rem 1.5rem; display: flex; align-items: center; gap: 2.2rem; flex-wrap: wrap; justify-content: center; }
.mt-brands .brand-chip { display: flex; align-items: center; gap: 0.5rem; color: var(--muted-foreground); font-size: 13.5px; font-weight: 600; opacity: 0.85; transition: opacity 0.15s, color 0.15s; }
.mt-brands .brand-chip:hover { opacity: 1; color: var(--foreground); }
.mt-brands .brand-chip img { width: 22px; height: 22px; padding: 2px; background: color-mix(in oklch, var(--muted) 50%, transparent); border-radius: 6px; box-sizing: content-box; }
.mt-brands .brand-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); width: 100%; text-align: center; margin-bottom: 0.2rem; }

/* ---- 能力卡片 ---- */
.mt-caps { max-width: 1200px; margin: 0 auto; padding: 3.6rem 1.5rem 1rem; }
.mt-section-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.mt-section-sub { color: var(--muted-foreground); font-size: 14px; margin: 0 0 1.8rem; }
.mt-caps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.mt-cap {
  border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem 1.5rem 1.3rem;
  background: var(--card); position: relative; overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-decoration: none; color: inherit; display: block;
}
.mt-cap:hover { transform: translateY(-3px); border-color: color-mix(in oklch, var(--sky-glow) 45%, var(--border)); box-shadow: 0 14px 34px rgba(2, 18, 38, 0.12); }
.mt-cap::after { content: ''; position: absolute; inset: 0; background: radial-gradient(320px 130px at 85% -10%, rgba(56, 189, 248, 0.09), transparent 70%); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.mt-cap:hover::after { opacity: 1; }
.mt-cap .cap-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem; }
.mt-cap .cap-icon.chat { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.mt-cap .cap-icon.image { background: rgba(34, 211, 238, 0.12); color: #0891b2; }
.mt-cap .cap-icon.video { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.mt-cap h3 { font-size: 16.5px; margin: 0 0 0.35rem; }
.mt-cap p { font-size: 13.5px; color: var(--muted-foreground); margin: 0 0 0.8rem; line-height: 1.6; }
.mt-cap .cap-count { font-size: 12.5px; color: var(--muted-foreground); }
.mt-cap .cap-arrow { position: absolute; right: 1.2rem; top: 1.4rem; color: var(--muted-foreground); transition: transform 0.18s; }
.mt-cap:hover .cap-arrow { transform: translateX(4px); color: var(--sky-glow); }
@media (max-width: 900px) { .mt-caps-grid { grid-template-columns: 1fr; } }

/* ---- 精选模型 ---- */
.mt-featured { max-width: 1200px; margin: 0 auto; padding: 2.8rem 1.5rem 1rem; }
.mt-featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mt-fcard {
  border: 1px solid var(--border); border-radius: 14px; background: var(--card);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.55rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.mt-fcard:hover { transform: translateY(-2px); border-color: color-mix(in oklch, var(--sky-glow) 40%, var(--border)); box-shadow: 0 10px 26px rgba(2, 18, 38, 0.1); }
.mt-fcard .f-head { display: flex; align-items: center; gap: 0.55rem; }
.mt-fcard .f-name { font-weight: 700; font-size: 14.5px; }
.mt-fcard .f-cat { margin-left: auto; }
.mt-fcard .f-desc { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.55; flex: 1; }
.mt-fcard .f-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.mt-fcard .f-id { font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-featured .view-all { display: flex; justify-content: center; margin-top: 1.4rem; }
@media (max-width: 1100px) { .mt-featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .mt-featured-grid { grid-template-columns: 1fr; } }

/* ---- 接入示例 ---- */
.mt-quick { max-width: 1200px; margin: 0 auto; padding: 2.8rem 1.5rem 3.5rem; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2.4rem; align-items: start; }
.mt-quick .steps { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.mt-quick .steps li { display: flex; gap: 0.8rem; padding: 0.55rem 0; font-size: 13.5px; color: var(--muted-foreground); }
.mt-quick .steps .n { flex: none; width: 22px; height: 22px; border-radius: 7px; background: color-mix(in oklch, var(--sky-glow) 16%, transparent); color: var(--sky-glow); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.mt-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.8rem; }
.mt-tab { height: 32px; padding: 0 0.95rem; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.14s; }
.mt-tab.active { background: color-mix(in oklch, var(--sky-glow) 14%, var(--card)); color: var(--sky-glow); border-color: color-mix(in oklch, var(--sky-glow) 40%, var(--border)); }
.mt-code {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--navy-950); color: #c9e3f7;
}
.mt-code .code-head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; border-bottom: 1px solid var(--navy-line); font-size: 12px; color: #7fa6c9; }
.mt-code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; }
.mt-code .tok-c { color: #5b7d9e; } .mt-code .tok-k { color: #7dd3fc; } .mt-code .tok-s { color: #a5d6ff; }
@media (max-width: 900px) { .mt-quick { grid-template-columns: minmax(0, 1fr); } } /* 防代码块 min-content 撑宽页面（横向溢出修复） */

/* ---- 页脚 ---- */
.mt-footer { border-top: 1px solid var(--border); background: var(--card); }
.mt-footer-inner { max-width: 1200px; margin: 0 auto; padding: 1.6rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted-foreground); font-size: 13px; }
.mt-footer .foot-brand { display: flex; align-items: center; gap: 0.5rem; color: var(--foreground); font-weight: 700; }
.mt-footer .foot-brand img { width: 22px; height: 22px; border-radius: 6px; }
.mt-footer a { color: var(--muted-foreground); text-decoration: none; }
.mt-footer a:hover { color: var(--foreground); }
