* {
  margin: 0;
  padding: 0;
  font-family: "Josefin Sans", sans-serif;
}
.hide {
  display: none;
}
.carGame {
  width: 100%;
  height: 100vh;
  background-image: url("assets/images/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 150vw;
}

.car,
.enemyCar {
  width: 49px;
  height: 107px;
  fill: red;
  position: absolute;
  bottom: 20px;
}
.roadLines {
  width: 10px;
  height: 100px;
  position: absolute;
  background: white;
  margin-left: 195px; /* show line in center = (gameArea.width / 2) - (roadLines.width / 2) */
}
.gameArea {
  width: 400px;
  height: 100vh;
  background: #2d3436;
  margin: auto;
  position: relative;
  /* overflow: hidden; */
  border-right: 7px dashed #c8d6e5;
  border-left: 7px dashed #c8d6e5;
  --width: 300px;
}
.gameArea::before,
.gameArea::after {
  position: absolute;
  content: "";
  font-size: 54px;
  width: var(--width);
  left: calc(calc(var(--width) * -1) - 7px);
  height: 100vh;
  background-image: url("assets/images/tree.jpg");
  background-repeat: no-repeat;
  background-position: top;
  background-size: 200px 200px;
  mix-blend-mode: multiply;
  transform: translateY(-190px);
  animation: moveTree 2s linear 1s;
  animation-iteration-count: infinite;
}
@keyframes moveTree {
  0% {
    transform: translateY(-190px);
  }
  100% {
    transform: translateY(120vh);
  }
}
.gameArea::after {
  content: "";
  left: unset;
  transform: translateY(-190px);
  right: calc(calc(var(--width) * -1) - 7px);

  animation: moveTree 2s linear;

  animation-iteration-count: infinite;
}

.score {
  position: absolute;
  top: 15px;
  left: 40px;
  background: #10ac84;
  width: 300px;
  line-height: 70px;
  text-align: center;
  color: white;
  font-size: 1.5em;
  box-shadow: 0 5px 5px #777;
}
.startScreen {
  position: absolute;
  background-color: #ee5253;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  z-index: 1;
  text-align: center;
  border: 1px solid #ff6b6b;
  padding: 15px;
  margin: auto;
  width: 50%;
  cursor: pointer;
  letter-spacing: 5;
  font-size: 20px;
  word-spacing: 3;
  line-height: 30px;
  text-transform: uppercase;
  box-shadow: 0 5px 5px #777;
}
.level button {
  padding: 7px;
  font-size: 14px;
  background: white;
  border: 1px solid orangered;
  border-radius: 10px;
  width: 80px;
  cursor: pointer;
  outline: none;
  box-shadow: 0 5px 5px #777777a6;
}
