:root {
  --ink: #0b1020;
  --card: #141b31;
  --card-2: #1b2440;
  --line: rgba(245, 196, 0, 0.28);
  --yellow: #f5c400;
  --yellow-2: #ffe56a;
  --blue: #2f5bff;
  --text: #f4f6fb;
  --muted: #b7c0d6;
  --good: #7dffb3;
  --bad: #ffb4b4;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Barlow, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(245, 196, 0, 0.22), transparent 60%),
    radial-gradient(700px 380px at -10% 20%, rgba(47, 91, 255, 0.22), transparent 55%),
    var(--ink);
}

button, input { font: inherit; color: inherit; }

.wrap {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.top {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.presents {
  display: flex;
  align-items: center;
  gap: 14px;
}

.presents p {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--yellow-2);
}

.manjappada {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  box-shadow: 0 0 0 3px var(--yellow);
}

.top-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

.brand { display: flex; gap: 12px; align-items: center; }

.crest {
  width: 58px;
  height: 74px;
  object-fit: contain;
  flex: none;
}

.eyebrow {
  margin: 0;
  color: var(--yellow-2);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 46px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rules {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rules span {
  background: rgba(245, 196, 0, 0.1);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
}

.rules b { color: var(--yellow); font-size: 16px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tabs button {
  border: 1px solid transparent;
  background: #10182c;
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 700;
  cursor: pointer;
}

.tabs button.active {
  background: var(--yellow);
  color: #1a1400;
}

.banner {
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255, 180, 180, 0.4);
  color: var(--bad);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
}

.banner.warn {
  background: rgba(245, 196, 0, 0.12);
  border-color: rgba(245, 196, 0, 0.45);
  color: var(--yellow-2);
}

.card, .identity {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
}

.identity {
  display: grid;
  gap: 10px;
}

.identity.known {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.identity p, .muted { color: var(--muted); margin: 4px 0 0; }

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input[type="text"], input[type="password"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0c1326;
  padding: 12px 12px;
  outline: none;
}

input:focus { border-color: var(--yellow); }

.match-top, .score-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.pill {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pill.home { background: rgba(47, 91, 255, 0.2); color: #b9c8ff; }
.pill.away { background: rgba(245, 196, 0, 0.14); color: var(--yellow-2); }
.pill.open { background: rgba(125, 255, 179, 0.14); color: var(--good); }
.pill.upcoming { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.pill.locked, .pill.final { background: rgba(255, 255, 255, 0.06); color: var(--muted); }

.crest-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}

.team-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
}

.score-box .team-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  padding: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.vs {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.when { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.countdown {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(245, 196, 0, 0.1);
  border: 1px solid var(--line);
}

.timer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: var(--yellow-2);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 34px;
  letter-spacing: 0.04em;
}

.timer span {
  color: var(--muted);
  font-family: Barlow, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

.countdown p { margin: 0; color: var(--muted); font-size: 13px; }

.fixture {
  margin: 10px 0 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 32px;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.venue { margin: 6px 0 0; color: var(--muted); }

.predict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.score-box {
  background: var(--card-2);
  border-radius: 14px;
  padding: 10px;
}

.score-box span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.score-input {
  width: 68px;
  height: 52px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(245, 196, 0, 0.45);
  background: #0b1020;
  color: var(--yellow);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 34px;
  padding: 0;
}

.btn, .ghost {
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn {
  width: 100%;
  margin-top: 12px;
  background: var(--yellow);
  color: #1a1400;
}

.btn:disabled { opacity: 0.6; cursor: wait; }

.ghost {
  width: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.locked, .final-score {
  margin-top: 14px;
  border-radius: 14px;
  padding: 14px;
  background: rgba(245, 196, 0, 0.08);
  border: 1px dashed rgba(245, 196, 0, 0.45);
}

.final-score strong, .locked strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 28px;
  letter-spacing: 0.03em;
}

.your-pick {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 196, 0, 0.28);
}

.your-pick strong { font-size: 24px; }

.points { margin: 6px 0 0; font-weight: 700; }
.points.good { color: var(--good); }
.points.zero { color: var(--muted); }

.board-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.board-toggle { width: 100%; margin-top: 14px; }

.edit-prediction { width: 100%; margin-top: 12px; }

.board-title h2 {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lb-head, .lb-row {
  display: grid;
  grid-template-columns: 42px 1fr 54px 54px;
  gap: 8px;
  align-items: center;
}

.lb-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 8px 8px;
}

.lb-row {
  padding: 10px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-row.mine {
  background: rgba(245, 196, 0, 0.1);
  border-radius: 10px;
}

.rank {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 24px;
  color: var(--yellow);
}

.pts { font-weight: 800; text-align: right; }

.phone-tail { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.pick-line { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }

.empty { color: var(--muted); margin: 8px 0 0; }

.admin-row {
  display: grid;
  grid-template-columns: 90px 90px;
  gap: 8px;
}

.admin-actions { display: flex; gap: 8px; }
.admin-actions .btn, .admin-actions .ghost { width: auto; margin-top: 12px; }

footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

footer a { color: var(--yellow-2); }

.phone-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
}

.member-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text, #f4f7fb);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.identity.known .member-check { flex: 1 0 100%; }

.member-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--yellow);
  flex: 0 0 auto;
}

#country[readonly] {
  color: var(--yellow);
  text-align: center;
  font-weight: 700;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 640px) {
  h1 { font-size: 36px; }
  .presents p { font-size: 22px; }
  .manjappada { width: 68px; height: 68px; }
  .top-row { flex-direction: column; align-items: flex-start; }
  .fixture { font-size: 28px; }
  .predict-grid { grid-template-columns: 1fr; }
  .identity.known { flex-direction: column; align-items: flex-start; }
}
