body {
  font-family: "Bungee";
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-image: url("/assets/bg-img.jpg");
  background-size: cover;
}

.text {
  font-size: 50px;
  line-height: 1;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgb(46, 204, 113), 0 2px 0 rgb(46, 204, 113),
    0 3px 0 rgb(46, 204, 113), 0 4px 0 rgb(46, 204, 113),
    0 5px 0 rgb(46, 204, 113), 0 6px 0 rgb(46, 204, 113),
    0 7px 0 rgb(46, 204, 113), 0 8px 0 rgb(46, 204, 113);
}
.sub-text {
  font-size: 20px;
  line-height: 1.3;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgb(46, 204, 113), 0 2px 0 rgb(46, 204, 113),
    0 3px 0 rgb(46, 204, 113), 0 4px 0 rgb(46, 204, 113),
    0 5px 0 rgb(46, 204, 113);
}
.game-container {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: fit-content;
  background-color: rgba(0, 0, 0, 0.5);
}

.game-info {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  font-size: 1.2em;
  font-weight: bold;
  opacity: 1;
}

#game {
  display: grid;
  grid-template-columns: repeat(4, 100px);
  gap: 10px;
  margin: 0 auto;
}

.card {
  width: 100px;
  height: 100px;
  background: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border-radius: 10%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

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

.card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flipped {
  background: rgb(70, 185, 234);
}
.unmatched {
  background: red;
}
.matched {
  background: rgb(46, 204, 113);
}

#result {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 100;
}

.hidden {
  display: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: none;
}

.show-overlay {
  display: block;
}

button {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgb(46, 204, 113);
  color: white;
  border: none;
  border-radius: 4px;
  font-family: "Bungee", sans-serif;
  font-size: 12px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

button:hover {
  background-color: #27ae60;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3);
}

.stars {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

.star {
  font-size: 24px;
  color: rgb(46, 204, 113);
  margin: 0 5px;
}

.star.filled {
  color: gold;
}

@media (max-width: 768px) {
  .text {
    font-size: 30px;
    text-shadow: 0 1px 0 rgb(46, 204, 113), 0 2px 0 rgb(46, 204, 113),
      0 3px 0 rgb(46, 204, 113), 0 4px 0 rgb(46, 204, 113);
  }

  .sub-text {
    font-size: 16px;
  }

  .game-container {
    padding: 15px;
    width: 90%;
  }

  #game {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .card {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Maintain square aspect ratio */
    position: relative;
  }

  .card img {
    position: absolute;
    top: 0;
    left: 0;
  }

  .game-info {
    flex-direction: column;
    gap: 10px;
    font-size: 1em;
  }

  #result {
    width: 80%;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .text {
    font-size: 24px;
    text-shadow: 0 1px 0 rgb(46, 204, 113), 0 2px 0 rgb(46, 204, 113);
  }

  #game {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  button {
    padding: 8px 16px;
    font-size: 10px;
  }

  .star {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  #game {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .game-container {
    padding: 10px;
  }

  .text {
    font-size: 20px;
  }

  .sub-text {
    font-size: 14px;
  }
}
