/* =============================================================
   players.php — oyuncular sayfası

   Önceden players.php içinde inline <style> olarak duruyordu ve
   #f1f3f5 / #0b3d91 / #adb5bd gibi sabit renklerle token sistemini
   by-pass ediyordu. Buraya taşındı; tournaments.css ve ligler.css
   ile aynı yapı.
   ============================================================= */

/* ---------- Sayfa başlığı (tournaments/ligler ile aynı düzen) ---------- */

.players-header{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}

.players-header-filters{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-2);
}

.players-filter-field{ min-width: 240px; }

.players-filter-field .form-label{
  font-size: .78rem;
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
  color: var(--c-text-muted);
  margin-bottom: .3rem;
}

/* ---------- Özet kutuları ---------- */

.pl-stat{
  height: 100%;
  padding: var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.pl-stat:hover{
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--c-border);
}

.pl-stat .eyebrow{
  font-size: .64rem;
  letter-spacing: .12em;
  display: block;
  margin-bottom: 6px;
}

.pl-stat-value{
  font-family: var(--font-numeric);
  font-size: 1.65rem;
  font-weight: var(--fw-black);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

.pl-stat-sub{
  margin-top: 6px;
  font-size: .78rem;
  color: var(--c-text-muted);
}

/* Altın vurgulu kutu — en yüksek rating */
.pl-stat.is-champion{
  background: linear-gradient(135deg, var(--c-champion-50) 0%, var(--c-surface) 100%);
  border-color: rgba(var(--c-champion-rgb), .38);
}

.pl-stat.is-champion .eyebrow,
.pl-stat.is-champion .pl-stat-value{ color: var(--c-champion-800); }

/* ---------- Sıralama tablosu ---------- */

#playersTbody tr.row-link{ cursor: pointer; }
#playersTbody tr.row-link:hover td{ background: rgba(var(--c-primary-rgb), .06); }

.players-table thead th{
  background: var(--c-surface-2);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}

.avatar-40{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-surface-2);
}

/* Rütbe rozeti — turnuva/lig tablolarıyla aynı dil */
.pl-rank{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .84rem;
  background: var(--c-surface-2);
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}

/* Podyum — ilk üç sıra (altın / mavi / magenta) */
#playersTbody tr[data-rank="1"] .pl-rank{
  background: var(--g-champion);
  color: var(--c-on-champion);
  box-shadow: var(--sh-champion);
}

#playersTbody tr[data-rank="2"] .pl-rank{
  background: linear-gradient(135deg, var(--c-primary-400), var(--c-primary-700));
  color: #fff;
}

#playersTbody tr[data-rank="3"] .pl-rank{
  background: linear-gradient(135deg, var(--c-hot-500), var(--c-hot-700));
  color: #fff;
}

#playersTbody tr[data-rank="1"] > td:first-child{ box-shadow: inset 3px 0 0 var(--c-champion-500); }
#playersTbody tr[data-rank="2"] > td:first-child{ box-shadow: inset 3px 0 0 var(--c-primary-500); }
#playersTbody tr[data-rank="3"] > td:first-child{ box-shadow: inset 3px 0 0 var(--c-hot-500); }

/* Maç / galibiyet / yüzde sütunları */
#playersTbody td:nth-child(5){ color: var(--c-success-700); font-weight: 700; }
#playersTbody td:nth-child(6){ font-weight: 700; }

/* ---------- Rating pill ---------- */

.rating-pill{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .65rem;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  letter-spacing: .01em;
  line-height: 1;
  background: rgba(var(--c-champion-rgb), .16);
  border: 1px solid rgba(var(--c-champion-rgb), .45);
  color: var(--c-champion-800);
}

.rating-pill .bi{ font-size: .9em; color: var(--c-champion-700); }

.rating-empty{
  color: var(--c-text-subtle);
  font-weight: 600;
}

.hint-muted{ color: var(--c-text-muted); }

/* ---------- Mobil — tablo düzeni korunur, sıkılaştırılır ---------- */

@media (max-width: 767.98px){
  .players-header-filters{ width: 100%; }
  .players-filter-field{ min-width: 0; flex: 1 1 100%; }

  .players-table > :not(caption) > * > *{ padding: .55rem .32rem; }
  .players-table thead th{ font-size: .66rem; letter-spacing: .05em; }

  .players-table th:first-child,
  .players-table td:first-child{
    width: 34px !important;
    min-width: 34px;
    padding-right: .18rem;
  }

  .players-table th:nth-child(3),
  .players-table td:nth-child(3){ width: 74px !important; min-width: 74px; }

  .players-table th:nth-child(n+4),
  .players-table td:nth-child(n+4){ width: 38px !important; min-width: 38px; }

  .players-table td:nth-child(2) .d-flex{ gap: .45rem !important; }
  .players-table td:nth-child(2) .lh-sm{ min-width: 0; }
  .players-table td:nth-child(2) .fw-semibold{ font-size: .84rem; line-height: 1.15; }
  .players-table td:nth-child(2) .small{ font-size: .7rem; }

  .pl-rank{ width: 26px; height: 26px; border-radius: 9px; font-size: .78rem; }

  .rating-pill{
    padding: .22rem .4rem;
    font-size: .78rem;
    gap: .2rem;
  }

  .rating-pill .bi{ display: none; }

  .pl-stat{ padding: var(--sp-3); }
  .pl-stat-value{ font-size: 1.35rem; }
}
