:root {
  --bg: #0f1115;
  --bg-card: #171a21;
  --bg-card-2: #1e222b;
  --border: #2a2f3a;
  --text: #e8eaed;
  --text-dim: #9aa0ac;
  --accent: #ffb300;
  --accent-2: #ff7043;
  --win: #4caf50;
  --lose: #ef5350;
  --void: #9aa0ac;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top, #171a24 0%, #0b0d11 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  padding-bottom: 60px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(120deg, #3a0d1f, #0f1115 70%);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
  gap: 8px;
}
header.topbar .brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}
header.topbar .brand .footy { display: inline-block; animation: bounce 2.2s infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(-8deg); }
}
nav.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
nav.tabs a, nav.tabs span.disabled {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
nav.tabs a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
nav.tabs a.active { background: var(--accent); color: #1a1200; border-color: var(--accent); font-weight: 700; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2, .card h3 { margin-top: 0; }
.muted { color: var(--text-dim); font-size: 0.88rem; }
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pill.open { background: #1c3a24; color: var(--win); }
.pill.locked { background: #3a2a10; color: var(--accent); }
.pill.resolved { background: #17304a; color: #64b5f6; }
.pill.void { background: #2a2a2a; color: var(--void); }

.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #1a1200;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.danger { background: var(--lose); color: #2a0000; }
.btn.small { padding: 5px 11px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

input[type=text], input[type=password], input[type=number], input[type=datetime-local], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
  font-size: 1rem;
  margin: 6px 0 14px;
}
label { font-weight: 600; font-size: 0.9rem; color: var(--text-dim); }
form.inline { display: inline; }

.market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.market-row:last-child { border-bottom: none; }
.market-row .label { font-weight: 600; }

table { width: 100%; border-collapse: collapse; margin: 10px 0; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--text-dim); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.4px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.9rem; }
.flash.error { background: #3a1414; color: #ff8a80; border: 1px solid #ff8a80; }
.flash.ok { background: #133a1e; color: #a5d6a7; border: 1px solid #a5d6a7; }

.amount.win { color: var(--win); font-weight: 700; }
.amount.lose { color: var(--lose); font-weight: 700; }
.amount.void { color: var(--void); font-weight: 700; }

.team-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.confetti { font-size: 1.4rem; }

.lock-banner {
  background: linear-gradient(90deg, #2a1a06, #3a0d1f);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-weight: 600;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
  header.topbar { flex-direction: column; align-items: flex-start; }
}
.disclaimer {
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px dashed var(--border);
  margin-top: 20px;
  padding-top: 12px;
  font-style: italic;
}
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--bg-card-2);
}
.choice-option input { width: auto; margin: 0; }
.choice-option:has(input:checked) { border-color: var(--accent); background: #241d0d; }
