@import url("https://fonts.googleapis.com/css2?family=Slackey&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap");

* {
  margin: 0;
  padding: 0;
  user-select: none;
  /* -ms-touch-action: manipulation;
  touch-action: manipulation; */
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #202028;
  font-family: "Slackey", cursive;
  overflow: hidden;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  box-sizing: border-box;
}

#canvas {
  height: 90vh;
  border: 2px solid #fff;
  margin-bottom: 10px;
}

.scoreCon,
.levelCon,
.nextPiece {
  color: #fff;
  font-size: 40px;
}

.infoWrapper {
  margin-left: 30px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.nextPiece {
  color: #fff;
}

.nextImg {
  width: 100px;
  height: 100px;
}

.messageCon {
  font-family: "Slackey", cursive;
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 44.5%;
  transform: translate(-50%, -50%);
  color: tomato;
  animation: textSize 0.8s linear;
  display: none;
  font-size: 70px;
  text-align: center;
}

@keyframes textSize {
  from {
    transform: scale(0) translate(-250%, -250%);
  }
  to {
    transform: scale(1) translate(-50%, -50%);
  }
}

/* button */
.startBtn {
  width: 250px;
  padding: 10px;
  font-size: 25px;
  background: tomato;
  outline: none;
  border: none;
  border-radius: 50px;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 6px 5px 3px rgba(0, 0, 0, 0.8);
  -webkit-transform: perspective(1000px) rotateY(-30deg);
  transform: perspective(1000px) rotateY(-30deg);
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
  overflow: hidden;
  -webkit-animation: BtnShow 1s 0.3s linear backwards;
  animation: BtnShow 1s 0.1s linear backwards;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
}

@keyframes BtnShow {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.startBtn:hover {
  background: -o-linear-gradient(
    to right,
    rgb(242, 161, 146),
    rgb(242, 52, 52)
  );
  background: linear-gradient(to right, rgb(242, 161, 146), rgb(242, 52, 52));
  -webkit-transform: perspective(1000px) rotateY(30deg);
  transform: perspective(1000px) rotateY(30deg);
  text-shadow: -6px 5px 3px rgba(0, 0, 0, 0.8);
}

.startBtn::before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  background: -o-linear-gradient(left, transparent, #fff, transparent);
  background: linear-gradient(to right, transparent, #fff, transparent);
  top: 0;
  left: -100%;
  -webkit-transform: skewX(-30deg);
  -ms-transform: skewX(-30deg);
  transform: skewX(-30deg);
  -webkit-transition: left 0.5s;
  -o-transition: left 0.5s;
  transition: left 0.5s;
}

.startBtn:hover::before {
  left: 100%;
}

.highScore {
  font-family: "Ubuntu Mono", monospace;
  font-size: 30px;
}

.page2Con {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #202028;
  font-family: "Slackey", cursive;
  display: none;
}

.startBtn2 {
  position: absolute;
  padding: 10px 30px;
  font-family: "Slackey", cursive;
  font-size: 40px;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
}

.startBtn2:active {
  transform: scale(0.95);
}

@keyframes textAnim {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1.1);
  }
}

.startBtn2:hover {
  animation: textAnim 0.8s infinite;
}

/* resources */
.resources {
  position: absolute;
  bottom: 50px;
  color: #fff;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1.5em;
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
}

a:visited {
  color: #fff;
}

.directionCon {
  width: 60vw;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 5px 0;
  color: #fff;
  align-self: center;
  height: 5vh;
  width: 85%;
  display: none;
}

.rotate {
  width: 25px;
  height: 25px;
  background-color: #fff;
  padding: 5px;
  border-radius: 5px;
}

.rotate img {
  width: 100%;
  height: 100%;
  color: #fff;
}

.arrowCon i {
  font-size: 32px;
  margin-left: 30px;
}

@media (max-width: 541px) {
  body {
    height: 85vh;
  }

  #canvas {
    height: 73vh;
    margin-top: 22%;
    width: 90vw;
  }

  .startBtn2 {
    padding: 5px 20px;
    font-size: 20px;
    border-radius: 20px;
  }

  .resources {
    bottom: 15px;
    font-size: 9px;
    width: 80%;
  }

  .scoreCon,
  .levelCon,
  .nextPiece {
    font-size: 12px;
  }

  .infoWrapper {
    position: absolute;
    top: 10px;
    margin-left: 10px;
    display: flex;
    flex-direction: row;
    height: 5vh;
    width: 80%;
    justify-content: space-between;
    align-items: center;
  }

  .nextImg {
    width: 20px;
    height: 20px;
  }

  .messageCon {
    left: 50%;
    line-height: 1.7em;
    font-size: 25px;
    text-align: center;
  }

  .highScore {
    font-size: 20px;
  }

  .startBtn {
    font-size: 15px;
    width: 180px;
    padding: 10px;
  }
}
