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

:root {
  --bg-primary: #1a1a2e;
  --bg-card: #16213e;
  --accent: #0f3460;
  --highlight: #e94560;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b0;
  --text-muted: #6c6c80;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
}

/* Header */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--accent) 50%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(233, 69, 96, 0.08) 0%, transparent 70%);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
}

.hero h1 .accent {
  color: var(--highlight);
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 400;
  position: relative;
}

.hero .description {
  max-width: 680px;
  margin: 24px auto 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  position: relative;
  line-height: 1.7;
}

/* Nav */
nav {
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 0;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

nav a:hover {
  color: var(--text-primary);
  background: rgba(233, 69, 96, 0.1);
}

/* Sections */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

section .section-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* Chart cards */
.chart-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.chart-container {
  width: 100%;
  min-height: 400px;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-card .stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--highlight);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

footer a {
  color: var(--highlight);
  text-decoration: none;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--highlight);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .chart-card {
    padding: 16px;
  }

  .chart-container {
    min-height: 300px;
  }

  section {
    padding: 40px 0;
  }

  nav ul {
    gap: 4px;
  }

  nav a {
    font-size: 0.78rem;
    padding: 6px 10px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 50px 16px 40px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }
}
