@import url("https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap");
body, html {
  background: #151724;
  height: 100%;
  margin: 0;
  padding: 0;
}

*, *:before, *:after {
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: serif;
}

#app {
  position: relative;
  width: 100px;
  height: 50px;
  background-color: #151724;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.obsticle {
  background: #f7fadc;
  height: 10px;
  width: 10px;
  position: absolute;
  right: -10px;
  bottom: 0;
}
.obsticle.top {
  top: 0;
  bottom: auto;
}

#ship {
  width: 7px;
  height: 3px;
  background: #f7fadc;
  position: absolute;
  left: 10px;
  top: 23px;
  z-index: 5;
  transition: top 0.1s linear;
}
#ship:before, #ship:after {
  display: block;
  content: "";
  position: absolute;
  background: #f7fadc;
  height: 2px;
  width: 2px;
}
#ship:before {
  left: 0;
  top: -1px;
}
#ship:after {
  right: -2px;
  bottom: 0;
  height: 2px;
}
#ship.die {
  background: red;
  -webkit-animation: die 1s ease-in forwards;
          animation: die 1s ease-in forwards;
}

#ship.die:before, #ship.die:after {
  background: red;
}

button#play {
  position: relative;
  font-family: "Press Start 2P", cursive;
  z-index: 4;
  border: 2px solid #f7fadc;
  background: #151724;
  color: #77c2f7;
  font-size: 0.6em;
  height: 100%;
  width: 100%;
}
button#play span {
  position: absolute;
  bottom: 5px;
  color: #f7fadc;
  width: 100%;
  left: 0;
  text-align: center;
  font-size: 0.33em;
}

#score {
  color: #151724;
  font-family: "Press Start 2P", cursive;
  position: absolute;
  top: 2px;
  right: 0px;
  z-index: 3;
  font-size: 0.33em;
  background: #f7fadc;
}

#debug {
  height: 5px;
  width: 5px;
  background: magenta;
  position: absolute;
  z-index: 999;
  opacity: 0.75;
  display: none;
}

@-webkit-keyframes die {
  from {
    transform: rotateZ(0deg) translate(0px, 0px);
  }
  to {
    transform: rotate(30deg) translate(20px, 50px);
  }
}

@keyframes die {
  from {
    transform: rotateZ(0deg) translate(0px, 0px);
  }
  to {
    transform: rotate(30deg) translate(20px, 50px);
  }
}