/* Game Results Component Styles - Horizontal Layout Optimized */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-results-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  padding: var(--sat) 0 var(--sab);
  background-color: rgba(20, 20, 20, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-in-out;
  overflow: hidden;
}

.results-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: rgba(30, 30, 30, 0.95);
  max-width: 500px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Mobile first - vertical layout */
.results-header {
  text-align: center;
  padding: 25px 20px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  flex-shrink: 0;
}

.results-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e74c3c, transparent);
}

.results-subtitle {
  font-size: 24px;
  color: var(--light-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}

#winnerMessage.blue-winner {
  color: #0066ff;
  text-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

#winnerMessage.red-winner {
  color: #ff3333;
  text-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

#winnerMessage.win {
  color: #4CAF50;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

#winnerMessage.lose {
  color: #f44336;
  text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

#winnerMessage.draw {
  color: #FFC107;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

#winnerMessage.aborted {
  color: #f44336;
  text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

.results-winning-comment {
  font-size: 16px;
  color: #888;
  font-weight: 400;
  text-align: center;
  margin-top: 8px;
  opacity: 0.8;
  font-style: italic;
}

.teams-results-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
  overflow-y: auto;
  flex-grow: 1;
  margin-bottom: 10px;
}

.team-result {
  background-color: rgba(40, 40, 40, 0.7);
  border-radius: 6px;
  padding: 15px;
  animation: fadeIn 0.5s ease-in-out;
}

.team-result.blue {
  border-left: 4px solid #0066ff;
}

.team-result.red {
  border-left: 4px solid #ff3333;
}

.team-result-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.team-result-header h3 {
  flex: 1;
  margin: 0 10px;
  font-size: 16px;
}

.team-score-value {
  font-size: 22px;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
}

.team-result.blue .team-score-value {
  color: #6699ff;
}

.team-result.red .team-score-value {
  color: #ff6666;
}

.team-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.team-icon.blue {
  background-color: #0066ff;
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

.team-icon.red {
  background-color: #ff3333;
  box-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

.team-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background-color 0.2s;
}

.player-stat-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.player-stat-row.current-player {
  background-color: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.player-stat-row.disconnected-player {
  opacity: 0.7;
}

.player-stat-row.disconnected-player .player-name {
  color: #999;
  font-style: italic;
}

.player-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.player-stats {
  display: flex;
  gap: 15px;
}

.player-kills {
  color: #4CAF50;
  font-weight: bold;
  min-width: 30px;
  text-align: center;
}

.player-deaths {
  color: #f44336;
  font-weight: bold;
  min-width: 30px;
  text-align: center;
}

.player-kd {
  color: #3498db;
  font-weight: bold;
  min-width: 40px;
  text-align: center;
}

.results-stats-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: rgba(20, 20, 20, 0.7);
  flex-shrink: 0;
  position: fixed;
  bottom: calc(80px + var(--sab));
  left: 0;
  width: 100%;
  max-width: 500px;
  z-index: 10;
}

.player-stats-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

.player-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
  min-width: 80px;
}

.player-stat-card .stat-value {
  font-size: 26px;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 5px;
}

.player-stat-card:nth-child(1) .stat-value {
  color: #4CAF50;
}

.player-stat-card:nth-child(2) .stat-value {
  color: #f44336;
}

.player-stat-card:nth-child(3) .stat-value {
  color: #ffffff;
}

.player-stat-card:nth-child(4) .stat-value {
  color: #3498db;
}

.player-stat-card .stat-label {
  font-size: 12px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.button-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 500px;
  padding: 15px 20px calc(20px + var(--sab));
  background-color: rgba(30, 30, 30, 0.95);
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.return-to-menu-button {
  padding: 15px 0;
  width: 100%;
  text-align: center;
  font-size: 16px;
  color: var(--light-color);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.return-to-menu-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s;
}

.return-to-menu-button:hover:before {
  left: 100%;
}

.return-to-menu-button:hover {
  transform: translateY(-3px);
  background-color: #c0392b;
}

.return-to-menu-button:active {
  transform: scale(0.98);
}

.return-to-menu-button.disabled,
.return-to-menu-button:disabled {
  opacity: 0.5;
  background-color: #888;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.return-to-menu-button.disabled:hover,
.return-to-menu-button:disabled:hover {
  transform: none;
  background-color: #888;
}

.return-to-menu-button.disabled:before,
.return-to-menu-button:disabled:before {
  display: none;
}

.button-icon {
  margin-right: 10px;
  font-size: 16px;
}

