:root {
  --bg: #0e1117;
  --panel: #161a23;
  --border: #2a3040;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --accent: #4cc9f0;
  --home-win: #2dd4bf;
  --away-win: #f87171;
  --draw: #fbbf24;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  max-width: 1000px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

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

.meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.tab {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.tab.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.tab:hover:not(.active) {
  color: var(--text);
  border-color: var(--accent);
}

button {
  background: var(--accent);
  color: #04222e;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

main {
  padding: 24px 32px;
  overflow-x: auto;
  max-width: 1000px;
  margin: 0 auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td.team {
  text-align: right;
  font-weight: 600;
}

td.team:nth-of-type(4) {
  text-align: left;
}

td.vs {
  color: var(--muted);
  padding: 10px 6px;
}

td.predicted {
  font-weight: 700;
  color: var(--accent);
}

tr.fixture-row {
  transition: background 0.15s ease;
}

tr.fixture-row:hover {
  background: rgba(76, 201, 240, 0.06);
}

/* Flag + team-name scoreboard-style pairing -------------------------------- */

.flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  vertical-align: middle;
}

.flag-inline {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  margin-bottom: -2px;
}

.team-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

td.team-home .team-cell {
  flex-direction: row-reverse;
}

td.team-away .team-cell {
  flex-direction: row;
}

.team-label {
  white-space: nowrap;
}

/* Horizontal stacked 3-way probability bar --------------------------------- */

.prob-bar-cell {
  min-width: 220px;
  padding: 10px 14px;
}

.prob-bar {
  display: flex;
  width: 100%;
  height: 22px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--border);
}

.prob-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 11px;
  font-weight: 600;
  color: rgba(14, 17, 23, 0.75);
  opacity: 0.55;
  transition: opacity 0.15s ease, filter 0.15s ease;
  overflow: hidden;
  white-space: nowrap;
}

.prob-seg.predicted {
  opacity: 1;
  filter: saturate(1.25) brightness(1.05);
}

.prob-seg-label {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.prob-home { background: var(--home-win); }
.prob-draw { background: var(--draw); }
.prob-away { background: var(--away-win); }
