* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 1.25rem;
  font-family: "poppins", sans-serif;
}

body {
  background: linear-gradient(to right, #22c1c3, #fdbb2d);
}

.container {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 50px;
  text-shadow: 2px 2px 5px greenyellow;
  text-align: center;
}

.header button {
  width: 100px;
  background-color: green;
  margin-top: 20px;
  font-size: 0.85rem;
}

.grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 0.1fr);
  gap: 25px;
  justify-content: center;
  padding: 30px;
}

.card {
  width: 75px;
  height: 75px;
  cursor: pointer;
}

.card img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  transition: transform 0.4s;
}

.card.matched {
  pointer-events: none;
}

.card.rotate img {
  transform: rotateY(180deg);
}

#winner {
  display: none;
}

@media screen and (max-width: 940px) {
  .grid {
    grid-template-columns: repeat(4, 0.1fr);
    gap: 20px;
  }

  .header {
    text-align: center;
  }
}

@media screen and (max-width: 630px) {
  body {
    font-size: 1.4rem;
  }

  .container {
    padding: 40px;
  }

  .header {
    margin-top: 30px;
    text-align: center;
  }

  .header button {
    width: 100px;
  }
}

@media screen and (max-width: 460px) {
  body {
    font-size: 1rem;
  }

  .grid {
    grid-template-columns: repeat(4, 0.1fr);
    gap: 20px;
  }

  .header {
    text-align: center;
  }

  .card {
    width: 65px;
    height: 65px;
  }

  .card img {
    width: 65px;
    height: 65px;
  }

  .header button {
    width: 80px;
  }
}

@media screen and (max-width: 380px) {
  * {
    font-size: 1rem !important;
  }

  .grid {
    grid-template-columns: repeat(3, 0.1fr);
    gap: 40px;
  }

  .header {
    text-align: center;
  }

  .card {
    width: 55px;
    height: 55px;
  }

  .card img {
    width: 55px;
    height: 55px;
  }

  .header button {
    width: 60px;
    font-size: 0.8rem !important;
  }
}
