/* Radar GOL - stadium-at-night scoreboard identity. Dark-only by design:
   the palette is a lit odds board against a night pitch, which only reads
   correctly against a dark ground - there's no meaningful light variant. */
:root {
  --bg: #0a1410;
  --panel: #12201a;
  --sidebar-bg: #0e1f16;
  --sidebar-bg-2: #16301f;
  --sidebar-text: #eef2ea;
  --sidebar-muted: #7d9082;
  --text-primary: #eef2ea;
  --text-secondary: #a9b8ac;
  --text-muted: #6f8074;
  --border: rgba(238, 242, 234, 0.12);
  --border-strong: rgba(238, 242, 234, 0.22);
  --home-color: #4d8ffa;
  --away-color: #ef4444;
  --gold: #f2b134;
  --pitch: #1c3d2a;
  --accent: var(--gold);
  --row-hover: rgba(238, 242, 234, 0.06);
  --state-win: rgba(61, 173, 110, 0.55);
  --state-draw: rgba(242, 177, 52, 0.5);
  --state-lose: rgba(239, 68, 68, 0.55);

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  /* Faint pitch marking (halfway line + center circle) watermarked behind
     .content. Lives on body, not .content, so it stays a fixed watermark
     instead of scrolling with the stats tables; the sidebar's own opaque
     background paints over its portion. The position offset compensates
     for the 300px sidebar so it centers in the content area, not the page. */
  background-image:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(238, 242, 234, 0.09) calc(50% - 1px), rgba(238, 242, 234, 0.09) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0, transparent 118px, rgba(238, 242, 234, 0.09) 118px, rgba(238, 242, 234, 0.09) 120px, transparent 120px);
  background-repeat: no-repeat;
  background-size: 640px 640px;
  background-position: calc(50% + 150px) center;
  color: var(--text-primary);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  /* The sidebar itself no longer scrolls - only #day-match-list does (see
     below). That keeps brand-bar/date-nav/filters/search permanently
     visible above the list instead of scrolling away with it; previously
     only .date-nav (position: sticky) stayed put and everything else
     (brand, sync status, filters, search) scrolled off with the list. */
  overflow: hidden;
}

.brand-bar {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  padding: 16px 10px 12px;
  background: var(--sidebar-bg);
  border-bottom: 1px dashed var(--border-strong);
  flex-shrink: 0;
}

.brand-radar,
.brand-gol {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-radar { color: var(--sidebar-text); }
.brand-gol { color: var(--gold); }

.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 10px;
  background: var(--sidebar-bg-2);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

#date-label {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.nav-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--sidebar-text);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font: inherit;
}

.nav-btn:hover { background: rgba(255, 255, 255, 0.08); }

/* Native date input stays functional (drives the OS/browser date picker via
   showPicker()) but is visually invisible - #open-date-picker is the button
   the user actually sees and clicks. */
.date-picker-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  border: 0;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--sidebar-bg);
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8a93a1;
  flex-shrink: 0;
}

.sync-status[data-state="ok"] .sync-status-dot { background: #2ecc71; }
.sync-status[data-state="updating"] .sync-status-dot { background: #e6b800; }
.sync-status[data-state="blocked"] .sync-status-dot { background: #e5484d; }

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  background: var(--sidebar-bg-2);
  flex-shrink: 0;
}

.seg-toggle {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
}

.seg-toggle button {
  font: inherit;
  font-size: 11px;
  padding: 5px 10px;
  border: none;
  background: transparent;
  color: var(--sidebar-muted);
  cursor: pointer;
}

.seg-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.filter-toggle-btn {
  font: inherit;
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: transparent;
  color: var(--sidebar-muted);
  cursor: pointer;
  white-space: nowrap;
}

.filter-toggle-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

#favorites-only-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--sidebar-bg);
}

.search-input {
  flex: 1;
  min-width: 120px;
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-text);
  text-overflow: ellipsis;
}

.search-input::placeholder { color: var(--sidebar-muted); }

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

.fav-star {
  border: none;
  background: transparent;
  color: var(--sidebar-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
}

.fav-star:hover { color: var(--gold); }
.fav-star.active { color: var(--gold); }

.competition-header {
  display: flex;
  align-items: center;
  gap: 2px;
}

.match-comp-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--sidebar-muted);
}

.match-list {
  padding: 6px 0 24px;
  /* Only this list scrolls now (see .sidebar) - flex:1 lets it claim
     whatever height is left under the fixed header, min-height:0 is what
     actually allows a flex child to shrink below its content size and
     scroll internally instead of pushing the sidebar taller. */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.competition-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--sidebar-muted);
  padding: 14px 14px 6px;
}

.competition-header .cat {
  color: var(--sidebar-text);
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.match-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.match-row:hover { background: rgba(255, 255, 255, 0.06); }

.match-row.active {
  background: rgba(255, 255, 255, 0.10);
  border-left-color: var(--accent);
}

.kickoff, .score {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--sidebar-muted);
}

.score { font-weight: 700; color: var(--sidebar-text); }

.teams { display: flex; flex-direction: column; font-size: 13px; line-height: 1.5; }

.teams-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 6px;
}

.odd-tag {
  display: inline-block;
  align-self: center;
  justify-self: end;
  min-width: 30px;
  padding: 1px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: var(--gold);
  background: rgba(242, 177, 52, 0.08);
  border: 1px solid rgba(242, 177, 52, 0.35);
  border-radius: 3px;
}

.match-status {
  font-size: 10px;
  color: var(--sidebar-muted);
  text-align: right;
}

.loading, .empty, .error {
  padding: 14px;
  font-size: 13px;
  color: var(--sidebar-muted);
}

.error { color: var(--away-color); }

/* Main content */

.content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.empty-state {
  color: var(--text-muted);
  font-size: 14px;
  padding-top: 40px;
  text-align: center;
}

.match-stats { max-width: 900px; margin: 0 auto; }

.match-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.team-block { font-size: 18px; font-weight: 700; }
.team-block.home { color: var(--home-color); }
.team-block.away { color: var(--away-color); }
.vs { color: var(--text-muted); font-size: 13px; }

.team-pos {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.team-pos[hidden] { display: none; }

.match-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: -8px 0 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.match-meta[hidden] { display: none; }

.match-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.match-meta-icon { opacity: 0.7; }

.referee-name {
  position: relative;
  border-bottom: 1px dotted var(--text-muted);
  cursor: default;
}

.referee-name:hover .referee-tooltip { opacity: 1; visibility: visible; }

.referee-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  padding: 4px 9px;
  background: var(--sidebar-bg-2);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  border-radius: 5px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  z-index: 5;
}

.referee-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--sidebar-bg-2);
}

.tab-bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border-strong);
}

.tab-bar button {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.tab-bar button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.toggle-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toggle-group {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.toggle-group[hidden] { display: none; }

.toggle-group button {
  font: inherit;
  font-size: 12px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.toggle-group button.active {
  background: var(--accent);
  color: #fff;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.stats-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.stats-table td {
  padding: 9px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.stats-table tr:last-child td { border-bottom: none; }

.col-home { text-align: center; color: var(--home-color); font-weight: 600; width: 90px; }
.col-away { text-align: center; color: var(--away-color); font-weight: 600; width: 90px; }
.col-label { text-align: center; color: var(--text-secondary); }

.pct {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.analyzed-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.analyzed-col h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin: 0 0 8px;
  font-weight: 700;
}

.analyzed-row {
  display: grid;
  grid-template-columns: 40px 1fr 16px 20px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.analyzed-row:last-child { border-bottom: none; }

.analyzed-date { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.analyzed-teams {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scored-first-icon {
  text-align: center;
  font-size: 11px;
  line-height: 1;
}

.analyzed-result {
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
  font-size: 11px;
}

.result-V { color: #2fa84f; }
.result-E { color: #c99a1f; }
.result-D { color: var(--away-color); }

.standings-table .col-label-left {
  text-align: left;
  color: var(--text-primary);
  font-weight: 600;
}

.standings-table th,
.standings-table td { text-align: center; }

.standings-highlight td {
  background: rgba(57, 135, 229, 0.08);
}

.standings-highlight .col-label-left { color: var(--accent); }

.standings-form {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .analyzed-lists { grid-template-columns: 1fr; }
}

/* Gols tab */

.gols-tipos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.gols-team-block h4 {
  text-align: center;
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.gols-team-block { display: flex; flex-direction: column; gap: 14px; }

.tipos-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 12px;
}

.tipos-table thead tr:first-child th {
  background: var(--sidebar-bg-2);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  text-align: center;
}

.tipos-table thead tr:first-child th:first-child { background: transparent; }

.tipos-table thead tr:last-child th {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  padding: 4px 10px;
  text-align: right;
}

.tipos-table thead tr:last-child th:first-child { text-align: left; }

.tipos-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
}

.tipo-goals, .tipo-pct { text-align: right; font-variant-numeric: tabular-nums; }
.tipo-pct { color: var(--accent); }

.tipo-pct.pct-green { color: #2ecc71; }
.tipo-pct.pct-yellow { color: #e6b800; }
.tipo-pct.pct-red { color: #e5484d; }

.tipo-total-row { font-weight: 700; }
.tipo-total-row td { border-bottom: none; border-top: 1px solid var(--border); }

.gols-section-title {
  margin: 26px 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  text-align: center;
}

.gols-periods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 10px;
}

.period-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.period-block h4 {
  margin: 0 0 10px;
  font-size: 12px;
  text-align: center;
  color: var(--text-secondary);
}

.period-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 11px;
}

.period-row:last-child { margin-bottom: 0; }

.period-label { color: var(--text-muted); }

.period-bars { display: flex; flex-direction: column; gap: 2px; }

.period-bar {
  position: relative;
  height: 14px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}

.period-bar span {
  position: relative;
  z-index: 1;
  line-height: 14px;
  color: var(--text-primary);
  font-size: 10px;
}

.period-fill { position: absolute; inset: 0; z-index: 0; }
.period-bar.for .period-fill { background: rgba(47, 168, 79, 0.35); }
.period-bar.against .period-fill { background: rgba(224, 90, 78, 0.35); }

.state-block-total { font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: normal; }

.state-bar-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.state-bar-line + .state-bar-line { margin-top: 2px; }

.state-pct { width: 26px; flex-shrink: 0; text-align: right; color: var(--text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }

.state-bar-track { flex: 1; height: 14px; background: var(--bg); border-radius: 3px; overflow: hidden; }

.state-bar { height: 100%; display: flex; }

.state-seg {
  height: 100%;
  color: var(--text-primary);
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.state-seg.winning { background: var(--state-win); }
.state-seg.drawing { background: var(--state-draw); }
.state-seg.losing { background: var(--state-lose); }

.state-total { width: 18px; flex-shrink: 0; text-align: right; color: var(--text-muted); font-size: 10px; }

.state-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-secondary);
}

.state-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.state-dot.winning { background: var(--state-win); }
.state-dot.drawing { background: var(--state-draw); }
.state-dot.losing { background: var(--state-lose); }

@media (max-width: 720px) {
  .gols-tipos-grid, .gols-periods-grid { grid-template-columns: 1fr; }
}

/* Overs tab */

.overs-spacer-row td { padding: 6px; border-bottom: none; }

.over-hit { color: #2fa84f; font-weight: 600; }
.over-miss { color: var(--away-color); font-weight: 600; }

/* Escalacoes tab */

.escalacoes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.escalacoes-col h4 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-primary);
}

.escalacoes-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 11px;
}

.escalacoes-table th {
  background: var(--sidebar-bg-2);
  color: #fff;
  padding: 5px 6px;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
}

.escalacoes-table td {
  padding: 4px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.escalacoes-table td.player-name { text-align: left; white-space: nowrap; }

.yellow-card-cell { color: #d9b32c; font-weight: 700; }
.red-card-cell { color: var(--away-color); font-weight: 700; }

.lineup-live-notice {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 20px;
}

.lineup-live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 10px;
}

.managers-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 14px;
}

.lineup-formation {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}

.pitch-field {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  background: linear-gradient(90deg, #1d4526, #183b21, #1d4526);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  margin-bottom: 18px;
  overflow: hidden;
}

.pitch-halfway-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateX(-50%);
}

.pitch-center-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-box {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.pitch-box-big { top: 20%; height: 60%; width: 16%; }
.pitch-box-small { top: 36%; height: 28%; width: 6%; }
.pitch-box.home { left: 0; border-left: none; }
.pitch-box.away { right: 0; border-right: none; }

.pitch-arc-clip {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pitch-arc-clip.home { clip-path: polygon(16% 0%, 100% 0%, 100% 100%, 16% 100%); }
.pitch-arc-clip.away { clip-path: polygon(0% 0%, 84% 0%, 84% 100%, 0% 100%); }

.pitch-arc-circle {
  position: absolute;
  top: 50%;
  width: 18%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-arc-clip.home .pitch-arc-circle { left: 12%; }
.pitch-arc-clip.away .pitch-arc-circle { left: 88%; }

.pitch-player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 72px;
}

.pitch-jersey {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.pitch-player.home .pitch-jersey { background: var(--home-color); }
.pitch-player.away .pitch-jersey { background: var(--away-color); }

.pitch-name {
  font-size: 10px;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  text-align: center;
  white-space: nowrap;
}

.lineup-manager {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}

.lineup-player {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  padding: 3px 10px;
}

.lineup-player-name { white-space: nowrap; }

.lineup-player-stats {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.lineup-bench-title {
  margin-top: 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 720px) {
  .escalacoes-grid, .lineup-live-grid { grid-template-columns: 1fr; }
}

/* Data face - every numeric readout reads like an odds-board digit. */

.stats-table td,
.tipos-table td,
.escalacoes-table td,
.standings-table td,
.analyzed-date,
.analyzed-result,
.lineup-player-stats,
.period-bar span,
.state-pct,
.state-total {
  font-family: var(--font-mono);
}

/* Signature moment: a live score/odd update flips like a stadium
   split-flap board instead of just snapping to the new value. Applied by
   app.js only when a value actually changes between renders (never on
   first paint or on filter/sort toggles), so the motion stays meaningful. */

@keyframes flip-update {
  0%   { transform: rotateX(0deg); color: var(--gold); text-shadow: 0 0 10px rgba(242, 177, 52, 0.65); }
  48%  { transform: rotateX(90deg); }
  52%  { transform: rotateX(-90deg); }
  100% { transform: rotateX(0deg); color: inherit; text-shadow: none; }
}

.flip-update {
  display: inline-block;
  animation: flip-update 0.6s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .flip-update {
    animation: none;
    color: var(--gold);
  }
}
