/* Wspólna góra serwisu: barwy, kroje, tytuł, pasek podsumowania, menu oraz
   komponent wyniku meczu. Każda strona wczytuje ten arkusz przed własnym, więc
   nagłówek wygląda i mierzy tak samo na statystykach i na szczegółach meczu. */
:root {
  --bg: #05080f;
  --panel: #0a1520;
  --panel-2: #0d1b28;
  --row: #0e1a26;
  --row-alt: #091420;
  --header: #1e4370;
  --line: #16324a;
  --text: #e8eef5;
  --muted: #7f93a8;
  --gold: #ffc72e;
  --green: #5ce6b8;
  --red: #ff7361;
}
/* Same display face the game uses. Letters only in the title — this is a
   trial build whose digits and punctuation are foundry watermarks.
   The URL is relative to this stylesheet, which is served from assets/ —
   an absolute /assets/... would resolve outside Caddy's /tf-lobby/ prefix. */
@font-face {
  font-family: "Rocabe";
  src: url("rocabe.ttf") format("truetype");
  font-display: swap;
}
/* Handel Gothic carries the whole Polish alphabet, so headings and tabs can
   use it without a fallback for diacritics. */
@font-face {
  font-family: "Handel Gothic";
  src: url("handel-gothic.ttf") format("truetype");
  font-display: swap;
}
* { box-sizing: border-box; }
/* Miejsce na pionowy pasek przewijania jest zarezerwowane zawsze, więc krótsza
   zakładka nie poszerza strony i cała treść nie przesuwa się przy przełączaniu. */
html { scrollbar-gutter: stable; }
body {
  margin: 0; padding: 16px;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.45;
}
.wrap { max-width: 1000px; margin: 0 auto; }
.site-header a { text-decoration: none; }
h1 {
  margin: 8px 0 4px;
  font-family: "Rocabe", "Courier New", monospace;
  font-size: clamp(30px, 7vw, 52px);
  letter-spacing: 3px;
  color: var(--green);
  text-align: center;
  text-shadow: 3px 3px 0 #000;
}
.sub { text-align: center; color: var(--muted); margin-bottom: 18px; font-size: 14px; }

.stats-strip {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 22px;
}
.chip {
  background: var(--panel); border: 2px solid var(--line);
  box-shadow: 3px 3px 0 #000; padding: 8px 16px; text-align: center; min-width: 120px;
}
.chip b { display: block; font-size: 26px; color: var(--gold); }
/* Data pierwszego meczu czyta się jak podpis, nie jak wynik: biała i o tyle
   mniejsza od liczb, żeby zmieściła się w jednej linii kafelka. */
.chip b.chip-date { font-size: 19px; color: #fff; letter-spacing: 1px; }
/* Direct children only: the ticker's own spans carry kit colours, and a
   descendant selector here would outrank the .tc-* classes. */
.chip > span { font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.chip-ticker { max-width: 360px; overflow: hidden; }
.chip-ticker #ticker-content {
  overflow: hidden;
  white-space: nowrap;
  padding: 4px 0;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-note { color: var(--muted); }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tabs {
  display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid var(--line);
}
/* Zakładki są odnośnikami (każda ma własny adres), więc wyglądają jak przyciski
   dopiero po zdjęciu domyślnego stylu linku. */
.tab-button {
  padding: 12px 20px; background: transparent; border: none; color: var(--muted);
  font-family: "Handel Gothic", "Courier New", monospace; font-size: 15px; font-weight: bold;
  text-decoration: none; display: inline-block;
  cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s;
  text-transform: uppercase; letter-spacing: 1px;
}
.tab-button:hover { color: var(--text); }
.tab-button.active { color: var(--gold); border-bottom-color: var(--gold); }

/* --- Wynik meczu ----------------------------------------------------------
   One component, three homes: the history table spreads it over three cells,
   the records table and the ticker keep it inline. Everything about how a
   result looks is decided here. */
.match-result-name {
  font-family: "Handel Gothic", "Courier New", monospace;
  letter-spacing: 1px;
}
.match-result-name.win { font-weight: bold; }
.match-result-score {
  color: var(--gold); font-weight: bold; letter-spacing: 1px;
}
.match-result-score a {
  color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted);
}
.match-result-score a:hover, .match-result-score a:focus-visible { color: var(--green); }
/* The inline arrangement: two nicknames around the score, never wrapped. */
.match-result {
  display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap;
}
.match-result .match-result-name { font-size: 14px; }
.match-result .match-result-score { font-size: 14px; }
/* The ticker is the same component, only spaced for a scrolling strip. */
.match-result--ticker { padding: 2px 16px; font-weight: bold; }

footer { text-align: center; color: var(--muted); font-size: 12px; margin: 26px 0 10px; }

@media (max-width: 620px) {
  body { padding: 10px; font-size: 14px; }
}
@media (min-width: 1440px) {
  .wrap { max-width: 75vw; }
  body { font-size: 18px; }
  .tab-button { font-size: 16px; }
  .chip b { font-size: 28px; }
  .chip b.chip-date { font-size: 21px; }
}
