/* Statistics page layout and chart sizing */

.stats-page { width: 80%; max-width: 1200px; margin: 20px auto; padding: 10px; }

.stats-page .chart-container {
  position: relative;
  width: 100%;
  height: 360px; /* explicit height to prevent infinite growth */
  max-height: 60vh;
  margin: 12px 0;
}

.stats-page canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.stats-page .mapper-cards,
.stats-page .player-related {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .stats-page .mapper-cards { grid-template-columns: 1fr; }
}

.stats-section {
  background: #ffffff;
  color: #1f1f1f;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stats-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mapper-card.full-width, .player-related .mapper-card {
  width: 100%;
}

.player-toggle select {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}


