/* ==========================================================================
   AI 观测台 · Apple 风格设计系统
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-deep: #fbfbfd;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --up: #0f9d6e;
  --up-bg: rgba(15, 157, 110, 0.1);
  --down: #d64545;
  --down-bg: rgba(214, 69, 69, 0.1);
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.05);
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html {
  color-scheme: light;
}

/* ---------- 深色主题（Apple 风） ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0f;
  --bg-soft: #1a1a1e;
  --bg-deep: #08080a;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #2997ff;
  --accent-soft: rgba(41, 151, 255, 0.16);
  --up: #30d158;
  --up-bg: rgba(48, 209, 88, 0.14);
  --down: #ff453a;
  --down-bg: rgba(255, 69, 58, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .site-header {
  background: rgba(13, 13, 15, 0.72);
}

html[data-theme="dark"] .hero-bg::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(10, 10, 12, 0.55) 32%,
    var(--bg) 60%
  );
}

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .skip-link {
  background: var(--text);
  color: var(--bg);
}

html[data-theme="dark"] .nav-links {
  background: rgba(13, 13, 15, 0.96);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

::selection {
  background: rgba(0, 113, 227, 0.16);
}

h1, h2, h3, p, dl, dd, figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--text);
  color: #fff;
  border-radius: 980px;
  font-size: 14px;
}

.skip-link:focus {
  left: 16px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section[id],
#hero {
  scroll-margin-top: var(--header-h);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.35s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  margin-right: auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 980px;
  color: var(--text-2);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.nav-links a.active {
  color: var(--text);
  font-weight: 600;
}

.nav-cta {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 980px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-cta:hover {
  background: var(--bg-soft);
  border-color: var(--text-3);
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: scale(1.05);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ---------- 个性化面板 ---------- */
.prefs-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: 300px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.prefs-panel[hidden] {
  display: none;
}

.prefs-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.prefs-group {
  margin-bottom: 16px;
}

.prefs-group:last-child {
  margin-bottom: 0;
}

.prefs-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}

.prefs-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 8px;
}

.seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.seg button {
  flex: 1 1 0;
  padding: 7px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.seg button:hover {
  color: var(--text);
}

.seg button.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.live-pill.is-live {
  background: rgba(15, 157, 110, 0.08);
  border-color: rgba(15, 157, 110, 0.28);
  color: var(--up);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.live-pill.is-live .live-dot {
  background: var(--up);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 0;
  border-radius: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0077ed;
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--text-3);
  transform: translateY(-1px);
}

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.section {
  padding: 104px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.section-subtitle {
  margin-top: 14px;
  font-size: 17px;
  color: var(--text-2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 0 0 96px;
  text-align: center;
  background: var(--bg);
  overflow: hidden;
}

.hero-bg {
  position: relative;
  height: 44vh;
  min-height: 300px;
  max-height: 470px;
  background-image: url("../images/hero.jpg");
  background-size: cover;
  background-position: center top;
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 32%,
    var(--bg) 60%
  );
}

.hero-inner {
  position: relative;
  margin-top: -240px;
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--text-2);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 72px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.stat-number {
  margin-top: 8px;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--text-2);
  margin-left: 2px;
}

.stat-desc {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Overview ---------- */
.overview {
  background: var(--bg);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.overview-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.overview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.overview-icon svg {
  width: 22px;
  height: 22px;
}

.overview-value {
  margin-top: 18px;
  font-size: clamp(1.45rem, 2.7vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.overview-value small {
  font-size: 0.55em;
  font-weight: 600;
  color: var(--text-2);
  margin-left: 4px;
}

.overview-title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
}

.overview-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ---------- Ranking ---------- */
.ranking {
  background: var(--bg-soft);
}

.ranking-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 28px;
  box-shadow: var(--shadow-sm);
}

.rank-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 220px) 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.rank-row:nth-child(-n + 3) .rank {
  color: var(--text);
}

.rank-info {
  min-width: 0;
}

.rank-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rank-vendor {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.rank-bar {
  position: relative;
  height: 10px;
  border-radius: 980px;
  background: var(--bg-soft);
  overflow: hidden;
}

.rank-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 980px;
  background: linear-gradient(90deg, var(--accent), #5aa8f5);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.rank-value {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Products ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---------- Agents ---------- */
.agents {
  background: var(--bg-soft);
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.product-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot-color, var(--accent));
  flex: none;
}

.product-card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.product-vendor {
  font-size: 13px;
  color: var(--text-3);
}

.trend-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.trend-badge.up {
  color: var(--up);
  background: var(--up-bg);
}

.trend-badge.down {
  color: var(--down);
  background: var(--down-bg);
}

.spark {
  margin-top: 20px;
}

.spark svg {
  width: 100%;
  height: 64px;
}

.spark polyline {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s ease 0.2s;
}

.product-card.is-visible .spark polyline {
  stroke-dashoffset: 0;
}

.spark-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-3);
  text-align: right;
}

.product-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.product-metrics > div {
  text-align: center;
}

.product-metrics dt {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}

.product-metrics dd {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.try-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.try-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 980px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease;
}

.try-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.try-arrow {
  transition: transform 0.2s ease;
}

.try-link:hover .try-arrow {
  transform: translateX(2px);
}

/* ---------- Compare / charts ---------- */
.compare {
  background: var(--bg);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.chart-card {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px 20px;
  min-width: 0;
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
}

.chart-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

.chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 260px;
  min-width: 0;
  overflow: hidden;
}

.bar-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bar-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar {
  width: min(64%, 44px);
  height: 0;
  border-radius: 10px 10px 4px 4px;
  background: var(--bar-color, var(--accent));
  opacity: 0.92;
  transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-label {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-soft);
  padding: 72px 0 40px;
  color: var(--text-2);
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.footer-desc {
  margin-top: 10px;
  line-height: 1.6;
}

.footer-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-list li {
  padding-left: 14px;
  position: relative;
  line-height: 1.7;
}

.footer-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
}

.footer-bottom {
  margin-top: 28px;
  color: var(--text-3);
}

/* ---------- Live monitor ---------- */
.live {
  background: var(--bg-deep);
}

.live-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 32px 24px;
  box-shadow: var(--shadow-sm);
}

.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.live-label .live-dot {
  width: 8px;
  height: 8px;
  background: var(--up);
  animation: livePulse 2s ease-in-out infinite;
}

.live-meta {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.live-sep {
  margin: 0 6px;
  opacity: 0.6;
}

.live-number {
  margin-top: 18px;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  overflow-wrap: anywhere;
}

.live-unit {
  font-size: 0.5em;
  font-weight: 600;
  color: var(--text-2);
  margin-left: 6px;
}

.live-chart {
  margin-top: 20px;
}

.live-chart svg {
  width: 100%;
  height: 220px;
  color: var(--accent);
}

.live-windows {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}

.live-windows button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 980px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.live-windows button:hover {
  border-color: var(--text-3);
  color: var(--text);
}

.live-windows button.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

/* ---------- Live signals ---------- */
.live-signals {
  margin-top: 44px;
}

.signals-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.signals-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.signals-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.signal-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.signal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.sig-name {
  font-size: 15px;
  font-weight: 600;
}

.sig-repo {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  font-family: "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sig-stars {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sig-stars small {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}

.sig-delta {
  font-size: 12px;
  font-weight: 600;
}

.sig-delta.up {
  color: var(--up);
}

.sig-delta.down {
  color: var(--down);
}

.sig-delta.muted {
  color: var(--text-3);
  font-weight: 500;
}

.signal-empty {
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

/* ---------- Live sources ---------- */
.live-sources {
  margin-top: 24px;
}

.sources-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 980px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.source-chip .live-dot {
  background: var(--text-3);
}

.source-chip.on .live-dot {
  background: var(--up);
}

.source-chip em {
  font-style: normal;
  color: var(--text-3);
  font-weight: 400;
}

/* ---------- 实时行情滚动条 ---------- */
.ticker {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 0;
  margin-bottom: 20px;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 70s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-half {
  display: flex;
  align-items: center;
  gap: 44px;
  padding-right: 44px;
}

.tick-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tick-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-color, var(--accent));
  flex: none;
}

.tick-name {
  font-weight: 600;
  color: var(--text);
}

.tick-val {
  font-weight: 600;
}

.tick-delta {
  font-size: 11px;
  font-weight: 600;
}

.tick-delta.up {
  color: var(--up);
}

.tick-delta.down {
  color: var(--down);
}

.tick-delta.flat {
  color: var(--text-3);
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 关注星标 ---------- */
.star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  flex: none;
}

.star-btn:hover {
  background: var(--bg-soft);
  color: var(--text);
  transform: scale(1.1);
}

.star-btn svg {
  width: 15px;
  height: 15px;
}

.product-card.starred {
  border-color: rgba(0, 113, 227, 0.35);
}

html[data-theme="dark"] .product-card.starred {
  border-color: rgba(41, 151, 255, 0.42);
}

.product-card.starred .star-btn {
  color: var(--accent);
}

.hot-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 980px;
  letter-spacing: 0.04em;
  flex: none;
}

/* ---------- 热门体验（最显眼位置） ---------- */
.hot {
  padding: 16px 0 0;
}

.hot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.hot-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.hot-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.hot-card:nth-child(-n + 3) .hot-rank {
  color: var(--accent);
}

.hot-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hot-vendor {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 2px;
}

.hot-dau {
  font-size: 12px;
  color: var(--text-2);
}

.hot-dau-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hot-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hot-btn:hover {
  background: #0077ed;
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.28);
  transform: translateY(-1px);
}

a.bar-label {
  cursor: pointer;
  transition: color 0.2s ease;
}

a.bar-label:hover {
  color: var(--accent);
}

/* ---------- 数值变化高亮 ---------- */
.num-flash-up {
  animation: numFlashUp 1.3s ease;
}

.num-flash-down {
  animation: numFlashDown 1.3s ease;
}

@keyframes numFlashUp {
  0% { color: var(--up); }
  100% { color: inherit; }
}

@keyframes numFlashDown {
  0% { color: var(--down); }
  100% { color: inherit; }
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-bg {
    height: 38vh;
  }

  .hero-inner {
    margin-top: -180px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid,
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .signals-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .hot-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    display: none;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    font-size: 16px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-cta {
    display: none;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }

  .hero {
    padding: 0 0 72px;
  }

  .hero-bg {
    height: 32vh;
    min-height: 230px;
  }

  .hero-inner {
    margin-top: -120px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 18px 16px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .overview-value {
    font-size: 1.55rem;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .ranking-list {
    padding: 8px 16px;
  }

  .rank-row {
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    padding: 16px 2px;
  }

  .rank-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .product-metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .product-metrics dd {
    font-size: 15px;
  }

  .live-card {
    padding: 24px 20px 20px;
  }

  .live-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .live-windows {
    justify-content: center;
  }

  .tick-item {
    font-size: 12px;
  }

  .prefs-panel {
    width: min(300px, calc(100vw - 48px));
  }

  .signals-row {
    grid-template-columns: 1fr;
  }

  .hot-grid {
    grid-template-columns: 1fr;
  }

  .hot-card {
    padding: 16px;
  }

  .chart-wrap {
    height: 220px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .rank-bar-fill,
  .bar {
    transition: none;
  }

  .ticker-track {
    animation: none;
  }

  .ticker {
    overflow-x: auto;
  }
}
