/* estilos básicos */
body {
  background-color: #f5f7fa;
  font-family: 'Comic Neue', cursive;
  margin: 0;
  padding: 0;
  color: #000000;
}

main {
  position: relative;       /* Necesario para que ::before se posicione relativo al main */
  min-height: 80vh;         /* Ajusta según lo que quieras ocupar */
  z-index: 0;               /* Asegura que el contenido esté por encima del fondo */
}

main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../assets/img/fondoFiguras.png'); /* Cambia la ruta */
  background-size: cover;        /* Ocupa todo el main */
  background-position: center;   /* Centrada */
  background-repeat: no-repeat;  /* Sin repetirse */
  opacity: 0.3;                  /* Ajusta transparencia */
  z-index: -1;                   /* Fondo detrás del contenido */
}

/* header h1 {
  font-family: 'Fredoka One', cursive;
  margin: 0;
} */

.imagenes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
  min-height: 120px;
  align-items: center;
}

.imagenes img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  cursor: grab;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: transform 0.2s, border-color 0.2s, opacity 0.2s;
  background: white;
  padding: 6px;
}

.imagenes img:active { cursor: grabbing; }

.imagenes img.hovering {
  transform: scale(1.05);
  border-color: #007bff;
}

/* contenedor de categorías */
.categorias {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

/* cada recuadro de categoría */
.categoria {
  position: relative;
  width: 150px; /* ajusta según tu diseño */
  height: 150px;
  border: 2px dashed #999;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* texto arriba */
  transition: 0.3s;
}

/* estado al pasar */
.categoria.over {
  background-color: #e6f2ff;
  border-color: #007bff;
  transform: translateY(-4px);
}

/* feedback acierto/error */
.correcto {
  border-color: #28a745 !important;
  background-color: #e6ffed !important;
  color: #155724;
  transform: translateY(-2px);
}

.incorrecto {
  border-color: #dc3545 !important;
  background-color: #ffe6e6 !important;
  color: #6b0b0b;
}

/* mensaje */
#mensaje {
  min-height: 30px;
  color: #333;
}

.figura-colocada {
  width: 60px;
  height: auto;
  margin-top: 8px; /* espacio debajo del texto */
  transition: transform 0.3s ease;
}

.tocando-clon {
  z-index: 9999;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.contenedor-categoria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 80px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

.contenedor-categoria.correcto {
  background-color: #d4edda;
  border-color: #28a745;
}


/* responsive */
@media (max-width: 600px) {
  .categoria { width: 140px; min-height: 110px; padding: 10px; }
  .imagenes img { width: 82px; height: 82px; }
}
