* {
  box-sizing: border-box;
}

body {
  text-align: center;
  background: #e0e5ec;
  width: min(90%, 1000px);
  margin: 0 auto;
}

.level-title {
  font-family: "Press Start 2P", cursive;
  font-size: 3rem;
  margin: 0;
  padding: 0;
  margin-top: max(70px, 12vh);
  line-height: 1.5;
  color: #f8e9a8;
  background-color: #e0e5ec;
  text-shadow: 2px 2px 5px rgb(0, 0, 0, 0.8);
  /* outline: 2px solid green; */
}

.lg-header-title {
  font-size: 3rem;
}

.start-mobile {
  display: none;
}

.start-btn {
  margin: 10px auto 0;
  outline: none;
  border: none;
  font-size: 2rem;
  padding: 0.4em 1em;
  box-shadow: 5px 5px 3px 0px #0001, 7px 7px 20px 0px #0002, -5px -5px 3px 0px #fff9, -7px -7px 20px 0px #fff9;
  border-radius: 1rem;
}
.start-btn:active {
  animation-name: popout;
  animation-timing-function: ease-in;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
}

.color-box {
  width: min(80%, 500px);
  display: flex;
  flex-direction: column;
  margin: 5rem auto 0;
  /* outline: 2px solid blue; */
  background: #e0e5ec;
  border-radius: 1em;
  box-shadow: 5px 5px 3px 0px #0001, 7px 7px 20px 0px #0002, -5px -5px 3px 0px #fff9, -7px -7px 20px 0px #fff9;
}

.row {
  display: flex;
  justify-content: space-between;
  padding: 8%;
}

.row + .row {
  padding-top: 0;
}

.btn {
  position: relative;
  cursor: pointer;
  flex: 0 1 45%;
  /* height: 150px; */
  padding-top: 45%;
  border-radius: 1em;
  box-shadow: 3px 3px 4px 0px #0002, 7px 7px 10px 0px #0004, -5px -5px 3px 0px #fff9, -7px -7px 10px 0px #fff9;
}
/* .btn::after {
  content: "";
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  padding-top: 100%;
  background: #0004;
  z-index: 4;
  margin: auto;
  margin-top: -100%;
} */

.btn::before {
  content: "";
  position: absolute;
  display: block;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1em;
  width: 100%;
  height: 100%;
}

.btn:hover {
  transform: translate(0, 0);
  /* box-shadow: 3px 3px 5px 0px #0002; */
  /* transition: all 0.2s; */
}

.btn:active {
  transform: translate(0, 0);
  animation-name: popout;
  animation-timing-function: ease-out;
  animation-duration: 0.2s;
  animation-fill-mode: forwards;
}

@keyframes popout {
  0% {
    box-shadow: inset 5px 5px 5px 0px #0002, inset 4px 4px 10px 0px #0002, inset -3px -3px 5px 0px #fff9, inset -4px -4px 8px 0px #fff9;
  }
  50% {
    box-shadow: inset 5px 5px 5px 0px #0002, inset 4px 4px 10px 0px #0002, inset -3px -3px 5px 0px #fff9, inset -4px -4px 8px 0px #fff9;
  }
  100% {
    box-shadow: 3px 3px 4px 0px #0002, 7px 7px 10px 0px #0004, -5px -5px 3px 0px #fff9, -7px -7px 10px 0px #fff9;
  }
}

.game-over {
  background-color: red;
  opacity: 0.8;
}

.red {
  /* background-color: #f009; */
  background-color: rgb(255, 0, 0, 0.7);
}

.green {
  /* background-color: #0f09; */
  background-color: rgb(0, 255, 0, 0.6);
}

.blue {
  /* background-color: #00f9; */
  background-color: rgb(0, 0, 255, 0.65);
}

.yellow {
  /* background-color: #ff09; */
  background-color: #ffa62b;
}

.pressed {
  position: relative;
  box-shadow: inset 5px 5px 5px 0px #0002, inset 4px 4px 10px 0px #0002, inset -3px -3px 5px 0px #fff9, inset -4px -4px 8px 0px #fff9;
  /* transition: box-shadow linear 1s; */
}

.pressed::before {
  /* this before statement modifies .btn::before */
  content: "";
  /* a radial transparent circle to imitate touch */
  background: radial-gradient(circle, rgb(255, 255, 255, 0.8) 0%, rgb(255, 255, 255, 0.5) 35%, rgb(255, 255, 255, 0) 60%);
  animation-name: wave;
  animation-timing-function: ease-out;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

/* animate the radial background, so no touch to heavy touch to no touch */
@keyframes wave {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.highscore {
  position: absolute;
  font-family: "Press Start 2P", cursive;
  font-size: 1.3rem;
  text-shadow: 2px 2px 5px rgb(0, 0, 0, 0.8);
  text-align: center;
  color: #fef2bf;
  top: 0;
  right: 5%;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: inset 2px 2px 5px 0px #0002, inset 4px 4px 8px 0px #0002, inset -2px -2px 3px 0px #fff9, inset -4px -4px 8px 0px #fff9;
}

@media (max-width: 1200px) {
  html {
    font-size: 0.8rem;
  }
  /* .lg-header-title {
    display: none;
  } */
  .start-mobile {
    display: block;
  }
}
@media (max-width: 600px) {
  html {
    font-size: 0.6rem;
  }
  .lg-header-title {
    display: none;
  }
  .start-btn {
    display: block;
  }
}
