/* ==========================================================================
   Football Bet Predictor — design system
   Premium dark theme. Tokens first, then components.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #070a10;
  --bg-grad-a: #0a0e16;
  --bg-grad-b: #0c1320;
  --surface: #101622;
  --surface-2: #141c2b;
  --surface-3: #1a2336;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  /* Text */
  --text: #e9edf5;
  --text-dim: #b5bdcc;
  --muted: #828da3;

  /* Brand & semantics (logo: green / red / white) */
  --green: #2ecc71;
  --green-bright: #3ee885;
  --green-deep: #16a34a;
  --green-soft: rgba(46, 204, 113, 0.12);
  --red: #ef4444;
  --red-bright: #f2554d;
  --red-deep: #cf1f1f;
  --red-soft: rgba(239, 68, 68, 0.12);
  --amber: #f5b342;
  --blue: #4d9fff;
  --blue-soft: rgba(77, 159, 255, 0.12);

  /* Probability bar segments */
  --seg-home: #2ecc71;
  --seg-draw: #5b6678;
  --seg-away: #4d9fff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.5);

  --font-head: "Sora", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --container: 1380px; /* fits the 5-round knockout bracket comfortably */
}

/* ==== Reset / base ==== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 85% -100px, rgba(46, 204, 113, 0.07), transparent 60%),
    radial-gradient(900px 450px at -10% 0, rgba(77, 159, 255, 0.05), transparent 55%),
    linear-gradient(180deg, var(--bg-grad-a), var(--bg) 480px);
  background-color: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-bright); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ==== Header ==== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 17, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand { display: flex; align-items: center; flex-shrink: 1; min-width: 0; }
.brand__logo { height: 46px; width: auto; display: block; }

.site-nav ul { display: flex; gap: 4px; list-style: none; }

.site-nav a {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.site-nav a.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), var(--red-deep));
  font-weight: 600;
  box-shadow: 0 2px 14px rgba(239, 68, 68, 0.4);
}
.site-nav a.is-active:hover { color: #fff; background: linear-gradient(135deg, var(--red-bright), var(--red-deep)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==== Hero ==== */
.hero { padding: 56px 0 36px; }

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(46, 204, 113, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 800px;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--green-bright) 0%, var(--green) 55%, #9be8bd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p { margin-top: 14px; max-width: 620px; color: var(--text-dim); font-size: 16.5px; }

/* ==== Stat strip ==== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 30px 0 8px;
}

.stat {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.stat__value {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.stat__value.pos { color: var(--green-bright); }
.stat__value.neg { color: var(--red); }
.stat__label { font-size: 12.5px; color: var(--muted); margin-top: 2px; letter-spacing: 0.03em; text-transform: uppercase; font-weight: 600; }

/* ==== Section headings ==== */
.section { padding: 34px 0 10px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__title { font-size: 24px; letter-spacing: -0.01em; }
.section__title .accent { color: var(--green); }
.section__link { font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.section__link:hover { color: var(--green); }

/* ==== League block ==== */
.league-block { margin-bottom: 30px; }

.league-block__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--surface-2), transparent 80%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.league-block__logo { width: 26px; height: 26px; object-fit: contain; }
.league-block__name { font-size: 15.5px; font-weight: 700; }
.league-block__count { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ==== Card grid ==== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

/* ==== Match card ==== */
.match-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--surface-2) 0%, var(--surface) 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.match-card:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 204, 113, 0.35);
  box-shadow: var(--shadow-pop);
}

.match-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 13px;
}

.match-card__when { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.match-card__venue, .match-card__league { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.match-card__league { color: var(--green); }
.match-card__detail { color: var(--text-dim); }

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: pulse 1.6s infinite;
}
[data-status="in"] .match-card__when { color: var(--red); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ft-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 1px 7px;
  color: var(--text-dim);
}

.match-card__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team--away { flex-direction: row-reverse; text-align: right; }

.team__logo { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }

.team__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.match-card__center { text-align: center; }

.vs {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}

.score {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.score em { font-style: normal; color: var(--muted); padding: 0 3px; }

/* Prediction widget inside the card */
.match-card__prediction {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.match-card__prediction--pending { text-align: center; font-size: 13px; padding: 14px 0 6px; }

.prob-bar {
  display: flex;
  height: 9px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-3);
  gap: 2px;
}

.prob-bar__seg { min-width: 2px; opacity: 0.45; transition: opacity 0.15s; }
.prob-bar__seg.is-pick { opacity: 1; }
.prob-bar__seg--h { background: var(--seg-home); border-radius: 99px 0 0 99px; }
.prob-bar__seg--d { background: var(--seg-draw); }
.prob-bar__seg--a { background: var(--seg-away); border-radius: 0 99px 99px 0; }

.prob-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin: 7px 1px 10px;
}
.prob-legend b { color: var(--text-dim); font-weight: 600; }
.prob-legend .is-pick, .prob-legend .is-pick b { color: var(--green-bright); }

.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.pick-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-bright);
  background: var(--green-soft);
  border: 1px solid rgba(46, 204, 113, 0.3);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.pick-badge--won {
  color: #06130b;
  background: linear-gradient(135deg, var(--green-bright), var(--green-deep));
  border-color: transparent;
}

.pick-badge--lost {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(239, 68, 68, 0.35);
}

.pick-meta { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pick-meta__score { font-family: var(--font-head); font-weight: 700; color: var(--text-dim); }
.pick-meta__conf { color: var(--amber); }
.pick-meta__odds { color: var(--blue); }

/* ==== Empty state ==== */
.empty {
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 44px 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
}
.empty h2, .empty h3 { color: var(--text-dim); margin-bottom: 6px; font-size: 17px; }
.empty p { font-size: 14px; }

/* ==== Filter pills (fixtures page) ==== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 26px; }

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 7px 14px;
  border-radius: 999px;
  transition: all 0.15s;
}
.filter-pill img { width: 17px; height: 17px; object-fit: contain; }
.filter-pill:hover { border-color: var(--green); color: var(--text); }
.filter-pill.is-active {
  color: #06130b;
  background: linear-gradient(135deg, var(--green-bright), var(--green-deep));
  border-color: transparent;
}

/* ==== Day group headers (fixtures page) ==== */
.day-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 16px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}
.day-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.day-head .tag {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(46, 204, 113, 0.25);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ==== Results page ==== */
.chart-panel {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 26px;
}
.chart-panel h3 { font-size: 15.5px; margin-bottom: 14px; color: var(--text-dim); }
.chart-panel .chart-wrap { position: relative; height: 280px; }

.league-acc { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 26px; }
.league-acc__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.league-acc__name { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.league-acc__nums { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.league-acc__pct { font-family: var(--font-head); font-size: 21px; font-weight: 800; color: var(--green-bright); }
.league-acc__rec { font-size: 12px; color: var(--muted); }

/* ==== Tables (league standings + results list) ==== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 640px;
}

table.data th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(255, 255, 255, 0.025); }
table.data .num { text-align: center; font-variant-numeric: tabular-nums; }
table.data .pts { font-weight: 800; color: var(--text); }

.team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-cell img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.team-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.pos-cell { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 700; font-size: 12px; }
.pos-cell--cl { background: var(--green-soft); color: var(--green-bright); border: 1px solid rgba(46,204,113,.3); }
.pos-cell--el { background: var(--blue-soft); color: var(--blue); border: 1px solid rgba(77,159,255,.3); }
.pos-cell--rel { background: var(--red-soft); color: var(--red); border: 1px solid rgba(239,68,68,.3); }

.outcome-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.outcome-chip--won { color: var(--green-bright); background: var(--green-soft); border: 1px solid rgba(46,204,113,.3); }
.outcome-chip--lost { color: var(--red); background: var(--red-soft); border: 1px solid rgba(239,68,68,.3); }
.outcome-chip--void { color: var(--muted); background: var(--surface-3); border: 1px solid var(--border-strong); }

/* ==== News ==== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.news-card {
  position: relative; /* stretched-link anchor: whole card is clickable */
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s, border-color 0.18s;
}

.news-card__title a::after { content: ""; position: absolute; inset: 0; }
.news-card:hover { transform: translateY(-3px); border-color: rgba(46, 204, 113, 0.35); }

.news-card__cover {
  height: 130px;
  background:
    radial-gradient(220px 120px at 80% 0%, rgba(46, 204, 113, 0.25), transparent),
    radial-gradient(220px 140px at 10% 100%, rgba(77, 159, 255, 0.18), transparent),
    var(--surface-3);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.news-card__tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #06130b;
  background: linear-gradient(135deg, var(--green-bright), var(--green-deep));
  padding: 4px 10px;
  border-radius: 999px;
}

.news-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card__title { font-size: 16.5px; line-height: 1.35; }
.news-card__title a { color: var(--text); }
.news-card__title a:hover { color: var(--green-bright); }
.news-card__excerpt { font-size: 13.5px; color: var(--muted); flex: 1; }
.news-card__meta { font-size: 12px; color: var(--muted); font-weight: 600; }

/* Article page */
.article { max-width: 760px; margin: 0 auto; }
.article__head { margin-bottom: 26px; }
.article__title { font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.015em; margin: 10px 0; }
.article__meta { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.article__body { font-size: 16px; color: var(--text-dim); }
.article__body p, .article__body ol, .article__body ul { margin-bottom: 16px; }
.article__body li { margin: 8px 0 8px 20px; }
.article__body strong { color: var(--text); }

/* ==== Tabs (league tables switcher) ==== */
.group-title { font-size: 15px; font-weight: 700; color: var(--text-dim); margin: 24px 0 12px; }

/* ==== Page title block ==== */
.page-head { padding: 44px 0 6px; }
.page-head h1 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -0.015em; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 640px; }

/* ==== Footer ==== */
.site-footer { margin-top: 70px; border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35)); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 42px 20px 26px;
}

.site-footer__logo { height: 30px; width: auto; margin-bottom: 12px; }
.site-footer__tag { color: var(--text-dim); font-size: 14px; }
.site-footer__small { color: var(--muted); font-size: 12px; margin-top: 10px; max-width: 380px; }
.site-footer h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.site-footer__links { list-style: none; }
.site-footer__links li { margin: 7px 0; }
.site-footer__links a { color: var(--text-dim); font-size: 13.5px; }
.site-footer__links a:hover { color: var(--green-bright); }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}

/* ==== Responsive ==== */
@media (max-width: 920px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(8, 11, 17, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-strong);
    display: none;
    padding: 10px 16px 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 15px; }

  .hero { padding: 38px 0 26px; }
  .card-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .chart-panel .chart-wrap { height: 230px; }
}

@media (max-width: 420px) {
  .stat-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat__value { font-size: 22px; }
}

/* ==== Match detail page ==== */
.match-card { position: relative; }
/* Stretched link: absolutely positioned so it never occupies a slot in the
   teams grid — it covers the whole card (nearest positioned ancestor). */
.match-card__link { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); color: inherit; }
.match-card__link:hover { color: inherit; }

.detail-head { padding: 16px 0 26px; }
.detail-head__meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 20px; }
.detail-head__meta a { color: var(--green); }
.detail-head__meta img { vertical-align: middle; }

.detail-head__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.detail-team { display: flex; align-items: center; gap: 16px; min-width: 0; }
.detail-team--away { flex-direction: row-reverse; text-align: right; }
.detail-team__logo { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.detail-team__name { font-size: clamp(20px, 3vw, 32px); letter-spacing: -0.015em; }
.score--big { font-size: 40px; }

.detail-prediction { margin-bottom: 22px; }
.detail-prediction h3 { display: flex; align-items: center; gap: 12px; }
.prob-bar--tall { height: 13px; }
.detail-prediction .prob-legend { font-size: 13px; margin-top: 9px; }
.detail-prediction__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 13px; }
.fact__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.fact__value { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; }
.detail-prediction__why { margin-top: 14px; font-size: 13.5px; color: var(--text-dim); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }

.form-rows { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.form-row__team { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; min-width: 0; }
.form-chips { display: inline-flex; gap: 6px; }
.form-chip { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; font-size: 12px; font-weight: 800; cursor: default; }
.chip--w { background: var(--green-soft); color: var(--green-bright); border: 1px solid rgba(46,204,113,.35); }
.chip--l { background: var(--red-soft); color: var(--red); border: 1px solid rgba(239,68,68,.35); }
.chip--d { background: var(--surface-3); color: var(--text-dim); border: 1px solid var(--border-strong); }

.h2h-record { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.h2h-record__cell { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 6px; }
.h2h-record__cell b { display: block; font-family: var(--font-head); font-size: 22px; }
.h2h-record__cell span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.h2h-list { list-style: none; }
.h2h-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.h2h-row:last-child { border-bottom: none; }
.h2h-row__date { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 84px; }
.h2h-row__match { flex: 1; min-width: 0; }
.h2h-row__match b { font-family: var(--font-head); padding: 0 2px; }
.h2h-row__comp { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

.squad-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.squad-col__team { display: flex; align-items: center; gap: 9px; font-size: 15.5px; margin-bottom: 10px; }
.squad-col__coach { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.squad-col__group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.player-list { list-style: none; }
.player-row { display: flex; align-items: baseline; gap: 10px; padding: 5px 2px; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.player-row:last-child { border-bottom: none; }
.player-row__no { min-width: 24px; text-align: right; color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.player-row__name { flex: 1; font-weight: 500; }
.player-row__age { color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .detail-grid, .squad-cols { grid-template-columns: 1fr; }
  .detail-team { flex-direction: column; align-items: flex-start; gap: 8px; }
  .detail-team--away { align-items: flex-end; }
  .detail-team__logo { width: 46px; height: 46px; }
  .score--big { font-size: 30px; }
}

/* ==== Decider tag (ET / Pens) ==== */
.decider-tag { font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); background: rgba(245,179,66,0.12); border: 1px solid rgba(245,179,66,0.28); border-radius: 5px; padding: 1px 4px; margin: 0 2px; vertical-align: 1px; flex-shrink: 0; }

/* ==== Knockout bracket ==== */
/* The global 1380px container fits all five rounds on desktop; on narrower
   screens the bracket scrolls horizontally with a visible slim scrollbar. */
.bracket { --bkt-line: rgba(46, 204, 113, 0.4); overflow-x: auto; padding-bottom: 14px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.bracket::-webkit-scrollbar { height: 8px; }
.bracket::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
.bracket::-webkit-scrollbar-track { background: transparent; }
.bracket__grid { display: flex; gap: 22px; min-width: max-content; align-items: stretch; }
.bracket__round { display: flex; flex-direction: column; width: 235px; flex-shrink: 0; }
@media (min-width: 1345px) {
  /* Container is at full width: all rounds fit — columns share the space. */
  .bracket__grid { min-width: 0; justify-content: center; }
  .bracket__round { width: auto; flex: 1 1 235px; min-width: 235px; max-width: 305px; }
}
.bracket__round-head { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; text-align: center; margin-bottom: 12px; font-family: var(--font-head); }
.bracket__col { display: flex; flex-direction: column; flex: 1; }
/* A pair = the two ties feeding one next-round match. Two equal grid tracks
   with centred cards put the card centres at exactly 25% / 75% of the pair,
   whatever the card height — which is what the connector geometry relies on. */
.bkt-pair { position: relative; display: grid; grid-template-rows: 1fr 1fr; align-items: center; flex: 1; }
.bkt-pair .bkt-match { margin: 6px 0; }
.bracket__col > .bkt-match { margin: auto 0; }
.bkt-match { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 96px; background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; color: inherit; box-shadow: var(--shadow-card); transition: border-color 0.15s; }
a.bkt-match:hover { border-color: rgba(46, 204, 113, 0.55); color: inherit; }
.bkt-match--tbd { border-style: dashed; box-shadow: none; opacity: 0.5; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; align-items: center; }
/* Connector guide lines: stub out of each pair member, vertical joiner between
   the pair's centres, stub into every match from round 2 onward. Column gap is
   22px: out-stub 12px + in-stub 10px meet the joiner drawn at +10..+12. */
.bkt-pair .bkt-match::after { content: ""; position: absolute; top: 50%; right: -12px; width: 12px; height: 2px; background: var(--bkt-line); }
.bkt-pair::after { content: ""; position: absolute; right: -12px; top: 25%; bottom: 25%; width: 2px; background: var(--bkt-line); }
.bracket__round + .bracket__round .bkt-match::before { content: ""; position: absolute; top: 50%; left: -10px; width: 10px; height: 2px; background: var(--bkt-line); }
.bkt-team { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.bkt-team img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.bkt-team__name { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-dim); min-width: 0; }
.bkt-team__score { font-family: var(--font-head); font-weight: 800; font-size: 13.5px; color: var(--muted); }
.bkt-team--win .bkt-team__name { color: var(--text); }
.bkt-team--win .bkt-team__score { color: var(--green-bright); }
.bkt-meta { display: flex; align-items: center; gap: 7px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); font-weight: 600; }
.bkt-meta .decider-tag { margin: 0; }
.bkt-meta .live-dot { width: 7px; height: 7px; }
.bkt-pick { margin-left: auto; font-weight: 800; font-size: 10.5px; letter-spacing: 0.04em; white-space: nowrap; }
.bkt-pick--won { color: var(--green-bright); }
.bkt-pick--lost { color: var(--red); }
.bracket-third { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; flex-wrap: wrap; }
.bracket-third .bkt-match { width: 235px; }
.bracket-third__label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; font-family: var(--font-head); }

/* ==== Stage view tabs (Group Stage | Knockout Stage) ==== */
.view-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); margin: 10px 0 24px; }
.view-tabs a { padding: 10px 2px 12px; font-family: var(--font-head); font-weight: 700; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s; }
.view-tabs a:hover { color: var(--text-dim); }
.view-tabs a.is-active { color: var(--text); border-bottom-color: var(--green); }
