/* 葬AI Web4 - Dark theme, sharp attitude */
:root {
  --bg: #0a0a0d;
  --surface: #141418;
  --surface2: #1c1c22;
  --border: #2a2a32;
  --text: #d4d4d8;
  --text-dim: #71717a;
  --accent: #a78bfa;
  --accent2: #f472b6;
  --accent3: #34d399;
  --accent4: #fbbf24;
  --red: #ef4444;
  --radius: 6px;
  --font: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent2); }

/* Navigation */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
.nav-brand:hover { color: var(--accent2); }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-size: .9rem; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }

/* Footer */
.site-footer {
  text-align: center; padding: 40px 24px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: .85rem; margin-top: 60px;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }
.site-footer p + p { margin-top: 8px; }

/* Hero */
.hero {
  text-align: center; padding: 80px 24px 60px;
}
.hero h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: 0.04em; margin-bottom: 16px; }
.hero .tagline {
  font-size: 1.15rem; color: var(--text-dim); max-width: 560px; margin: 0 auto 40px;
  line-height: 1.8;
}
.hero-stats {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2.5rem; font-weight: 700; color: var(--accent2); display: block; }
.hero-stat .label { font-size: .85rem; color: var(--text-dim); margin-top: 4px; }

/* Navigation cards */
.nav-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; padding: 0 24px; max-width: 960px; margin: 0 auto 60px;
}
.nav-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px; transition: all .2s;
}
.nav-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(167,139,250,.08); }
.nav-card h2 { font-size: 1.35rem; margin-bottom: 10px; color: var(--text); }
.nav-card p { font-size: .9rem; color: var(--text-dim); line-height: 1.7; }

/* Section titles */
.section-title {
  padding: 0 24px; max-width: 960px; margin: 40px auto 20px;
  font-size: 1.1rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Article list */
.article-list { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.article-item {
  display: block; padding: 20px 0; border-bottom: 1px solid var(--border);
  transition: all .15s;
}
.article-item:hover { background: var(--surface); margin: 0 -16px; padding: 20px 16px; border-radius: var(--radius); }
.article-item h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 6px; line-height: 1.5; }
.article-item .meta { font-size: .82rem; color: var(--text-dim); }
.article-item .excerpt { font-size: .88rem; color: var(--text-dim); margin-top: 6px; line-height: 1.65; }

/* Search / filter */
.filter-bar {
  max-width: 900px; margin: 0 auto 24px; padding: 0 24px; display: flex; gap: 12px; flex-wrap: wrap;
}
.filter-bar input {
  flex: 1; min-width: 200px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: .9rem; outline: none; font-family: var(--font);
}
.filter-bar input:focus { border-color: var(--accent); }
.filter-bar input::placeholder { color: var(--text-dim); }

/* Article detail page */
.article-detail { max-width: 780px; margin: 0 auto; padding: 40px 24px; }
.article-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-header h1 { font-size: 1.8rem; font-weight: 700; line-height: 1.4; margin-bottom: 14px; }
.article-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: .88rem; color: var(--text-dim); }
.article-meta .article-author { color: var(--accent); }
.back-link { font-size: .85rem; }
.article-nav-bottom { display: flex; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.btn {
  display: inline-block; padding: 8px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: .88rem; cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

/* Markdown body */
.md-body { line-height: 1.85; font-size: 1rem; }
.md-body h1 { font-size: 1.6rem; margin: 32px 0 16px; font-weight: 700; }
.md-body h2 { font-size: 1.3rem; margin: 28px 0 14px; font-weight: 600; }
.md-body h3 { font-size: 1.1rem; margin: 24px 0 12px; font-weight: 600; }
.md-body p { margin: 12px 0; }
.md-body a { word-break: break-all; }
.md-body blockquote {
  border-left: 3px solid var(--accent); padding: 8px 20px; margin: 16px 0;
  color: var(--text-dim); background: rgba(167,139,250,.04); border-radius: 0 var(--radius) var(--radius) 0;
}
.md-body ul, .md-body ol { padding-left: 24px; margin: 12px 0; }
.md-body li { margin: 4px 0; }
.md-body code {
  background: var(--surface2); padding: 2px 6px; border-radius: 3px;
  font-family: var(--mono); font-size: .9em;
}
.md-body pre {
  background: var(--surface2); padding: 16px 20px; border-radius: var(--radius);
  overflow-x: auto; margin: 16px 0; border: 1px solid var(--border);
}
.md-body pre code { background: none; padding: 0; }
.md-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.md-body img { max-width: 100%; border-radius: var(--radius); }
.md-body strong { font-weight: 600; color: #e4e4e7; }
.md-body em { color: var(--text-dim); }

/* Article empty state */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-dim); }

/* Graph page */
.graph-page { display: flex; height: calc(100vh - 57px); }
.graph-panel { flex: 1; position: relative; background: var(--bg); }
#graph-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
#graph-canvas:active { cursor: grabbing; }

.graph-sidebar {
  width: 340px; background: var(--surface); border-left: 1px solid var(--border);
  overflow-y: auto; padding: 20px;
}
.graph-sidebar h2 { font-size: 1rem; margin-bottom: 20px; color: var(--text-dim); }

/* Leaderboard tabs */
.lb-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.lb-tab {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .82rem; cursor: pointer; transition: all .15s; color: var(--text-dim); background: none;
}
.lb-tab:hover { border-color: var(--accent); color: var(--text); }
.lb-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.lb-list { list-style: none; }
.lb-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: .88rem; cursor: pointer; transition: all .15s;
}
.lb-item:hover { color: var(--accent); }
.lb-rank {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: .8rem; font-weight: 700; flex-shrink: 0;
  background: var(--surface2); color: var(--text-dim);
}
.lb-item:nth-child(1) .lb-rank { background: #fbbf24; color: #000; }
.lb-item:nth-child(2) .lb-rank { background: #94a3b8; color: #000; }
.lb-item:nth-child(3) .lb-rank { background: #d97706; color: #000; }
.lb-name { font-weight: 600; }
.lb-type { color: var(--text-dim); font-size: .78rem; }
.lb-degree { margin-left: auto; font-size: .78rem; color: var(--text-dim); }

/* Node detail popup */
.node-detail {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; display: none;
}
.node-detail.active { display: block; }
.node-detail h3 { font-size: 1.1rem; margin-bottom: 6px; }
.node-detail .node-type {
  display: inline-block; padding: 2px 10px; border-radius: 3px; font-size: .75rem; margin-bottom: 12px;
}
.node-detail .node-type.product { background: rgba(167,139,250,.15); color: var(--accent); }
.node-detail .node-type.founder { background: rgba(244,114,182,.15); color: var(--accent2); }
.node-detail .node-type.vc { background: rgba(52,211,153,.15); color: var(--accent3); }
.node-detail .node-type.company { background: rgba(251,191,36,.15); color: var(--accent4); }
.node-detail .node-type.person { background: rgba(244,114,182,.15); color: var(--accent2); }
.node-detail .node-type.vc_firm { background: rgba(52,211,153,.15); color: var(--accent3); }
.node-detail p { font-size: .85rem; color: var(--text-dim); line-height: 1.65; margin: 6px 0; }
.node-detail .node-stats { display: flex; gap: 16px; margin-top: 12px; font-size: .8rem; color: var(--text-dim); }
.node-detail .node-stats span strong { color: var(--text); }

/* Node type legend */
.legend { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-dim); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { gap: 28px; }
  .hero-stat .num { font-size: 1.8rem; }
  .graph-page { flex-direction: column; }
  .graph-panel { height: 50vh; }
  .graph-sidebar { width: 100%; max-height: 50vh; }
}
