:root {
  --bg: #0b1120;            /* 比 slate-900 更深一档，衬托玻璃卡 */
  --bg-raise: #0f172a;
  --surface: rgba(30, 41, 59, .55);
  --surface-solid: #1e293b;
  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .28);
  --fg: #f1f5f9;
  --fg-dim: #94a3b8;
  --fg-faint: #64748b;
  --accent: #60a5fa;
  --accent-strong: #3b82f6;
  --up: #10b981;           /* 语义：上升 */
  --up-bg: rgba(16, 185, 129, .12);
  --down: #ef4444;         /* 语义：下降 */
  --down-bg: rgba(239, 68, 68, .12);
  --flat: #64748b;
  --gold: #fbbf24;         /* 预算/价值 */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .55);
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-color: var(--border-strong) transparent;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* 环境光晕：顶部一抹蓝，克制 */
  background-image:
    radial-gradient(900px 500px at 78% -8%, rgba(96, 165, 250, .14), transparent 60%),
    radial-gradient(700px 400px at 8% 4%, rgba(59, 130, 246, .08), transparent 55%);
  background-attachment: fixed;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ---------- 顶栏 ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 17, 32, .72);
  border-bottom: 1px solid var(--border);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 18px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, .32));
}

nav.tabs {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

nav.tabs a {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--fg-dim);
  font-weight: 500;
  transition: background .18s, color .18s;
  display: inline-block;
}

nav.tabs a:hover {
  color: var(--fg);
  background: rgba(148, 163, 184, .08);
}

nav.tabs a.active {
  color: var(--fg);
  background: rgba(96, 165, 250, .14);
}

.top .spacer {
  flex: 1;
}

.lang {
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}

.lang a {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg-dim);
  display: inline-block;
}

.lang a:hover {
  color: var(--fg);
}

.lang a.active {
  background: var(--accent);
  color: #04122b;
  font-weight: 600;
}

.btn-login {
  padding: 8px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}

.btn-login:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 通用玻璃卡 ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 600;
}

section.view {
  padding: 34px 0 90px;
}

/* ---------- 首页 Hero ---------- */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.hero h1 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -.025em;
  text-wrap: balance;
  max-width: 16ch;
}

.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--fg-dim);
  margin-top: 10px;
  max-width: 52ch;
  font-size: 15px;
}

.stat-row {
  display: flex;
  gap: 14px;
}

.stat {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, .06);
  border: 1px solid var(--border);
  min-width: 104px;
}

.stat .n {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.stat .l {
  font-size: 11px;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 3px;
}

/* ---------- 过滤栏 ---------- */
.filters {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 18px;
}

.fgroup {
  display: flex;
  gap: 6px;
  align-items: center;
}

.fgroup .cap {
  font-size: 11px;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-right: 2px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  transition: all .16s;
  display: inline-block;
}

.pill:hover {
  color: var(--fg);
  border-color: var(--border-strong);
}

.pill.active {
  background: var(--accent);
  color: #04122b;
  border-color: var(--accent);
  font-weight: 600;
}

.filters .spacer {
  flex: 1;
}

.sel {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg);
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

/* ---------- 榜单大盘 ---------- */
.board-head,
.row {
  display: grid;
  grid-template-columns: 52px 1fr 118px 120px 132px 96px;
  gap: 16px;
  align-items: center;
}

.board-head {
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 600;
}

.board {
  padding: 6px;
}

.row {
  padding: 15px 14px;
  border-radius: 12px;
  position: relative;
  transition: background .16s, transform .16s;
}

.row+.row {
  margin-top: 2px;
}

.row:hover {
  background: rgba(96, 165, 250, .06);
  transform: translateX(2px);
}

.row:hover .rank .no {
  color: var(--accent);
}

.rank {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rank .no {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg-dim);
  width: 26px;
  text-align: right;
}

.rank .mv {
  font-size: 12px;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 2px;
}

.mv.up {
  color: var(--up);
}

.mv.down {
  color: var(--down);
}

.mv.flat {
  color: var(--flat);
}

.feat .name {
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -.01em;
}

.feat .name .hot {
  color: var(--gold);
  font-size: 13px;
  margin-left: 5px;
}

.feat .tags {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, .1);
  color: var(--fg-dim);
  font-family: var(--mono);
}

.tag.tech {
  color: #93c5fd;
  background: rgba(96, 165, 250, .1);
}

/* 涨跌 pill */
.trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  justify-self: start;
}

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

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

.trend.flat {
  color: var(--flat);
  background: rgba(100, 116, 139, .12);
}

.mentions {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg);
}

.mentions small {
  display: block;
  font-size: 11px;
  color: var(--fg-faint);
  font-family: var(--sans);
}

.budget {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 5px;
}

.budget small {
  color: var(--fg-faint);
  font-size: 11px;
}

.spark {
  width: 88px;
  height: 30px;
  display: block;
}

/* ---------- 详情页 ---------- */
.crumb {
  font-size: 13px;
  color: var(--fg-faint);
  margin-bottom: 16px;
}

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

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.detail-head h1 {
  font-size: 28px;
  font-weight: 730;
  letter-spacing: -.02em;
  max-width: 20ch;
  text-wrap: balance;
}

.badges {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--mono);
  border: 1px solid var(--border);
}

.badge.rank {
  background: rgba(96, 165, 250, .12);
  color: var(--accent);
  border-color: transparent;
}

.mine-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 14.5px;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #04122b;
  box-shadow: 0 8px 24px -8px var(--accent);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}

.mine-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px var(--accent);
}

.mine-btn:active:not(:disabled) {
  transform: translateY(0);
}

.mine-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--fg-faint);
}

.cookie-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 650;
  font-size: 14px;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #04122b;
  box-shadow: 0 8px 24px -8px var(--accent);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}

.cookie-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px var(--accent);
}

.cookie-btn:active {
  transform: translateY(0);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-top: 22px;
  align-items: start;
}

.grid2>.evidence {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 102px);
  overflow-y: auto;
}

.panel {
  padding: 22px;
}

.panel h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg-faint);
  margin-bottom: 14px;
  font-weight: 600;
}

.panel p.body {
  color: #cbd5e1;
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 64ch;
}

.panel+.panel {
  margin-top: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.mcard {
  padding: 14px;
  border-radius: 10px;
  background: rgba(148, 163, 184, .05);
  border: 1px solid var(--border);
}

.mcard .k {
  font-size: 11px;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.mcard .v {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  margin-top: 4px;
}

/* 地域条 */
.geo {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.geo .g {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.geo .bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(148, 163, 184, .12);
  overflow: hidden;
}

.geo .bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #818cf8);
}

.geo .pct {
  font-family: var(--mono);
  color: var(--fg-dim);
  text-align: right;
  font-size: 12px;
}

/* 证据面板 */
.evidence .ev {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.evidence .ev:last-child {
  border-bottom: none;
}

.ev .et {
  font-size: 13.5px;
  color: #e2e8f0;
  line-height: 1.5;
}

.ev .em {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--fg-faint);
  font-family: var(--mono);
  align-items: center;
  flex-wrap: wrap;
}

.ev .plat {
  color: var(--accent);
}

.ev .ext {
  margin-left: auto;
  color: var(--fg-dim);
}

.ev .ext:hover {
  color: var(--accent);
}

.src-note {
  font-size: 11px;
  color: var(--fg-faint);
  margin-top: 14px;
  line-height: 1.5;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* 锁区（分层变现）*/
.lock {
  position: relative;
  overflow: hidden;
}

.lock .blurred {
  filter: blur(6px);
  opacity: .5;
  pointer-events: none;
  user-select: none;
}

.lock .gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, .2), rgba(15, 23, 42, .72));
}

.gate .glabel {
  font-size: 13px;
  color: var(--fg-dim);
  max-width: 32ch;
}

.gate .cta {
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
}

.gate .cta.free {
  background: var(--accent);
  color: #04122b;
}

.gate .cta.pro {
  background: linear-gradient(120deg, var(--gold), #f59e0b);
  color: #3a2606;
}

.gate .tier {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.tier.free {
  background: rgba(96, 165, 250, .16);
  color: var(--accent);
}

.tier.pro {
  background: rgba(251, 191, 36, .16);
  color: var(--gold);
}

/* 挖掘结果 */
#mineResult {
  margin-top: 18px;
  display: none;
}

#mineResult.show {
  display: block;
}

.mine-loading {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 20px;
  color: var(--fg-dim);
  font-size: 14px;
}

.mine-loading.show {
  display: flex;
}

.digger {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.idea-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.idea {
  padding: 18px;
  border-radius: 12px;
  background: rgba(148, 163, 184, .05);
  border: 1px solid var(--border);
  transition: border-color .16s;
}

.idea:hover {
  border-color: var(--accent);
}

.idea .kind {
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.idea h4 {
  font-size: 15px;
  margin: 8px 0 7px;
  letter-spacing: -.01em;
}

.idea p {
  font-size: 12.5px;
  color: var(--fg-dim);
  line-height: 1.6;
}

.idea .st {
  display: flex;
  gap: 5px;
  margin-top: 11px;
  flex-wrap: wrap;
}

/* 机会评分环 */
.score-wrap {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 6px;
}

.ring {
  --v: 88;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--up) calc(var(--v)*1%), rgba(148, 163, 184, .14) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--bg-raise);
}

.ring b {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
}

.score-legend {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}

.score-legend .sl {
  display: flex;
  align-items: center;
  gap: 9px;
}

.score-legend .swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  color: var(--fg-faint);
  font-size: 12px;
}

footer .wrap {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

footer .disc {
  max-width: 60ch;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  .grid2>.evidence {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .idea-cards {
    grid-template-columns: 1fr;
  }
  .board-head {
    display: none;
  }
  .row {
    grid-template-columns: 44px 1fr auto;
    row-gap: 10px;
  }
  .row .spark,
  .row .mentions {
    display: none;
  }
  .hero h1 {
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
