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

.container {
  background-image: linear-gradient(
    174.2deg,
    rgba(255, 244, 228, 1) 7.1%,
    rgba(240, 246, 238, 1) 67.4%
  );

  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hide {
  display: none;
}

.car,
.enemy {
  position: absolute;
  bottom: 100px;
  margin: auto;
  width: 50px;
  height: 100px;
  background-color: white;
  line-height: 38px;
  font-size: 1.7em;
  text-align: center;
  vertical-align: middle;
  background-image: url(car.png);
  background-size: cover;
  border-radius: 10px;
}

.line {
  position: absolute;
  height: 100px;
  width: 10px;
  margin-left: 195px;
  background-color: white;
}

.score {
  background-color: black;
  height: 10vh;
  text-align: center;
  color: white;
  font-size: 1.5em;
  font-family: fantasy;
  padding-top: 2rem;
}

.gameArea {
  background-color: black;
  width: 400px;
  height: 100vh;
  overflow: hidden;
  position: relative;
  margin: auto;
}

.start {
  position: absolute;
  background-color: limegreen;
  padding: 10px;
  border-radius: 5px;
  left: 48vw;
  top: 50vh;
  color: black;
  z-index: 1;
  text-align: center;
  font-size: 1.5em;
  cursor: pointer;
}

.start:hover {
  background-color: orangered;
  color: white;
  transform: scale(1.1);
}

.pauseScreen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(244, 244, 44, 0.8);
  color: black;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  z-index: 2;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.fadeOut {
  animation-name: fadeOut;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

@media screen and (max-width: 500px) {
  .gameArea {
    width: 90%;
  }
  .startScreen {
    width: 90%;
    left: 5%;
  }
}
