@font-face {
    font-family: 'bloodynormal';
    src: url('../fonts/BLOODY-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    font-family: bloodynormal, serif;
}

body {
    margin: 0 auto;
    padding: 0;
    background-image: url(../images/board-bg.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    overflow-y: hidden;
}

section#score {
  width: 100%;
}

#board {
  width: 90%;
  margin: 0 auto;
  position: relative;
}

#board::before {
  content: '';
  display: block;
  padding-top: 100%;
}

.board-wrapper {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.board-wrapper  > div {
  border: 1px solid black;
  border-radius: 5px;
  background-color: rgba(211,211,211, 0.55);
  float: left;
  width: 10%;
  height: 10%;
}


section#score div {
  width: 10em;
  height: 3em;
  text-align: center;
  padding: 0.5em;
  background-color: rgba(211,211,211, 0.75);
  border: 1px solid lightgray;
  border-radius: 1px;
  box-shadow: 1px 1px 5px 1px lightgray;
  margin: 0.4em auto;
}

.zombie {
  background: url('../images/zombie_head3.png') no-repeat;
  background-size: cover;
}

.brain {
  background-size: cover;
  background: url('../images/brain.png') no-repeat center;
  animation-name: pulse_animation;
  animation-duration: 1000ms;
  transform-origin:70% 70%;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.trap {
  background-size: contain;
  background: url('../images/trap.png') no-repeat center;
  animation-name: pulse_animation;
  animation-duration: 1000ms;
  transform-origin:70% 70%;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

section#over {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 1;
  padding: 10px;
  background-color: rgba(46, 10, 68, 0.9);
  background-image: url('../images/zombie-clipart-finger-4.png');
  background-size: 40% auto;
  background-repeat: no-repeat;
  background-position: bottom right;
  font-size: 4em;
  color: rgb(0, 189, 0);
}

section#over pre {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: bolder;
  color: brown;
}

.invisible {
  display: none;
}

.none {
  display: none;
}

.container {
  text-align: center;
  position: relative;
  top: 50%;
  transform: translateY(-80%);
  }

.over, .start {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 1;
  padding: 10px;
  background-color: rgba(46, 10, 68, 0.9);
  }

.over p, .start p {
  text-align: center;
}

#over button, .start button {
  border: none;
  border-radius: 10px;
  width: 300px;
  height: 60px;
  cursor: pointer;
  background-color: rgb(255, 81, 196);
  color: rgb(299, 299, 299);
  font-size: 25px;
}

.start .container {
  color: rgb(0, 189, 0);
}

.start .container h1 {
  font-size: 68px;
}

.start .container p {
  font-size: 40px;
}

#over {
  background-color: #000;
}

@keyframes pulse_animation {
  0% { background-size: 95%; }
  50% { background-size: 85% }
  100% { background-size: 95% }
}

.mobile-controller {
  width: 70%;
  margin: 0 auto;
  position: relative;
}

.mobile-controller::before {
  content: '';
  display: block;
  padding-top: 100%;
}

.controller-wrapper {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.controller-wrapper > div {
  height: calc(33% - 20px);
  width: calc(33% - 20px);
  float: left;
  font-size: 2em;
  text-align: center;
  line-height: 2em;
  margin: 10px 10px;
}

.left,
.right,
.up,
.down {
  background-color: rgba(46, 10, 68, 0.9);
  color: white;
  border-radius: 10px;
}

@media screen and (min-width: 768px) {
  #board {
    margin: 1em auto;
    width: 640px;
  }

  section#score div {
    margin: 1em auto;
  }
}
