/* ═══════════════════════════════════════════════════════════
   VOLLEY — History Page Styles  (history.css)
   Standalone history.html — uses same design tokens as site
   ═══════════════════════════════════════════════════════════ */

/* ── Page shell ─────────────────────────────────────────── */
.page-history {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

/* ── Background glow ─────────────────────────────────────── */
.hist-page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hist-page-glow {
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(200,241,53,0.08) 0%,
    rgba(200,241,53,0.03) 45%,
    transparent 70%);
  animation: float 4s ease-in-out infinite;
}

/* ── Main layout ────────────────────────────────────────── */
.hist-page-main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 28px 120px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ── Page header ────────────────────────────────────────── */
.hist-page-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  animation: fadeInUp 0.7s 0.1s both;
}

.hist-page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: var(--lime-muted);
  border: 1px solid var(--lime-border);
  border-radius: var(--r-pill);
  color: var(--lime);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  width: fit-content;
}

.hist-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2s ease-in-out infinite;
}

.hist-page-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 900;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  line-height: 0.88;
  color: var(--ghost);
}

.hist-page-sub {
  font-size: var(--text-lg);
  color: var(--ghost-2);
  font-weight: 300;
}

/* ── Stats bar ──────────────────────────────────────────── */
.hist-stats {
  display: flex;
  align-items: stretch;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.6s 0.2s both;
}

.hist-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 28px 36px;
  flex: 1;
}

.hist-stat-val {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--lime);
  line-height: 1;
  letter-spacing: 0.02em;
}

.hist-stat-lbl {
  font-size: var(--text-xs);
  color: var(--grey);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hist-stat-div {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 20px 0;
  flex-shrink: 0;
}

/* Hidden state (no data) */
.hist-stats.hidden,
.hist-controls.hidden,
.hist-page-cta.hidden { display: none !important; }

/* ── Controls ───────────────────────────────────────────── */
.hist-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s 0.3s both;
}

.hist-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hist-filter {
  padding: 7px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--ghost-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.15s var(--ease-spring);
}
.hist-filter:hover {
  border-color: var(--lime-border);
  color: var(--lime);
  background: var(--lime-muted);
  transform: scale(1.03);
}
.hist-filter.active {
  background: var(--lime-muted);
  border-color: var(--lime-border);
  color: var(--lime);
}

.hist-clear-btn {
  flex-shrink: 0;
  color: var(--grey);
  border-color: rgba(255,255,255,0.08);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
}
.hist-clear-btn:hover {
  color: var(--error);
  border-color: rgba(255,77,77,0.28);
  background: var(--error-muted);
  transform: none;
}

/* ── Empty states ───────────────────────────────────────── */
.hist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 100px 24px;
  border: 1px dashed rgba(255,255,255,0.07);
  border-radius: var(--r-xl);
  opacity: 0;
  animation: fadeInUp 0.6s 0.25s both;
}

.hist-empty-icon {
  font-size: 44px;
  margin-bottom: 20px;
  opacity: 0.35;
  display: block;
}

.hist-empty-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 900;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--ghost-2);
  margin-bottom: 8px;
}

.hist-empty-sub {
  font-size: var(--text-sm);
  color: var(--grey);
  font-weight: 300;
  max-width: 300px;
  line-height: 1.6;
}

/* ── Cards grid ─────────────────────────────────────────── */
.hist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  opacity: 0;
  animation: fadeInUp 0.5s 0.35s both;
}

/* Individual card */
.sess-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
  cursor: default;
  opacity: 0;
  transform: translateY(12px);
  animation: sessCardIn 0.4s var(--ease-out) both;
}
@keyframes sessCardIn { to { opacity: 1; transform: none; } }

.sess-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--lime);
  opacity: 0;
  transition: opacity 0.2s;
}
.sess-card:hover {
  border-color: var(--lime-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.sess-card:hover::after { opacity: 0.55; }

.sess-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sess-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--lime-muted);
  border: 1px solid var(--lime-border);
  border-radius: var(--r-pill);
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sess-date {
  font-size: var(--text-xs);
  color: var(--grey);
  white-space: nowrap;
}

.sess-topic {
  font-family: var(--font-reel);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--ghost);
  line-height: 1.4;
  flex: 1;
}

.sess-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sess-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sess-diff {
  font-size: var(--text-xs);
  color: var(--ghost-2);
  font-weight: 500;
}

.sess-dur {
  font-size: var(--text-xs);
  color: var(--grey);
}

.sess-dot {
  font-size: 9px;
  color: var(--border-strong);
  line-height: 1;
}

.sess-stars {
  display: flex;
  gap: 2px;
  line-height: 1;
}
.sess-star {
  font-size: 12px;
  color: var(--surface-4);
}
.sess-star.on { color: var(--lime); }

.sess-unrated {
  font-size: var(--text-xs);
  color: var(--grey-muted);
  font-style: italic;
}

/* ── Bottom CTA ─────────────────────────────────────────── */
.hist-page-cta {
  display: flex;
  justify-content: center;
  padding-top: 8px;
  opacity: 0;
  animation: fadeInUp 0.5s 0.45s both;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hist-page-main { padding: 52px 20px 80px; gap: 28px; }
  .hist-stat { padding: 20px 22px; }
  .hist-stat-val { font-size: var(--text-2xl); }
}

@media (max-width: 600px) {
  .hist-grid { grid-template-columns: 1fr; }
  .hist-stats { flex-direction: column; }
  .hist-stat-div { width: 100%; height: 1px; margin: 0; }
  .hist-stat { flex-direction: row; justify-content: space-between; width: 100%; padding: 14px 20px; }
  .hist-controls { flex-direction: column; align-items: flex-start; }
  .hist-filter { padding: 6px 12px; font-size: 10px; }
}
