/* 葬AI Web4 - Static Site Styles */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #dc2626;
  --accent-hover: #ef4444;
  --accent-soft: rgba(220, 38, 38, 0.1);
  --border: #2a2a2a;
  --border-light: #333333;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1200px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Section titles */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Article cards */
.article-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, transform 0.2s;
}

.article-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: var(--text-primary);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.article-meta .author {
  color: var(--accent);
  font-weight: 500;
}

/* Articles grid */
.articles-grid {
  display: grid;
  gap: 1rem;
}

/* Search */
.search-box {
  margin-bottom: 2rem;
}

.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--accent);
}

/* Article detail */
.article-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0;
}

.article-detail h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.article-meta-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-meta-bar .author {
  color: var(--accent);
  font-weight: 500;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-body h1, .article-body h2, .article-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.article-body h1 { font-size: 1.8rem; }
.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.15rem; }

.article-body p {
  margin-bottom: 1.2rem;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-body code {
  background: var(--bg-tertiary);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.article-body pre {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-body pre code {
  background: none;
  padding: 0;
}

.article-body ul, .article-body ol {
  margin: 1rem 0 1rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-body em {
  color: var(--text-secondary);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.article-body a {
  color: var(--accent);
}

.article-body img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--accent);
}

/* Graph page */
.graph-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  padding: 0;
}

.graph-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#graph-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#graph-canvas:active {
  cursor: grabbing;
}

.graph-controls {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.graph-controls button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.graph-controls button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.node-details {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 320px;
  max-height: calc(100% - 2rem);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.node-details.hidden {
  display: none;
}

.node-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.node-details .node-type {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.node-details .node-type.product { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.node-details .node-type.founder { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.node-details .node-type.vc { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.node-details .node-type.company { background: rgba(168, 85, 247, 0.2); color: #a855f7; }

.node-details p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.node-details .node-degree {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Leaderboards */
.leaderboards-panel {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  max-height: 300px;
  overflow-y: auto;
}

.leaderboards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.leaderboard h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.leaderboard-rank.top {
  background: var(--accent);
  color: white;
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Utility */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .leaderboards-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .node-details {
    width: 100%;
    top: auto;
    bottom: 0;
    right: 0;
    max-height: 50%;
    border-radius: 8px 8px 0 0;
  }
  
  main {
    padding: 1rem;
  }
  
  .article-detail h1 {
    font-size: 1.5rem;
  }
  
  .article-body {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .leaderboards-grid {
    grid-template-columns: 1fr;
  }
  
  .graph-controls {
    bottom: 1rem;
    right: 1rem;
  }
}
