.ps-stats-loading {
  display: flex;
  height: 16rem;
  align-items: center;
  justify-content: center;
}

.ps-stats-page {
  max-width: 56rem;
  margin-right: auto;
  margin-left: auto;
  padding: 1rem;
  animation: ps-stats-fade-in 0.3s ease forwards;
}

.ps-stats-empty-state {
  border: 2px dashed var(--ps-border);
  padding: 3rem;
  text-align: center;
}

.ps-stats-empty-state__icon {
  width: 4rem;
  height: 4rem;
  margin-right: auto;
  margin-bottom: 1rem;
  margin-left: auto;
  color: var(--ps-text-muted);
}

.ps-stats-empty-state__title {
  margin-bottom: 0.5rem;
  color: var(--ps-text-primary);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
}

.ps-stats-empty-state__description {
  margin-bottom: 1.5rem;
  color: var(--ps-text-secondary);
}

.ps-stats-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.ps-stats-summary__card {
  padding: 1rem;
}

.ps-stats-summary__label {
  margin-bottom: 0.25rem;
  color: var(--ps-text-secondary);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.ps-stats-summary__value {
  color: var(--ps-text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
}

.ps-stats-summary__value--best {
  color: var(--ps-primary);
}

.ps-stats-panel--trend {
  margin-bottom: 2rem;
}

.ps-stats-panel__header {
  padding: 1rem;
  border-bottom: 1px solid var(--ps-border);
}

.ps-stats-panel__title {
  color: var(--ps-text-primary);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 700;
}

.ps-stats-panel__description {
  color: var(--ps-text-secondary);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.ps-stats-panel__content {
  padding: 1rem;
}

.ps-stats-trend-chart {
  height: 20rem;
}

.ps-stats-distribution > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem;
}

.ps-stats-distribution__row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ps-stats-distribution__label {
  width: 6rem;
  color: var(--ps-text-secondary);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.ps-stats-distribution__track {
  height: 1rem;
  flex: 1 1 0%;
  overflow: hidden;
  border-radius: 9999px;
  background-color: var(--ps-bg-elevated);
}

.ps-stats-distribution__fill {
  height: 100%;
  border-radius: 9999px;
  transition-property: all;
  transition-duration: 500ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-stats-distribution__count {
  width: 3rem;
  color: var(--ps-text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: right;
}

@media (min-width: 768px) {
  .ps-stats-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@keyframes ps-stats-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
