/* ==========================================================================
   history.css — pages/history.html (Continue Playing, Most Played, and the
   full chronological play log — all sourced from localStorage)
   ========================================================================== */

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.history-header__title {
  font-size: var(--fs-2xl);
}

.history-header__subtitle {
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  max-width: 60ch;
}

.history-section {
  margin-bottom: var(--space-8);
}

.history-section__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-1);
}

.history-section__subtitle {
  font-size: var(--fs-sm);
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

/* ---------------------------------------------------------------------
   Full chronological history log
   --------------------------------------------------------------------- */
.history-list {
  display: flex;
  flex-direction: column;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-border);
  font-size: var(--fs-sm);
}

.history-list li:last-child {
  border-bottom: none;
}

.history-row__title {
  color: var(--color-text);
  font-weight: var(--fw-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row__title:hover {
  color: var(--color-accent);
}

.history-row__category {
  color: var(--color-secondary);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.history-row__time {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 560px) {
  .history-row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .history-row__time {
    text-align: left;
  }
}

/* ---------------------------------------------------------------------
   Small inline empty states per section (distinct from the full-page
   .empty-state used elsewhere, since these are compact and mid-page)
   --------------------------------------------------------------------- */
.history-empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-faint);
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
}
