/* WC26 Pool — shared dark theme. Standalone from AstraVeris styles. */

:root {
  --bg: #07090c;
  --bg-card: #10151c;
  --bg-card2: #161d26;
  --border: #222b36;
  --text: #e8edf2;
  --text-dim: #93a1b0;
  --accent: #2fd66f;        /* pitch green */
  --accent-dim: #1d8f4a;
  --gold: #f0c33c;
  --red: #e5534b;
  --blue: #4a9eda;
  --radius: 10px;
  font-size: 15px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.45;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px 60px; }

/* ---------- nav ---------- */
.wcnav {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  background: rgba(7, 9, 12, .92); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50; flex-wrap: wrap;
}
.wcnav .brand {
  font-weight: 800; letter-spacing: .06em; color: var(--text);
  font-size: 1.05rem;
}
.wcnav .brand b { color: var(--accent); }
.wcnav a.navlink { color: var(--text-dim); font-weight: 600; font-size: .92rem; }
.wcnav a.navlink:hover { color: var(--text); text-decoration: none; }
.wcnav a.navlink.active { color: var(--accent); }
.wcnav .spacer { flex: 1; }
.wcnav .home { font-size: .8rem; color: var(--text-dim); }

.temp-note {
  font-size: .75rem; color: var(--text-dim); text-align: center;
  padding: 6px 14px; background: #0c1118; border-bottom: 1px solid var(--border);
}

h1 { font-size: 1.7rem; margin: 26px 0 6px; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
.sub { color: var(--text-dim); margin: 0 0 18px; }

/* ---------- cards / tables ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

table.wc { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.wc th {
  text-align: left; color: var(--text-dim); font-size: .75rem;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 7px 8px; border-bottom: 1px solid var(--border);
}
table.wc td { padding: 7px 8px; border-bottom: 1px solid #161d26; }
table.wc tr:hover td { background: #131a23; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.teamcell { display: flex; align-items: center; gap: 8px; }
.teamcell img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- buttons / chips / badges ---------- */
.btn {
  display: inline-block; background: var(--accent-dim); color: #fff;
  border: 1px solid var(--accent); border-radius: 8px; padding: 8px 18px;
  font-weight: 700; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: var(--accent); color: #04140a; text-decoration: none; }
.btn.secondary { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn.secondary:hover { color: var(--text); background: var(--bg-card2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--bg-card2);
  border-radius: 999px; padding: 4px 12px; margin: 3px; cursor: pointer;
  font-size: .85rem; user-select: none;
}
.chip img { width: 16px; height: 16px; }
.chip.sel { border-color: var(--accent); background: #11281a; color: var(--accent); }
.chip.dis { opacity: .35; cursor: default; }

.badge {
  display: inline-block; font-size: .68rem; font-weight: 800; border-radius: 5px;
  padding: 2px 7px; letter-spacing: .04em; text-transform: uppercase;
}
.badge.live { background: #3a1113; color: #ff7b72; border: 1px solid #5c1e21; animation: pulse 1.6s infinite; }
.badge.ft   { background: #15202b; color: var(--text-dim); border: 1px solid var(--border); }
.badge.pre  { background: #10231a; color: var(--accent); border: 1px solid #1d4830; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- match rows ---------- */
.matchrow {
  display: grid; grid-template-columns: 90px 1fr 70px 1fr 110px;
  align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid #141b24;
}
.matchrow:hover { background: #121922; }
.matchrow .t { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.matchrow .t.away { justify-content: flex-end; }
.matchrow .t img { width: 22px; height: 22px; }
.matchrow .score { text-align: center; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.matchrow .when { color: var(--text-dim); font-size: .8rem; }
.matchrow .meta { text-align: right; font-size: .75rem; color: var(--text-dim); }

/* ---------- pagination pills (site-standard pattern) ---------- */
.table-pagination {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 12px 0; font-size: .85rem; color: var(--text-dim);
}
.page-size-pill, .page-pill {
  border: 1px solid var(--border); background: var(--bg-card2); color: var(--text-dim);
  border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: .8rem;
}
.page-size-pill.active, .page-pill.active { border-color: var(--accent); color: var(--accent); }
.page-pill[disabled] { opacity: .35; cursor: default; }

/* ---------- forms ---------- */
input[type="text"], input[type="search"] {
  background: #0c1117; border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-size: .95rem; outline: none;
}
input:focus { border-color: var(--accent-dim); }

.token-box {
  background: #11281a; border: 1px dashed var(--accent); border-radius: 8px;
  padding: 12px 16px; font-family: Consolas, monospace; font-size: 1.1rem;
  color: var(--accent); letter-spacing: .12em;
}

.notice { border-left: 3px solid var(--gold); background: #1a1709; padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .9rem; }
.error { border-left: 3px solid var(--red); background: #1a0d0c; padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .9rem; }

/* ---------- bracket builder ---------- */
.groupcard h3 { margin: 0 0 8px; font-size: .95rem; color: var(--text-dim); }
.groupcard .teampick {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 8px; margin: 5px 0;
  cursor: pointer; user-select: none; background: var(--bg-card2);
}
.groupcard .teampick:hover { border-color: #33414f; }
.groupcard .teampick img { width: 22px; height: 22px; }
.groupcard .teampick .slot {
  margin-left: auto; font-weight: 800; font-size: .8rem; width: 24px; height: 24px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.groupcard .teampick.s1 { border-color: var(--accent); background: #0f2418; }
.groupcard .teampick.s1 .slot { background: var(--accent); color: #04140a; }
.groupcard .teampick.s2 { border-color: var(--blue); background: #0e1c2a; }
.groupcard .teampick.s2 .slot { background: var(--blue); color: #04101c; }

.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.funnel .col h3 { font-size: .85rem; color: var(--text-dim); margin: 0 0 8px; }
.funnel .col .pool { min-height: 60px; }
@media (max-width: 900px) { .funnel { grid-template-columns: 1fr 1fr; } }

.progress {
  height: 8px; border-radius: 99px; background: #141b24; overflow: hidden; margin: 8px 0 4px;
}
.progress > div { height: 100%; background: var(--accent); transition: width .3s; }

/* ---------- leaderboard breakdown ---------- */
.bk-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 8px; font-size: .85rem; border-bottom: 1px solid #141b24; }
.bk-line .pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.bk-line .pts.pos { color: var(--accent); }
.bk-line .pts.neg { color: var(--red); }
.bk-line .detail { color: var(--text-dim); font-size: .75rem; }

/* ---------- hub hero ---------- */
.hero { text-align: center; padding: 46px 16px 30px; }
.hero h1 { font-size: 2.3rem; margin: 0 0 8px; }
.hero .countdown { font-size: 1.5rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.statline { display: flex; gap: 26px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.statline .s { text-align: center; }
.statline .s b { display: block; font-size: 1.5rem; color: var(--accent); }
.statline .s span { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- match center ---------- */
.scorehead {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center;
  padding: 22px; text-align: center;
}
.scorehead .side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scorehead .side img { width: 56px; height: 56px; }
.scorehead .bigscore { font-size: 2.6rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.probbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.probbar div { transition: width .6s; }
.probbar .ph { background: var(--accent-dim); }
.probbar .pd { background: #39424d; }
.probbar .pa { background: #7a4a9e; }
.problabels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-dim); margin-top: 4px; }

#pitchwrap { position: relative; }
#pitch { width: 100%; border-radius: var(--radius); display: block; background: #07120b; }
.sim-banner {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
  background: rgba(6, 20, 12, .92); border: 1px solid var(--accent);
  color: var(--text); border-radius: 8px; padding: 8px 18px; font-weight: 700;
  opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap;
}
.sim-banner.show { opacity: 1; }
.sim-legend { font-size: .75rem; color: var(--text-dim); margin-top: 6px; }

.evt { display: flex; gap: 10px; padding: 6px 8px; font-size: .87rem; border-bottom: 1px solid #131a23; }
.evt .min { color: var(--text-dim); width: 44px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.evt.goal { background: #0e2014; }
.evt.card-y .ic { color: var(--gold); }
.evt.card-r .ic { color: var(--red); }

details.math { margin-top: 10px; font-size: .82rem; color: var(--text-dim); }
details.math code { background: #0c1117; padding: 2px 6px; border-radius: 5px; }

footer.wcfoot {
  margin-top: 50px; padding: 18px; text-align: center;
  color: var(--text-dim); font-size: .78rem; border-top: 1px solid var(--border);
}

/* ---------- mobile (iPhone-first) ---------- */
.wcnav { -webkit-backdrop-filter: blur(8px); }
.card:has(> table.wc) { overflow-x: auto; }

@media (max-width: 700px) {
  :root { font-size: 14px; }
  .wrap { padding: 0 12px 48px; }
  .wcnav { gap: 8px 13px; padding: 9px 12px; }
  .wcnav .brand { font-size: .95rem; }
  .wcnav a.navlink { font-size: .82rem; }
  .wcnav .home { font-size: .75rem; }
  h1 { font-size: 1.45rem; }
  .hero { padding: 26px 4px 16px; }
  .hero h1 { font-size: 1.75rem; }
  .hero .countdown { font-size: 1.25rem; }

  /* 16px stops iOS Safari from zooming the page on input focus */
  input[type="text"], input[type="search"], input[type="number"], select {
    font-size: 16px;
  }

  /* match rows: round/kickoff line on top, teams + score below */
  .matchrow {
    grid-template-columns: 1fr 64px 1fr;
    grid-template-areas: "when when meta" "h s a";
    row-gap: 3px; padding: 9px 10px;
  }
  .matchrow .when { grid-area: when; }
  .matchrow .meta { grid-area: meta; }
  .matchrow .t:not(.away) { grid-area: h; }
  .matchrow .score { grid-area: s; }
  .matchrow .t.away { grid-area: a; }
  .matchrow .t { font-size: .85rem; gap: 5px; }
  .matchrow .t img { width: 18px; height: 18px; }

  /* predict rows: meta drops to its own full-width line */
  .predrow {
    grid-template-columns: 1fr 50px 14px 50px 1fr;
    row-gap: 4px; padding: 8px 8px;
  }
  .predrow .meta { grid-column: 1 / -1; text-align: left; }
  .predrow input { width: 46px; padding: 5px 2px; }

  .funnel { grid-template-columns: 1fr 1fr; gap: 9px; }
  .scorehead { padding: 14px 8px; gap: 8px; }
  .scorehead .side img { width: 40px; height: 40px; }
  .scorehead .bigscore { font-size: 1.9rem; }
  table.wc { font-size: .82rem; }
  table.wc th, table.wc td { padding: 6px 5px; }
  .statline { gap: 16px; }
  .ceiling { gap: 16px; }
  .groupcard .teampick { padding: 7px 8px; gap: 7px; }
}
