@font-face {
  font-family: "Baby Monsta";
  src: url("./assets/Baby\ Monsta.otf");
}

* {
  touch-action: manipulation;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

body {
  background: url("./assets/background.jpg") no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  color: #fff;
  font-family: sans-serif;
  font-size: 2em;
  text-align: center;
}

canvas {
  height: 70vh;
}

.logo-img {
  z-index: 10;
  position: fixed;
  width: 150px;
  margin-left: -80px;
}

.gamepad {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 90%;
  left: 5%;
  right: 5%;
  gap: 0.5rem;
}

.controls_1 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

#arrow-right {
  font-size: 1rem;
  background: transparent;
  border: none;
  outline-style: none;
  cursor: pointer;
  color: white;
}

#arrow-left {
  font-size: 1rem;
  background: transparent;
  border: none;
  outline-style: none;
  cursor: pointer;
  color: white;
}

.controls_2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

#pause_game {
  position: absolute;
  right: 120px;
  background: transparent;
  border: none;
  z-index: 10;
  outline-style: none;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}

#pause_game:hover,
#continue_game:hover,
#start_game:hover,
#restart_game:hover,
#btn-home:hover {
  transform: scale(1.05);
}

#continue_game {
  display: none;
  position: absolute;
  right: 120px;
  background: transparent;
  border: none;
  z-index: 10;
  outline-style: none;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}

#rotate_piece {
  font-size: 1rem;
  background: transparent;
  color: white;
  border: none;
  outline-style: none;
  cursor: pointer;
}

#arrow-down {
  font-size: 1rem;
  background: transparent;
  color: white;
  border: none;
  outline-style: none;
  cursor: pointer;
}

#start_game {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  opacity: 1;
  z-index: 10;
  outline-style: none;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}

#restart_game {
  display: none;
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  z-index: 10;
  outline-style: none;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}

#modal {
  display: none;
  position: absolute;
  width: 700px;
  top: 30%;
  left: 50%;
  -webkit-transform: translateX(-50%);
  -moz-transform: translateX(-50%);
  transform: translateX(-50%);
  background-image: url(./assets/bg-screen.png);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  z-index: 20;
}
.modal-title {
  font-size: 2.5rem;
  font-family: "Baby Monsta";
}

.modal-text {
  font-size: 1.5rem;
}

#replay_game {
  background: transparent;
  border: none;
  outline-style: none;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
  margin-bottom: 2rem;
}

#btn-home {
  position: absolute;
  left: 10px;
  background: transparent;
  border: none;
  z-index: 10;
  outline-style: none;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}
#score {
  border: 0px solid black;
  font-size: 2rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.score-marge {
  margin: 0.5rem;
}

#levels {
  border: 0px solid black;
  margin: 0;
  font-size: 2rem;
}

.history {
  font-size: 1.25rem;
  margin-top: 0.25rem;
}

@media all and (max-width: 800px) {
  #levels,
  #score,
  .score-marge {
    font-size: 1.25rem;
  }
  #restart_game {
    opacity: 1;
  }
  #pause_game {
    right: 75px;
  }
  #continue_game {
    right: 75px;
  }
  .img_home,
  .img_pause,
  .img_continue,
  .img_start,
  .img_restart {
    width: 50px;
    height: auto;
  }
  .controls_1 {
    display: none;
  }

  .controls_2 {
    display: none;
  }
  .img_replay {
    width: 100px;
    height: auto;
  }
  .modal-text {
    font-size: 1.2rem;
  }
}

@media all and (max-width: 870px) {
  canvas {
    height: 60vh;
  }
  .controls_1 {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .controls_2 {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

@media (max-height: 800px) {
  canvas {
    height: 55vh;
  }
  .controls_1 {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .controls_2 {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .gamepad {
    top: 85%;
  }
}
