body {
  font-family: "Arial", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100vh;
  background-color: #222;
  color: #fff;
  margin: 0;
}

.scoreboard {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #333;
  border: 5px solid #444;
  border-radius: 15px;
  padding: 20px;
  width: 80%;
  max-width: 800px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  margin-top: 20px;
}

.timer {
  text-align: center;
  margin: 0 20px;
}

.timer #quarter {
  font-size: 1.5em;
  margin-bottom: 10px;
}

.timer #time {
  font-size: 2em;
  background-color: #111;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid #555;
  display: inline-block;
  width: 100px;
  text-align: center;
}

.timer-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-button-row {
  display: flex;
  justify-content: center;
  margin: 5px 0;
}

.timer-button {
  margin: 0 5px;
  padding: 5px 10px;
  font-size: 1em;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s;
  background-color: #444;
  color: white;
}

.timer-button.active {
  background-color: #888;
}

.timer-button:hover {
  background-color: #666;
}

.team {
  text-align: center;
  width: 30%;
}

.team h2 {
  margin-bottom: 20px;
  font-size: 1.5em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ccc;
}

.score {
  font-size: 4em;
  margin-bottom: 20px;
  background-color: #111;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid #555;
  width: 100px;
  text-align: center;
  margin: 0 auto;
}

.buttons button {
  display: block;
  width: 80%;
  margin: 10px auto;
  padding: 10px;
  font-size: 1em;
  cursor: pointer;
  border: none;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.red-button {
  background-color: #ff0000;
}

.red-button:hover {
  background-color: #cc0000;
}

.blue-button {
  background-color: #007bff;
}

.blue-button:hover {
  background-color: #0056b3;
}

.stats {
  margin-top: 20px;
  width: 80%;
  max-width: 800px;
}

.stats h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.5em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ccc;
}

.table-container {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #555 #333;
}

.table-container::-webkit-scrollbar {
  width: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #333;
}

.table-container::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 10px;
  border: 2px solid #333;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  text-align: center;
  border: 1px solid #555;
  width: 33.33%;
}

th.narrow {
  width: 15%;
}

th {
  background-color: #444;
  position: sticky;
  top: 0;
  z-index: 1;
  top: -1px;
}

tbody tr:nth-child(odd) {
  background-color: #333;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #333;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  text-align: center;
  border-radius: 10px;
  position: relative;
}

.close {
  position: absolute;
  top: 10px;
  right: 25px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

#winnerMessage {
  font-size: 1.5em;
  color: #fff;
}

.restart-button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #444;
  color: white;
  transition: background-color 0.3s;
}

.restart-button:hover {
  background-color: #666;
}

.restart-button:disabled {
  background-color: #888;
  cursor: not-allowed;
}

.reset-button-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  position: relative;
  top: 25px;
}

.reset-button {
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #444;
  color: white;
  transition: background-color 0.3s;
}

.reset-button:hover {
  background-color: #666;
}

@media (max-width: 768px) {
  .scoreboard {
    flex-direction: column;
  }

  .team {
    width: 100%;
  }

  .timer {
    width: 100%;
    margin-bottom: 20px;
  }
}
