:root {
  --bg: #0b1420;
  --card: #121f30;
  --line: #1f3550;
  --text: #e8f1fa;
  --dim: #8fa8c2;
  --ice: #5ec5e8;
  --good: #4ade80;
  --bad: #f87171;
}
* { box-sizing: border-box; margin: 0; }
body {
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  max-width: 760px; margin: 0 auto; padding: 16px;
}
header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
h1 { font-size: 22px; }
h2 { font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.hidden { display: none !important; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
label { display: block; margin-bottom: 10px; color: var(--dim); font-size: 13px; }
input, select {
  width: 100%; padding: 9px 11px; margin-top: 4px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
}
.row { display: flex; gap: 8px; margin-bottom: 10px; }
.row input { margin-top: 0; }
button {
  padding: 9px 14px; border: 0; border-radius: 8px; font-weight: 600; font-size: 14px;
  background: var(--ice); color: #06121c; cursor: pointer; white-space: nowrap;
}
button:disabled { opacity: .35; cursor: default; }
.bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.bar select { width: auto; flex: 1; margin-top: 0; }
.chip { font-size: 12px; color: var(--ice); border: 1px solid var(--line); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.league-title { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 18px; margin: -4px 0 12px; }
.deadline { font-size: 13px; color: var(--dim); margin-bottom: 10px; }
.deadline b { color: var(--ice); }
.countdown { font-family: ui-monospace, Consolas, monospace; color: var(--ice); font-weight: 700; }
.mypick { margin-bottom: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.minilogo { width: 22px; height: 22px; vertical-align: middle; }
.dim { color: var(--dim); font-weight: 400; }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.game { border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13px; }
.game .teams { display: flex; gap: 6px; margin-top: 8px; }
.game .when { color: var(--dim); font-size: 12px; }
.game .when b { color: var(--text); }
.at { align-self: center; color: var(--dim); font-size: 12px; }
button.team {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
}
button.team img { width: 40px; height: 40px; }
button.team:not(:disabled):hover { border-color: var(--ice); }
button.team.picked { background: rgba(94,197,232,.16); border-color: var(--ice); box-shadow: 0 0 0 1px var(--ice); color: var(--ice); }
button.team.used { opacity: .3; }
button.team.used span { text-decoration: line-through; }
button.team.dimmed img { filter: grayscale(1); opacity: .5; }
.badge {
  display: inline-block; min-width: 20px; text-align: center; border-radius: 5px;
  font-size: 12px; font-weight: 800; padding: 1px 5px; background: var(--line); color: var(--dim);
}
.badge.win { background: rgba(74,222,128,.15); color: var(--good); }
.badge.loss { background: rgba(248,113,113,.15); color: var(--bad); }
.pickteam { display: flex; align-items: center; gap: 6px; }
.pickteam img { width: 20px; height: 20px; }
.recap-btn { margin-top: 12px; width: 100%; }
tr.leader td { color: var(--ice); font-weight: 700; }
tr.me td { background: rgba(94,197,232,.06); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
label.check input { width: auto; margin: 0; }
.members { margin: 12px 0 4px; }
.member-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.member-row:last-child { border-bottom: 0; }
.member-row button { background: transparent; color: var(--bad); border: 1px solid var(--line); padding: 3px 10px; font-size: 12px; }
.override { margin-top: 10px; }
.override select { flex: 1; margin-top: 0; }
.override input { flex: 0 0 110px; text-transform: uppercase; }
.small { font-size: 12px; }
#btn-save-settings { margin-top: 8px; }
.msg { color: var(--bad); font-size: 13px; min-height: 1.2em; }
.pickrow { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pickrow:last-child { border-bottom: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-size: 12px; text-transform: uppercase; }
td.num, th.num { text-align: right; }
.result-W { color: var(--good); font-weight: 700; }
.result-L { color: var(--bad); font-weight: 700; }
@media (max-width: 520px) { .games { grid-template-columns: 1fr; } }
