
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Noto+Sans+SC:wght@300;500;900&display=swap');

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

:root {
  --cyan: #00f0ff;
  --magenta: #ff00aa;
  --dark: #0a0e17;
  --card: rgba(15, 22, 40, 0.85);
  --border: rgba(0,240,255,0.1);
}

body {
  background: var(--dark);
  color: #e0e6f0;
  font-family: 'Noto Sans SC', sans-serif;
  overflow-x: hidden;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#bgCanvas { position: absolute; inset: 0; z-index: 0; }

.hero-content { position: relative; z-index: 1; text-align: center; }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glitch 4s infinite;
}

.hero .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.8rem, 1.5vw, 1.1rem);
  color: rgba(0,240,255,0.6);
  margin-top: 1rem;
  letter-spacing: 4px;
}

.hero .tagline {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 300;
  margin-top: 2rem;
  color: rgba(255,255,255,0.5);
  max-width: 600px;
}

.data-badge {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #00ff88;
  background: rgba(0,255,136,0.05);
}

.data-badge .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: #00ff88;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  margin-right: 6px;
  vertical-align: middle;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  z-index: 1;
  animation: bounce 2s infinite;
  font-size: 1.5rem;
  color: var(--cyan);
  opacity: 0.5;
}

@keyframes glitch {
  0%, 100% { text-shadow: none; filter: none; }
  92% { text-shadow: 2px 0 var(--magenta), -2px 0 var(--cyan); }
  93% { text-shadow: -2px 0 var(--magenta), 2px 0 var(--cyan); transform: translate(1px,-1px); }
  94% { text-shadow: none; filter: none; transform: none; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.section-title span { color: var(--cyan); }

.section-desc {
  color: rgba(255,255,255,0.4);
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

.section-hint {
  font-size: 0.75rem;
  color: rgba(0,240,255,0.4);
  margin-bottom: 2rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== CLICKABLE HINT ===== */
.clickable-hint {
  font-size: 0.7rem;
  color: rgba(0,240,255,0.3);
  margin-bottom: 1rem;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.clickable-hint::before {
  content: '▶';
  font-size: 0.6rem;
}

/* ===== FLOW ===== */
.flow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.flow-node {
  flex: 1;
  min-width: 130px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 0.8rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.flow-node:hover {
  border-color: var(--cyan);
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(0,240,255,0.12);
}

.flow-node:hover::after {
  content: '点击查看详情';
  position: absolute;
  bottom: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: rgba(0,240,255,0.5);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.flow-node .icon { font-size: 2rem; margin-bottom: 0.4rem; }
.flow-node .label { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.3rem; }
.flow-node .stat { font-family: 'JetBrains Mono', monospace; font-size: 1.3rem; font-weight: 700; color: var(--cyan); }
.flow-node .delta { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; margin-top: 0.3rem; }
.delta.up { color: #00ff88; }
.delta.down { color: #ff4466; }

.flow-arrow { color: rgba(0,240,255,0.25); font-size: 1.2rem; flex-shrink: 0; }

/* ===== INSIGHT CARDS ===== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.insight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.insight-card:hover {
  border-color: rgba(0,240,255,0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0,240,255,0.06);
}

.insight-card:hover::before { opacity: 1; }
.insight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  opacity: 0;
  transition: opacity 0.3s;
}

.insight-card:hover .click-hint { opacity: 1; }

.click-hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.65rem;
  color: rgba(0,240,255,0.4);
  font-family: 'JetBrains Mono', monospace;
  opacity: 0;
  transition: opacity 0.3s;
}

.insight-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.tag-trend { background: rgba(0,255,136,0.15); color: #00ff88; }
.tag-risk { background: rgba(255,68,102,0.15); color: #ff4466; }
.tag-opty { background: rgba(0,240,255,0.15); color: var(--cyan); }

.insight-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.8rem; line-height: 1.4; }
.insight-body { font-size: 0.85rem; color: rgba(255,255,255,0.5); line-height: 1.7; }

.insight-metric {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 1.2rem;
  font-family: 'JetBrains Mono', monospace;
}

.insight-metric .big { font-size: 1.8rem; font-weight: 700; color: var(--cyan); }
.insight-metric .unit { font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* ===== TICKER ===== */
.ticker-wrap {
  background: linear-gradient(180deg, rgba(0,240,255,0.03) 0%, transparent 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* Channel Tabs */
.ticker-channels {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.8rem 2rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ticker-channels::-webkit-scrollbar { display: none; }

.ticker-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 20px 20px 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.ticker-tab:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.03); }

.ticker-tab.active {
  color: var(--cyan);
  background: rgba(0,240,255,0.07);
  border-color: rgba(0,240,255,0.15);
  border-bottom-color: var(--dark);
  position: relative;
}

.ticker-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--dark);
}

.ticker-tab .t-icon { font-size: 0.9rem; }

.ticker-tab .t-label {
  font-size: 0.72rem;
}

.ticker-tab .t-count {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  color: rgba(255,255,255,0.4);
}

.ticker-tab.active .t-count {
  background: rgba(0,240,255,0.15);
  color: var(--cyan);
}

/* Ticker Body */
.ticker-body {
  padding: 0.8rem 0 1.2rem;
  overflow: hidden;
  position: relative;
}

.ticker-hint {
  font-size: 0.65rem;
  color: rgba(0,240,255,0.3);
  padding: 0 2rem 0.6rem;
  font-family: 'JetBrains Mono', monospace;
}

.ticker {
  display: flex;
  gap: 2rem;
  animation: scroll 40s linear infinite;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

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

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  transition: background 0.2s;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.ticker-item:hover {
  background: rgba(0,240,255,0.08);
  border-color: rgba(0,240,255,0.15);
}

.ticker-item .t-cat {
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.3);
}

.ticker-item .name { color: #e0e6f0; }
.ticker-item .val { color: var(--cyan); font-weight: 700; }
.ticker-item .chg.up { color: #00ff88; }
.ticker-item .chg.down { color: #ff4466; }
.ticker-item .chg.neutral { color: #ffaa00; }
.ticker-item .arrow { color: rgba(0,240,255,0.3); font-size: 0.7rem; }

/* Signal dot */
.ticker-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-up { background: #00ff88; box-shadow: 0 0 4px #00ff88; }
.dot-down { background: #ff4466; box-shadow: 0 0 4px #ff4466; }
.dot-risk { background: #ff4466; box-shadow: 0 0 4px #ff4466; }
.dot-opty { background: #00ff88; box-shadow: 0 0 4px #00ff88; }
.dot-warn { background: #ffaa00; box-shadow: 0 0 4px #ffaa00; }
.dot-neutral { background: rgba(255,255,255,0.3); }

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== CHART AREA ===== */
.chart-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.chart-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}

.chart-box h3 { font-size: 0.85rem; font-weight: 500; color: rgba(255,255,255,0.5); margin-bottom: 0.5rem; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: all 0.4s ease;
  cursor: pointer;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.bar:hover { filter: brightness(1.3); transform: scaleY(1.03); }
.bar:hover .bar-tip { opacity: 1; }

.bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 1s cubic-bezier(0.16,1,0.3,1);
}

.bar-label {
  position: absolute;
  bottom: -1.5rem;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
  text-align: center;
}

.bar-tip {
  position: absolute;
  top: -2rem;
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  background: rgba(0,240,255,0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  pointer-events: none;
}

.bar-src {
  position: absolute;
  bottom: -2.8rem;
  font-size: 0.5rem;
  color: rgba(255,255,255,0.2);
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== RADAR ===== */
.radar-visual { display: flex; flex-direction: column; gap: 0.8rem; }

.radar-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.radar-item:hover { background: rgba(0,240,255,0.05); }

.radar-item .rl { font-size: 0.75rem; color: rgba(255,255,255,0.5); width: 60px; flex-shrink: 0; }

.radar-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.radar-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.16,1,0.3,1);
}

.radar-item .rv {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

.radar-src {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.2);
  margin-left: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== MODAL ===== */
#modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

#modal.open { display: flex; }

.modal-box {
  background: #0d1525;
  border: 1px solid rgba(0,240,255,0.2);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 60px rgba(0,240,255,0.1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,240,255,0.1); }

.modal-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-tag { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.8rem; }
.modal-title { font-size: 1.3rem; font-weight: 900; margin-bottom: 1rem; line-height: 1.4; }
.modal-metric { font-family: 'JetBrains Mono', monospace; font-size: 2rem; font-weight: 700; color: var(--cyan); margin-bottom: 1.2rem; }
.modal-detail { font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.8; margin-bottom: 1.5rem; }
.modal-source { background: rgba(0,240,255,0.05); border: 1px solid rgba(0,240,255,0.1); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.modal-source-title { font-size: 0.7rem; font-weight: 700; color: var(--cyan); margin-bottom: 0.4rem; font-family: 'JetBrains Mono', monospace; }
.modal-source-body { font-size: 0.78rem; color: rgba(255,255,255,0.5); line-height: 1.6; }
.modal-source-body a { color: rgba(0,240,255,0.6); text-decoration: none; }
.modal-source-body a:hover { color: var(--cyan); text-decoration: underline; }
.modal-note { font-size: 0.75rem; color: rgba(255,255,255,0.25); font-style: italic; line-height: 1.6; }

/* ===== SOURCE BANNER ===== */
.source-banner { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.source-banner details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.5rem; }
.source-banner summary { cursor: pointer; font-size: 0.85rem; color: rgba(255,255,255,0.4); font-weight: 500; }
.source-banner summary:hover { color: var(--cyan); }
.source-list { margin-top: 1rem; font-size: 0.75rem; color: rgba(255,255,255,0.3); line-height: 2; }
.source-list a { color: rgba(0,240,255,0.5); text-decoration: none; }
.source-list a:hover { color: var(--cyan); text-decoration: underline; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
  border-top: 1px solid rgba(0,240,255,0.05);
}

footer .pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: #00ff88;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .chart-section { grid-template-columns: 1fr; }
  .flow-container { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .ticker { gap: 1.5rem; }
}

/* ===== SCROLL ANIM ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: none; }
