/* Predictions HUD theme: loaded only on /predictions pages (body.pred-hud). */
/* Light variant (default) and dark variant, both from html[data-theme]. */
body.pred-hud {
  --bg: #eef3fb; --surface: #ffffff; --surface-2: #f3f7fd; --surface-3: #e6eef9; --border: rgba(30,90,160,.22);
  --text: #0c1830; --muted: #4b5d78; --accent: #0891b2; --line: rgba(30,90,160,.18);
  --hud-strong: #06101f; --hud-link: #0369a1; --hud-head: rgba(238,243,251,.94); --hud-glow: rgba(8,145,178,.28);
  --hud-card: linear-gradient(160deg, #ffffff, #eef4fc); --hud-panel: rgba(12,40,80,.05); --hud-ring: rgba(12,40,80,.1);
  --hud-btn: #075985; --hud-rg-bg: #fff6e0; --hud-rg-text: #6b4a00; --hud-input: #ffffff; --hud-grid: rgba(8,145,178,.07);
  color-scheme: light; color: var(--text); --hud-flash: 1.15;
  background: radial-gradient(1200px 600px at 50% -10%, var(--hud-glow), transparent 60%),
    linear-gradient(var(--hud-grid) 1px, transparent 1px) 0 0 / 100% 28px, var(--bg);
}
[data-theme='dark'] body.pred-hud {
  --bg: #05070f; --surface: #0b1020; --surface-2: #10172b; --surface-3: #172040; --border: rgba(120,200,255,.18);
  --text: #e8f1ff; --muted: #9fb2cf; --accent: #22d3ee; --line: rgba(120,200,255,.18);
  --hud-strong: #ffffff; --hud-link: #7de8ff; --hud-head: rgba(5,7,15,.92); --hud-glow: rgba(34,211,238,.14);
  --hud-card: linear-gradient(160deg, rgba(16,23,43,.95), rgba(8,12,24,.95)); --hud-panel: rgba(0,0,0,.35); --hud-ring: rgba(255,255,255,.08);
  --hud-btn: #c9f6ff; --hud-rg-bg: rgba(255,200,80,.07); --hud-rg-text: #ffe7b0; --hud-input: #0b1020; --hud-grid: rgba(34,211,238,.05);
  color-scheme: dark;
}
body.pred-hud .site-header { background: var(--hud-head); border-bottom-color: var(--border); }
body.pred-hud a { color: var(--hud-link); }
body.pred-hud .page-title { color: var(--hud-strong); text-shadow: 0 0 18px rgba(34,211,238,.45); }
body.pred-hud .eyebrow { color: var(--accent); letter-spacing: .18em; }
body.pred-hud .page-sub, body.pred-hud .pred-when, body.pred-hud small { color: var(--muted); }
body.pred-hud .rg-note { border: 1px solid rgba(255,200,80,.45); background: var(--hud-rg-bg); color: var(--hud-rg-text); padding: 12px 14px; border-radius: 12px; }
body.pred-hud .btn--primary { background: linear-gradient(90deg,#22d3ee,#a855f7); color: #05070f; border: 0; font-weight: 700; box-shadow: 0 0 18px rgba(34,211,238,.35); }
body.pred-hud .header-search-input, body.pred-hud .header-search-list { background: var(--hud-input); color: var(--text); }

/* Cards */
.pred-hud .pred-card, .pred-hud .pred-mini {
  position: relative; background: var(--hud-card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 0 0 0 transparent; color: var(--text);
  transition: box-shadow .4s ease, border-color .4s ease;
}
.pred-hud .pred-card::before, .pred-hud .pred-mini::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 16px 0 0 16px; background: linear-gradient(var(--ac, #ff3d7f), var(--hc, #22d3ee)); }
.pred-hud .pred-card h3, .pred-hud .pred-card h3 a { color: var(--hud-strong); }
.pred-hud .pred-bar { background: var(--hc, #22d3ee); box-shadow: 0 0 10px color-mix(in srgb, var(--hc, #22d3ee) 60%, transparent); }
.pred-hud .pred-bar i { background: var(--ac, #ff3d7f); }
.pred-hud .pred-mini-row.is-pick b { color: var(--hud-strong); text-shadow: 0 0 10px rgba(34,211,238,.8); }
.pred-hud .pred-final:not(.hud-card), .pred-hud .pred-started:not(.hud-card) { opacity: .7; }

.hud-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0 6px; }
.hud-team { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.hud-name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.hud-proj { font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.hud-team.is-pick .hud-proj { color: var(--hud-strong); }
.hud-vs { font: 800 12px/1 ui-monospace, monospace; letter-spacing: .2em; color: var(--muted); }
.hud-ring { position: relative; width: 76px; height: 76px; display: block; }
.hud-ring svg { width: 76px; height: 76px; transform: rotate(-90deg); display: block; }
.hud-ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--hud-ring); }
.ring-fg { stroke-linecap: round; stroke-dasharray: calc(var(--p) * 1px) 100px; transition: stroke-dasharray .08s linear; animation: ring-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
.hud-ring--away .ring-fg { stroke: var(--ac, #ff3d7f); filter: drop-shadow(0 0 4px var(--ac, #ff3d7f)); }
.hud-ring--home .ring-fg { stroke: var(--hc, #22d3ee); filter: drop-shadow(0 0 4px var(--hc, #22d3ee)); }
.ring-val { position: absolute; inset: 0; display: grid; place-items: center; font: 700 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--hud-strong); }
@keyframes ring-in { from { stroke-dasharray: 0px 100px; } }

.hud-sim { position: relative; height: 110px; margin: 10px 0 4px; border-radius: 10px; background: var(--hud-panel); border: 1px solid var(--border); overflow: hidden; }
.hud-hist { color: var(--hud-strong); display: block; width: 100%; height: 110px; }
.hud-hist-hint { position: absolute; top: 6px; left: 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.hud-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hud-run { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #22d3ee; background: rgba(34,211,238,.12); color: var(--hud-btn); font: 700 15px/1 system-ui, sans-serif; letter-spacing: .04em; cursor: pointer; box-shadow: 0 0 14px rgba(34,211,238,.25); }
.hud-run:hover:not(:disabled) { background: rgba(34,211,238,.24); }
.hud-run:disabled { opacity: .55; cursor: default; }
.hud-out { flex: 1 1 180px; height: 5.2em; overflow: hidden; margin: 0 !important; font: 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.hud-out strong { color: var(--hud-strong); }
.hud-whatif { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 6px; }
.hud-whatif summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--hud-btn); font-weight: 600; }
.hud-whatif-body { display: grid; gap: 10px; padding-bottom: 6px; }
.hud-slider { display: grid; gap: 4px; font-size: 14px; }
.hud-slider span { display: flex; justify-content: space-between; }
.hud-slider input { width: 100%; min-height: 44px; accent-color: #22d3ee; }
.hud-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.hud-toggle input { width: 22px; height: 22px; accent-color: #22d3ee; }
.hud-small { font-size: 13px; color: var(--muted); margin: 0; }
.hud-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(11,16,32,.8); }
.hud-slate { background: linear-gradient(90deg, rgba(34,211,238,.25), rgba(168,85,247,.25)); }

/* Winner reveal */
.pred-card.is-running { border-color: rgba(34,211,238,.5); }
.pred-card.reveal-home { border-color: var(--hc); box-shadow: 0 0 0 1px var(--hc), 0 0 28px -4px var(--hc); }
.pred-card.reveal-away { border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac), 0 0 28px -4px var(--ac); }
.pred-card.reveal-home .hud-team:last-child .hud-name, .pred-card.reveal-away .hud-team:first-child .hud-name { animation: win-pop .6s ease both; text-shadow: 0 0 12px currentColor; }
@keyframes win-pop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

@media (max-width: 480px) {
  .hud-ring, .hud-ring svg { width: 68px; height: 68px; }
  .ring-val { font-size: 15px; }
  .hud-proj { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ring-fg, .pred-card.reveal-home .hud-team .hud-name, .pred-card.reveal-away .hud-team .hud-name { animation: none !important; transition: none !important; }
  .pred-hud .pred-card, .pred-hud .pred-mini { transition: none; }
}

.pred-hud .hud-run { min-width: 9.5em; }
.pred-hud .hud-slate { min-width: 15em; }
.hud-play { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--hud-panel); border: 1px solid var(--border); }
.hud-play-h { margin: 0 0 4px !important; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hud-tick { height: 7.8em; overflow-y: auto; margin: 0; padding: 0; list-style: none; font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--hud-btn); }
.hud-tick li { margin: 0; animation: tick-in .3s ease both; }
@keyframes tick-in { from { opacity: 0; transform: translateX(-6px); } }
.is-running .hud-hist { filter: drop-shadow(0 0 6px rgba(34,211,238,.5)); }
.pred-card.reveal-home, .pred-card.reveal-away { animation: reveal-flash .9s ease both; }
@keyframes reveal-flash { 0% { filter: brightness(var(--hud-flash, 1.8)) saturate(1.4); } 100% { filter: none; } }
.hud-out strong { display: inline-block; transform-origin: left center; animation: win-pop .6s ease both; }
@media (prefers-reduced-motion: reduce) { .hud-tick li, .pred-card.reveal-home, .pred-card.reveal-away, .hud-out strong { animation: none !important; } }
