/* ==============================
   GLOBAL BASE (match homepage feel)
==============================*/
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f5f7fa;
  color: #1a1a1a;
}

/* Page content wrapper (NEW - important) */
.page-content {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==============================
   STAT NAV (cleaner buttons)
==============================*/
.stat-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-nav button {
  padding: 8px 14px;
  cursor: pointer;
  border: none;
  background: #e9edf2;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.stat-nav button:hover {
  background: #d6dde6;
}

.stat-nav button.active {
  background: #1e2a38;
  color: white;
}

/* ==============================
   CATEGORY SECTIONS
==============================*/
.stat-category {
  display: none;
}

.stat-category.active {
  display: block;
}

/* ==============================
   STAT CARDS (major upgrade)
==============================*/
.stat-card {
  background: white;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.stat-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* ==============================
   LEADER DISPLAY
==============================*/
.stat-leader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leader-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leader-pic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.leader-chevron {
  font-weight: bold;
  font-size: 16px;
  color: #999;
}

.leader-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.leader-rank {
  font-weight: bold;
  text-align: center;
  color: #666;
}

.leader-player {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.leader-value {
  font-weight: 600;
  text-align: right;
}


/* ==============================
   PLAYER LINKS
==============================*/
.player-link {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
}

.player-link:hover {
  color: #0077cc;
  text-decoration: underline;
}

/* ==============================
   GRID LAYOUT
==============================*/
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  align-items: stretch;
  margin-bottom: 30px;
}

/* ==============================
   LEADERBOARD TABLE (refined)
==============================*/
.leaderboard-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 550px;
  table-layout: fixed;
  font-size: 13px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
  border-bottom: 1px solid #eee;
  padding: 6px 8px;
}

/* Header */
.leaderboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #f1f3f6;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Rank column */
.leaderboard-table th:first-child,
.leaderboard-table td:first-child {
  position: sticky;
  left: 0;
  width: 30px;
  z-index: 20;
  background: #f1f3f6;
  text-align: center;
  font-weight: bold;
}

/* Player column */
.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
  position: sticky;
  left: 40px;
  z-index: 20;
  background: #f1f3f6;
  box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

/* Player cell */
.player-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-name-cell img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* Stat columns */
.leaderboard-table td:nth-child(n+3),
.leaderboard-table th:nth-child(n+3) {
  text-align: center;
}

.leaders {
list-style: none;
padding-left: 0;
margin: 0;
}
/* ==============================
   FILTERS
==============================*/
#season-filter {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#season-select,
#stat-select {
  padding: 5px 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* ==============================
   MIN REQUIREMENT
==============================*/
#min-requirement-message {
  margin-top: 12px;
  font-style: italic;
  color: #666;
}

/* ==============================
   SPINNER
==============================*/
.spinner {
  border: 4px solid #eee;
  border-top: 4px solid #333;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
  margin: 30px auto;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* ==============================
   ACTIVE STAT
==============================*/
.active-stat {
  background-color: #e6f2ff !important;
  font-weight: bold;
}

/* ==============================
   MOBILE
==============================*/
@media (max-width: 768px) {
  .page-content {
    padding: 10px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}
