/* Estilos específicos para el memorama */

.grid {
  width: 37%;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px;
}

.card {
  width: 110px;
  height: 110px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background-color: transparent!important;
  z-index: 10;
}

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

.card.match {
  pointer-events: none;
  /*opacity: 0.7;*/
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
}

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

.card-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: #000;
  visibility: hidden;
  transform: rotateY(180deg);
  backface-visibility: hidden;
}

.card.active .card-text {
  visibility: visible;
}

.card.active .card-text img {
  width: 100%;
}

/* Timer styles */
.timer-container {
  text-align: center;
  margin: 20px 0;
}

.timer {
  font-size: 32px;
  font-weight: bold;
  color: #642a72;
  font-family: 'Arial', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
  .grid {
    width: 90%;
    /* grid-template-columns: repeat(2, 1fr); */
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 8px;
  }
  
  .card {
    width: 100px;
    height: 100px;
  }
  
  .timer {
    font-size: 24px;
  }
}

/* Estilos para el modal de pregunta */
#modalPregunta {
  z-index: 1005 !important;
}

#modalPregunta .modal-content {
  background-color: #fff !important;
  padding: 30px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1006 !important;
  border-radius: 20px;
  padding: 20px 24px !important;
}

#modalPregunta p {
  font-size: clamp(1.125rem, 1.0417rem + 0.3704vw, 1.375rem);
  color: #0b2739;
  margin-bottom: 20px;
  text-align: center;
}

#quiz-form {
  width: 100%;
  max-width: 500px;
}

#quiz-form p {
  margin: 10px 0;
  text-align: left;
}

#quiz-form label {
  display: flex;
  align-items: center;
  margin: 12px 0;
  cursor: pointer;
  font-size: 16px;
}

#quiz-form input[type="radio"] {
  margin-right: 10px;
}

#quiz-form .white-text {
  color: white !important;
}
