body {
  font-family: Arial, sans-serif;
  background-color: #eef6fd;
  text-align: center;
  padding: 40px;
}

h1 {
  color: #222;
}

button {
  padding: 10px 20px;
  margin: 10px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  transition: 0.2s;
}

button:hover {
  transform: scale(1.05);
}


/* 🌟 Estilo Pixel Art Cuadrícula */
.cuadro-container {
  position: relative; /* 👈 Esto es clave para botones flotantes */
  display: inline-block;
  padding: 15px;
  margin-top: 15px;
  background: linear-gradient(145deg, #ffffff, #e3f2fd);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: scale(1); /* Base zoom */
  transition: transform 0.3s ease, all 0.3s ease-in-out;
  justify-content: center;
}

table.pixel-cuadricula {
  border-collapse: collapse;
  border-spacing: 4px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #e3f2fd);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 🌫 Sombra suave */
  transition: all 0.3s ease-in-out;
}


table.pixel-cuadricula td {
  width: 30px;
  height: 30px;
  background-color: white;
  border: 1px solid #ccc;
  font-weight: normal !important;
  font-size: 13px;
  text-align: center;
  vertical-align: middle;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}


/* 🌈 Botón de Zoom */
#zoom-controls {
  margin-top: 10px;
  margin-bottom: -10px;
}


/*Efecto hover mágico */
.pixel-cuadricula td:hover {
  box-shadow: 0 0 6px #8ecfff;
  transform: scale(1.05);
  transition: all 0.15s ease;
}

@keyframes brilloZoom {
  0% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(2);
  }
  100% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    transform: scale(1);
  }
}

.celda-magica {
  animation: brilloZoom 0.3s ease-in-out;
  z-index: 1;
  position: relative;
}


.cuadro-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}



table.pixel-cuadricula {
  border-collapse: collapse;
}



/* 🌟 Botones de operaciones flotantes mágicos */
.operaciones-flotantes {
  position: absolute;
  left: -72px;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0px; /* Menos separación */
border-radius: 16px;
  z-index: 10;
}

.operaciones-flotantes button {
  width: 60px;
  height: 32px;
  font-size: 13px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(0px);
  background-blend-mode: multiply;
}

.operaciones-flotantes button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.25);
  filter: brightness(1.1) saturate(1.2);
}



/* ✅Realce 3D suave sin contorno */
.celda-correcta {
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.2),     /* Sombra interna más profunda */
    0 2px 4px rgba(255, 255, 255, 0.9);     /* Luz suave por fuera para el relieve */
  font-weight: bold;
  background-blend-mode: multiply;
  transition: box-shadow 0.3s ease-in-out, transform 0.2s ease;
}



