/* ── Dashboard Layout ──────────────────────────────────────────────────────── */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

header h1 {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

header p {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
}

.byline {
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

.byline a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Stats Bar ────────────────────────────────────────────────────────────── */

.stats-bar {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  text-align: center;
  min-width: 140px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ── Install Box ──────────────────────────────────────────────────────────── */

.install-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.install-box p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.install-cmd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  max-width: 520px;
  margin: 0 auto;
}

.install-cmd code {
  color: var(--green);
  font-size: 0.85rem;
  user-select: all;
  white-space: nowrap;
}

.install-cmd button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.install-cmd button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.section {
  margin-bottom: 3rem;
}

.section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Chart ─────────────────────────────────────────────────────────────────── */

.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

/* ── Leaderboard ──────────────────────────────────────────────────────────── */

.leaderboard {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard th {
  text-align: left;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.leaderboard td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.leaderboard tr { transition: background 0.15s; }

.leaderboard tr:hover { background: var(--accent-dim); }

.rank { font-weight: 700; color: var(--text-muted); width: 40px; }

.rating-bar {
  display: inline-block;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.rating-value {
  font-weight: 700;
  font-size: 1rem;
}

.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--text-muted); }

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

/* ── Empty State ──────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.empty-state code {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin: 1.5rem auto;
  max-width: 500px;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

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

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  header h1 { font-size: 2.2rem; }
  .stats-bar { flex-direction: column; align-items: center; }
  .leaderboard { font-size: 0.8rem; }
}
