/* World Cup 2026 Predictions - sleek modern sportsbook theme */
:root {
  --bg: #090c12;
  --bg-2: #0e131c;
  --surface: #141a24;
  --surface-2: #1a212d;
  --surface-3: #212a38;
  --border: #232c3a;
  --border-2: #2f3a4c;
  --text: #eef2f8;
  --muted: #8d97a8;
  --muted-2: #606b7e;
  --accent: #1fd98a;
  --accent-grad: linear-gradient(135deg, #25e08f 0%, #12b6cf 100%);
  --gold: #f4c044;
  --good: #1fd98a;
  --warn: #f0b53a;
  --bad: #f0625f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px -10px rgba(0,0,0,.55);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.28);
  --ring: 0 0 0 3px rgba(31,217,138,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55; min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(31,217,138,.10), transparent 60%),
    radial-gradient(900px 520px at -5% -5%, rgba(18,182,207,.09), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, .group-title, .bracket-round { font-family: 'Outfit', 'Inter', sans-serif; }

/* Header */
header {
  display: flex; align-items: center; gap: 16px; padding: 14px 22px;
  background: linear-gradient(180deg, rgba(20,26,36,.94), rgba(14,18,27,.80));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
header h1 { font-size: 19px; margin: 0; font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 9px; }
header h1::before { content: "\01F3C6"; font-size: 20px; filter: drop-shadow(0 2px 6px rgba(244,192,68,.5)); }
header .spacer { flex: 1; }
header .who { color: var(--muted); font-size: 13.5px; font-weight: 500; }

/* Nav */
nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 22px; background: rgba(14,18,27,.5); border-bottom: 1px solid var(--border); }
nav button {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 7px 15px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  transition: color .15s, background .15s, box-shadow .15s;
}
nav button:hover { color: var(--text); background: var(--surface-2); }
nav button.active { color: #04130c; font-weight: 600; background: var(--accent-grad); box-shadow: 0 4px 14px -4px rgba(31,217,138,.6); }

main { max-width: 960px; margin: 0 auto; padding: 24px 20px 64px; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.group-title { font-weight: 700; margin: 0 0 12px; font-size: 15.5px; letter-spacing: .2px; display: flex; align-items: center; gap: 9px; }
.group-title::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--accent-grad); display: inline-block; }

/* Match rows */
.match { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.match:last-child { border-bottom: none; }
.match .team { flex: 1; font-weight: 500; font-size: 14px; }
.match .team.home { text-align: right; }
.match .team.away { text-align: left; }
.match input[type=number] {
  width: 46px; padding: 7px; text-align: center; background: var(--bg-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; font-weight: 600; transition: border-color .15s, box-shadow .15s;
}
.match input[type=number]:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.match input:disabled { opacity: .5; }
.match .sep { color: var(--muted-2); font-size: 12px; }
.match .meta { width: 116px; font-size: 11.5px; color: var(--muted); text-align: center; }

/* Badges */
.badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 600; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }
.badge.locked { color: var(--warn); border-color: rgba(240,181,58,.3); background: rgba(240,181,58,.08); }
.badge.pts { color: var(--good); background: rgba(31,217,138,.12); border-color: rgba(31,217,138,.25); }

/* Buttons */
button.primary {
  background: var(--accent-grad); color: #04130c; border: none; padding: 10px 18px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 18px -6px rgba(31,217,138,.6); transition: transform .12s, filter .15s;
}
button.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
button.primary:active { transform: translateY(0); }
button.ghost {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2);
  padding: 8px 15px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500;
  transition: border-color .15s, color .15s;
}
button.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--surface-3); color: var(--text); padding: 12px 20px; border-radius: 12px;
  border: 1px solid var(--border-2); box-shadow: var(--shadow);
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; font-weight: 500; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast::before { content: "\2713  "; color: var(--good); font-weight: 700; }
.toast.err { border-color: rgba(240,98,95,.4); }
.toast.err::before { content: "\26A0  "; color: var(--bad); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody tr:last-child td { border-bottom: none; }

/* Login */
.login { max-width: 360px; margin: 72px auto; }
.login h1 { font-size: 24px; margin: 0 0 6px; }
.login input, .login select {
  width: 100%; padding: 12px; margin: 8px 0; background: var(--bg-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); color: var(--text); font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.login input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

.muted { color: var(--muted); }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.pill-list { display: flex; flex-direction: column; gap: 7px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pick .idx {
  color: var(--accent); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: rgba(31,217,138,.1); border-radius: 6px; flex: 0 0 auto;
}
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--bg) 45%); padding: 16px 0 10px; display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
select.adv, input.adv {
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  color: var(--text); padding: 8px 10px; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
select.adv:focus, input.adv:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
small.hint { color: var(--muted); display: block; margin-top: 6px; font-size: 12.5px; }

/* Knockout bracket */
.bracket { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 14px; align-items: stretch; }
.bracket-col { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 200px; }
.bracket-round { font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: 1px; padding-bottom: 4px; }
.tie {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px;
  box-shadow: var(--shadow-sm); transition: border-color .15s;
}
.tie:hover { border-color: var(--border-2); }
.tie-code { font-size: 10px; color: var(--muted-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tie-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 13px; }
.tie-team { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tie-team.win { font-weight: 700; color: var(--good); }
.tie-score { width: 42px; padding: 5px; text-align: center; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 7px; color: var(--text); font-weight: 600; }
.tie-score:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.tie-score-static { width: 20px; text-align: center; color: var(--muted); font-weight: 600; }
.tie .adv { margin-top: 8px; width: 100%; font-size: 12px; }
.tie-pred { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* All picks (everyone's predictions) */
.ap-match { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.card .ap-match:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 4px 0 4px 10px; font-size: 13px; }
.ap-name { min-width: 96px; color: var(--muted); font-weight: 500; }
.ap-score { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Scrollbars */
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Scorer badges */
.badge.gb { color: #3a2c04; background: var(--gold); border-color: var(--gold); }
.badge.top5 { color: #04130c; background: rgba(31,217,138,.22); border-color: rgba(31,217,138,.4); }
