/* ========== Nexus 中台 · 全局样式 ========== */
:root {
  /* Cangobench：深黑底 + 方形卡片（对齐 CangoAgent） */
  --bg: #050506;
  --bg-soft: #0a0a0c;
  --bg-card: #111113;
  --bg-elev: #18181b;
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #fafafa;
  --text-soft: #a1a1aa;
  --text-muted: #71717a;
  --brand: #ff7a2b;
  --brand-2: #ffb547;
  --accent: #4f8cff;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --positive: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --grid: #1d1d20;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --radius: 4px;
  --radius-sm: 4px;
  --radius-lg: 4px;
}

[data-theme='light'] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --bg-card: #ffffff;
  --bg-elev: #f0f3fa;
  --border: #e3e8f1;
  --border-soft: #eef1f7;
  --text: #0f172a;
  --text-soft: #4b5568;
  --text-muted: #94a3b8;
  --brand: #ff6a1a;
  --brand-2: #ff9533;
  --grid: #e8edf5;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

body {
  min-height: 100vh;
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

/* ========== 顶部新闻 Ticker ========== */
.nexus-ticker {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 38px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(255, 122, 43, 0.10) 0%, rgba(34, 211, 238, 0.06) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 14px;
  height: 100%;
  background: rgba(255, 122, 43, 0.15);
  color: var(--brand-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-right: 1px solid var(--border);
}
.ticker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  animation: pulse 1.6s infinite;
}
.ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 60px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 60px), transparent);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: tickerScroll 90s linear infinite;
  gap: 36px;
  padding-left: 28px;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
  transition: color .15s;
}
.ticker-item:hover { color: var(--text); }
.ticker-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(79, 140, 255, 0.16);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ticker-text { font-weight: 500; }
.ticker-more {
  flex-shrink: 0;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-2);
  border-left: 1px solid var(--border);
  height: 100%;
  display: grid;
  place-items: center;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
[data-theme='light'] .nexus-ticker {
  background: linear-gradient(90deg, rgba(255, 122, 43, 0.06) 0%, rgba(34, 211, 238, 0.04) 100%);
}

/* ========== 顶部导航 ========== */
.nexus-topbar {
  position: sticky;
  top: 38px;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(5, 5, 6, 0.88);
  border-bottom: 1px solid var(--border);
}
[data-theme='light'] .nexus-topbar { background: rgba(255, 255, 255, 0.85); }

.nexus-topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 24px;
  gap: 24px;
}

.nexus-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
}
.nexus-logo__img {
  display: block;
  height: 22px;
  width: auto;
}
.nexus-logo-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: grid; place-items: center;
  color: #1a1106;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 122, 43, 0.4);
}
.nexus-logo-mark svg { width: 18px; height: 18px; }
.nexus-logo small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.nexus-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nexus-nav a {
  padding: 8px 14px;
  color: var(--text-soft);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s ease;
}
.nexus-nav a:hover { color: var(--text); background: var(--bg-elev); }
.nexus-nav a.active {
  color: var(--text);
  background: var(--bg-elev);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Lab 下拉（参考 Artificial Analysis 多模态入口） */
.nav-dropdown {
  position: relative;
  margin: 0 2px;
}
.nav-dd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: var(--text-soft);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
}
.nav-dd-trigger:hover { color: var(--text); background: var(--bg-elev); }
.nav-dd-trigger.active {
  color: var(--text);
  background: var(--bg-elev);
  box-shadow: inset 0 0 0 1px var(--border);
}
.nav-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 80;
}
.nav-dropdown-open .nav-dd-menu,
.nav-dropdown:hover .nav-dd-menu,
.nav-dropdown:focus-within .nav-dd-menu { display: block; }
.nav-dd-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-soft);
  font-weight: 500;
}
.nav-dd-menu a:hover { color: var(--text); background: var(--bg-elev); }
.nav-dd-menu a.active {
  color: var(--brand-2);
  background: rgba(255, 122, 43, 0.08);
  box-shadow: none;
}

.nexus-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nexus-search {
  position: relative;
  width: 260px;
}
.nexus-search input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.nexus-search input:focus { border-color: var(--brand); }
.nexus-search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-muted);
}

.nexus-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
}
.nexus-btn:hover { border-color: var(--brand); color: var(--brand); }
.nexus-btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #1a1106;
  border: 0;
}
.nexus-btn-primary:hover { color: #1a1106; opacity: 0.92; }

/* ========== 页面骨架 ========== */
.nexus-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

/* ========== Hero ========== */
.hero {
  padding: 56px 0 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 1024px) { .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; } }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 122, 43, 0.08);
  border: 1px solid rgba(255, 122, 43, 0.25);
  color: var(--brand-2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 122, 43, 0.2);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 43, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(255, 122, 43, 0); }
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #b4bfd5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme='light'] .hero h1 {
  background: linear-gradient(180deg, #0f172a 0%, #3b465c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 620px;
  line-height: 1.65;
}
.hero-cta { display: flex; gap: 12px; margin-top: 26px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.hero-stat {
  padding: 18px 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.hero-stat::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120px 80px at 90% 10%, rgba(255, 122, 43, 0.18), transparent 70%);
  pointer-events: none;
}
.hero-stat .label { font-size: 12px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.hero-stat .value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; }
.hero-stat .delta { font-size: 12px; color: var(--positive); font-weight: 600; }
.hero-stat .delta.down { color: var(--danger); }

/* ========== Section ========== */
.section {
  margin-top: 56px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-head .sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.section-head .tools { display: flex; align-items: center; gap: 8px; }

.pill-group {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.pill-group button {
  padding: 6px 14px;
  background: transparent;
  border: 0;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  border-radius: 999px;
  font-weight: 500;
}
.pill-group button.active {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.card .desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ========== 表格 ========== */
.nexus-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.nexus-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  padding: 12px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nexus-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.nexus-table tr:hover td { background: var(--bg-elev); }

.cell-model {
  display: flex; align-items: center; gap: 10px;
}
.org-dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.cell-model .name { font-weight: 600; }
.cell-model .org { font-size: 11.5px; color: var(--text-muted); }

.bar {
  position: relative;
  background: var(--bg-elev);
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  min-width: 64px;
  margin-top: 4px;
}
.bar > i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  border-radius: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
}
.tag.reasoning { border-color: rgba(255, 181, 71, 0.4); color: var(--brand-2); background: rgba(255, 181, 71, 0.08); }
.tag.open { border-color: rgba(34, 197, 94, 0.4); color: var(--positive); background: rgba(34, 197, 94, 0.08); }
.tag.china { border-color: rgba(239, 68, 68, 0.35); color: #f87171; background: rgba(239, 68, 68, 0.08); }
.tag.usa { border-color: rgba(79, 140, 255, 0.35); color: var(--accent); background: rgba(79, 140, 255, 0.08); }
.tag.eu { border-color: rgba(167, 139, 250, 0.4); color: var(--accent-3); background: rgba(167, 139, 250, 0.08); }

/* ========== 图表盒子 ========== */
.chart {
  width: 100%;
  height: 380px;
}
.chart-sm { height: 260px; }
.chart-lg { height: 460px; }

/* ========== 新闻流 ========== */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-soft);
}
.news-item:last-child { border-bottom: 0; }
.news-date {
  flex-shrink: 0;
  width: 90px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.news-body { flex: 1; }
.news-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(79, 140, 255, 0.1);
  border: 1px solid rgba(79, 140, 255, 0.3);
  color: var(--accent);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.news-tag.release { background: rgba(255, 122, 43, 0.1); border-color: rgba(255, 122, 43, 0.3); color: var(--brand-2); }
.news-tag.eval { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); color: var(--positive); }
.news-tag.agent { background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.3); color: var(--accent-3); }
.news-tag.article { background: rgba(34, 211, 238, 0.1); border-color: rgba(34, 211, 238, 0.3); color: var(--accent-2); }
.news-title { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.news-desc { font-size: 13px; color: var(--text-soft); line-height: 1.55; }

/* ========== 工具卡 ========== */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: all .15s;
}
.tool-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.tool-card .cat {
  display: inline-flex; align-items: center;
  font-size: 11px;
  color: var(--brand-2);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tool-card h3 { margin: 0; font-size: 18px; font-weight: 700; }
.tool-card .desc { font-size: 13px; color: var(--text-soft); line-height: 1.55; margin: 0; }
.tool-card .caps { display: flex; flex-direction: column; gap: 8px; }
.cap-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-soft); }
.cap-row .name { width: 70px; flex-shrink: 0; }
.cap-row .bar { flex: 1; }
.cap-row .val { width: 28px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.tool-card .footer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border-soft);
  font-size: 12.5px; color: var(--text-muted);
}

/* ========== 模型详情 ========== */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .15s;
  cursor: pointer;
}
.model-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.model-card.selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.model-card .top {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px;
}
.model-card .name { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.model-card .org { font-size: 12px; color: var(--text-muted); }
.model-card .score {
  font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.model-card .meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.model-card .meta div { color: var(--text-muted); }
.model-card .meta strong { color: var(--text); font-weight: 600; }
.model-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ========== Compare 工具 ========== */
.compare-bar {
  display: flex; gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.compare-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.compare-chip:hover { border-color: var(--brand); }
.compare-chip.active { background: rgba(255, 122, 43, 0.1); border-color: var(--brand); color: var(--brand); }
.compare-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ========== Footer ========== */
.nexus-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 32px 24px;
}
.nexus-footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-muted); font-size: 12.5px;
}
.nexus-footer a { margin: 0 8px; }
.nexus-footer a:hover { color: var(--brand); }

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ========== 杂项 ========== */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.text-soft { color: var(--text-soft); }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--brand-2); }
.text-positive { color: var(--positive); }
.text-danger { color: var(--danger); }
.font-mono { font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
