* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
  font-weight: 600;
}

.game-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.game {
  display: grid;
  margin: 0 auto;
  isolation: isolate;
}

.panel {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;

  input {
    width: 3rem;
    height: 3rem;

    border-radius: 1rem;
    text-align: center;
  }
}

.panel:last-of-type {
  justify-content: center;
  gap: 2rem;
}

.counter {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  font-size: 2rem;
}

.square {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: white;
  background-color: rgb(61, 127, 232);
  user-select: none;
  transition: 0.5s ease;
}

.incorrect {
  background-color: brown;
  animation: shake 0.2s ease;
  transform-origin: center;
}

@keyframes shake {
  0%,
  100% {
    transform: translate(-2px);
  }
  50% {
    transform: translate(2px);
  }
}

.timer {
  font-size: 1.5rem;
}

.hide {
  opacity: 0;
  visibility: hidden;
}

.custom-select {
  height: 2rem;
  padding: 0 1rem;
  border-radius: 1rem;
  border: none;
}

.reset-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background-color: inherit;
  cursor: pointer;

  img {
    width: 100%;
    height: 100%;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

.game-score {
  z-index: 100;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: rgb(255, 255, 255);

  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 4rem;
  border-radius: 1rem;
  visibility: hidden;
  opacity: 0;
  box-shadow: 8px 8px 40px black, -8px -8px 40px rgb(255, 255, 255);

  .info-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;

    .row {
      display: flex;

      gap: 1rem;
    }
  }

  h2 {
    text-align: center;
    margin-bottom: 2rem;
  }

  button {
    border-radius: 1rem;
    margin: 0 auto;
    height: 3rem;
    cursor: pointer;
    padding: 0 1rem;
    transition: 0.2s ease;
  }
}

.shadow {
  background-color: black;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
}

.shadow.show {
  opacity: 0.4;
  visibility: visible;
}

.game-score.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .game-score {
    width: 400px;
    padding: 3rem;

    .info {
      text-wrap: nowrap;
    }
  }
}
