body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #8f8fc4;
  user-select: none;
  padding: 20px;
}

.container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 30px;
  border-radius: 20px;
  background: linear-gradient(
    325deg,
    #03001e 0%,
    #94bbe9 30%,
    #eeaeca 70%,
    #fdeff9 100%
  );
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  width: 500px;
}

h2 {
  font-size: 2.5em;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.reset {
  padding: 15px 20px;
  width: 100%;
  color: #2c3457;
  background-color: #fff;
  border: none;
  font-size: 1.2em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  border-radius: 10px;
  transition: 0.3s;
}

.reset:hover {
  background-color: #2c3457;
  color: #38ec47;
}

.game {
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  transform-style: preserve-3d;
  perspective: 500px;
}

.item {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  font-size: 2.5em;
  transform: rotateY(180deg);
  transition: 0.25s;
  border-radius: 12px;
}

.item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #4d5a94;
  border-radius: 12px;
  transition: 0.25s;
  transform: rotateY(0deg);
  backface-visibility: hidden;
}

.item.boxOpen {
  transform: rotateY(0deg);
}

.boxOpen::after,
.boxMatch::after {
  transform: rotateY(180deg);
}

/* Responsividade extra para telas pequenas */
@media screen and (max-width: 480px) {
  .item {
    width: 70px;
    height: 70px;
    font-size: 2em;
  }

  .container {
    padding: 20px;
  }

  h2 {
    font-size: 2em;
  }
}