* {
  font-family: "Press Start 2P", cursive;
  user-select: none;
}

body {
  background: black;
  margin: 0;
  padding: 0;
}

#logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 0.15vw;
  color: white;
  line-height: 0.30vw;
  white-space: pre-wrap;
  cursor: default;
}

.loadingScreen {
    position: absolute;
    height: 100vh;
    z-index: 9000;
    width: 100vw;
    background: black;
}

.loadingBar {
    margin-top: 30%;
    margin-left: auto;
    margin-right: auto;
    width: 70%;
    height: 30px;
    border: 7px solid green;
    border-radius: 10px;
}

.loadingBarFill {
    width: 1%;
    height: 30px;
    background-color: green;
    color: black;
    overflow: hidden;
    text-align: center;
    font-weight: 400;
    padding-top: 7px;
    font-size: 20px;
}

.wrapper {
  position: fixed;
  width: 100vw;
  height: 100vh;
  display: grid;
  background-color: black;
  /* size: cover; */
  /* resize: none; */
}

#game {
  background-color: black;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
  /* display: block; */
}

.info {
  height: 3em;
  margin-top: 3%;
  margin-bottom: -3%;
  color: white;
  display: flex;
}

.timer {
  text-align: center;
  flex: 33.333%;
  font-weight: 600;
  /* width: 33%; */
}

.lives {
  text-align: left;
  flex: 33.333%;
}

.livesIcon {
  background-image: url("/img/heartBM.png");
  background-size: cover;
  width: 17px;
  height: 15px;
  margin: 3px;
  display: inline-block;
}

.score {
  text-align: right;
  flex: 33.333%;
  font-weight: 600;
  /* width: 15%; */
}

.grid-container {
  --grid-width: 80vh;
  /* position: relative; */
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  margin-bottom: auto;
  z-index: 2;
  width: var(--grid-width);
  height: calc(var(--grid-width) * 13/15);
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(13, 1fr);
}

.grid-item {
  color: white;
  size: initial;
}

.border {
  background-image: url("/img/bmo.png");
  background-size: cover;
}

.solid-wall {
  background-image: url("/img/solidWallBM.png");
  background-size: cover;
  
}

.softWall {
  background-image: url("/img/softWallBM3.png");
  background-size: cover;
  /* background-color: brown;
  background-blend-mode: multiply; */
  /* will-change: background-image; */
}

.empty-field {
  background-color: transparent;
  /* opacity: 0; */
}

.empty-field.goal {
  background-image: url("/img/goalBM.png");
  background-size: cover;
}

.empty-field.goal.player {
  background-image: url("/img/bombBasic2.png"),url("/img/goalBM.png") ;
  background-position: 2px 66%, 0 0;
  background-size: 257%, contain;
}

.empty-field.goal.explosion {
  background-color: rgb(255, 0, 0, 0.4);
  color: rgb(255, 0, 0);
  background-image: url("/img/explosionBM.png");
  background-size: contain;
}

.empty-field.goal.enemy {
    background-image: url('/img/enemyBM2.png'), url('/img/goalBM.png');
    animation: none;
    background-position: 0 0, 0 0;
}

.empty-field.goal.bomb {
    background-image: url("/img/bombBM.png"), url('/img/goalBM.png');
    animation-name: bombTimer;
    background-size:contain;
    background-position: -2px -1px, 0px 0px;
    animation-duration: 3s;
    animation-timing-function: ease-in-out;
}

.goal.player.winner {
    background-image: url("/img/victoryBM.png"),url('/img/goalBM.png');
    background-position: 2px -3px, 0 0;
    background-position-x: center, auto;
    background-size: contain, contain;
  }

.player {
  background-image: url("/img/bombBasic2.png");
  background-position: -5% 65%;
  /* background-position-x: 4px; */
  background-size: 258% auto;
  
}

/* .goal.player.bomb {
    background-image: url("/img/bombBM.png"), url('/img/goalBM.png'), url("/img/bombBasic2.png");
    background-position: auto, auto, -2px 66%;
    background-size: contain, contain, 257% auto;
} */

.player.bomb {
    background-image: url("/img/bombBasic2.png"), url("/img/bombBM.png"); ;
    background-position: 0px 70%, -2px 0;
    background-size: 250% auto, contain; 
}

.player.invincible {
  animation: blinker 0.9s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

.player.moveUp {
    animation: moveUp 200ms steps(3);
  }

.player.moveRight {
  animation: moveRight 200ms steps(3);
}

.player.moveLeft {
  animation: moveLeft 200ms steps(3);
}

.player.moveDown {
   animation: moveDown 200ms steps(3);
} 

@keyframes moveUp {
    0% {
     background-position: 2px 2px;
     transform: translateY(15%);
     background-position-x: center;
    }
    50% {
        background-position: -50% 2px;
        /* transform: translateY(0%); */
        background-position-x: center;
    }
    100% {
        background-position: -100% 2px;
        transform: translateY(-15%);
        background-position-x: center;
    }
}

@keyframes moveRight {
  0% {
    background-position: 0px 27%;
    background-position-x: center;
    transform: translateX(-15%);
  }
  50% {
    background-position: -50% 27%;
    background-position-x: center;
  }
  100% {
    background-position: -100% 27%;
    background-position-x: center;
    transform: translateX(15%);
  }
}

@keyframes moveDown {
  0% {
    background-position: 3px 66%;
    background-position-x: center;
    transform: translateY(-15%);
  }
  50% {
    background-position: -50% 66%;
    background-position-x: center;
  }
  100% {
    background-position: -100% 66%;
    background-position-x: center;
    transform: translateY(15%);
  }
}

@keyframes moveLeft {
  0% {
    background-position: 0 100%;
    background-position-x: center;
    /* background-position-y: 43px; */
    transform: translateX(15%);
  }
  50% {
    background-position: -50% 100%;
    background-position-x: center;
  }
  100% {
    background-position: -100% 100%;
    background-position-x: center;
    /* background-position-y: 43px; */
    transform: translateX(-15%);
  }
} 

.dead {
     /* url("/img/explosionBM.png"); */
    background-image: url('/img/playerDeadBM.png');
    /* url('/img/explosionBM.png');  */
    background-size: 400% auto;
    animation: playerDeath 1000ms steps(3);
}


@keyframes playerDeath {
    0%{background-position: 0 0;}
    /* 25%{background-position: 127px 0px;}
    50%{background-position: 85px 0px;} 
    75%{background-position: 45px 0px;}  */
    100%{background-position: -100% 0};
}

.enemy {
  animation: enemyMove 400ms steps(3);
  background-image: url("/img/enemyBM2.png");
  background-position: -2% 0;
  background-size: 395% auto;
}

@keyframes enemyMove {
  from {
    background-position: -2%, 0;
  }
  to {
    background-position: -100%, 0;
  }
}

.bomb {
  background-image: url("/img/bombBM.png");
  animation-name: bombTimer;
  background-repeat: no-repeat;
  animation-iteration-count: infinite;
  background-size:contain;
  background-position: -2px -1px;
  animation-duration: 3s;
  animation-timing-function: ease-in-out;
  z-index: 4;
}

@keyframes bombTimer {
  0% {
    transform: scale(85%);
  }
  25% {
    transform: scale(95%);
  }
  50% {
    transform: scale(85%);
  }
  75% {
    transform: scale(95%);
  }
  100% {
    transform: scale(85%);
  }
}

.explosion {
  /* background-color: rgb(255, 0, 0, 0.4); */
  /* color: rgb(255, 0, 0); */
  background-image: url("/img/explosionBM.png");
  background-size: contain;
}

.pauseScreen {
  background-color: rgba(0, 0, 0, 0.8);
  color:white;
  position: absolute;
  display: none;
  margin-top: 15%;
  padding-top: 4px;
  margin-left: 25%;
  width: 50%;
  z-index: 999;
  text-align: center;
  text-shadow: 2px 2px 0px black, 3px 4px 0px white;
  font-weight: 800;
  box-shadow: 0px 0px 5px 5px black;
}

.pauseButton {
  text-align: center;
  display: inline-block;
  background-color: transparent;
  color: white;
  border: 1px solid white;
  border-radius: 3px;
  margin-left: 5%;
  margin-right: 5%;
  margin-bottom: 5%;
  margin-top: 10%;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pauseButton:focus {
  transform: scale(120%);
  outline: none;
}

.pauseButton:hover {
  transform: scale(120%);
  outline: none;
}

.gameOverScreen {
  background-color: black;
  width: 100vw;
  height: 100vh;
  padding: 0px;
  margin: 0px;
  text-align: center;
  display: none;
  color: white;
}

.gameOverScreenH1 {
  padding-top: 15%;
  font-size: 60px;
  font-weight: 800;
  color: white;
  text-shadow: 2px 2px 0px black, 5px 5px 0px green;
}

.congratulations {
  font-size: 2em;
  font-weight: 800;
  display: block;
  z-index: 1001;
  color: white;
  margin-top: 15%;
  width: 40%;
  margin-left: auto;
  margin-right: auto;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.6);
  left: 50%;
  transform: translateX(-50%);
  padding: 20px;
  text-align: center;
  text-shadow: 3px 3px 0px black;
}

.winP {
  color: inherit;
  font-size: 20px;
  font-weight: 100;
  text-align: center;
  line-height: 32px;
}

.startWrap {
  width: 100vw;
  height: 100vh;
  display: block;
  position: absolute;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 1);
}
.startScreen {
  position: absolute;
  display: inline-flex;
  flex-direction: column;
  z-index: 1000;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
}

.startTitle {
  margin-top: 20px;
  text-align: center;
  justify-content: center;
  color: white;
  font-size: 50px;
  font-weight: 900;
  position: relative;
  margin-bottom: 0;
}
.startTitle2 {
  margin-top: 7%;
  color: white;
  text-align: center;
  cursor: default;
  font-size: 60px;
  font-weight: 900;
  position: relative;
  text-shadow: -4px 3px 1px black, -9px 6px 0px green;
}

.startButton {
  display: block;
  height: auto;
  text-align: center;
  margin: 7px;
  padding: 20px;
  left: 50%;
  background-color: black;
  border: 3px solid white;
  border-radius: 20px;
  font-size: 20px;
  font-weight: 900;
  color: rgb(255, 255, 255);
  cursor: pointer;
}

.startButton:hover {
  color: green;
  border: 3px solid green;
}

.startButton:focus {
  color: green;
  border: 3px solid green;
  outline: none;
}

.helpWrap {
  width: 100vw;
  height: 100vh;
  display: block;
  position: absolute;
  z-index: 1004;
  background-color: rgba(0, 0, 0, 1);
}

.helpScreen {
  z-index: 1005;
  width: 100vw;
  height: 100vh;
  position: relative;
  background-color: black;
}

#helpText {
  white-space: pre-wrap;
  color: white;
  margin-top: 7%;
  font-size: 0.9rem;
  font-weight: 0;
  width: 60%;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
  line-height: 23px;
}

#backButton {
  left: 50%;
  transform: translateX(-50%);
  position: relative;
  margin-top: 5%;
}

.level {
    position: absolute;
    color: white;
    display: block;
    top: 78%;
    left: 50%;
    transform: translateX(-50%);
    will-change: transform;
}

.endDiv {
    position: absolute;
    display: block;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: 20000;
}

.endH2 {
    text-align: center;
    margin-top: 10%;
    color: white;
    text-shadow: -4px 3px 1px black, -9px 6px 0px green;
}

.endP {
    text-align: center;
    margin-top: 4%;
    color: white;
    line-height: 32px;
    white-space: pre-wrap;
}

.ultimate {
    text-align: center;
    margin-top: 5%;
    color: white;
    text-shadow: -3px 3px 1px black, -5px 5px 0px rgb(0, 255, 0);
}

.storyDiv {
  margin-top: 0;
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: 1000;
}

.storyWrap {
  position: absolute;
  display: inline-flex;
  flex-direction: column;
  z-index: 1000;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.storyText {
  color: white;
  text-align: justify;
  width: 60%;
  line-height: 26px;
  white-space: pre-wrap;
  margin-left: auto;
  margin-right: auto;
  margin-top: 5%;
}

.storyModeGameOverScreen {
  display: block;
  width: 100%;
  height: 100%;
  text-align: justify;

}

.storyGameOverWrap {
  display: inline-flex;
  position: relative;
  flex-direction: row;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 30px;
}

.startButton.gameOver {
  display: block;
}

.startButton.story {
  /* transform: translateX(-50%); */
  position: absolute;
  display: block;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 20px;
}



