/* LAN Party Leaderboard Styles */
.lanparty-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.lanparty-container h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2.5em;
}

.lanparty-container h2 {
  color: #444;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
  margin-top: 30px;
  margin-bottom: 20px;
}

/* Controls */
.lanparty-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
}

/* Players Section */
.players-section {
  margin-bottom: 40px;
}

.players-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.player-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.3em;
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.player-card .player-stats {
  font-size: 0.9em;
  opacity: 0.9;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.player-stat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 10px 12px;
}

.player-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 1.1em;
}

.player-stat-content {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.player-stat-value {
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  font-weight: 800;
  font-size: 1.2em;
  color: #fff;
}

.player-stat-label {
  font-family: 'Ledger', sans-serif;
  font-size: 0.8em;
  opacity: 0.9;
}

/* Suggested icon variants for wins/games; attach via classes on markup */
.player-stat-icon.win { background: #0f766e; }
.player-stat-icon.game { background: #2563eb; }
.player-stat-icon.loss { background: #b91c1c; }

/* Hover polish */
.player-card:hover .player-stat-chip {
  border-color: rgba(255,255,255,0.5);
}

/* Leaderboard Table */
.leaderboard-section {
  margin-bottom: 40px;
}

.sort-controls {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-controls select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  font-family: 'Ledger', sans-serif;
}

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(17,24,39,0.08);
}

.leaderboard-table thead {
  background-color: #111827;
  color: #ffffff;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 14px 16px;
  text-align: center; /* Center horizontally */
  font-family: 'Ledger', serif; /* Match game leaderboard font */
}

.leaderboard-table th {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid #eef2f7;
  transition: background-color 0.2s;
}

.leaderboard-table tbody tr:hover {
  background: #f9fbff;
}

/* Rank highlight rows (match game leaderboard) */
.leaderboard-table .rank-1 { background: linear-gradient(90deg, #fff8e1 0%, #fff3cd 100%); }
.leaderboard-table .rank-2 { background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%); }
.leaderboard-table .rank-3 { background: linear-gradient(90deg, #fff1e6 0%, #ffe4d6 100%); }

/* Zebra rows for non-highlighted */
.leaderboard-table tbody tr:nth-child(even):not(.rank-1):not(.rank-2):not(.rank-3) { background: #fafbfc; }

/* Adopt column font colors similar to game leaderboard */
/* Columns: 1=Rank, 2=Name, 3=Wins, 4=Losses, 5=Games, 6=Winrate, 7=Points */
.leaderboard-table tbody td:nth-child(3) { color: #2563eb; font-weight: 600; }
.leaderboard-table tbody td:nth-child(4) { color: #b91c1c; }
.leaderboard-table tbody td:nth-child(5) { color: #374151; }
.leaderboard-table tbody td:nth-child(6) { color: #6b7280; }
.leaderboard-table tbody td:nth-child(7) { color: #0f766e; font-weight: 700; }

/* Optional: make player names a bit bolder to match game leaderboard vibe */
.leaderboard-table tbody td:nth-child(2) { color: #111827; font-weight: 700; }

/* Games Grid Section */
.games-section {
  margin-bottom: 40px;
}

.search-controls {
  margin-bottom: 15px;
}

.search-controls input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  font-family: 'Ledger', sans-serif;
}

.search-controls input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.game-tile {
  background: white;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.game-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  border-color: #007bff;
}

.game-tile .game-title {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.3em;
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  text-align: center;
}

.game-tile .game-link-icon {
  color: #007bff;
  font-size: 0.8em;
  text-decoration: none;
}

.game-tile .game-link-icon:hover {
  color: #0056b3;
}

.game-tile-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.game-tile-stat {
  background-color: #f8f9fa;
  padding: 12px 20px;
  border-radius: 5px;
  text-align: center;
  flex: 1;
  max-width: 200px;
}

.game-tile-stat-value {
  font-size: 1.5em;
  font-weight: bold;
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  color: #333;
}

.game-tile-stat-label {
  font-size: 0.85em;
  color: #666;
  margin-top: 5px;
}

.game-tile-winners {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.game-tile-winners h4 {
  margin: 0 0 10px 0;
  font-size: 0.9em;
  color: #666;
  text-transform: uppercase;
}

.game-tile-winner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-left: 4px solid #28a745;
  border-radius: 5px;
  font-weight: bold;
}

.game-tile-winner-icon {
  font-size: 1.2em;
}

.game-tile-winner-name {
  flex: 1;
}

.game-tile-winner-score {
  font-size: 0.9em;
  color: #155724;
}

/* Sessions Section Styles (kept for backward compatibility) */
.sessions-section {
  margin-bottom: 40px;
}

.filter-controls {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-controls select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  font-family: 'Ledger', sans-serif;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.session-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.session-card h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.session-card .game-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.session-card .game-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.session-card .game-link::after {
  content: '🎮';
  font-size: 0.9em;
}

.session-card .session-date {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 15px;
}

.session-card .session-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 5px;
}

.session-result.winner {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-left: 4px solid #28a745;
  font-weight: bold;
}

.session-result.loser {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-left: 4px solid #dc3545;
}

.session-card .session-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85em;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-content.modal-large {
  max-width: 900px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
}

.close:hover,
.close:focus {
  color: #000;
}

.modal-content h2 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  font-family: 'Ledger', sans-serif;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
  color: #666;
  font-style: italic;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Game Results Form */
#gameResults,
#sessionResults {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
  flex-wrap: wrap;
}

.player-result label {
  flex: 1;
  min-width: 120px;
  margin: 0;
  font-weight: normal;
}

.player-result select {
  width: auto;
  min-width: 120px;
}

.player-result input[type="number"] {
  width: 100px;
}

/* Game Stats Summary */
.game-stats-summary {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
}

.game-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.game-stat-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.game-stat-card-value {
  font-size: 2em;
  font-weight: bold;
  color: #333;
}

.game-stat-card-label {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

/* Add Session Section */
.add-session-section {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #007bff;
  margin-bottom: 25px;
}

.add-session-section h3 {
  margin-top: 0;
  color: #007bff;
}

/* Game Sessions List */
.game-sessions-list {
  margin-top: 25px;
}

.game-sessions-list h3 {
  color: #444;
  margin-bottom: 15px;
}

.game-session-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.game-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.game-session-date {
  color: #666;
  font-size: 0.9em;
}

.game-session-actions {
  display: flex;
  gap: 8px;
}

.game-session-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.session-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 5px;
}

.session-result.winner {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-left: 4px solid #28a745;
  font-weight: bold;
}

.session-result.loser {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-left: 4px solid #dc3545;
}

.session-result.draw {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-left: 4px solid #ffc107;
}

.session-result.abstinent {
  background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
  border-left: 4px solid #6c757d;
  opacity: 0.7;
}

/* Current Players List */
.current-players {
  margin-top: 30px;
}

.current-players h3 {
  color: #444;
  margin-bottom: 15px;
}

.current-players ul {
  list-style: none;
  padding: 0;
}

.current-players li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
  margin-bottom: 8px;
}

.current-players .remove-player {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85em;
}

.current-players .remove-player:hover {
  background-color: #c82333;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

/* Time Picker Styles */
.time-picker {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.time-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.time-picker-row label {
  width: 60px;
  color: #555;
}

.time-picker-preview {
  margin-top: 8px;
}

/* Session Results Table */
.session-results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.session-results-table th,
.session-results-table td {
  padding: 8px;
  border: 1px solid #eee;
  text-align: left;
}

.session-results-table th {
  background: #f2f2f2;
}

.team-pill {
  background: #ddd;
  border-radius: 20px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.team-pill input {
  width: 120px;
}

.team-remove {
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 4px 8px;
  cursor: pointer;
}

/* Points Breakdown */
.points-breakdown {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 10px;
}

.points-breakdown .pb-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
}

.points-breakdown .pb-row:last-child {
  border-bottom: none;
}

/* Session History Table */
.session-history-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.session-history-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
  min-width: 800px; /* Prevent excessive squishing */
}

.session-history-table thead {
  background-color: #333;
  color: white;
}

.session-history-table th,
.session-history-table td {
  padding: 12px 15px;
  text-align: center; /* Center horizontally */
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.session-history-table th {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.session-history-table tbody tr:hover {
  background-color: #f8f9fa;
}

.session-info-cell {
  min-width: 180px;
}

.session-date {
  font-weight: bold;
  color: #333;
}

.session-meta {
  font-size: 0.85em;
  color: #666;
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.session-actions {
  margin-top: 8px;
  display: flex;
  gap: 5px;
}

.session-actions .btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  padding: 2px;
}

.session-player-result {
  text-align: center;
}

.result-icon {
  display: block;
  font-weight: bold;
  font-size: 1.0em;
}

.result-status {
  display: block;
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  font-weight: bold;
  font-size: 1.2em;
}

.result-points {
  display: block;
  font-size: 0.8em;
  color: #555;
}

.session-history-table .status-win {
  background-color: #d4edda;
}

.session-history-table .status-loss {
  background-color: #f8d7da;
}

.session-history-table .status-draw {
  background-color: #fff3cd;
}

.session-history-table .status-abstinent {
  background-color: #f0f0f0;
  opacity: 0.6;
}

/* Game-level Leaderboard */
.game-leaderboard {
  margin-top: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid #e3e7ee;
  border-radius: 12px;
  padding: 20px;
}

.game-leaderboard-title {
  margin: 0 0 15px 0;
  font-size: 1.4em;
  color: #1f2937;
  letter-spacing: 0.3px;
}

.game-leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(17,24,39,0.08);
}

.game-leaderboard-table thead tr {
  background: #111827;
  color: #ffffff;
}

.game-leaderboard-table th,
.game-leaderboard-table td {
  padding: 14px 16px;
  text-align: center; /* Center horizontally */
  font-family: 'Ledger', serif;
}

.game-leaderboard-table th {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.game-leaderboard-table tbody tr {
  border-bottom: 1px solid #eef2f7;
  transition: background-color 0.2s ease;
}

.game-leaderboard-table tbody tr:hover {
  background: #f9fbff;
}

/* Rank highlight rows */
.game-leaderboard-table .rank-1 {
  background: linear-gradient(90deg, #fff8e1 0%, #fff3cd 100%);
}
.game-leaderboard-table .rank-2 {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
}
.game-leaderboard-table .rank-3 {
  background: linear-gradient(90deg, #fff1e6 0%, #ffe4d6 100%);
}

/* Cell-level decorations */
.glb-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1f2937;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-family: 'Big Shoulders Stencil Text', sans-serif;
}

.glb-player-name {
  color: #111827;
  font-weight: 700;
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  font-size: 1.2em;
}

.glb-points {
  font-weight: 700;
  color: #0f766e; /* teal */
}
.glb-wins {
  color: #2563eb; /* blue */
  font-weight: 600;
}
.glb-losses {
  color: #b91c1c; /* red */
}
.glb-draws {
  color: #6b7280; /* gray */
}
.glb-games {
  color: #374151; /* dark gray */
}

/* Restore sorting indicators on global leaderboard headers */
.leaderboard-table th[style*="cursor: pointer"]::after {
  content: ' ⇅';
  opacity: 0.3;
  font-size: 0.8em;
  margin-left: 6px;
}
.leaderboard-table th.sort-asc::after {
  content: ' ▲';
  opacity: 1;
  color: #4CAF50;
  margin-left: 6px;
}
.leaderboard-table th.sort-desc::after {
  content: ' ▼';
  opacity: 1;
  color: #4CAF50;
  margin-left: 6px;
}

/* Responsive: stack table on small screens */
@media (max-width: 640px) {
  .game-leaderboard-table thead { display: none; }
  .game-leaderboard-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .game-leaderboard-table td { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 0; }
  .game-leaderboard-table td.glb-player { grid-column: 1 / -1; font-size: 1.05em; }
}

/* Align global leaderboard styling with game leaderboard and center cells */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(17,24,39,0.08);
}

.leaderboard-table thead tr {
  background: #111827;
  color: #ffffff;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 14px 16px;
  text-align: center; /* Center horizontally */
  font-family: 'Ledger', serif; /* Match game leaderboard font */
}

.leaderboard-table th {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid #eef2f7;
  transition: background-color 0.2s ease;
}

.leaderboard-table tbody tr:hover {
  background: #f9fbff;
}

/* Rank highlight rows (match game leaderboard) */
.leaderboard-table .rank-1 { background: linear-gradient(90deg, #fff8e1 0%, #fff3cd 100%); }
.leaderboard-table .rank-2 { background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%); }
.leaderboard-table .rank-3 { background: linear-gradient(90deg, #fff1e6 0%, #ffe4d6 100%); }

/* Zebra for non-highlighted rows */
.leaderboard-table tbody tr:nth-child(even):not(.rank-1):not(.rank-2):not(.rank-3) {
  background: #fafbfc;
}

/* Center cells for game leaderboard */
.game-leaderboard-table th,
.game-leaderboard-table td {
  text-align: center; /* Center horizontally */
}

/* Optional: Center status-specific cells in session history if needed */
.session-history-table th,
.session-history-table td {
  text-align: center; /* Center horizontally */
}

/* Responsive Design */
@media (max-width: 768px) {
  .lanparty-controls {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .players-list {
    grid-template-columns: 1fr;
  }

  .leaderboard-table {
    font-size: 0.9em;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 10px 8px;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 20px;
  }
}

/* Points pills inside session results */
.points-pills {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
}
.pill {
  min-width: 80px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.2;
}
.pill .pill-points {
  font-weight: 700;
  font-size: 1em;
  color: #111827;
}
.pill .pill-label {
  font-size: 0.8em;
  color: #6b7280;
}
.pill-main { background: #eef2ff; border-color: #c7d2fe; }
.pill-duration { background: #ecfeff; border-color: #a5f3fc; }
.pill-bonus { background: #f0fdf4; border-color: #bbf7d0; }
.pill-total { background: #fff7ed; border-color: #fed7aa; }

/* Status and Rank selects font */
.player-status-select,
.player-rank-select {
  font-family: 'Big Shoulders Stencil Text', sans-serif;
  font-weight: 700;
}

/* Session Results Table column sizing tweaks */
.session-results-table .col-bonus,
.session-results-table td.col-bonus {
  width: 90px; /* keep bonus compact */
}

/* Let the Rank column grow naturally (2nd column in FFA mode) */
.session-results-table th:nth-child(2),
.session-results-table td:nth-child(2) {
  width: auto;
}

/* Ensure rank select is reasonably wide so options aren't cut off */
.player-rank-select {
  min-width: 140px;
}

/* Components and Total columns can wrap without forcing extra width */
.session-results-table .player-components,
.session-results-table .player-total {
  white-space: normal;
}

/* Controller support in games grid overlay */
.overlay-controller-support {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}

.controller-support-icon {
  height: 20px;
  width: auto;
}

