:root {
  --l: 560px;
  --m: 350px;
  --s: 380px;
}

* {
  padding: 0;
  margin: 0;
}

html,
body {
  overscroll-behavior-y: contain;
}

body {
  background-color: black;
  color: limegreen;
  font-family: 'VT323', monospace;
  text-shadow: 3px 3px #666;
  height: 90vh;

}

a {
  text-decoration: none;
  display: block;
  max-width: 120px;
  margin: 0 auto;
  cursor: none;
}

#instructions {
  margin: 75px auto;
}

.play {
  font-family: 'VT323', monospace;
  display: block;
  margin: 0 auto;
  background-color: black;
  color: limegreen;
  font-size: 3rem;
  padding: 10px 20px;
  border: 2px solid limegreen;
  box-shadow: 5px 5px #666;
}

.play:hover {
  background-color: gray;
}

.play:active {
  background-color: gray;
  box-shadow: 0px 5px #666;
  transform: translateY(4px)
}

.again {
  margin-top: 50px;
}

h1 {
  text-align: center;
  font-size: 5rem;
}

h2 {
  text-align: center;
  font-size: 3rem;
  padding-bottom: 10px;
}

.board-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

#board {
  text-align: center;
  outline: 2px solid limegreen;
  box-shadow: 5px 5px #666;
  height: 800px;
  width: 800px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.cell {
  height: 40px;
  width: 40px;
  padding: 0;
  margin: 0;
}

.invader {
  background-image: url('assets/invader.svg');
  background-size: 100%;
}

.player {
  background-image: url('assets/ship.svg');
  background-size: 100%;
}

.laser {
  background-image: url('assets/laser.svg');
  background-size: 100%;
}

.overlay {
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  text-align: center;
  font-size: 5rem;
  height: 700px;
  width: 600px;
  position: relative;
  top: -750px;
  margin: 0 auto;
  background-color: rgba(0, 0, 0, .5);
  outline: 2px solid limegreen;
  box-shadow: 5px 5px #666;
}

.overlay p {
  margin: 25px;
}

.hidden {
  opacity: 0;
  z-index: -1;
}

@media screen and (max-width: 805px) {

  /* laptop and ipad */
  h1 {
    font-size: 3rem;
    margin-top: 5px;
  }

  h2,
  .play {
    font-size: 2rem;
  }

  .again {
    margin-top: 25px;
  }

  #board {
    margin-top: 15px;
    height: var(--l);
    width: var(--l);
  }

  .cell {
    height: calc(var(--l)/20);
    width: calc(var(--l)/20);
  }

  .overlay {
    font-size: 3rem;
    height: 500px;
    width: 500px;
    top: -525px;
  }

  .overlay p {
    margin: .5rem;
  }

}

@media screen and (max-width: 570px) {

  /* iphone 13 vertical */
  h1 {
    font-size: 2rem;
    margin-top: 15px;
  }

  h2,
  .play {
    font-size: 2rem;
  }

  .again {
    margin-top: 15px;
  }

  #board {
    margin-top: 15px;
    height: 500px;
    width: var(--m);
  }

  .cell {
    height: calc(var(--m)/20);
    width: calc(var(--m)/20);
  }

  .overlay {
    font-size: 3rem;
    height: 400px;
    width: 300px;
    top: -455px;
  }

  .overlay p {
    margin: .5rem;
  }

}

@media screen and (max-height: 340px) {

  /* iphone 13 horizontal */
  h1 {
    font-size: 2rem;
    margin-top: 5px;
  }

  h2,
  .play {
    font-size: 1.5rem;
  }

  .again {
    margin-top: 5px;
    padding: 5px;
  }

  #board {
    margin-top: 15px;
    height: 240px;
    width: var(--s);
  }

  .cell {
    height: calc(var(--s)/20);
    width: calc(var(--s)/20);
  }

  .overlay {
    font-size: 1.5rem;
    height: 200px;
    width: 300px;
    top: -220px;
  }

  .overlay p {
    margin: .5rem;
  }

}