body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 30px;
}

.preview {
  max-width: 250px;
  border: 5px solid #98d8c8;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Miniaturas seleccionables */
.image-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.image-selector .preview {
  max-width: 100px;
  max-height: 100px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.3s ease;
}

.image-selector .preview:hover {
  border-color: #ffb6c1;
}

.puzzle-container {
  width: 400px;
  height: 400px;
  display: flex;
  flex-wrap: wrap;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.piece {
  width: 100px;
  height: 100px;
  background-size: 400px 400px;
  box-sizing: border-box;
  border: 1px solid #fff;
  position: relative;
}

.buttons {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 20px;
}

button {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:hover {
  background-color: var(--secondary-color);
}

#puzzleName {
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  color: #ffb6c1;
  margin-bottom: 20px;
  font-weight: bold;
}

.container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 30px;
  gap: 40px;
  flex-wrap: wrap;
  border-radius: 24px;
  margin: 30px auto;
}

.image-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  max-width: 500px;
}

.image-box img {
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.text-box {
  flex: 1;
  font-size: 0.5rem;
  line-height: 1.3;
  background-color: rgba(255, 248, 242, 0.9); /* Fondo base ligeramente transparente */
  padding: 15px;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative; /* Importante para el pseudo-elemento */
  z-index: 1; /* Asegura que el contenido esté por encima del fondo */
}

.text-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/Kira2.png');
  background-size: cover;
  background-position: center;
  opacity: 0.1; /* Controla la transparencia de la imagen de fondo */
  border-radius: 24px; /* Mantiene los bordes redondeados */
  z-index: -1; /* Coloca el pseudo-elemento detrás del contenido */
}