@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Press Start 2P", sans-serif;
}

body {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: transparent;
  background-image: url("../assets/gameBackground.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

canvas {
  position: absolute;
  background-color: rgba(0, 22, 41, 84%);
  box-shadow: 1px 5px 11px inset rgba(02,18,27,7.1);
  border-radius: .5rem;
  left: 13.7rem;
  height: 75%;
  width: 25%;
}

#info {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  width: fit-content;
  height: 60px;
  background-color: rgb(1 18 33 / 0.1);
  border-radius: .5rem;
  right: 12.5rem;
  top: 5.9375rem;
  padding: 1.25rem;
}

#info p {
  color: #E5E9F0;
  font-size: 5.7px;
}

#score {
  position: absolute;
  right: 7.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#score p {
  color: #E5E9F0;
  font-size: 1.5rem;
}

button {
  display: block;
  position: absolute;
  cursor: pointer;
  padding: .625rem .875rem;
  font-size: .75rem;
  border-radius: .5rem;
  border: none;
  width: 10rem;
  height: 3.5rem;
  background-color: #FEA55F;
}

#start {
  bottom: 8.125rem;
  left: 10rem;
}

#pause {
  left: 60rem
}

#restart {
  width: fit-content;
}

button:hover {
  background-color: #ff8b32;
  transition: all .2s ease-in-out;
}

#game-over {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-size: 2rem;
  left: 31.5rem;
  gap: 1rem;
}

#game-over p {
  color: #FEA55F;
  text-shadow: 0px 0px 6px rgb(254, 163, 93, 0.6);
  -webkit-animation: blink 2s ease-in-out infinite both;
  animation: blink 2s ease-in-out infinite both;
}

#restart {
  /* position: absolute;
  top: 8rem; */
  margin-top: 8rem;
}

@-webkit-keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}
@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  canvas {
    left: 2rem;
    height: 85%;
    width: 50%;
  }

  #info {
    justify-content: center;
    height: 4.6875rem;
    top: 1.7rem;
    padding: 6px;
    right: 2.5rem;
  }

  #info p {
    font-size: .375rem;
  }

  #score {
    right: 4rem;
  }
  
  #score p {
    font-size: 1rem;
  }

  button {
    padding: .625rem .875rem;
    font-size: .5rem;
    width: fit-content;
    height: 2.5rem;
  }
  
  #start {
    bottom: 6rem;
    left: 18.5rem;
  }
  
  #restart {
    width: fit-content;
  }
  
  #game-over {
    text-align: center;
    font-size: 1rem;
    left: 11rem;
    width: 30%;
    gap: 1.5rem;
  }

  #restart {
    margin-top: 7rem;
  }
  
}

@media (min-width: 768px) {
  canvas {
    left: 12rem;
    height: 85%;
    width: 45%;
  }

  #info {
    top: 3.55rem;
    right: 10rem;
  }

  #info p {
    font-size: .625rem;
  }

  #score {
    bottom: 30rem;
    right: 12rem;
  }
  
  #score p {
    font-size: 2rem;
  }

  #start {
    font-size: 1rem;
    width: 12.5rem;
    height: 4.375rem;
    bottom: 20rem;
    left: 46rem;
  }

  #pause {
    font-size: 1rem;
    width: 12.5rem;
    height: 4.375rem;
    bottom: 20rem;
    left: 46rem;
  }
}

.hidden {
  display: none !important;
}
