*{
  margin: 0 auto;

}
#game {
  text-align: center;
  height: 300px;
}
body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #20232a;
}
#won {
  margin-top: 100px;
  width: 50%;
  font-family: 'Press Start 2P', cursive;
  font-size: 26px;
  text-align: center;
  background-image: url(./img/1.gif);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
#won p {
  margin-bottom: 30px;
}
.start{
  display: inline-block;
  margin-top: 100px;
  width: 150px;
  height: 50px;
  cursor: pointer;
  border-radius: 10px;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  font-weight: bold;
  background-image: url(./img/flame.gif);
  background-size: cover;

}
.hidden {
  display: none;
}

.background {
  background: url(https://github.com/krodetsa/t-rex_game.github.io/blob/master/img/tumblr_ne869oUo1Z1scncwdo1_500.gif?raw=true);
  table-layout: fixed;
  background-position: left bottom;
  border-spacing: 0;
}

.background td {
  padding: 0;
}

.fireball {
  background-image: url(./img/flame.gif);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom;
}

.lava {
  background-image: url(https://github.com/krodetsa/t-rex_game.github.io/blob/master/img/lava.gif?raw=true);
  background-repeat: no-repeat;

}
#lives {
  position: absolute;
  right: 29%;
  top: 10px;
  z-index: 666;
  display: none;
}
.elevator {
  background: rgb(229, 229, 229);
}

.wall {
  background-image: url(https://media.forgecdn.net/avatars/116/413/636397996886685593.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom;
}

.actor {
  position: absolute;
}

.coin {
  background-image: url(https://github.com/krodetsa/t-rex_game.github.io/blob/master/img/bone.png?raw=true);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom;
  width: 25px !important;
}

.player {
  background-image: url(./img/dead.png);
  background-image: url(https://raw.githubusercontent.com/krodetsa/t-rex_game.github.io/master/img/8bit-TRex.png);
  -webkit-transform: scaleX(-1);
      -ms-transform: scaleX(-1);
          transform: scaleX(-1);
  background-position:-40px 0px;
  background-size: cover;
  display: inline-block;
}
.player::before{
  display: inline-block;
  background-image: url(https://raw.githubusercontent.com/krodetsa/t-rex_game.github.io/master/img/8bit-TRex.gif);
  background-position:-63px 2px;
  background-size: cover;
  margin-left: 24px;
  height: 45px;
  width: 35px;
  content: " ";
}
.player::after{
  display: inline-block;
      background-image: url(https://raw.githubusercontent.com/krodetsa/t-rex_game.github.io/master/img/8bit-TRex.gif);
      background-position: 0px 2px;
      background-size: cover;
      height: 45px;
      position: relative;
      width: 31px;
      content: " ";
      top: -55px;
      right: 31px;
}

.lost .player {
  background-image: url(./img/dead.png);
}
.won .player {
  display: none
}
.lost .player::after{
  display: inline-block;
  background-image: url(./img/dead.png);
  background-position: -8px 6px;
  background-size: cover;
  background-repeat: no-repeat;
  height: 45px;
  position: relative;
  width: 31px;
  content: " ";
  top: -55px;
  right: 31px;
}
.lost .player::before{
  display: inline-block;
  background-image: url(./img/dead.png);
  background-position:-60px 2px;
  background-size: cover;
  margin-left: 24px;
  height: 45px;
  width: 35px;
  content: " ";
}
.won .player::before{
  display: none;
  background-repeat: no-repeat;
  background-size: cover;
}

.game {
  overflow: hidden;
  max-width: 600px;
  max-height: 450px;
  position: relative;
}
