/* Games Styles */
.games-container {
  min-height: 100vh;
  background: #ffffff;
  position: relative;
}

.games-header {
  background: linear-gradient(135deg, #c8102e 0%, #13294b 100%);
  color: #ffffff;
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.games-main {
  padding: 40px 0;
}

.games-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.games-header-section {
  text-align: center;
  margin-bottom: 40px;
}

.games-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.games-header-section h2 {
  color: #13294b;
  font-size: 2.5rem;
  margin: 0;
  font-weight: 700;
}

.add-game-button {
  background: linear-gradient(135deg, #c8102e 0%, #13294b 100%);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(200, 16, 46, 0.3);
}

.add-game-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
}

.add-game-button:active {
  transform: translateY(0);
}

.add-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.games-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.games-filters {
  margin-bottom: 30px;
  text-align: center;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #ffffff;
  color: #13294b;
  border: 2px solid #b1b3b3;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: #c8102e;
  color: #c8102e;
}

.filter-btn.active {
  background: #c8102e;
  color: #ffffff;
  border-color: #c8102e;
}

/* Games Grid (Card View) */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

.game-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid #b1b3b3;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #c8102e;
}

.game-card.tournament-game {
  border: 2px solid #ffa500;
  background: linear-gradient(135deg, #ffffff 0%, #fff9f0 100%);
}

.game-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.game-date-time {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.game-date {
  color: #13294b;
  font-size: 1rem;
  font-weight: 600;
}

.game-type {
  color: #c8102e;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tournament-badge {
  background: rgba(255, 165, 0, 0.2);
  color: #ff8c00;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.tournament-label {
  background: rgba(255, 165, 0, 0.2);
  color: #ff8c00;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.game-duration {
  color: #b1b3b3;
  font-size: 0.9rem;
  font-weight: 500;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 6px;
}

.game-card-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.game-winner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.winner-label {
  color: #b1b3b3;
  font-size: 0.9rem;
  font-weight: 500;
}

.winner-name {
  color: #c8102e;
  font-size: 1.1rem;
  font-weight: 700;
}

.game-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.players-count {
  color: #13294b;
  font-size: 0.9rem;
  font-weight: 600;
}

.players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-name {
  color: #b1b3b3;
  font-size: 0.8rem;
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
}

.more-players {
  color: #c8102e;
  font-size: 0.8rem;
  font-style: italic;
}

/* Game Details */
.game-details {
  max-width: 800px;
  margin: 0 auto;
}

.game-header {
  text-align: center;
  margin-bottom: 40px;
}

.game-header h2 {
  color: #13294b;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
}

.game-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.game-meta .game-date,
.game-meta .game-type,
.game-meta .game-duration {
  color: #b1b3b3;
  font-size: 1rem;
  font-weight: 500;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
}

.game-meta .game-type {
  color: #c8102e;
  background: rgba(200, 16, 46, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-info-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.game-info-section h3 {
  color: #13294b;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 20px 0;
}

.game-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #13294b;
}

.info-value {
  color: #b1b3b3;
  font-weight: 500;
}

.info-value.winner {
  color: #c8102e;
  font-weight: 700;
}

.tournament-link-btn {
  background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
  color: #ffffff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tournament-link-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.players-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.players-section h3 {
  color: #13294b;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 20px 0;
}

.players-scores {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.player-score.winner {
  background: rgba(200, 16, 46, 0.1);
  border-color: #c8102e;
}

.player-score .player-name {
  font-weight: 600;
  color: #13294b;
}

.player-score.winner .player-name {
  color: #c8102e;
}

.player-score .player-points {
  font-weight: 700;
  color: #b1b3b3;
}

.player-score.winner .player-points {
  color: #c8102e;
}

.game-actions {
  text-align: center;
  margin-top: 30px;
}

.no-games {
  text-align: center;
  padding: 60px 20px;
}

.no-games h3 {
  color: #13294b;
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.no-games p {
  color: #b1b3b3;
  font-size: 1rem;
  margin: 0;
}

/* Add Game Modal Specific Styles */
.modal-form {
  padding: 30px;
}

.modal-form h3 {
  color: #13294b;
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.game-type-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.type-button {
  background: #ffffff;
  color: #13294b;
  border: 2px solid #b1b3b3;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
}

.type-button:hover {
  border-color: #c8102e;
  color: #c8102e;
  background: #fff5f5;
}

.type-button.active {
  background: #c8102e;
  color: #ffffff;
  border-color: #c8102e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

/* Player Selection */
.player-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.player-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.player-checkbox:hover {
  background: #fff5f5;
  border-color: rgba(200, 16, 46, 0.3);
}

.player-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #c8102e;
  cursor: pointer;
}

.player-checkbox input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.player-checkbox:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.player-checkbox:has(input:disabled):hover {
  background: #f8f9fa;
  border-color: transparent;
}

.player-checkbox input[type="checkbox"]:checked {
  transform: scale(1.1);
}

.player-checkbox:has(input:checked) {
  background: rgba(200, 16, 46, 0.1);
  border-color: #c8102e;
}

.checkbox-label {
  color: #13294b;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.player-checkbox:has(input:checked) .checkbox-label {
  color: #c8102e;
  font-weight: 600;
}

/* Stats Input Section */
.player-stats-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  border: 1px solid #e9ecef;
}

.player-stats-header {
  margin-bottom: 15px;
}

.player-stats-header h4 {
  color: #13294b;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.stats-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.stat-input-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-input-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #13294b;
}

.stat-input-item input {
  padding: 8px;
  border: 1px solid #b1b3b3;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.stat-input-item input:focus {
  outline: none;
  border-color: #c8102e;
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.1);
}

.player-total-points {
  text-align: center;
  padding: 10px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #c8102e;
}

.player-total-points strong {
  color: #c8102e;
  font-size: 1rem;
}

.player-total {
  color: #c8102e;
  font-weight: 700;
}

/* Winner Selection */
.winner-selection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.winner-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.winner-option:hover {
  background: #fff5f5;
  border-color: rgba(200, 16, 46, 0.3);
}

.winner-option:has(input:checked) {
  background: rgba(200, 16, 46, 0.1);
  border-color: #c8102e;
}

.winner-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #c8102e;
  cursor: pointer;
}

.radio-label {
  color: #13294b;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.winner-option:has(input:checked) .radio-label {
  color: #c8102e;
  font-weight: 600;
}

.duo-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.duo-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.duo-checkbox:hover {
  background: #fff5f5;
  border-color: rgba(200, 16, 46, 0.3);
}

.duo-checkbox:has(input:checked) {
  background: rgba(200, 16, 46, 0.1);
  border-color: #c8102e;
}

.winner-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #c8102e;
  cursor: pointer;
}

.winner-checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.duo-checkbox:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.duo-checkbox:has(input:disabled):hover {
  background: #f8f9fa;
  border-color: transparent;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .games-content {
    padding: 0 15px;
  }
  
  .games-header-section h2 {
    font-size: 2rem;
  }

  .games-title-row {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
  }

  .add-game-button {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .games-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .game-card {
    padding: 20px;
  }

  .game-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .game-meta {
    flex-direction: column;
    gap: 10px;
  }

  .game-info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .game-type-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .type-button {
    min-width: auto;
    width: 100%;
  }
  
  .player-selection-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stats-input-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .duo-selection-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .games-header-section h2 {
    font-size: 1.8rem;
  }

  .games-title-row {
    gap: 10px;
  }

  .add-game-button {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .add-icon {
    font-size: 1rem;
  }

  .game-header h2 {
    font-size: 2rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .players-list {
    flex-direction: column;
    gap: 4px;
  }

  .type-button {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .player-checkbox {
    padding: 8px 10px;
  }
  
  .checkbox-label {
    font-size: 0.9rem;
  }
}