* {
  box-sizing: border-box;
  font-family: 'Press Start 2P', cursive;
}

body {
  background-color: black;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#game {
  background: url("background.gif") no-repeat center center;
  background-size: cover;
}

.game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ui-container {
  position: absolute;
  display: flex;
  width: 100%;
  align-items: center;
  padding: 20px;
  top: 0;
}

.health-bar {
  position: relative;
  width: 100%;
  height: 30px;
  border-top: 4px solid white;
  border-bottom: 4px solid white;
}

.health-bar.player {
  display: flex;
  justify-content: flex-end;
  border-left: 4px solid white;
}

.health-bar.enemy {
  border-right: 4px solid white;
}

.health-red {
  background-color: red;
  height: 100%;
  width: 100%;
}

.health-blue {
  position: absolute;
  background: #818cf8;
  top: 0;
  bottom: 0;
}

.health-bar.player .health-blue {
  right: 0;
  width: 100%;
}

.health-bar.enemy .health-blue {
  left: 0;
  right: 0;
}

#timer {
  background-color: black;
  width: 100px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 4px solid white;
}

.centered-text {
  position: absolute;
  color: white;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
}

#displayText {
  position: absolute;
  top: 5%;
  width: 100%;
  text-align: center;
  font-size: 25px;
  color: white;
  font-weight: bold;
}

#restartText {
  position: absolute;
  left: 50%;
  top: 65%;
  transform: translateX(-50%);
  font-size: 15px;
  color: white;
  display: none;
}

.controls-container {
  position: absolute;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
  background-color: #333;
  color: white;
  font-size: 14px;
  font-family: 'Press Start 2P', cursive;
  border: 2px solid white;
  bottom: 0;
  box-sizing: border-box;
}

.controls {
  width: 48%;
  padding: 10px;
  text-align: center;
  background-color: #444;
  border-radius: 5px;
  color: white;
}

.player1 {
  color: blue;
  border: 2px solid blue;
}

.player2 {
  color: red;
  border: 2px solid red;
}
