/* ─ Statistics Page ─ */
.stats-page {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .stats-overview {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.stats-card-value {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stats-card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stats-card-label[data-tooltip] {
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

/* Genre chart */
.genre-chart {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.genre-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.genre-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.genre-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-counts {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.genre-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}

.genre-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

