/* =========================================================
   Hoops Grid — σκούρο θέμα
   ========================================================= */
:root {
  --bg: #0b0d12;
  --surface: #141820;
  --surface-2: #1b2029;
  --surface-3: #232935;
  --border: #262d3a;
  --text: #eceef3;
  --muted: #8d95a5;
  --accent: #ff6b1a;          /* πορτοκαλί EuroLeague */
  --accent-soft: rgba(255, 107, 26, 0.14);
  --blue: #2f6bff;            /* στήλες PTS/REB/AST στο game log */
  --blue-soft: rgba(47, 107, 255, 0.16);
  --win: #1fd690;
  --loss: #ff5566;
  /* Χρώματα γραφημάτων και σύγκρισης: 4 χρώματα με σταθερή σειρά (μπλε, πορτοκαλί, aqua, κίτρινο).
     Ελεγμένα για αχρωματοψία και αντίθεση πάνω στο --surface (validator του dataviz skill) */
  --slot-1: #3987e5;
  --slot-2: #d95926;
  --slot-3: #199e70;
  --slot-4: #c98500;
  --chart-grid: #232935;
  --radius: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }

/* Πλάτος σελίδων: 1600px για τις κανονικές, 1880px (container-wide) για πίνακες, αρχική και κάρτες */
.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 28px; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.empty { color: var(--muted); padding: 20px; margin: 0; }

/* ---------- Σήματα & φωτογραφίες ---------- */
.crest {
  --size: 40px;
  width: var(--size); height: var(--size); flex: none;
  display: inline-grid; place-items: center;
  background: #fff; border-radius: 50%;
  padding: calc(var(--size) * 0.12);
  vertical-align: middle;
}
.crest img { width: 100%; height: 100%; object-fit: contain; }

.headshot {
  --size: 36px;
  width: var(--size); height: var(--size); flex: none;
  display: inline-block; overflow: hidden; border-radius: 50%;
  background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='15' r='7' fill='%23434b5a'/%3E%3Cpath d='M6 38c1-8 7-13 14-13s13 5 14 13z' fill='%23434b5a'/%3E%3C/svg%3E") center/cover;
  vertical-align: middle;
}
.headshot img { width: 100%; height: 100%; object-fit: cover; object-position: top; background: var(--surface-3); }

/* ---------- Header ---------- */
/* Μπάρα ομάδων: σήμα χωρίς κύκλο και συντομογραφία από κάτω */
.crest-strip { background: #07080b; border-bottom: 1px solid var(--border); padding: 10px 0; }
.crest-strip-row { display: flex; align-items: center; }
.crest-strip-row .container { flex: 1; min-width: 0; }
.site-info { flex: none; padding-left: 20px; font-size: 12px; color: var(--muted); white-space: nowrap; }
/* Λογότυπο στο κενό αριστερά από τη μπάρα ομάδων (όπως και το site-info, κρύβεται σε στενές οθόνες) */
.strip-logo { flex: none; display: flex; align-items: center; margin: 0 20px; }
.strip-logo img { height: 80px; width: auto; display: block; }
@media (max-width: 1400px) { .site-info, .strip-logo { display: none; } }
.crest-strip-inner {
  display: flex; justify-content: space-between; align-items: stretch; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.crest-strip-inner::-webkit-scrollbar { display: none; }
.crest-strip-item {
  flex: 1 0 54px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 4px 6px; border-radius: 8px; transition: background 0.15s;
}
.crest-strip-item:hover { background: var(--surface-3); }
.crest-strip-item.active { background: var(--bg); }
.crest-plain { width: 38px; height: 38px; display: grid; place-items: center; transition: transform 0.15s; }
.crest-plain img { max-width: 100%; max-height: 100%; object-fit: contain; }
.crest-strip-item:hover .crest-plain { transform: translateY(-2px); }
.crest-plain.invert img { filter: invert(1) brightness(0.92); }
.crest-plain.outline img { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.75)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.35)); }
.crest-strip-code { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.crest-strip-item:hover .crest-strip-code { color: var(--text); }
.crest-strip-item.active .crest-strip-code { color: var(--accent); }

.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-row { display: flex; align-items: stretch; }
.navbar-row .container { flex: 1; min-width: 0; }
.navbar-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; }

/* ---------- Μενού ρυθμίσεων (⚙ πάνω αριστερά): refresh δεδομένων + auto-refresh ---------- */
.settings-menu { position: relative; flex: none; display: flex; align-items: center; padding-left: 16px; }
.settings-trigger {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; cursor: pointer;
  color: var(--muted); background: transparent; border: 1px solid transparent; transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.settings-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-trigger:hover { color: var(--text); background: var(--surface-2); }
.settings-menu.open .settings-trigger { color: var(--accent); background: var(--accent-soft); border-color: rgba(255, 107, 26, 0.35); }
.settings-popup {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 60; width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); padding: 14px;
}
.settings-popup-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.settings-popup .settings-refresh-btn { width: 100%; text-align: center; cursor: pointer; }
.settings-popup .refresh-status { margin: 8px 0 0; font-size: 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.settings-row small { font-weight: 500; }
.switch {
  position: relative; width: 38px; height: 22px; flex: none; border-radius: 999px; cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--border); transition: background 0.15s, border-color 0.15s;
}
.switch-dot {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform 0.15s, background 0.15s;
}
.switch:hover .switch-dot { background: var(--text); }
.switch.on { background: rgba(31, 214, 144, 0.18); border-color: rgba(31, 214, 144, 0.5); }
.switch.on .switch-dot { background: var(--win); transform: translateX(16px); }
.switch.on:hover .switch-dot { background: var(--win); }
/* "Home Page": ίδιο στυλ με τα tabs του μενού (Games, Standings, ...) */
.brand {
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.brand:hover { color: var(--text); background: var(--surface-2); }
.brand.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-links { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.navbar-search { width: 280px; flex: none; display: flex; justify-content: flex-end; }

/* ---------- Αναζήτηση ---------- */
.search { position: relative; width: 100%; }
.search input {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 14px 9px 38px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { filter: invert(0.6); }
.search-icon {
  position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.search-hero { max-width: 640px; margin: 0 auto; }
.search-hero input { font-size: 18px; padding: 17px 22px 17px 54px; background: var(--surface); }
.search-hero .search-icon { left: 20px; width: 22px; height: 22px; }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); overflow: hidden; text-align: left;
}
.search-compact .search-results { left: auto; width: 360px; max-width: calc(100vw - 32px); }
.search-result { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.search-result + .search-result { border-top: 1px solid var(--border); }
.search-result:hover, .search-result.selected { background: var(--surface-2); color: var(--text); }
.search-result-text { flex: 1; min-width: 0; }
.search-result-text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-text span { color: var(--muted); font-size: 13px; }
.search-empty { padding: 14px; color: var(--muted); }

/* ---------- Αρχική ---------- */
.hero {
  text-align: center; padding: 64px 0 56px;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(255, 107, 26, 0.18), transparent 60%),
    linear-gradient(180deg, #10131a, var(--bg));
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 28px; }
/* Αρχική: λογότυπο αριστερά από τον τίτλο */
.hero-brand { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 28px; }
.hero-brand h1 { margin-bottom: 0; }
.hero-logo { height: 112px; width: auto; display: block; }
@media (max-width: 640px) { .hero-logo { height: 76px; } .hero-brand { gap: 12px; } }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; margin: 0 0 10px; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; }
.panel-header h2 { font-size: 22px; }
.panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 14px;
}
.panel-title h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; }

.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 40px; }

/* ---------- Αρχική: ομάδες | βαθμολογία | αγωνιστική ----------
   Μεγάλη οθόνη (≥1500px): τρεις στήλες σε όλο το πλάτος.
   Μεσαία (1000-1499px): ομάδες αριστερά, βαθμολογία και αγωνιστική η μία κάτω από την άλλη δεξιά.
   Μικρή (<1000px): μία στήλη, πρώτα βαθμολογία, μετά αγωνιστική, μετά ομάδες. */
.container-wide { max-width: 1880px; padding: 0 24px; }
.container-full { max-width: none; padding: 0 24px; }
.home-layout {
  display: grid; gap: 24px; align-items: start; margin-bottom: 40px;
  grid-template-columns: minmax(340px, 1fr) minmax(560px, 1.6fr) minmax(400px, 1fr);
  grid-template-areas: "teams standings round";
}
.home-teams { grid-area: teams; min-width: 0; }
.mini-standings { grid-area: standings; margin-bottom: 0; min-width: 0; }
.home-side { grid-area: round; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.home-round, .home-leaders { margin-bottom: 0; min-width: 0; }
.home-round.loading { opacity: 0.5; transition: opacity 0.15s; }

/* Στην αρχική, σε οθόνη αρκετά ψηλή ώστε να βγάζει νόημα (≥700px) και όχι σε κινητό (≥1000px πλάτος):
   οι τρεις στήλες γεμίζουν ό,τι ύψος απομένει κάτω από το hero και κυλούν η καθεμιά ξεχωριστά από μέσα,
   ώστε να μη χρειάζεται scroll σε όλη τη σελίδα. */
@media (min-width: 1000px) and (min-height: 700px) {
  body.home-page { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
  body.home-page main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
  body.home-page .hero { flex: none; }
  body.home-page .home-layout { flex: 1; min-height: 0; align-items: stretch; margin-bottom: 0; }
  body.home-page .home-teams, body.home-page .mini-standings, body.home-page .home-side { overflow-y: auto; min-height: 0; }
}

/* Βελάκια αγωνιστικής στην αρχική */
.round-switch { display: flex; align-items: center; gap: 8px; }
.round-arrow {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 20px; line-height: 1;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
}
.round-arrow:hover { border-color: var(--accent); color: var(--accent); }
.round-arrow.disabled { opacity: 0.3; }

/* Leaders στην αρχική: καρτέλες κατηγοριών + top 5 */
.leader-mode-toggle { padding: 0 16px 12px; }
.leader-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 16px 10px; }
.leader-tabs button {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
  padding: 6px 10px; border-radius: 7px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
}
.leader-tabs button:hover { color: var(--text); }
.leader-tabs button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.leader-list { list-style: none; margin: 0; padding: 0; }
.leader-list li + li, .leader-list li:first-child { border-top: 1px solid var(--border); }
.leader-list a { display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.leader-list a:hover { background: var(--surface-2); color: var(--text); }
.leader-rank { width: 16px; text-align: right; color: var(--muted); font-weight: 700; font-size: 13px; }
.leader-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.leader-name strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-name small { color: var(--muted); font-size: 12px; }
.leader-value { font-size: 17px; font-weight: 800; }
.leader-note { font-size: 12px; margin: 0; padding: 8px 16px 12px; border-top: 1px solid var(--border); }

/* Σελίδα Stats > Leaders */
.leaders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-bottom: 24px; }
.leader-card { margin-bottom: 0; }
.leader-top { display: flex; align-items: center; gap: 14px; padding: 4px 16px 14px; }
.leader-top:hover { color: var(--text); }
.leader-top-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.leader-top-text strong { font-size: 16px; }
.leader-top-text .crest { margin-right: 2px; }
.leader-top-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Σελίδα Teams ---------- */
.teams-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; margin-bottom: 24px; }
.team-tile {
  display: flex; flex-direction: column; gap: 14px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.15s;
}
.team-tile:hover { border-color: #3a4252; }
.team-tile-head { display: flex; align-items: center; gap: 16px; }
.team-tile-title { flex: 1; min-width: 0; }
.team-tile-name { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; }
.team-tile-pos { font-size: 22px; font-weight: 800; color: var(--muted); }
.team-tile-facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 8px; margin: 0; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.team-tile-facts dt { color: var(--muted); font-size: 12px; }
.team-tile-facts dd { margin: 3px 0 0; font-weight: 700; font-size: 16px; }
.team-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.team-tile-next { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.team-tile-next:hover strong { color: var(--accent); }
.team-tile-injuries .injury-badge { margin-left: 0; cursor: pointer; }
.home-section-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 4px 12px; }
.home-section-head h2 { font-size: 19px; }

.team-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.team-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.team-row:hover { border-color: #3a4252; background: var(--surface-2); }
.team-row-text { min-width: 0; }
.team-row-name { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; }
.team-row .team-card-links { font-size: 13px; margin-top: 3px; }

/* Αγωνιστική στην αρχική: συμπαγείς γραμμές αγώνων */
.mini-day { padding: 10px 18px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); border-top: 1px solid var(--border); }
.mini-day:first-of-type { border-top: 0; padding-top: 2px; }
.mini-game {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 84px minmax(0, 1fr) 18px; align-items: center; gap: 10px;
  padding: 9px 18px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600;
}
.mini-game:hover { color: var(--text); background: var(--surface-2); }
.mini-game-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.mini-game-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-game-team.home { justify-content: flex-end; text-align: right; }
.mini-game-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-game-score { display: flex; justify-content: center; }
.mini-game-score .vs { color: var(--muted); font-size: 12px; font-weight: 700; }
.mini-game-score b {
  min-width: 38px; padding: 3px 6px; text-align: center; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); color: var(--muted);
}
.mini-game-score b:first-child { border-radius: 6px 0 0 6px; }
.mini-game-score b:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.mini-game-score b.win { background: var(--win); border-color: var(--win); color: #06140e; }
.mini-game-arrow { color: var(--muted); text-align: right; }
.mini-game:hover .mini-game-arrow { color: var(--accent); }
.mini-game .win-text { color: var(--text); }
/* Όταν το πλαίσιο της αγωνιστικής είναι στενό, αντί για το όνομα φαίνεται η συντομογραφία (PAO, OLY...) */
.home-round { container-type: inline-size; }
.mini-game-name .name-code { display: none; }
@container (max-width: 559px) {
  .mini-game { gap: 8px; padding-left: 14px; padding-right: 14px; }
  .mini-game-name .name-full { display: none; }
  .mini-game-name .name-code { display: inline; letter-spacing: 0.03em; }
}

@media (max-width: 1499px) {
  .home-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    grid-template-areas: "teams standings" "teams round";
  }
  .team-list { grid-template-columns: 1fr; }
}
@media (max-width: 999px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "standings" "round" "teams"; }
  .team-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

.mini-standings .stats-table td, .mini-standings .stats-table th { padding: 7px 7px; }
.mini-standings .stats-table th:first-child, .mini-standings .stats-table td:first-child { padding-left: 14px; }
.mini-standings .team-cell > .crest { margin-right: 8px; }
.small-link { font-size: 13px; font-weight: 600; }
.small-link:hover { color: var(--accent); }

/* Ζώνες βαθμολογίας: playoffs (πράσινο) και play-in (πορτοκαλί) */
.zone-row td:first-child { box-shadow: inset 3px 0 0 transparent; }
.zone-row.playoffs td:first-child { box-shadow: inset 3px 0 0 var(--win); }
.zone-row.playin td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.stats-table .zone-head td {
  padding-top: 10px; padding-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--surface); border-bottom: 0;
}
.zone-head.playoffs td { color: var(--win); }
.zone-head.playin td { color: var(--accent); }
.stats-table tbody tr.zone-head:hover td { background: var(--surface); }
.team-card {
  display: flex; align-items: center; gap: 18px; min-height: 96px; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.team-card:hover { border-color: #3a4252; background: var(--surface-2); transform: translateY(-2px); }
.team-card-name { font-size: 18px; font-weight: 600; display: block; }
.team-card-links { display: flex; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 15px; }
.team-card-links a { color: var(--muted); }
.team-card-links a:hover { color: var(--accent); }

/* ---------- Σελίδα ομάδας ---------- */
.team-banner {
  position: relative; overflow: hidden; text-align: center; padding: 44px 0 36px;
  background:
    linear-gradient(115deg, transparent 62%, rgba(255, 107, 26, 0.16) 62%, rgba(255, 107, 26, 0.05) 80%, transparent 80%),
    radial-gradient(ellipse at 50% 0%, #1d2330, var(--bg) 70%);
  border-bottom: 1px solid var(--border);
}
.team-banner-inner { display: flex; flex-direction: column; align-items: center; }
.team-banner .crest { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.team-banner h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; margin-top: 18px; letter-spacing: -0.02em; }
.team-banner-sub { color: var(--muted); font-size: 17px; margin: 6px 0 18px; }
.record { display: flex; align-items: center; gap: 22px; }
.record div:not(.record-divider) { display: flex; flex-direction: column; align-items: center; }
.record span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.record strong { font-size: 30px; font-weight: 800; }
.record-divider { width: 1px; height: 40px; background: var(--border); }

.tabs { display: flex; gap: 6px; margin: 24px 0 22px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 10px 18px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }

.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 32px; font-weight: 800; }
.section-title { font-size: 19px; margin: 28px 0 14px; display: flex; align-items: center; gap: 10px; }
.badge { font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 3px 9px; border-radius: 999px; }

/* ---------- Toolbar / διακόπτες ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toggle { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.toggle a, .toggle button {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 7px 14px; border-radius: 7px;
}
.toggle a:hover, .toggle button:hover { color: var(--text); }
.toggle .active { background: var(--accent); color: #fff; }
.toggle .active:hover { color: #fff; }

.toolbar-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.select-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--muted);
}
.select-pill select { font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: none; border: 0; outline: none; cursor: pointer; }
.select-pill option { background: var(--surface); }
.page-tabs { margin-top: 0; }

.pill-button {
  display: inline-block; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.pill-button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Tiles (μέσοι όροι) ---------- */
.tiles {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 28px; overflow: hidden;
}
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 58px 8px; }
.tile + .tile { border-left: 1px solid var(--border); }
.tile strong { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; position: relative; }
.tile span { color: var(--muted); font-size: 13px; font-weight: 500; position: relative; }
.tile-arc { position: absolute; width: 164px; height: 164px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tile-arc path { fill: none; stroke: #e0b43a; stroke-width: 1.4; opacity: 0.8; }
.tiles-compact .tile { padding: 22px 8px; }
.tiles-compact .tile strong { font-size: 28px; }

/* ---------- Πίνακες ---------- */
.table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.stats-table th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); letter-spacing: 0.02em;
  padding: 11px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  position: relative; user-select: none;
}
.stats-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table th:first-child, .stats-table td:first-child { padding-left: 18px; }
.stats-table th:last-child, .stats-table td:last-child { padding-right: 18px; }
.stats-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.stats-table tr.clickable { cursor: pointer; }
.stats-table tfoot td { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 0; font-weight: 500; }
.stats-table tfoot tr.strong td { font-weight: 700; }
.stats-table tfoot tr + tr td { border-top: 1px solid var(--border); }

.sortable th[data-col] { cursor: pointer; }
.sortable th[data-col]:hover { color: var(--text); }
.sortable th.sorted { color: var(--text); box-shadow: inset 0 2px 0 var(--accent); background: var(--surface-3); }
.sortable th.sorted::after { content: " ▼"; font-size: 9px; color: var(--accent); }
.sortable th.sorted.asc::after { content: " ▲"; }
.sortable td.sorted { background: rgba(255, 255, 255, 0.035); font-weight: 600; }

/* Στήλες ταυτότητας (#, Παίκτης/Ομάδα) "παγωμένες" αριστερά σε πίνακες με οριζόντια κύλιση.
   Το ακριβές αριστερό περιθώριο κάθε στήλης υπολογίζεται δυναμικά στο app.js (updateStickyColumns). */
.stats-table .sticky-col { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.stats-table thead .sticky-col { background: var(--surface-2); z-index: 3; }
.stats-table tfoot .sticky-col { background: var(--surface-2); }
.stats-table tbody tr:hover .sticky-col { background: var(--surface-2); }
.stats-table .sticky-col.sorted { background: var(--surface-3); }
.stats-table .sticky-col-end { border-right: 1px solid var(--border); }

.player-cell, .team-cell, .game-log .opponent-cell { font-weight: 600; }
.player-cell > *, .team-cell > *, .game-log .opponent-cell > * { vertical-align: middle; }
.player-cell > .headshot, .team-cell > .crest, .game-log .opponent-cell > .crest { margin-right: 10px; }
.player-cell a:hover, .team-cell a:hover { color: var(--accent); }
.roster-group .stats-table td { padding-top: 8px; padding-bottom: 8px; }

/* Game log (σελίδα παίκτη) */
.game-log td a { color: #7ea6ff; text-decoration: underline; text-underline-offset: 3px; }
.game-log td a:hover { color: var(--accent); }
.game-log td, .game-log th { padding-left: 8px; padding-right: 8px; }
.game-log th.hl { background: var(--blue); color: #fff; }
.game-log td.hl { background: var(--blue-soft); }
.game-log tbody tr:hover td.hl { background: rgba(47, 107, 255, 0.24); }
.win-text { color: var(--win); font-weight: 700; }
.loss-text { color: var(--loss); font-weight: 700; }
.dnp { color: var(--muted); font-style: italic; }

/* Βαθμολογία */
.form-dot { width: 22px; height: 22px; margin-right: 4px; border-radius: 50%; display: inline-grid; place-items: center; vertical-align: middle; font-size: 11px; font-weight: 700; color: #0b0d12; }
.form-dot.w { background: var(--win); }
.form-dot.l { background: var(--loss); }
.form-dot.small { width: 17px; height: 17px; margin-right: 2px; font-size: 9px; }

/* ---------- Κάρτες αγώνων ---------- */
.game-list { display: flex; flex-direction: column; gap: 12px; }
.game-card {
  display: grid; grid-template-columns: 1.3fr 1.4fr auto 1.4fr 0.6fr; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--surface-3);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 0;
}
.game-card.played { border-left-color: #3a4252; }
.game-when strong { display: block; font-size: 15px; }
.game-when span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
.team-position { color: var(--muted); font-weight: 500; font-size: 13px; }
.game-team { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 16px; min-width: 0; }
.game-team.home { justify-content: flex-end; text-align: right; }
.game-team.focus .game-team-name { color: var(--text); }
.game-team-name { min-width: 0; }
.game-score { display: flex; justify-content: center; min-width: 126px; }
.game-score .score {
  min-width: 62px; padding: 8px 10px; text-align: center; font-size: 26px; font-weight: 700;
  border: 1px solid var(--border); color: var(--muted); font-variant-numeric: tabular-nums;
}
.game-score .score:first-child { border-radius: 8px 0 0 8px; }
.game-score .score:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.game-score .score.win { background: var(--win); border-color: var(--win); color: #06140e; }
.game-score .vs { color: var(--muted); font-weight: 700; }
.game-action { display: flex; justify-content: flex-end; }

/* Χώρισμα ημερομηνίας ανάμεσα στους αγώνες */
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 10px; font-size: 16px; }
.day-head:first-of-type { margin-top: 18px; }
.day-head .muted { font-size: 13px; font-weight: 600; }

/* ---------- Επιλογή ομάδας (Games) ---------- */
.games-head { justify-content: space-between; align-items: center; }
.page-head-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.team-select { position: relative; width: 360px; max-width: 100%; }
.team-select-field {
  display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; height: 46px; cursor: text;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.team-select.open .team-select-field { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.team-select-field input {
  flex: 1; min-width: 0; font: inherit; font-weight: 500; color: var(--text); background: none; border: 0; outline: none;
}
.team-select-field input::placeholder { color: var(--muted); }
.team-select-dot { width: 22px; height: 22px; flex: none; border: 1.5px dashed var(--muted); border-radius: 50%; }
.round-status { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; line-height: 1; }
.round-status.pending { border: 1.5px dashed var(--muted); }
.round-status.done { background: var(--win); color: #06140e; }
.team-select-clear {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--muted); background: var(--surface-3);
}
.team-select-clear:hover { color: #fff; background: var(--accent); }
.team-select-chevron { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.team-select.open .team-select-chevron { transform: rotate(180deg); }
.team-select-list {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; max-height: 380px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); padding: 6px;
}
.team-select-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.team-select-list a.active { background: var(--surface-2); color: var(--text); }
.team-select-list a.current { color: var(--accent); font-weight: 700; }
.team-select-empty { padding: 10px; color: var(--muted); font-size: 14px; }

.round-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.round-picker a {
  min-width: 38px; padding: 7px 0; text-align: center; border-radius: 8px; font-weight: 600; font-size: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.round-picker a.completed { color: var(--win); border-color: rgba(31, 214, 144, 0.45); background: rgba(31, 214, 144, 0.08); }
.round-picker a.current { border-color: var(--accent); color: var(--accent); }
.round-picker a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Μενού αγωνιστικών στο πρόγραμμα ομάδας: νίκη / ήττα / επόμενος / υπόλοιποι */
.schedule-rounds a.win { color: var(--win); border-color: rgba(31, 214, 144, 0.45); background: rgba(31, 214, 144, 0.08); }
.schedule-rounds a.loss { color: var(--loss); border-color: rgba(255, 85, 102, 0.45); background: rgba(255, 85, 102, 0.08); }
.schedule-rounds a.next { background: var(--accent); border-color: var(--accent); color: #fff; }
.schedule-rounds a:hover { border-color: var(--text); color: var(--text); }
.round-legend { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.legend::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--surface-3); }
.legend.win::before { background: var(--win); }
.legend.loss::before { background: var(--loss); }
.legend.next::before { background: var(--accent); }
.game-card { scroll-margin-top: 84px; }
.game-card:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Σελίδες πίνακα */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.pager-buttons { display: flex; flex-wrap: wrap; gap: 4px; }
.pager button {
  min-width: 32px; height: 32px; padding: 0 8px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px;
}
.pager button:hover:not(:disabled) { color: var(--text); border-color: var(--text); }
.pager button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager button:disabled { opacity: 0.35; cursor: default; }

/* Σελίδα αγώνα */
.scoreboard { padding: 22px 24px 28px; text-align: center; }
.scoreboard-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin-top: 16px; }
.scoreboard-team { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.game-score.big .score { font-size: 40px; min-width: 96px; }

/* ---------- Σελίδα παίκτη ---------- */
.player-hero {
  padding: 36px 0; margin-bottom: 28px; border-bottom: 1px solid var(--border);
  background:
    linear-gradient(115deg, transparent 58%, rgba(255, 255, 255, 0.025) 58%, rgba(255, 255, 255, 0.025) 74%, transparent 74%),
    radial-gradient(ellipse at 20% 0%, #1d2330, var(--bg) 70%);
}
.player-hero-inner { display: flex; align-items: center; gap: 36px; }
.player-hero .headshot { border: 3px solid var(--surface-3); }
.player-hero-text { flex: 1; min-width: 0; }
.player-hero h1 { font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.player-hero-sub { color: var(--muted); font-size: 17px; margin: 6px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.player-facts { display: flex; flex-wrap: wrap; gap: 12px 56px; margin: 16px 0 0; }
.player-facts dt { color: var(--muted); font-size: 13px; }
.player-facts dd { margin: 4px 0 0; font-weight: 700; }
.player-hero-club { align-self: flex-start; }
.season-chip {
  display: inline-block; margin-bottom: 12px; padding: 6px 12px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
}

/* Πίνακες σελίδας παίκτη, με ομάδες στηλών (Rebounds / Blocks / Fouls) */
.player-table th, .player-table td { padding-left: 9px; padding-right: 9px; }
.player-table .group-row th { background: var(--surface); padding-top: 8px; padding-bottom: 4px; border-bottom: 0; text-align: center; font-weight: 500; }
.player-table .group-row th.group { color: var(--text); }
.player-table .group-start { border-left: 1px solid var(--border); }
.player-table tfoot td { background: var(--surface-2); }
/* Πίνακας παικτών λίγκας (Stats / Players): πιο πυκνός ώστε να χωράνε όλες οι στήλες */
.player-table.sortable { font-size: 13px; }
.player-table.sortable th, .player-table.sortable td { padding-left: 6px; padding-right: 6px; }
.player-table.sortable th:first-child, .player-table.sortable td:first-child { padding-left: 14px; }
.player-table.sortable th:last-child, .player-table.sortable td:last-child { padding-right: 14px; }
.player-table.sortable .team-cell > .crest { margin-right: 6px; }

/* ---------- Κάρτες παικτών (Players > Accumulated) ---------- */
.search-filter { width: 320px; max-width: 100%; }
.player-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.player-card {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding-right: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.player-card:hover { color: var(--text); border-color: var(--team); background: var(--surface-2); transform: translateY(-2px); }
.player-card-photo {
  width: 80px; align-self: stretch; flex: none; display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(110deg, var(--team) 0 56%, var(--surface-3) 56%);
}
.player-card-photo img { width: 100%; height: 76px; object-fit: cover; object-position: top; }
.player-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.player-card-first, .player-card-last { text-transform: uppercase; font-size: 13px; letter-spacing: 0.04em; font-weight: 700; overflow-wrap: anywhere; }
.player-card-last { font-size: 14px; }
.player-card-stats { margin-top: 6px; color: var(--muted); font-size: 12px; }
.player-card-stats b { color: var(--text); font-weight: 600; }
.load-more { display: flex; justify-content: center; margin: 28px 0 8px; }

/* Κάρτες αριστερά και πλαίσιο παίκτη δεξιά (μένει σταθερό όσο κάνεις scroll) */
.cards-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.cards-main { min-width: 0; }
.cards-layout .player-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.player-card.selected { border-color: var(--team); background: var(--surface-2); box-shadow: 0 0 0 1px var(--team); }
.player-side {
  position: sticky; top: 76px; margin: 0; padding: 20px; max-height: calc(100vh - 92px); overflow-y: auto;
  transition: opacity 0.15s;
}
.player-side.loading { opacity: 0.5; }
.player-panel-close {
  display: none; position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  font-size: 22px; line-height: 1; color: var(--text); background: var(--surface-3); border: 0; cursor: pointer;
}
.panel-player { position: relative; display: flex; flex-direction: column; gap: 14px; }
.panel-player-head { display: flex; align-items: center; gap: 16px; }
.panel-player-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.panel-player-title h2 { font-size: 21px; text-transform: uppercase; letter-spacing: -0.01em; }
.panel-player-team { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.panel-player-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.panel-player-facts dt { color: var(--muted); font-size: 12px; }
.panel-player-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.panel-player .injury-note { margin-top: 0; }
.panel-player-section { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 4px; }
.panel-player-section .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.panel-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.panel-stat-grid div {
  display: flex; flex-direction: column; align-items: center; padding: 10px 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.panel-stat-grid strong { font-size: 20px; font-weight: 800; }
.panel-stat-grid span { color: var(--muted); font-size: 11px; font-weight: 700; }
.panel-shots { width: 100%; border-collapse: collapse; font-size: 14px; }
.panel-shots th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; padding: 7px 0; }
.panel-shots td { padding: 7px 0 7px 10px; font-variant-numeric: tabular-nums; }
.panel-shots .num { text-align: right; }
.panel-shots tr + tr { border-top: 1px solid var(--border); }
.panel-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.panel-form div { display: flex; flex-direction: column; }
.panel-form .muted { font-size: 11px; font-weight: 700; }
.panel-form strong { font-size: 18px; }
.panel-form .form-delta { font-size: 12px; }
.panel-games { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.panel-games li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px 62px 58px; align-items: center; gap: 6px; padding: 7px 0; }
.panel-games li + li { border-top: 1px solid var(--border); }
.panel-games .num { text-align: right; color: var(--muted); }
.panel-games .num b { color: var(--text); }
.panel-games .crest { margin: 0 2px; }
.full-profile {
  display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 4px; padding: 12px;
  border-radius: 10px; font-weight: 700; color: #fff; background: var(--accent);
}
.full-profile:hover { color: #fff; filter: brightness(1.1); }

/* Μικρή οθόνη: το πλαίσιο ανοίγει από τα δεξιά πάνω από τις κάρτες */
@media (max-width: 1100px) {
  .cards-layout { grid-template-columns: minmax(0, 1fr); }
  .player-side {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(420px, 100vw); max-height: none;
    border-radius: 0; transform: translateX(100%); transition: transform 0.2s ease, opacity 0.15s;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.5);
  }
  .player-side.open { transform: none; }
  .player-panel-close { display: block; }
}

/* ---------- Σελίδα αγώνα: σκορ ανά δεκάλεπτο και MVP ---------- */
.game-extras { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-bottom: 24px; align-items: stretch; }
.game-extras > .panel { margin-bottom: 0; }
.periods-table td, .periods-table th { padding-top: 10px; padding-bottom: 10px; }
.periods-table .num { min-width: 44px; }
.periods-table td.period-won { color: var(--text); font-weight: 700; }
.periods-table tbody td.num:not(.period-won):not(.strong) { color: var(--muted); }
.mvp-card { display: flex; align-items: center; gap: 18px; padding: 18px 20px; flex-wrap: wrap; }
.mvp-card:hover { color: var(--text); border-color: var(--accent); }
.mvp-text { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.mvp-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.mvp-name { font-size: 20px; }
.mvp-stats { display: flex; gap: 16px; margin: 0; }
.mvp-stats dt { color: var(--muted); font-size: 11px; font-weight: 600; }
.mvp-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; }

/* ---------- Σελίδα παίκτη: φόρμα, γραφήματα, ρεκόρ, έδρα/εκτός ---------- */
.form-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.form-card {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.form-card-title { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; }
.form-card strong { font-size: 26px; font-weight: 800; }
.form-delta { font-size: 13px; font-weight: 700; }
.form-delta.up { color: var(--win); }
.form-delta.down { color: var(--loss); }
.form-delta.same { color: var(--muted); }
.form-card-season { font-size: 12px; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.chart-card { margin: 0; padding-bottom: 10px; }
.bar-chart { display: block; width: 100%; height: auto; padding: 0 10px; overflow: visible; }
.chart-grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart-baseline { stroke: #3a4252; stroke-width: 1; }
.chart-bar { fill: var(--slot-1); }
.chart-tick { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-average { stroke: var(--text); stroke-width: 1; opacity: 0.55; }
.chart-average-label { fill: var(--text); font-size: 11px; font-weight: 600; font-family: inherit; }
.chart-hit { fill: transparent; cursor: default; outline: none; }
.chart-hit.active, .chart-hit:focus-visible { fill: rgba(255, 255, 255, 0.05); }
.chart-tooltip {
  position: absolute; z-index: 80; pointer-events: none; display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap;
  background: var(--surface-3); border: 1px solid var(--border); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.chart-tooltip strong { font-size: 14px; }
.chart-tooltip span { color: var(--muted); }

.insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; margin-bottom: 8px; align-items: start; }
.highs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.high-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.high-card:not(:nth-child(4n)) { border-right: 1px solid var(--border); }
.high-card:hover { background: var(--surface-2); color: var(--text); }
.high-card span { font-size: 12px; }
.high-card strong { font-size: 24px; font-weight: 800; }
.high-card small { font-size: 11px; }

/* ---------- Σύγκριση ---------- */
.compare-grid {
  display: grid; grid-template-columns: 170px repeat(var(--cols), minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
form.loading .compare-grid { opacity: 0.5; transition: opacity 0.15s; }
.compare-corner { border-bottom: 1px solid var(--border); }
.compare-head {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px 16px; min-width: 0;
  border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); border-top: 4px solid var(--slot);
}
.compare-identity { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.compare-identity:hover { color: var(--text); }
.compare-identity strong { font-size: 16px; }
.compare-identity .muted { font-size: 13px; }
.compare-selects { display: flex; flex-direction: column; gap: 6px; }
.compare-selects select {
  width: 100%; font: inherit; font-size: 13px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px; cursor: pointer;
}
.compare-selects select:focus { outline: none; border-color: var(--accent); }
.compare-remove {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; font-size: 18px; color: var(--muted); background: var(--surface-3);
}
.compare-remove:hover { color: #fff; background: var(--loss); }
.compare-section {
  grid-column: 1 / -1; padding: 14px 16px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
}
.compare-label { padding: 9px 16px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); }
.compare-cell {
  display: grid; grid-template-columns: minmax(0, 1fr) 76px; align-items: center; gap: 10px;
  padding: 9px 16px; border-top: 1px solid var(--border); border-left: 1px solid var(--border);
}
.compare-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.compare-bar i { display: block; height: 100%; background: var(--slot); border-radius: 4px; }
.compare-value { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); }
.compare-cell.best .compare-value { color: var(--text); font-weight: 800; }
.compare-best { margin-left: 4px; font-size: 10px; color: var(--text); }
.slot-1 { --slot: var(--slot-1); }
.slot-2 { --slot: var(--slot-2); }
.slot-3 { --slot: var(--slot-3); }
.slot-4 { --slot: var(--slot-4); }

/* ---------- Injury report ---------- */
.injury-badge {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; cursor: help;
  color: #ffc53d; background: rgba(255, 197, 61, 0.14); border: 1px solid rgba(255, 197, 61, 0.35);
}
.injury-badge.out { color: var(--loss); background: rgba(255, 85, 102, 0.14); border-color: rgba(255, 85, 102, 0.4); }
.injury-badge.ok { color: var(--win); background: rgba(31, 214, 144, 0.12); border-color: rgba(31, 214, 144, 0.35); }
.hint .injury-badge, .injury-table .injury-badge { margin-left: 0; }
.injury-table { table-layout: fixed; min-width: 720px; }
.injury-table th:nth-child(1) { width: 30%; }
.injury-table th:nth-child(2) { width: 8%; }
.injury-table th:nth-child(3) { width: 13%; }
.injury-table th:nth-child(4) { width: 14%; }
.injury-table td { overflow: hidden; text-overflow: ellipsis; }
.injury-table .injury-comment { white-space: normal; color: var(--muted); }
.injury-source a { text-decoration: underline; text-underline-offset: 3px; }
.injury-source a:hover { color: var(--accent); }
.injury-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 16px; padding: 10px 14px;
  border-radius: 10px; background: rgba(255, 197, 61, 0.08); border: 1px solid rgba(255, 197, 61, 0.3); font-size: 14px;
}
.injury-note.out { background: rgba(255, 85, 102, 0.08); border-color: rgba(255, 85, 102, 0.35); }
.injury-note.ok { background: rgba(31, 214, 144, 0.07); border-color: rgba(31, 214, 144, 0.3); }
.injury-note .injury-badge { margin-left: 0; }
.injury-note .injury-source { font-size: 12px; margin-left: auto; }
.preview-injuries { border-top: 1px solid var(--border); }
.preview-injuries h3 { font-size: 13px; color: var(--loss); padding: 14px 20px 4px; }

/* ---------- Προεπισκόπηση αγώνα (πιθανές πεντάδες) ---------- */
/* Players και team comparison δίπλα δίπλα όταν χωράνε· από κάτω από αυτό το πλάτος γίνονται tabs
   (Player stats / Team stats), ώστε να μη στριμώχνονται τα δύο πλαίσια παικτών + η σύγκριση ομάδων */
.preview-tabs { display: none; margin-bottom: 20px; }
.preview-compare-row { display: flex; gap: 20px; align-items: start; }
.preview-compare-row > [data-game-panel] { display: block !important; min-width: 0; }
.preview-compare-row > [data-game-panel="player"] { flex: 1.7; }
.preview-compare-row > [data-game-panel="team"] { flex: 1; }
@media (max-width: 1650px) {
  .preview-tabs { display: block; }
  .preview-compare-row { flex-direction: column; }
  .preview-compare-row > [data-game-panel] { flex: none; width: 100%; }
  .preview-compare-row > [data-game-panel][hidden] { display: none !important; }
}

.preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.preview-team .panel-title h2 a:hover { color: var(--accent); }
.preview-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0 20px 16px; }
.preview-facts div { display: flex; flex-direction: column; }
.preview-facts span { color: var(--muted); font-size: 12px; }
.preview-facts strong { font-size: 18px; }
.lineup-table th:first-child { color: var(--text); }
.lineup-table + .lineup-table, .table-wrap + .table-wrap { border-top: 1px solid var(--border); }
.lineup-table td { padding-top: 8px; padding-bottom: 8px; }
.lineup-name { display: inline-flex; flex-direction: column; line-height: 1.25; }
.lineup-name small { font-size: 12px; font-weight: 500; }

/* ---------- Widget αγωνιστικής στη σελίδα αγώνα (γρήγορη πλοήγηση σε άλλο παιχνίδι, νέα καρτέλα) ---------- */
.game-top-row { display: flex; gap: 20px; align-items: stretch; }
.game-top-row .scoreboard { flex: 1 1 0; margin-bottom: 0; min-width: 0; }
.round-widget { flex: 1 1 0; min-width: 0; margin-bottom: 0; container-type: inline-size; display: flex; flex-direction: column; }
.round-widget .round-select { width: auto; margin: 16px 16px 12px; }
.round-widget-games { flex: 1; overflow-y: auto; max-height: 300px; }
.round-widget-games.loading { opacity: 0.5; transition: opacity 0.15s; }
/* Όταν το widget έχει αρκετό χώρο, οι αγώνες κάθε ημέρας μπαίνουν σε 2 στήλες αντί για μία */
@container (min-width: 620px) {
  .round-widget-games .mini-day-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4px; }
  .round-widget-games .mini-day-games .mini-game:nth-child(2n) { border-left: 1px solid var(--border); }
  /* Σε 2 στήλες ο διαθέσιμος χώρος ανά αγώνα υποδιπλασιάζεται: συντομογραφίες (PAO, OLY) αντί για ονόματα,
     και η ώρα φεύγει (η ημερομηνία φαίνεται ήδη στον τίτλο), για να χωρέσουν άνετα */
  .round-widget-games .mini-game-name .name-full { display: none; }
  .round-widget-games .mini-game-name .name-code { display: inline; }
  .round-widget-games .mini-game {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 16px; gap: 6px; padding-left: 10px; padding-right: 10px;
  }
  .round-widget-games .mini-game-time { display: none; }
}

/* ---------- Box score αγώνα (starters/bench δίπλα δίπλα) ---------- */
.boxscore-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.boxscore-table + .boxscore-table, .boxscore-team .table-wrap + .table-wrap { border-top: 1px solid var(--border); }
.starter-badge {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255, 107, 26, 0.4);
}
.position-badge {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
  color: var(--muted); background: var(--surface-3); border: 1px solid var(--border);
}

/* ---------- Σύγκριση ομάδων στον αγώνα (tab "Team stats") ---------- */
.team-compare-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 16px;
}
.team-compare-side { display: flex; align-items: center; gap: 10px; }
.team-compare-side.away { flex-direction: row-reverse; text-align: right; }
.shot-compare-row {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.shot-compare-row:last-child { border-bottom: 0; }
.shot-compare-frac { width: 58px; flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.shot-compare-frac.away { text-align: right; }
.shot-compare-label { flex: 1; text-align: center; font-weight: 600; font-size: 14px; }
.stat-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; flex: none; }
.stat-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.stat-ring circle { fill: none; stroke-width: 5; }
.stat-ring .ring-bg { stroke: var(--surface-3); }
.stat-ring .ring-fg {
  stroke-linecap: round; stroke-dasharray: 175.93;
  stroke-dashoffset: calc(175.93 - (175.93 * var(--pct, 0) / 100));
  transition: stroke-dashoffset 0.4s ease;
}
.stat-ring[data-side="home"] .ring-fg { stroke: var(--slot-1); }
.stat-ring[data-side="away"] .ring-fg { stroke: var(--slot-2); }
.stat-ring strong { position: absolute; font-size: 13px; font-weight: 700; }
.compare-bars { padding: 6px 0; }
.compare-bar-row { padding: 10px 20px; }
.compare-bar-values { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.compare-bar-value { font-weight: 700; font-size: 15px; }
.compare-bar-value.home { color: var(--slot-1); }
.compare-bar-value.away { color: var(--slot-2); }
.compare-bar-label { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.compare-bar-track { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.compare-bar-fill.home { background: var(--slot-1); }
.compare-bar-fill.away { background: var(--slot-2); }

.empty-state { text-align: center; padding: 48px 20px; }
.empty-state p { margin: 10px 0 22px; }

main { display: block; padding-bottom: 40px; }

/* ---------- Κινητό / tablet ---------- */
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile:nth-child(4) { border-left: 0; }
  .tile:nth-child(n + 4) { border-top: 1px solid var(--border); }
  .game-card { grid-template-columns: 1fr auto 1fr; }
  .game-when { grid-column: 1 / -1; }
  .game-action { grid-column: 1 / -1; justify-content: center; }
  .player-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-grid, .boxscore-grid { grid-template-columns: minmax(0, 1fr); }
  .game-extras, .chart-grid, .insight-grid { grid-template-columns: minmax(0, 1fr); }
  .game-top-row { flex-direction: column; }
  .game-top-row .scoreboard, .round-widget { flex: none; width: 100%; }
}

@media (max-width: 860px) {
  .player-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .highs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .high-card:not(:nth-child(4n)) { border-right: 0; }
  .high-card:nth-child(odd) { border-right: 1px solid var(--border); }
  /* Σύγκριση σε στενή οθόνη: οριζόντια κύλιση αντί για στριμωγμένες στήλες */
  .compare-grid { grid-template-columns: 120px repeat(var(--cols), minmax(170px, 1fr)); overflow-x: auto; }
  .teams-page-grid { grid-template-columns: 1fr; }
}

/* Το μενού (7 επιλογές) + αναζήτηση δεν χωράνε σε μία γραμμή κάτω από ~1100px: το μενού πάει σε δική του γραμμή */
@media (max-width: 1100px) {
  .navbar-inner { flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .nav-links { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; flex: none; }
  .navbar-search { flex: 1; width: auto; min-width: 160px; }
  .search-compact .search-results { width: auto; left: 0; }
}

@media (max-width: 640px) {
  .team-grid { grid-template-columns: 1fr; gap: 12px; }
  .panel-header { padding: 18px; }
  .hero { padding: 40px 0 36px; }
  .search-hero input { font-size: 16px; padding: 14px 18px 14px 48px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:nth-child(odd) { border-left: 0; }
  .tile:nth-child(4) { border-left: 1px solid var(--border); }
  .tile:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .tile strong { font-size: 30px; }
  .game-card { gap: 12px; padding: 16px; }
  .game-team { font-size: 14px; flex-direction: column; gap: 6px; }
  .game-team.home { flex-direction: column-reverse; text-align: center; }
  .game-team.away { text-align: center; }
  .game-score { min-width: 0; }
  .game-score .score { min-width: 44px; font-size: 20px; }
  .player-hero-inner { flex-direction: column; text-align: center; gap: 20px; }
  .player-facts { justify-content: center; gap: 12px 28px; }
  .player-hero-club { display: none; }
  .player-cards { grid-template-columns: 1fr; }
  .team-select, .search-filter { width: 100%; }
  .scoreboard-team { font-size: 14px; }
  .game-score.big .score { font-size: 28px; min-width: 60px; }
  .form-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-tile-facts { grid-template-columns: repeat(2, auto); }
  .mvp-stats { width: 100%; justify-content: space-between; }
}

/* ---------- Fantasy ---------- */

/* Fantasy: επιλογή γύρων */
.round-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px;
  font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-round { min-width: 38px; padding: 0 8px; }
.chip-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.chip-note { font-size: 13px; margin-left: 6px; }

/* Fantasy: επιλογή ομάδας με μεγάλα σήματα, σε δύο στήλες */
.fantasy-team-select { width: 280px; }
.fantasy-team-select .team-select-list { right: auto; width: 560px; max-width: calc(100vw - 48px); padding: 10px; }
.fantasy-team-select .team-select-list:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.fantasy-team-select .team-select-empty { grid-column: 1 / -1; }
.team-option { gap: 12px; padding: 8px 12px; border: 1px solid transparent; }
.team-option .crest-plain { width: 40px; height: 40px; flex: none; }
.team-option:hover, .team-option.active { background: var(--surface-2); border-color: var(--border); }
.team-option-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.team-option-text b { font-size: 15px; letter-spacing: 0.02em; }
.team-option-text small { color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-option.current .team-option-text b { color: var(--accent); }
.crest-plain.small { width: 26px; height: 26px; flex: none; }
.fantasy-table .team-cell .crest-plain { margin-right: 6px; }
.fantasy-table .team-cell { white-space: nowrap; }
@media (max-width: 640px) {
  .fantasy-team-select { width: 100%; }
  .fantasy-team-select .team-select-list:not([hidden]) { grid-template-columns: 1fr; }
}

/* Μενού ρυθμίσεων: ενότητα Site (Restart) */
.settings-popup-title-gap { margin-top: 16px; }
