:root {
  --ink: #0e1210;
  --panel: rgba(18, 28, 22, 0.72);
  --line: rgba(180, 255, 120, 0.14);
  --text: #e8f0e6;
  --muted: #8a9a8c;
  --signal: #b8ff4a;
  --live: #ff5a3c;
  --ok: #3dffa8;
  --warn: #ffc14a;
  --radius: 18px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(184, 255, 74, 0.16), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(61, 255, 168, 0.1), transparent 50%),
    linear-gradient(165deg, #101612 0%, #0a0d0b 45%, #121816 100%);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(184, 255, 74, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 255, 74, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  animation: rise 0.45s ease both;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #101610;
  background: linear-gradient(135deg, var(--signal), #6dffb0);
  box-shadow: 0 0 0 1px rgba(184,255,74,0.35), 0 10px 30px rgba(184,255,74,0.15);
}
.brand-name { margin: 0; font-weight: 700; font-size: 1.05rem; }
.brand-sub { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }

.btn-ghost, .btn-primary, .chip {
  font-family: inherit;
  border: 0;
  cursor: pointer;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
}
.btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  color: #101610;
  background: linear-gradient(135deg, var(--signal), #7dffc0);
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 20px;
}
.gate h1 { margin: 0 0 8px; font-size: 1.45rem; }
.gate p { margin: 0; color: var(--muted); line-height: 1.45; }

.loader {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 48px 0;
  color: var(--muted);
}
.pulse {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(184,255,74,0.25);
  border-top-color: var(--signal);
  animation: spin 0.8s linear infinite;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  animation: rise 0.5s ease both;
}
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.85rem;
}
.chip.active {
  color: var(--ink);
  background: var(--signal);
  font-weight: 600;
}

.list { display: grid; gap: 12px; }

.match {
  width: 100%;
  text-align: left;
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 40, 32, 0.9), rgba(16, 22, 18, 0.85));
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
  animation: rise 0.55s ease both;
}
.match:active { transform: scale(0.985); }
.match:hover { border-color: rgba(184,255,74,0.35); }

.match-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.live { background: rgba(255,90,60,0.18); color: #ff8a74; }
.badge.upcoming { background: rgba(184,255,74,0.12); color: var(--signal); }

.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.team { font-weight: 700; font-size: 1rem; }
.team.right { text-align: right; }
.vs {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(255,255,255,0.06);
  margin-bottom: 8px;
}
.bar > span:first-child { background: var(--signal); }
.bar > span:last-child { background: rgba(255,255,255,0.22); }

.pick-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}
.pick-line strong { color: var(--ok); font-weight: 600; }

.detail { animation: rise 0.35s ease both; }
.detail .back {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  margin-bottom: 12px;
  cursor: pointer;
  padding: 0;
}
.detail h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.detail .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.probs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.prob {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(0,0,0,0.2);
}
.prob .name { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.prob .pct {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 500;
}
.prob.fav { border-color: rgba(184,255,74,0.4); }
.summary {
  margin: 0 0 16px;
  line-height: 1.45;
  color: var(--text);
}
.factors { display: grid; gap: 8px; }
.factor {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}
.factor .row { display: flex; justify-content: space-between; gap: 8px; }
.factor .label { font-weight: 600; font-size: 0.9rem; }
.factor .detail-text { color: var(--muted); font-size: 0.8rem; font-family: var(--mono); }

.foot {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.75rem;
  font-family: var(--mono);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 380px) {
  .team { font-size: 0.92rem; }
}
