/* ── Juego: Encuentra las diferencias ────────────────────── */

.diferencias-panel-controles {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  padding: 1rem;
}

.diferencias-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.75rem 0;
  font-size: 1rem;
}

.diferencias-botones {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.diferencias-mensaje {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #eaf7f5;
  border: 1px solid #2a9d8f;
  border-radius: 8px;
  color: #2a9d8f;
  font-weight: 600;
}

/* ── Tableros ─────────────────────────────────────────────── */
.diferencias-tableros {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem;
}

.diferencias-lado {
  text-align: center;
}

.diferencias-lado h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #555;
}

.diferencias-grid {
  display: grid;
  gap: 6px;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 10px;
}

/* ── Celdas ───────────────────────────────────────────────── */
.dif-celda {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
  cursor: default;
  position: relative;
}

/* Solo el tablero derecho es clicable */
#diferencias-der .dif-celda {
  cursor: pointer;
}

#diferencias-der .dif-celda:hover {
  transform: scale(1.1);
  border-color: #4361ee;
  box-shadow: 0 4px 12px rgba(67,97,238,0.25);
}

.dif-celda.dif-correcta {
  background: #eaf7f5;
  border-color: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46,204,113,0.3);
  animation: pulso-correcto 0.4s ease;
}

.dif-celda.dif-error {
  background: #fdecea;
  border-color: #e63946;
  animation: temblor 0.4s ease;
}

@keyframes pulso-correcto {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes temblor {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .diferencias-tableros {
    flex-direction: column;
    align-items: center;
  }

  .dif-celda {
    width: 58px;
    height: 58px;
  }
}
