:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-2: #8b5cf6;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --cyan: #06b6d4;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 24px -8px rgba(15, 23, 42, 0.15);
  --nav-height: 56px;
}

html.dark {
  --bg: #020617;
  --surface: #1e293b;
  --surface-2: #0f172a;
  --surface-3: #334155;
  --border: #334155;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 24px;
}

.muted { color: var(--muted); font-size: 12px; }
.green { color: var(--green); }
.amber { color: var(--amber); }
.red { color: var(--red); }

/* ---------- 渐变文字 ---------- */
.grad,
.grad-cool,
.grad-warm {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grad { background-image: linear-gradient(135deg, #6366f1, #8b5cf6); }
.grad-cool { background-image: linear-gradient(135deg, #06b6d4, #6366f1); }
.grad-warm { background-image: linear-gradient(135deg, #f59e0b, #f43f5e); }
html.dark .grad { background-image: linear-gradient(135deg, #818cf8, #a78bfa); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 12px 30px -12px rgba(79, 70, 229, 0.55);
  margin-bottom: 22px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #9333ea 100%);
}
html.dark .hero-bg {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 55%, #0f172a 100%);
}
.hero-dots {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle at 25% 25%, #fff 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero-glow {
  position: absolute;
  top: -96px;
  right: -96px;
  width: 288px;
  height: 288px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(64px);
}
.hero-inner {
  position: relative;
  padding: 30px 24px;
  color: #fff;
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.hero-inner h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin: 6px 0 0;
  max-width: 760px;
  font-size: 14px;
  color: rgba(224, 231, 255, 0.92);
}
.hero-compact .hero-inner { padding: 26px 24px; }
.hero-compact h1 { font-size: 24px; }
.hero-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 500;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
.pill-live .dot { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2); }

.hero-search {
  position: relative;
  max-width: 640px;
  margin: 0 0 16px;
}
.hero-search input {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 52px 0 16px;
  font-size: 15px;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
  outline: none;
}
html.dark .hero-search input {
  background: rgba(15, 23, 42, 0.9);
  color: #f1f5f9;
}
.hero-search input::placeholder { color: #94a3b8; }
.hero-search button {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: grid;
  place-items: center;
}
.hero-search button svg { width: 17px; height: 17px; }
.hero-search button:hover { filter: brightness(1.08); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s;
}
.chip:hover { background: rgba(255, 255, 255, 0.28); }
.chip-accent {
  background: rgba(251, 191, 36, 0.92);
  color: #451a03;
  border-color: transparent;
  font-weight: 700;
}
.chip-accent:hover { background: rgba(253, 224, 71, 0.95); }

/* ---------- 统计条 ---------- */
.stat-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  font-size: 14px;
}
.stat-item { display: flex; align-items: baseline; gap: 6px; }
.stat-item strong { font-size: 24px; font-weight: 800; line-height: 1; }
.stat-item small { font-size: 14px; }
.stat-item span { color: var(--muted); }
.divider { width: 1px; height: 24px; background: var(--border); }

/* ---------- 区块 ---------- */
.section { margin-bottom: 38px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.section-head.plain { margin-bottom: 14px; }
.section-bar {
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  flex-shrink: 0;
}
html.dark .section-bar { background: linear-gradient(180deg, #818cf8, #a78bfa); }
.section-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.section-more:hover { color: var(--accent-strong); }

/* ---------- 资源站卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.source-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, border-color 0.25s;
}
.source-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.5);
}
.card-bar { height: 2px; width: 100%; display: block; }
.tone-ok .card-bar { background: linear-gradient(90deg, #34d399, #14b8a6); }
.tone-warn .card-bar { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.tone-bad .card-bar { background: linear-gradient(90deg, #f87171, #ef4444); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-title-wrap { min-width: 0; flex: 1; }
.card-title-wrap h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.source-card:hover .card-title-wrap h3 { color: var(--accent); }
.card-title-wrap p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--muted);
}
.card-metrics span { position: relative; }
.card-metrics span + span::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-2);
}
.card-link {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.card-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.card-foot {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  margin-top: auto;
}

/* ---------- 徽章与标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge .dot { width: 5px; height: 5px; }
.badge-ok { background: rgba(16, 185, 129, 0.13); color: #047857; }
html.dark .badge-ok { background: rgba(16, 185, 129, 0.16); color: #4ade80; }
.badge-warn { background: rgba(245, 158, 11, 0.15); color: #b45309; }
html.dark .badge-warn { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.badge-bad { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
html.dark .badge-bad { background: rgba(239, 68, 68, 0.16); color: #f87171; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tag:hover { color: var(--accent); border-color: rgba(99, 102, 241, 0.4); }
.tag-row-lg .tag { font-size: 12px; padding: 2px 9px; }

/* ---------- 功能卡 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.feature-card {
  display: block;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.45);
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.16));
  color: var(--accent);
  margin-bottom: 10px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card h3 { margin: 0 0 4px; font-size: 15px; }
.feature-card p { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- 面板 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.panel-title { margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.panel p { margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.panel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.panel-head .panel-title { margin: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-light {
  background: rgba(255, 255, 255, 0.95);
  color: #4338ca;
  border-color: transparent;
  font-weight: 700;
}
.btn-light:hover { color: #3730a3; background: #fff; }
.btn-light-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-light-ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.btn-ghost { background: transparent; }
.btn-small { padding: 4px 10px; font-size: 12px; }

/* ---------- FAQ ---------- */
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 18px;
  color: var(--muted);
  line-height: 1;
}
.faq[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--text-2); font-weight: 600; }
.breadcrumb span:not(.current) { color: var(--muted-2); }

/* ---------- 筛选 ---------- */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.filter-search { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-search input {
  flex: 1;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
.filter-search input:focus { border-color: var(--accent); }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.filter-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.filter-row select {
  height: 34px;
  min-width: 132px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0 8px;
  font-size: 13px;
}
.sort-tabs {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.sort-tabs a {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
}
.sort-tabs a.is-active { background: var(--accent); color: #fff; font-weight: 600; }
.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.result-meta strong { color: var(--text); }

/* ---------- 分页 / 空状态 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.pagination a {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  display: grid;
  place-items: center;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination a.is-active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.empty-state {
  text-align: center;
  padding: 48px 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.empty-state h3 { margin: 0 0 6px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.empty-state a { color: var(--accent); }

/* ---------- 指标卡 ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.metric-card strong { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.metric-card span { font-size: 12px; color: var(--muted); }

/* ---------- 健康度 / 趋势 ---------- */
.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 30px;
}
.score-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.score-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--score) * 1%), var(--surface-3) 0);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}
.score-ring span {
  position: relative;
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}
.score-legend p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot.ok { background: var(--accent); }
.legend-dot.info { background: var(--cyan); }
.legend-dot.warn { background: var(--amber); }

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-top: 8px;
}
.trend-bar {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.trend-fill {
  width: 100%;
  max-width: 34px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #818cf8, #6366f1);
  min-height: 3px;
  transition: height 0.4s ease;
}
.trend-fill.is-empty { background: var(--surface-3); }
.trend-bar span { font-size: 10px; color: var(--muted-2); white-space: nowrap; }

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.data-table th,
.data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(99, 102, 241, 0.05); }
.data-table.compact { min-width: 560px; }
.table-link { font-weight: 700; color: var(--text); }
.table-link:hover { color: var(--accent); }
.table-sub { font-size: 11px; color: var(--muted-2); }
.days-col { width: 190px; }
.day-cells { display: flex; gap: 3px; }
.day-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  background: var(--surface-3);
}
.day-cell.ok { background: rgba(16, 185, 129, 0.75); }
.day-cell.warn { background: rgba(245, 158, 11, 0.8); }
.day-cell.bad { background: rgba(239, 68, 68, 0.8); }
.day-cell.empty { background: var(--surface-3); border: 1px dashed var(--border); }

/* ---------- 详情 ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.info-grid dt { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.info-grid dd { margin: 0; font-size: 14px; font-weight: 600; word-break: break-all; }
.code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  margin: 10px 0 12px;
}
.code-box code {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-2);
  overflow-x: auto;
  white-space: nowrap;
}
.test-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
}
.test-result .row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.test-result .row span:first-child { color: var(--muted); }
.test-result pre {
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--muted);
  font-size: 11px;
}

.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-row {
  display: grid;
  grid-template-columns: 90px 60px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 12px;
}
.history-date { color: var(--muted); }
.history-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.history-bar i { display: block; height: 100%; background: linear-gradient(90deg, #34d399, #14b8a6); }
.history-meta { color: var(--muted-2); white-space: nowrap; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-title { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy { margin: 0; font-size: 11px; color: var(--muted-2); }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(226, 232, 240, 0.7);
}
html.dark .bottom-nav {
  background: rgba(15, 23, 42, 0.86);
  border-top-color: rgba(51, 65, 85, 0.7);
}
.bottom-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 10px;
  transition: color 0.2s;
}
.bottom-link svg { width: 20px; height: 20px; }
.bottom-link:hover { color: var(--text-2); }
.bottom-link.is-active { color: var(--accent); font-weight: 600; }
.bottom-link.is-active svg { transform: scale(1.08); }
#theme-toggle .icon-sun { display: none; }
html.dark #theme-toggle .icon-moon { display: none; }
html.dark #theme-toggle .icon-sun { display: block; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- 排序标签（独立） ---------- */
.sort-tabs-standalone {
  margin: 0 0 20px;
  padding: 0;
  border-top: 0;
}

/* ---------- 排行榜 ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s;
}
.rank-item:hover { border-color: rgba(99, 102, 241, 0.45); transform: translateX(2px); }
.rank-num {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface-2);
}
.rank-num.is-top {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.rank-main { flex: 1; min-width: 0; }
.rank-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-name { font-size: 15px; font-weight: 700; }
.rank-name:hover { color: var(--accent); }
.rank-desc {
  margin: 4px 0 6px;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rank-metrics { display: flex; gap: 18px; flex-shrink: 0; text-align: right; }
.rank-metrics div { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.rank-metrics strong { font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.rank-metrics span { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

/* ---------- 标签云 ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tag-pill em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 7px;
}

/* ---------- 教程 / 文章卡片 ---------- */
.tutorial-grid,
.article-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tutorial-card,
.article-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tutorial-card:hover,
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.45);
}
.tutorial-icon,
.article-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.14));
}
.tutorial-body,
.article-body { min-width: 0; flex: 1; }
.tutorial-head,
.article-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tutorial-head h3,
.article-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.tutorial-card:hover h3,
.article-card:hover h3 { color: var(--accent); }
.tutorial-body p,
.article-body p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.level-badge {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  white-space: nowrap;
}
.article-more { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--accent); }

/* ---------- 文章正文 ---------- */
.article-detail .panel-title { margin-top: 18px; }
.article-detail .panel-title:first-child { margin-top: 0; }
.article-detail p { margin: 0 0 12px; font-size: 13px; line-height: 1.8; color: var(--text-2); }
.step-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step-list li { display: flex; gap: 10px; align-items: flex-start; }
.step-list p { margin: 0; }
.step-num {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.note-list { margin: 0 0 18px; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.note-list li { margin-bottom: 6px; }

/* ---------- 对比 ---------- */
.compare-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.compare-picker label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.compare-picker select {
  height: 34px;
  min-width: 160px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0 8px;
  font-size: 13px;
}
.compare-table th:first-child { width: 160px; white-space: nowrap; }
.compare-table td { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); word-break: break-all; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 一键采集 ---------- */
.focus-panel {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}
.row-focus td { background: rgba(99, 102, 241, 0.1); }
.row-focus td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.data-table td .btn + .btn { margin-left: 6px; }

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .container { padding: 28px 24px 32px; }
  .hero-inner { padding: 34px 32px; }
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid { gap: 18px; }
  .filter-row { gap: 16px; }
}

@media (min-width: 760px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tutorial-grid,
  .article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-inner { padding: 40px 40px; }
  .hero-inner h1 { font-size: 30px; }
}

@media (max-width: 560px) {
  .history-row { grid-template-columns: 82px 52px 1fr; }
  .history-meta { grid-column: 1 / -1; }
  .data-table { min-width: 620px; }
  .days-col { display: none; }
  .stat-strip { gap: 10px; }
  .stat-item strong { font-size: 20px; }
  .divider { height: 20px; }
  .rank-metrics { gap: 10px; }
  .rank-metrics strong { font-size: 13px; }
  .rank-metrics span { font-size: 10px; }
  .rank-item { padding: 12px; gap: 10px; grid-template-columns: 30px minmax(0, 1fr); }
  .rank-metrics { grid-column: 1 / -1; justify-content: flex-end; }
}
