*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(
    to right bottom,
    #16222a 15%,
    #294552,
    #16222a 75%
  );
}

.game-container {
  width: 1200px;
  height: 675px;

  position: relative;
  box-shadow: 0.5rem 1rem 3rem rgba(0, 0, 0, 0.6);
}

.start-screen,
.score-box,
.end-screen {
  position: absolute;
  top: 0;
  left: 0;
}

.start-screen,
.end-screen {
  width: 100%;
  height: 100%;
  z-index: 2;
  background-color: #000000;
  background-image: url("assets/space/space-posx.jpg");

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: "Fredoka One";
}

.end-screen {
  display: none;
}

.start-screen__title,
.end-screen__title {
  font-size: 3rem;
  color: #ffffff;
  text-transform: uppercase;
}

.start-screen__start,
.end-screen__score {
  font-size: 1.5rem;
  color: yellow;
}

.end-screen__restart {
  font-size: 1.5rem;
  color: #ffffff;
  margin-top: 2rem;
  cursor: pointer;

  animation: throb 1.2s ease-out infinite;
}

.score-box {
  z-index: 3;
  padding: 2rem;

  font-family: "Fredoka One";
  color: white;
  font-size: 1.3rem;

  display: none;
}

.level-up {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;

  font-family: "Fredoka One";
  color: white;
  font-size: 2rem;
  visibility: hidden;
  opacity: 0;
}

@keyframes throb {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    visibility: hidden;
  }
  20% {
    opacity: 1;
    visibility: visible;
  }
  70% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}
