/* BigPool UI refresh — match history (/history). */
.history-page { max-width: 820px; }
.hx-header { margin-bottom: 18px; }
.hx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- Summary strip ---------- */
.hx-summary { position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; padding: 14px 6px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.07); background: radial-gradient(120% 140% at 100% 0%, rgba(217,180,93,0.10), transparent 55%), linear-gradient(160deg, #111712, #0b0f0c); box-shadow: 0 24px 60px -40px rgba(0,0,0,0.9); }
.hx-summary::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(217,180,93,0.6) 30%, rgba(104,211,145,0.5) 70%, transparent); }
.hx-summary > div { display: grid; align-content: start; gap: 4px; padding: 0 14px; min-width: 0; }
.hx-summary > div + div { border-left: 1px solid rgba(255,255,255,0.07); }
.hx-summary span { color: var(--muted); font: 800 10px var(--font-heading); letter-spacing: 1.4px; text-transform: uppercase; }
.hx-summary b { font: 900 28px/1 BigPoolDisplay, var(--font-heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-summary b em { font-style: normal; }
.hx-summary b small { font-size: 0.6em; color: var(--muted); margin-left: 1px; }
.hx-summary > div > small { color: #66716b; font-size: 11px; }
.hx-summary .up { color: var(--gold); }
.hx-summary .down { color: var(--text-soft); }
.hx-summary .is-hot b { text-shadow: 0 0 22px rgba(217,180,93,0.45); }
.hx-form { display: flex; gap: 4px; margin-top: 2px; }
.hx-form i { width: 8px; height: 8px; border-radius: 50%; background: rgba(240,125,115,0.55); }
.hx-form i.is-win { background: var(--gold); box-shadow: 0 0 6px rgba(217,180,93,0.6); }

/* ---------- Result cards ---------- */
.hx-list { display: grid; gap: 8px; }
.hx-card { position: relative; width: 100%; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.06); background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012)); color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; overflow: hidden; transition: border-color .18s, background .18s, transform .18s; }
.hx-card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: rgba(255,255,255,0.12); }
.hx-card.is-win { background: linear-gradient(90deg, rgba(217,180,93,0.08), rgba(255,255,255,0.012) 55%); border-color: rgba(217,180,93,0.16); }
.hx-card.is-win::before { background: var(--gold); box-shadow: 0 0 10px rgba(217,180,93,0.7); }
.hx-card.is-loss::before { background: rgba(240,125,115,0.55); }
.hx-card:hover { border-color: rgba(104,211,145,0.32); transform: translateY(-1px); }
.hx-card.is-win:hover { border-color: rgba(217,180,93,0.4); }

.hx-badge { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; font: 900 15px/1 BigPoolDisplay, var(--font-heading); }
.hx-badge.is-win { color: #2b1d04; background: linear-gradient(180deg, #ffe39a, var(--gold)); box-shadow: 0 6px 16px -6px rgba(217,180,93,0.7); }
.hx-badge.is-loss { color: #f3a49c; background: rgba(240,125,115,0.12); border: 1px solid rgba(240,125,115,0.25); }
.hx-badge.is-void { color: var(--muted); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.hx-card .avatar { width: 40px; height: 40px; }
.hx-vault-avatar { color: #f5f7f5; background: radial-gradient(circle at 35% 30%, #2b302d, #070908 70%); border-color: rgba(217,180,93,0.3); font: 900 15px BigPoolDisplay, var(--font-heading); }

.hx-main { display: grid; gap: 5px; min-width: 0; }
.hx-main > strong { font: 800 15px var(--font-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-meta { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.hx-meta time { overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.hx-chip { flex: none; display: inline-flex; align-items: center; height: 19px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: var(--text-soft); font: 800 9.5px var(--font-heading); letter-spacing: 1px; text-transform: uppercase; }
.hx-money { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--text-soft); font: 800 12px var(--font-heading); font-variant-numeric: tabular-nums; }
.hx-money .coin { width: 15px; height: 15px; font-size: 8px; box-shadow: none; }
.hx-money.is-prize { color: var(--gold); }

.hx-side { display: grid; justify-items: end; gap: 4px; }
.hx-score { display: inline-flex; align-items: baseline; gap: 4px; font: 900 22px/1 BigPoolDisplay, var(--font-heading); font-variant-numeric: tabular-nums; }
.hx-score i { font-style: normal; color: var(--muted); font-size: 0.7em; }
.is-win .hx-score { color: var(--gold); }
.hx-delta, .hx-side small { color: var(--muted); font: 800 11px var(--font-heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-delta.up { color: var(--green-bright); }
.hx-delta.down { color: var(--red); }
.hx-net { font: 900 18px/1 BigPoolDisplay, var(--font-heading); font-variant-numeric: tabular-nums; }
.hx-net.up { color: var(--green-bright); } .hx-net.down { color: var(--red); }

.history-page .pagination { margin-top: 14px; }

@media (max-width: 720px) {
  .hx-summary { padding: 12px 2px; border-radius: 16px; margin-bottom: 14px; }
  .hx-summary > div { padding: 0 10px; }
  .hx-summary b { font-size: 23px; }
  .hx-card { gap: 10px; padding: 10px 12px 10px 10px; border-radius: 14px; }
  .hx-badge { width: 26px; height: 26px; border-radius: 9px; font-size: 13px; }
  .hx-card .avatar { width: 36px; height: 36px; font-size: 11px; }
  .hx-main > strong { font-size: 14px; }
  .hx-meta { gap: 6px; font-size: 11px; }
  .hx-score { font-size: 20px; }
  .hx-side small { font-size: 10px; }
}
@media (max-width: 400px) {
  /* Keep the row to one line of meta: the date gives way first. */
  .hx-card:has(.hx-money) .hx-meta time { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-card { transition: none; }
  .hx-card:hover { transform: none; }
}
