/* Puan durumu sayfası */

.st-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.st-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* CJK / Devanagari başlıklar sistem fontunda kutu görünmesin:
   bu diller için geniş kapsamlı font yığını kullanılır. */
:root:lang(zh) .st-table,
:root:lang(ja) .st-table,
:root:lang(ko) .st-table,
:root:lang(hi) .st-table,
:root:lang(ar) .st-table,
:root:lang(el) .st-table,
:root:lang(uk) .st-table,
:root:lang(ru) .st-table {
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans CJK JP",
    "Noto Sans CJK SC", "Noto Sans KR", "Noto Sans Devanagari", "Noto Sans Arabic",
    "Noto Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.st-table thead th {
  /* sticky kaldırıldı: scroll kabuğu olmayan tabloda başlık
     viewport'a yapışııp sütun hizasını bozuyordu */
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 9px 6px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.st-table thead th.st-team { text-align: left; padding-left: 10px; }
.st-table tbody td {
  padding: 9px 6px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.st-table tbody tr:last-child td { border-bottom: 0; }
.st-table tbody tr:hover { background: var(--surface-2); }

.st-pos {
  width: 30px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  /* delta rozeti alt satıra düşüp satır yüksekliğini bozmasın */
  white-space: nowrap;
  vertical-align: middle;
}
/* sira numarasi + delta rozeti yanyana, tek satirda */
.st-pos .st-delta {
  margin-left: 2px;
}
/* Genel/İç/Dış dropdown */
.st-scope-dd {
  position: relative;
  display: inline-block;
}
.st-scope-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface, #131a24);
  border: 1px solid var(--border, #263041);
  border-radius: 10px;
  color: var(--text, #e6edf5);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
}
.st-scope-btn:hover { border-color: var(--accent, #2fd07f); }
.st-scope-caret {
  font-size: 0.75em;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.st-scope-dd.open .st-scope-caret { transform: rotate(180deg); }
.st-scope-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 130px;
  background: var(--surface, #131a24);
  border: 1px solid var(--border, #263041);
  border-radius: 10px;
  padding: 4px;
  display: none;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.st-scope-dd.open .st-scope-menu { display: block; }
.st-scope-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: none;
  border: 0;
  border-radius: 7px;
  color: var(--text, #e6edf5);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.st-scope-menu button:hover { background: rgba(255, 255, 255, 0.06); }
.st-scope-menu button.active {
  color: var(--accent, #2fd07f);
  font-weight: 600;
}
/* siralama hareketi: API result (up/down) + canli delta — ▲▼ */
.st-move {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.72em;
  line-height: 1;
}
.st-move.up { color: var(--accent); }
.st-move.down { color: var(--danger); }
/* beklenen puan (xPTS) sutunu: noktali vurgu, anlambilim farki */
.st-table th.st-xpts,
.st-table td.st-xpts {
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  text-transform: none; /* xPTS — büyük harfle XPTS olmasın */
}
.st-table td.st-xpts {
  font-style: italic;
}
/* takım hücresi: logo + ad birlikte SOLA dayalı.
   Özküçüklik notu: .st-table tbody td { text-align:center } kuralını
   ezmesi için bu seçici aynı gücüde olmalı. */
.st-table thead th.st-team,
.st-table tbody td.st-team {
  text-align: left;
  justify-content: flex-start;
}
.st-team {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px !important;
  width: auto;
  min-width: 0;
}
/* takım sütunu esner, istatistik sütunları sabit kalır */
.st-table thead th.st-team,
.st-table tbody td.st-team { width: 100%; }
.st-table thead th:not(.st-team):not(.st-pos),
.st-table tbody td:not(.st-team):not(.st-pos) { width: 38px; }
.st-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.st-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 3px;
}
.st-logo-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}
.st-pts {
  font-weight: 750;
  color: var(--accent);
  width: 42px;
}

/* canlı puan durumu — rozetler ve vurgular */
.st-wrap.has-live { border-color: var(--accent); }
.st-row-live { background: var(--accent-soft); }
.st-row-live:hover { background: var(--accent-soft); }

/* kazanan yeşil, kaybeden kırmızı — takım adı ve puan birlikte */
.st-team.lm-win span { color: var(--accent); font-weight: 700; }
.st-team.lm-lose span { color: var(--danger); }
.st-row-live.lm-win-row .st-pts { color: var(--accent); }
.st-row-live.lm-lose-row .st-pts { color: var(--danger); }

.st-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* dolgulu rozetlerde skor her zaman okunur: yeterli padding + zorunlu metin rengi */
.st-live-badge.winning {
  background: var(--accent);
  border-color: var(--accent);
  color: #06120a !important;
  font-weight: 800;
}
.st-live-badge.losing {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff !important;
  font-weight: 800;
}

.st-delta {
  display: inline-block;
  margin-left: 2px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(-1px);
}
.st-delta.up { color: var(--accent); }
.st-delta.down { color: var(--danger); }

.st-live-note {
  padding: 8px 4px 0;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- görünüm modları (Kısa / Tam / Form + Genel / İç / Dış) ---------- */
/* Standart pill şerit: kadro filtreleriyle aynı tasarım (kullanıcı talebi —
   Kısa/Tam/Form, Genel/İç/Dış, Tümü/Hücum/Savunma/Oyun kurma hepsi bu görünümde) */
.st-modes {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 10px;
}
.st-modes::-webkit-scrollbar { display: none; }
.st-mode-group {
  display: flex;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.st-mode-group button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, color .14s, border-color .14s;
}
.st-mode-group button:hover { color: var(--text); }
.st-mode-group button.active {
  background: var(--accent);
  color: #06210f;
  border-color: transparent;
}
:root[data-theme="light"] .st-mode-group button.active { color: #fff; }
.st-mode-group.hidden { display: none; }

/* Tam mod: A-Y sütunu tek satırda sığsın (sayı-fark ayrılırsa okunmaz) */
.st-table.st-full thead th, .st-table.st-full tbody td { white-space: nowrap; }
.st-table.st-full .hide-s { font-size: 11.5px; }

/* ---------- Form modu: flex liste (tablo hizalama sorunlarını önler) ----------
   Font/padding tablo görünümüyle aynı tutulur (kullanıcı talebi: görünüm tutarlı olsun) */
.fr-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 44px 170px;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;              /* .st-table ile aynı */
  font-variant-numeric: tabular-nums;
}
.fr-row:last-child { border-bottom: 0; }
.fr-row:hover { background: var(--surface-2); }
.fr-pos {
  color: var(--muted);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
  position: relative;
  padding-left: 3px;
}
.fr-zone {
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  border-radius: 2px;
}
.fr-zone.z-ucl { background: var(--accent); }
.fr-zone.z-uel { background: #3b82f6; }
.fr-zone.z-rel { background: var(--danger); }
.fr-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 550;
  color: var(--text);
}
.fr-team span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-pts {
  font-weight: 750;
  color: var(--accent);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.fr-form { display: inline-flex; gap: 4px; justify-content: flex-end; align-items: center; }
.fr-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 44px 170px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.fr-head .fr-team, .fr-head .fr-pts, .fr-head .fr-form { color: var(--muted); font-weight: 650; }
.fr-head .fr-team { text-align: left; }
.fr-head .fr-pts, .fr-head .fr-form { text-align: center; }
@media (max-width: 520px) {
  .fr-row, .fr-head { grid-template-columns: 28px minmax(0, 1fr) 40px 150px; gap: 7px; padding: 9px 8px; }
  .fr-form .f { width: 17px; height: 17px; font-size: 9px; }
}
.st-form-empty { color: var(--muted); font-size: 11px; }
.st-form { display: inline-flex; gap: 4px; align-items: center; }
/* Form rozetleri — modern 3D: yuvarlak, üstten parlak gradyan, hafif gölge,
   alt kenarda koyu raf (pah görünümü). Harfler dile göre (G/B/M, В/Н/П…). */
.st-form .f,
.fr-form .f {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -2px 3px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.4);
}
.fr-form .f {
  width: 18px;
  height: 18px;
  font-size: 9px;
}
.f-w {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.45), rgba(16, 185, 129, 0.25));
  color: #7ff0c0;
}
.f-l {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.45), rgba(220, 38, 38, 0.25));
  color: #ffb0ab;
}
.f-d {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.45), rgba(180, 120, 10, 0.25));
  color: #ffd884;
}
.f-n { background: var(--surface-2); color: var(--muted); box-shadow: none; }

/* sıralama bölgeleri */
.st-table tr.z-ucl td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.st-table tr.z-uel td:first-child { box-shadow: inset 3px 0 0 #3b82f6; }
.st-table tr.z-rel td:first-child { box-shadow: inset 3px 0 0 var(--danger); }

.st-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 4px 0;
  font-size: 11px;
  color: var(--muted);
}
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.dot.z-ucl { background: var(--accent); }
.dot.z-uel { background: #3b82f6; }
.dot.z-rel { background: var(--danger); }

/* kriket form satırı */
.st-form-row td {
  padding: 0 6px 8px !important;
  border-bottom: 1px solid var(--line);
}
.st-table tbody tr.st-form-row:hover { background: transparent; }
.st-form { display: inline-flex; gap: 4px; }
/* kriket form rozetleri de aynı 3D stil (ilk .f-w/.f-l/.f-d tanımı ortak) */

/* üst kontroller */
.standings-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.standings-bar select {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  /* tarayıcı varsayılan okunu kaldır, kendi okumuzu çiz */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
/* sağ köşedeki dropdown oku — kullanıcı tıklayınca lig değişeceğini anlamalı */
.standings-bar select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.standings-bar select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.standings-bar select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.st-sports { display: flex; gap: 4px; }
.st-sports button {
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.14s, background 0.14s, border-color 0.14s;
}
.st-sports button:hover { color: var(--text); background: var(--surface-2); }
.st-sports button.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.standings-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 8px 2px;
  min-height: 14px;
}

.standings-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 4px 16px 28px;
}

@media (max-width: 640px) {
  .st-table { font-size: 12px; }
  .st-table .hide-s { display: none; }
  .st-table thead th, .st-table tbody td { padding: 8px 4px; }
  /* takım adı mobilde kesilmesin: dar sütunları sıkıştır, isme yer aç */
  .st-table thead th:not(.st-team):not(.st-pos),
  .st-table tbody td:not(.st-team):not(.st-pos) { width: 26px; }
  /* sira + delta rozeti tek satirda sigsin */
  .st-pos { width: 34px !important; white-space: nowrap; }
  .st-pos .st-delta { font-size: 7.5px; }
  .st-table tbody td:last-child,
  .st-table thead th:last-child { width: 34px; }
  .st-team { width: auto !important; padding-left: 6px !important; gap: 6px; }
  .st-team span { font-size: 12px; white-space: normal; line-height: 1.25; }
  /* mobilde de flex kalır: logo + ad sola dayalı, ortalanmaz */
  .st-table thead th.st-team,
  .st-table tbody td.st-team { display: flex; text-align: left; }
  .st-logo { width: 16px; height: 16px; vertical-align: middle; }
  .standings-page { padding: 4px 8px 24px; }
  .st-pos { width: 22px; }
  .st-pts { width: 32px; }
  /* form rozetleri mobilde de okunur kalsın */
  .st-form .f { width: 16px; height: 16px; font-size: 9px; }
}

/* tablo logoları kesin boyut: bazı kaynak logolar dev geldiğinde satırı patlatıyor */
.st-logo { max-width: 20px; max-height: 20px; }
.st-team img, .st-team .st-logo { width: 20px; height: 20px; }
