/* ===== 智蛋AI 数据大屏：科技暗色模式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(22, 163, 74, .18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(34, 197, 94, .12) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(13, 24, 42, .6) 0%, transparent 70%),
    linear-gradient(135deg, #06121f 0%, #0a1a2e 45%, #0d2233 100%);
  background-attachment: fixed;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #dbe4ee;
}
/* 科技网格背景（细密网格 + 扫描线） */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(34, 197, 94, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
body::after {
  content: ""; position: fixed; left: 0; right: 0; height: 2px; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, .55), transparent);
  animation: scanline 8s linear infinite;
}
@keyframes scanline { 0% { top: -2px; } 100% { top: 100%; } }

#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; }
#stage { width: 1920px; height: 1080px; transform-origin: center center; display: flex; flex-direction: column; }

/* 头部 */
.s-head {
  height: 88px; display: flex; align-items: center; justify-content: center; position: relative; flex: none;
  background: linear-gradient(180deg, rgba(22, 163, 74, .22), transparent);
  border-bottom: 1px solid rgba(74, 222, 128, .14);
}
.s-head h1 { font-size: 34px; letter-spacing: 8px; font-weight: 700; color: #f0fdf4;
  text-shadow: 0 0 24px rgba(34, 197, 94, .35); }
.s-head .clock { position: absolute; right: 40px; font-size: 18px; color: #86efac; font-variant-numeric: tabular-nums; }

/* 三栏布局 */
.s-body { flex: 1; display: grid; grid-template-columns: 460px 1fr 460px; gap: 20px; padding: 12px 28px 20px; min-height: 0; }
.s-col { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.panel {
  background: linear-gradient(160deg, rgba(21, 27, 35, .9) 0%, rgba(13, 34, 51, .75) 100%);
  border: 1px solid rgba(134, 239, 172, .18);
  border-radius: 12px; padding: 18px 20px;
  display: flex; flex-direction: column; min-height: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .03);
  position: relative;
}
.panel::before {
  content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 24px;
  background: linear-gradient(180deg, #4ade80, #16a34a); border-radius: 0 2px 2px 0;
}
.panel h3 {
  font-size: 18px; font-weight: 600; color: #bbf7d0; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; flex: none;
  letter-spacing: 1px;
}
.panel h3::before { content: ""; width: 4px; height: 16px; background: #22c55e; border-radius: 2px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s-kpi { background: rgba(34, 197, 94, .07); border: 1px solid rgba(34, 197, 94, .15); border-radius: 10px; padding: 12px 14px; }
.s-kpi .l { font-size: 13px; color: #64748b; }
.s-kpi .v { font-size: 26px; font-weight: 700; color: #f0fdf4; font-variant-numeric: tabular-nums; margin-top: 2px; }
.s-kpi .v small { font-size: 13px; color: #64748b; font-weight: 400; }

/* 榜单与价格表 */
.up { color: #f87171; }
.down { color: #4ade80; }
.s-rank {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 6px;
  padding-right: 4px;
  scrollbar-width: thin; scrollbar-color: rgba(74, 222, 128, .35) transparent;
}
.s-rank::-webkit-scrollbar { width: 6px; }
.s-rank::-webkit-scrollbar-thumb { background: rgba(74, 222, 128, .35); border-radius: 3px; }
.s-rank::-webkit-scrollbar-track { background: transparent; }
.s-rank .row { display: flex; font-size: 15px; padding: 6px 8px; border-radius: 6px; background: rgba(148, 163, 184, .05); }
.s-rank .row .n { width: 28px; color: #64748b; }
.s-rank .row .nm { flex: 1; }
.s-rank .row b { font-variant-numeric: tabular-nums; }
.s-rank .row .nm { display: flex; align-items: center; gap: 8px; }
.s-rank .row .nm .rk-tag {
  font-size: 11px; padding: 1px 6px; border-radius: 3px; font-weight: 400; line-height: 1.4;
  border: 1px solid rgba(148, 163, 184, .3); color: #94a3b8;
}
.s-rank .row .nm .rk-tag.producer { color: #fbbf24; border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }
.s-rank .row .nm .rk-tag.consumer { color: #60a5fa; border-color: rgba(96, 165, 250, .4); background: rgba(96, 165, 250, .08); }

/* 价格榜筛选 tabs */
.s-rank-tabs { margin-left: auto; display: flex; gap: 4px; }
.s-rank-tabs span {
  font-size: 12px; padding: 3px 10px; border-radius: 4px; cursor: pointer;
  color: #64748b; border: 1px solid rgba(148, 163, 184, .15);
  transition: all .15s; font-weight: 400;
}
.s-rank-tabs span:hover { color: #cbd5e1; border-color: rgba(74, 222, 128, .35); }
.s-rank-tabs span.active {
  color: #0d1117; background: #4ade80; border-color: #4ade80; font-weight: 600;
}

.s-table { flex: 1; position: relative; min-height: 0; }
.s-table .thead, .s-table .row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; font-size: 14px; padding: 6px 8px; }
.s-table .thead { color: #64748b; border-bottom: 1px solid rgba(148, 163, 184, .15); position: relative; z-index: 2; background: rgba(13, 34, 51, .6); backdrop-filter: blur(4px); }
.s-table .scroll-wrap { position: absolute; left: 0; right: 0; top: 33px; bottom: 0; overflow: hidden; }
.s-table .scroll { animation: scrollUp 22s linear infinite; }
@keyframes scrollUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }

/* 地图 */
#s-map { flex: 1; min-height: 0; }
.center-col { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.map-panel { flex: 1; }
.trend-panel { height: 260px; flex: none; }
#s-trend { flex: 1; min-height: 0; }

/* AI 日报 */
.ai-body { font-size: 14px; color: #cbd5e1; overflow: hidden; flex: 1; }
.ai-body h2 { font-size: 15px; color: #86efac; margin: 10px 0 6px; }
.ai-body h2:first-child { margin-top: 0; }
.ai-badge { font-size: 12px; color: #0d1117; background: #4ade80; border-radius: 999px; padding: 2px 10px; margin-left: auto; }
.ai-badge.mock { background: #fbbf24; }

/* 底部滚动条 */
.s-ticker {
  height: 52px; flex: none; margin: 0 28px 18px;
  border: 1px solid rgba(134, 239, 172, .14); border-radius: 10px;
  background: rgba(21, 27, 35, .85);
  display: flex; align-items: center; overflow: hidden;
}
.s-ticker .label { flex: none; padding: 0 18px; color: #4ade80; font-weight: 600; font-size: 15px; border-right: 1px solid rgba(148,163,184,.15); }
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-inner { display: inline-block; white-space: nowrap; animation: marquee 60s linear infinite; font-size: 15px; }
.ticker-inner span { margin: 0 22px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
