:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1d212a;
  --line: #272c37;
  --ink: #f3f5f8;
  --muted: #9aa3b2;
  --accent: #f97316;       /* basketball orange */
  --accent-2: #fb923c;
  --green: #4ade80;
  --red: #f87171;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(249,115,22,.10), transparent 60%), var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 24px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark { font-size: 2rem; filter: drop-shadow(0 4px 10px rgba(249,115,22,.4)); }
.brand__title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.brand__sub { font-size: .85rem; color: var(--muted); }
.topbar__right { display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--green); background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.25); padding: 5px 11px; border-radius: 999px; }
.live--paused { color: var(--muted); background: rgba(154,163,178,.1); border-color: rgba(154,163,178,.25); }
.live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.4s ease-in-out infinite; }
.live--paused .live__dot { background: var(--muted); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.btn { font-family: inherit; font-weight: 600; font-size: .88rem; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; transition: all .15s ease; }
.btn:hover { border-color: #3a4150; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #1a1206; }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

.demo-banner { max-width: 1180px; margin: 0 auto; padding: 10px 24px; font-size: .85rem; color: var(--muted); }
.demo-banner strong { color: var(--ink); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 16px 24px 48px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat__num { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.stat__label { font-size: .8rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.section-h { font-size: 1rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }

.machines { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.machine { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .2s ease, transform .2s ease; position: relative; overflow: hidden; }
.machine__flash { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.machine.make .machine__flash { background: radial-gradient(circle at 50% 0%, rgba(74,222,128,.25), transparent 70%); animation: flash .5s ease-out; }
.machine.miss .machine__flash { background: radial-gradient(circle at 50% 0%, rgba(248,113,113,.18), transparent 70%); animation: flash .5s ease-out; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.machine__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.machine__name { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.machine__id { font-size: .7rem; color: var(--accent); font-weight: 700; }
.machine__shooter { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #1a1206; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex-shrink: 0; }
.machine__player { font-weight: 600; font-size: .98rem; }
.machine__stat-line { font-size: .78rem; color: var(--muted); }
.machine__pct { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.machine__bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 10px; }
.machine__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s ease; }

.board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board__row { display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); transition: background .3s ease; }
.board__row:last-child { border-bottom: 0; }
.board__row.top { background: linear-gradient(90deg, rgba(249,115,22,.08), transparent); }
.board__rank { font-weight: 800; color: var(--muted); text-align: center; }
.board__row.top .board__rank { color: var(--accent); }
.board__name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.board__pts { font-weight: 800; }
.board__pct { font-size: .82rem; color: var(--muted); min-width: 48px; text-align: right; }

.foot { max-width: 1180px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .machines { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
