:root {
  --bg-primary: #0a0e14;
  --bg-secondary: #111720;
  --bg-card: #151b26;
  --border: #1e2a3a;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --accent: #0aff9e;
  --accent-dim: rgba(10, 255, 158, 0.15);
  --cat1: #ff5c5c;
  --cat2: #58a6ff;
  --cat3: #f0a050;
  --cat4: #bc8cff;
  --cat5: #e3b341;
  --font-sans: -apple-system, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Consolas", "Courier New", monospace;
  --radius: 6px;
  --gap: 16px;
  --transition: 0.3s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
#header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 24px 32px;
  position: relative;
  overflow: hidden;
}
#header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 3s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
#header h1 {
  font-family: var(--font-mono);
  font-size: clamp(18px, 3vw, 24px);
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
#header .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* KPI Row */
#kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--gap);
  padding: 24px 32px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  position: relative;
}
.kpi-card .kpi-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.kpi-card .kpi-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-card .kpi-dot {
  position: absolute;
  top: 8px; right: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
}

/* SVG Chart */
#chart-section {
  padding: 0 32px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: center;
}
#chart-section svg { width: 200px; height: 200px; }
.chart-legend { display: flex; flex-direction: column; gap: 8px; }
.chart-legend .legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chart-legend .legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Sections */
#content {
  padding: 0 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.section {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.section.visible {
  opacity: 1;
  transform: translateY(0);
}
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.section-header .cat-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.section-header .cat-title {
  font-size: 16px;
  font-weight: 600;
}

/* Article Card */
.article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.article:hover { border-color: var(--accent-dim); }
.article .art-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-right: 6px;
  opacity: 0.8;
}
.article .art-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.article .art-title a { color: var(--text-primary); }
.article .art-title a:hover { color: var(--accent); }
.article .art-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}
.article .art-source {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  padding: 1px 6px;
  border-radius: 3px;
}
.article .art-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.hl-kw {
  color: var(--accent);
  font-weight: 600;
}

/* Footer */
#footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
#footer .sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#footer .source-tag {
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  #header, #kpi-row, #content, #chart-section, #footer { padding-left: 16px; padding-right: 16px; }
  .kpi-card .kpi-num { font-size: 24px; }
}
@media (max-width: 480px) {
  #kpi-row { grid-template-columns: repeat(3, 1fr); }
  #chart-section { flex-direction: column; }
}
