/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

@import url("https://fonts.googleapis.com/css2?family=Fjalla+One&display=swap");

* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  font-family: "Fjalla One", sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background-color: #111;
}

.game-container {
  width: clamp(220px, 100%, 720px);
  height: 100%;
  margin: 0 auto;
  background-color: #426dbd;
  position: relative;
  overflow: hidden;

  display: -webkit-box;

  display: -ms-flexbox;

  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.score-container {
  font-size: 35px;
  margin-bottom: 20px;
}

.cieling {
  width: 100%;
  height: 16px;
  background: url("images/ceiling.png") repeat-x;
  -webkit-animation: movingScreen 3.5s linear infinite;
          animation: movingScreen 3.5s linear infinite;
}

.land {
  width: 100%;
  height: 100px;

  position: absolute;
  bottom: 0;
  left: 0;

  background: url("images/land.png") repeat-x;
  -webkit-animation: movingScreen 3.5s linear infinite;
          animation: movingScreen 3.5s linear infinite;
}

.game-screen {
  width: 100%;
  height: 70vh;
  position: relative;
}

.plane {
  position: absolute;
  pointer-events: none;
  z-index: 99;
  left: 8%;
  -webkit-transition: all 0.1s ease;
  -o-transition: all 0.1s ease;
  transition: all 0.1s ease;
  -webkit-transform-origin: center;
      -ms-transform-origin: center;
          transform-origin: center;
}

.plane img {
  width: 100%;
  height: 100%;
}

.explosion {
  position: fixed;
  z-index: 9;
  display: none;
}

.obstacle {
  position: absolute;
  width: 60px;
  background: url("images/pipe.png") repeat-y;
}

.obstacle.bottom {
  bottom: 0;
}

.obstacle.top {
  top: 0;
}

.buildings {
  position: absolute;
  width: 100%;
  height: 120px;

  bottom: 3%;
  left: 0;

  background: url("images/buildings.png") repeat-x;
  -webkit-animation: movingScreen 11s linear infinite;
          animation: movingScreen 11s linear infinite;
}

.score-board {
  position: absolute;
  width: clamp(250px, 80%, 350px);
  height: 200px;
  z-index: 99;
  border-radius: 10px;

  display: -webkit-box;

  display: -ms-flexbox;

  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;

  -webkit-transform: scale(0);

      -ms-transform: scale(0);

          transform: scale(0);
  gap: 20px;

  color: #fff;
  font-size: 20px;
  -webkit-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  background-color: #171616b8;
}

.score-board.show {
  -webkit-transform: scale(1);
      -ms-transform: scale(1);
          transform: scale(1);
}

button {
  padding: 10px 20px;
  font-size: 20px;
  background-color: #f11d13;
  border: none;
  border-radius: 10px;
}

.animation-stop .buildings,
.animation-stop .land,
.animation-stop .cieling {
  -webkit-animation-play-state: paused;
          animation-play-state: paused;
}

/* Keyframes */

@-webkit-keyframes movingScreen {
  0% {
    background-position: 0px;
  }
  100% {
    background-position: -1000px;
  }
}

@keyframes movingScreen {
  0% {
    background-position: 0px;
  }
  100% {
    background-position: -1000px;
  }
}