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

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #516dff;
  font-family: "Press Start 2P", sans-serif;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}
.screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  text-align: center;
  height: 100vh;
  width: 100vw;
  transition: margin-top 0.4s ease;
}

.screen .all-insects .choose-insect-btn img {
  width: 100px;
  height: 100px;
}
.screen .all-insects .choose-insect-btn {
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin-top: 1rem;
  cursor: pointer;
  background-color: transparent;
  border: 2px solid white;
  color: #fff;
  font-family: "Press Start 2P", sans-serif;
  transition: all 0.3s ease-in-out;
  &:hover {
    background-color: #fff;
    color: #516dff;
  }

  &:active {
    opacity: 0.7;
  }
}

.screen .all-insects {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  align-items: center;
  justify-content: center;
}

.message {
  position: absolute;
  top: 0;
  left: 50%;
  background-color: rgba(0, 0, 0, 0.8);
  width: 100%;
  padding: 20px;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translate(-50%, -150%);
}
.message.visible {
  transform: translate(-50%, 150%);
  opacity: 1;
}
.screen.up {
  margin-top: -100vh;
}

.screen .play-game {
  font-family: "Press Start 2P", sans-serif;
  padding: 1rem;
  cursor: pointer;
  border: none;
  color: #516dff;
}
#time,
#score {
  position: absolute;
}
#time {
  top: 5%;
  left: 20px;
}
#score {
  top: 5%;
  right: 20px;
}
.insect {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%) scale(1);
  animation: rotateInsect 20s forwards infinite;
  transition: transform 0.3s ease-in-out;
}
.insect.caught {
  transform: translate(-50%, -50%) scale(0);
}
@keyframes rotateInsect {
  0% {
    rotate: 0deg;
  }
  100% {
    rotate: 1230deg;
  }
}

.insect img {
  width: 100px;
  height: 100px;
  animation: rotateInsect 20s forwards infinite;
}

#game-container {
  position: relative;
}
