.screen-game {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.screen-game .title {
  font-family: "Boulder Dash";
  font-size: 1.3em;
  margin: 0;
}

.screen-game #game-infos {
  font-size: 0.8em;
  font-family: "Boulder Dash";
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}
.screen-game #game-infos > div:nth-child(2) {
  margin-left: 100px;
}

.screen-game .buttons {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-game .line {
  display: flex;
}
.screen-game .cell {
  background-color: black;
  /* border: 1px solid white; */
  width: 32px;
  height: 32px;
}

.screen-game .cell.cell-m { /* wall */
  background-image: url("../img/sprites.png");
  background-position: calc(256px - 1*32px) calc(384px - 6*32px);
  background-color: grey;
}

.screen-game .cell.cell-d { /* diamond */
  background-image: url("../img/sprites.png");
  background-position: calc(256px - 0*32px) calc(384px - 10*32px);
  background-color: cyan;
  animation: diamondIdle 1.2s infinite step-end;
}

.screen-game .cell.cell-t { /* earth */
  background-image: url("../img/sprites.png");
  background-position: calc(256px - 1*32px) calc(384px - 7*32px);
  background-color: saddlebrown;
}

.screen-game .cell.cell-r { /* rock */
  background-image: url("../img/sprites.png");
  background-position: calc(256px - 0*32px) calc(384px - 7*32px);
  background-color: darkgray;
}

.screen-game .cell.cell-v { /* void */
  background-color: black;
}

.screen-game .cell.cell-p { /* startpoint */
  background-color: yellow;
}

.screen-game .cell.cell-x {
  background-image: url("../img/sprites.png");
  /* background-position: calc(256px - 0*32px) calc(384px - 0*32px); */
  background-color: yellow;
  animation: playerIdle 1.2s infinite step-end;
}

.screen-game .cell.cell-e {
  background-image: url("../img/sprites.png");
  background-color: red;
  animation: explodeAnimation 0.5s infinite step-end;
}

@keyframes playerIdle {
  0% {
    background-position: calc(256px - 0*32px) calc(384px - 1*32px);
  }
  12% {
    background-position: calc(256px - 1*32px) calc(384px - 1*32px);
  } 
  24% {
    background-position: calc(256px - 2*32px) calc(384px - 1*32px);
  }
  36% {
    background-position: calc(256px - 3*32px) calc(384px - 1*32px);
  } 
  48% {
    background-position: calc(256px - 4*32px) calc(384px - 1*32px);
  }
  60% {
    background-position: calc(256px - 5*32px) calc(384px - 1*32px);
  } 
  72% {
    background-position: calc(256px - 6*32px) calc(384px - 1*32px);
  }
  84% {
    background-position: calc(256px - 7*32px) calc(384px - 1*32px);
  }
}

@keyframes diamondIdle {
  0% {
    background-position: calc(256px - 0*32px) calc(384px - 10*32px);
  }
  12% {
    background-position: calc(256px - 1*32px) calc(384px - 10*32px);
  } 
  24% {
    background-position: calc(256px - 2*32px) calc(384px - 10*32px);
  }
  36% {
    background-position: calc(256px - 3*32px) calc(384px - 10*32px);
  } 
  48% {
    background-position: calc(256px - 4*32px) calc(384px - 10*32px);
  }
  60% {
    background-position: calc(256px - 5*32px) calc(384px - 10*32px);
  } 
  72% {
    background-position: calc(256px - 6*32px) calc(384px - 10*32px);
  }
  84% {
    background-position: calc(256px - 7*32px) calc(384px - 10*32px);
  }
}

@keyframes explodeAnimation {
  0% {
    background-position: calc(256px - 3*32px) calc(384px - 0*32px);
  }
  33% {
    background-position: calc(256px - 2*32px) calc(384px - 0*32px);
  } 
  66% {
    background-position: calc(256px - 1*32px) calc(384px - 0*32px);
  }
}

#game-popup {
  position: fixed;
  top: 0;
  left: 0;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
}
#game-popup.show {
  display: flex;
}
#game-popup .container {
  padding: 1em;
  background: #000;
  color: #fff;
  border: 5px solid #fff;
  border-radius: 10px;
  max-width: 600px;
}
#game-popup .container .title {
  font-size: 0.9em;
  font-family: "Boulder Dash";
  text-align: center;
}

#game-popup .container .buttons-confirm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#game-popup.one-button .container .buttons-confirm {
  display: none;
}
#game-popup .container .one-button {
  display: none;
  justify-content: center;
}
#game-popup.one-button .container .one-button {
  display: flex;
}

#game-popup .container button {
  margin-top: 16px;
  font-size: 0.8em;
}