/* ============================================================
   MY STATS PAGE
   ============================================================ */

/* ── Phase breakdown chart ── */
.stats-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.phase-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.phase-stat-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.phase-stat-points {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.phase-stat-max {
  font-size: 0.75rem;
  color: var(--text-disabled);
}

/* ── Accuracy bars ── */
.accuracy-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
}

.accuracy-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: var(--sp-5);
}

.accuracy-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.accuracy-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  width: 160px;
  flex-shrink: 0;
}

.accuracy-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.accuracy-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--gold);
  transition: width 600ms ease;
}

.accuracy-bar-fill.green  { background: var(--green); }
.accuracy-bar-fill.neutral { background: var(--neutral); }

.accuracy-pct {
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  width: 44px;
  text-align: right;
}

/* ── Prediction history table ── */
.history-table-wrapper {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.history-table thead th {
  text-align: left;
  padding: var(--sp-2) var(--sp-4);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.history-table tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.history-table tbody tr:last-child td { border-bottom: none; }
.history-table tbody tr:hover td { background: var(--bg-surface-hover); }

.history-original {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.history-updated {
  font-weight: 600;
}

.history-original.had-update {
  text-decoration: line-through;
  opacity: 0.6;
}

.multiplier-badge {
  display: inline-block;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(245,166,35,0.15);
  color: var(--gold);
}

/* ── Summary row ── */
.stats-summary-row {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.stats-summary-item {
  flex: 1;
  min-width: 120px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  text-align: center;
}

.stats-summary-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.stats-summary-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--sp-1);
}
