@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
    
body {
  font-family: 'Roboto', sans-serif;
  background-color: transparent;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 40vh;
}

.layout-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 15px;
  max-width: 100%;
}

.card {
  background-color: rgba(20, 20, 20, 0.9);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  padding: 8px;
  width: auto; 
  min-width: 240px;
  max-width: 280px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(60, 60, 60, 0.4);
  flex-shrink: 0;
}

.side-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: fixed;
  bottom: 15px;
  right: 15px;
}

.side-buttons button {
  width: auto;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 12px;
}

.player-list {
  margin-bottom: 0;
}

.player-row {
  display: grid;
  grid-template-columns: minmax(90px, 110px) 70px 70px;
  gap: 6px;
  padding: 6px;
  border-radius: 4px;
  margin-bottom: 5px;
  background-color: rgba(15, 15, 15, 0.5);
  font-size: 12px;
}

.player-name {
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
  text-align: left;
  max-width: 120px;
}

.player-stats {
  display: contents;
}

.stat-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 35px;
}

.stats-headers {
  display: grid;
  grid-template-columns: minmax(110px, 130px) 80px 80px;
  gap: 6px;
  padding: 0 6px;
  margin-bottom: 6px;
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.stats-headers div {
  text-align: center;
}

.stats-headers div:first-child {
  text-align: left;
}

.damage {
  color: #ff9c00;
  font-weight: 500;
}

.damage-in-battle {
  color: #ff6a00;
  font-size: 9px;
}

.frags {
  color: #00a8ff;
  font-weight: 500;
}

.frags-in-battle {
  color: #00a8ff;
  font-size: 9px;
}

/* Блок статистики внизу */
.summary-stats {
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 6px;
  padding: 6px;
  margin-top: 5px;
  background-color: rgba(15, 15, 15, 0.7);
  font-size: 14px;
  border-radius: 4px;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.battle-label {
  color: #fff;
  text-align: left;
}

.battle-label span {
  font-weight: 500;
}

.battle-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.best-row {
  margin-bottom: 2px;
}

.worst-row {
  margin-top: 2px;
}

.best-battle-value {
  color: #00ff00;
  font-weight: 500;
  font-size: 12px; /* Зменшений розмір шрифту */
}
.worst-battle-value {
  color: #ff3333;
  font-weight: 500;
  font-size: 12px; /* Зменшений розмір шрифту */
}

.frags-label {
  color: #fff;
  text-align: center;
  justify-content: center;
}

.frags-value {
  color: #00a8ff;
  font-weight: 500;
  margin-left: 5px;
}

.points-label {
  color: #fff;
  text-align: right;
  justify-content: flex-end;
}

.points-value {
  color: #d580ff;
  font-weight: 700;
  margin-left: 5px;
}

.empty-message {
  text-align: center;
  color: #aaa;
  padding: 15px;
  font-style: italic;
  font-size: 12px;
}

.draw {
  color: #ffd700; 
  font-weight: bold;
}

button {
  cursor: pointer;
  background-color: #4e54c8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #373b9d;
}

@media (max-width: 500px) {
  .side-buttons {
    position: static;
    flex-direction: row;
    width: 100%;
    max-width: 240px;
    justify-content: space-between;
    margin-top: 8px;
    gap: 10px;
  }
  
  .side-buttons button {
    flex: 1;
    font-size: 10px;
    padding: 5px 4px;
  }
  
  .layout-container {
    flex-direction: column;
    align-items: center;
  }
}
