* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}
body {
  background: linear-gradient(
    360deg,
    rgb(0, 0, 0),
    rgb(92, 92, 92),
    rgb(0, 0, 0)
  );
  background-repeat: no-repeat;
  background-attachment: fixed;
}

header {
  height: 30%;
  margin: 1%;
}

#header-box {
  height: 95%;
  aspect-ratio: 1 / 1;
  border: 0.07vw solid black;
  box-shadow: 0px 0px 5px 0px black;
}

.score-container {
  height: 100%;
  width: 98%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-radius: 20px;
  border: 6px solid rgb(55, 255, 0);
  background-color: rgba(45, 207, 0, 0.7);
}

.score-container > span {
  font-size: 2em;

  font-family:
    "science gothic", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
}

main {
  width: 100%;
}

#box-container {
  display: grid;
  margin: 0px auto;
  width: 98%;
  height: 100%;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 10px;
  padding: 10px;
}

.game-box {
  aspect-ratio: 1 / 1;
  border: 0.3vw solid balck;
  box-shadow: 0px 0px 6px 0px black;
  animation: lefBoxesPan 1s ease;
  animation-fill-mode: both;
}

.box1 {
  animation: lefBoxesPan 1s ease;
  animation-fill-mode: both;
}

.box2 {
  animation-delay: 0.2s;
  animation: lefBoxesPan 1.2s ease;
  animation-fill-mode: both;
}

.box3 {
  animation: rightBoxesPan 1.4s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 1.4s ease;
}
.box4 {
  animation: rightBoxesPan 1.6s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 1.6s ease;
}
.box5 {
  animation-delay: 0.4s;
  animation: lefBoxesPan 1.8s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 1.8s ease;
}

.box6 {
  animation-delay: 0.6s;
  animation: lefBoxesPan 2s ease;
  animation-fill-mode: both;
}

.box7 {
  animation: rightBoxesPan 2.1s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 2.1s ease;
}
.box8 {
  animation: rightBoxesPan 2.2s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 2.2s ease;
}
.box9 {
  animation-delay: 0.8s;
  animation: lefBoxesPan 2.3s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 2.3s ease;
}

.box10 {
  animation-delay: 1s;
  animation: lefBoxesPan 2.4s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 2.4s ease;
}

.box11 {
  animation: rightBoxesPan 2.5s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 2.5s ease;
}
.box12 {
  animation: lefBoxesPan 2.6s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 2.6s ease;
}
.box13 {
  animation-delay: 1.2s;
  animation: lefBoxesPan 2.7s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 2.7s ease;
}

.box14 {
  animation-delay: 1.4s;
  animation: rightBoxesPan 2.8s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 2.8s ease;
}

.box15 {
  animation: rightBoxesPan 2.9s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 2.9s ease;
}
.box16 {
  animation: lefBoxesPan 3s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 3s ease;
}
.box17 {
  animation-delay: 1.6s;
  animation: lefBoxesPan 3.1s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 3.1s ease;
}

.box18 {
  animation-delay: 1.8s;
  animation: rightBoxesPan 3.2s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 3.2s ease;
}

.box19 {
  animation: rightBoxesPan 3.3s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 3.3s ease;
}
.box20 {
  animation: lefBoxesPan 3.4s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 3.4s ease;
}
.box21 {
  animation-delay: 2s;
  animation: lefBoxesPan 3.5s ease;
  animation-fill-mode: both;
  -webkit-animation: lefBoxesPan 3.5s ease;
}

.box22 {
  animation-delay: 2.2s;
  animation: rightBoxesPan 3.6s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 3.6s ease;
}

.box23 {
  animation: rightBoxesPan 3.7s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 3.7s ease;
}
.box24 {
  animation: lefBoxesPan 3.8s ease;
  animation-fill-mode: both;
}
.box25 {
  animation-delay: 2.4s;
  animation: lefBoxesPan 3.9s ease;
  animation-fill-mode: both;
}

.box26 {
  animation-delay: 2.6s;
  animation: rightBoxesPan 4s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 4s ease;
}
.box27 {
  animation: rightBoxesPan 4.1s ease;
  animation-fill-mode: both;
  -webkit-animation: rightBoxesPan 4.1s ease;
}
.box28 {
  animation: lefBoxesPan 4.2s ease;
  animation-fill-mode: both;
}

@keyframes lefBoxesPan {
  from {
    transform: translateX(-1000px);
    opacity: 0.2;
  }

  to {
    transform: translateX(0px);
    opacity: 1;
  }
}

@keyframes rightBoxesPan {
  from {
    transform: translateX(1000px);
    opacity: 0.2;
    -webkit-transform: translateX(1000px);
    -moz-transform: translateX(1000px);
    -ms-transform: translateX(1000px);
    -o-transform: translateX(1000px);
  }

  to {
    transform: translateX(0px);
    opacity: 1;
  }
}

#try-again {
  font-size: 1.5em;
  font-weight: bold;
  font-family: monospace;
  color: white;
  animation: pop-up 1s ease;
  animation-fill-mode: both;
}

@keyframes pop-up {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}