* {
  /* removing pre-existing margins and paddings so that we can assign what is necessary  */
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  /* For use with 'rem' 1rem = 16px and setting font size to this value makes 1rem = 10px making it easier to calculate. */
  font-size: 62.5%;
  font-family: 'Fira Sans', 'Open Sans', sans-serif, 'Courier New', monospace;
  overflow: hidden;
  background: linear-gradient(
    210deg,
    rgba(68, 148, 71, 0.4),
    rgba(1, 31, 192, 0.7)
  );
}

#infopopup {
  border: 1px solid black;
  position: fixed;
  display: none;
  width: 40rem;
  height: 15rem;
  overflow: auto;
  z-index: 2;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: 50vh 50vw;
  transform: translate(-50%, -50%);
  line-height: 2.5rem;
  text-align: center;
  color: white;
  background: black;
  padding: 1rem 0 0 0;
  border-radius: 1rem;
  box-shadow: 0 0 1rem 0.05rem black;
}

#infopopup .heading {
  font-size: 2rem;
  text-align: center;
  text-decoration-line: underline;
}

#infopopup .controls {
  font-size: 1.5rem;
  text-align: center;
}

#infopopup #startgame {
  font-size: 1.5rem;
  text-align: center;
  border-radius: 0.5rem;
  border: 0;
  padding: 0.5rem;
  margin-top: 0.5rem;
  cursor: pointer;
  background-color: green;
  border: 1px solid #7a8eb8;
  box-shadow: 0 0 0.5rem 0.05rem white;
}

#replaypopup {
  border: 1px solid black;
  position: fixed;
  display: none;
  width: 25rem;
  height: 15rem;
  overflow: auto;
  z-index: 2;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: 50vh 50vw;
  transform: translate(-50%, -50%);
  line-height: 3rem;
  text-align: center;
  color: white;
  background: black;
  padding: 1rem 0 0 0;
  border-radius: 1rem;
  box-shadow: 0 0 1rem 0.05rem black;
}

#replaypopup #scoreheading {
  font-size: 2rem;
  text-align: center;
  text-decoration-line: underline;
}

#replaypopup .controls {
  font-size: 1.5rem;
  text-align: center;
}

#restartgame,
#endgame {
  font-size: 1.5rem;
  text-align: center;
  border-radius: 0.5rem;
  border: 0;
  padding: 0.5rem;
  margin: 0.5rem 1rem 0 1rem;
  cursor: pointer;
  background-color: green;
  border: 1px solid #7a8eb8;
  box-shadow: 0 0 0.5rem 0.05rem white;
}

#endgame {
  background-color: red;
}

header #heading {
  font-size: 3rem;
  text-align: center;
  padding: 0.5rem;
  height: auto; /*required.... do not remove*/
  width: auto;
  color: #7a8eb8;
  background: rgba(26, 48, 96);
  box-shadow: 0 0 1rem 0.05rem black;
}

#myCanvas {
  background: rgb(141, 242, 238);
  margin: 40px;
  box-shadow: 0 0 1rem 0.05rem black;
  border-radius: 0.5rem;
}

#footer {
  box-shadow: 0 0 1rem 0.05rem black;
  background-color: rgb(4, 28, 46);
  padding: 2rem;
  height: auto; /*required.... do not remove*/
  width: 100%;
  margin: 0;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap-reverse;
  justify-content: space-around;
  align-items: flex-end;
}

#footer .footerElement {
  display: flex;
  flex-basis: 66%;
  font-size: 1.3rem;
  text-align: center;
  line-height: 1.6rem;
  color: rgb(78, 83, 142);
}

#footer .footerElement a {
  font-size: 1.5rem;
  color: tomato;
  text-decoration-color: tomato;
}

#footer #score {
  display: flex;
  align-content: center;
  height: auto;
  margin: -2rem 0 0 0;
  flex-basis: 33%;
  color: rgb(176, 154, 245);
  font-size: 3.5rem;
  text-align: center;
}
