/* sort.css — Ordenar bolitas */

/* Fondo verde */
body.game-page {
  background: linear-gradient(150deg, #1a6e2e 0%, #52b369 100%);
}

/* Área de juego */
#game-area {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
}

/* Fila de tubos */
.so-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}

/* Tubo */
.so-tube {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-top: none;
  border-radius: 0 0 999px 999px;
  background: rgba(0, 0, 0, 0.18);
  width: 54px;
  padding: 4px 4px 8px;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

/* Labios superiores */
.so-tube::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -3px;
  right: -3px;
  height: 10px;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  pointer-events: none;
}

/* Slot */
.so-slot {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Bolita */
.so-ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow:
    inset -3px -4px 6px rgba(0, 0, 0, 0.3),
    inset  3px  3px 6px rgba(255, 255, 255, 0.35);
  transition: transform 0.12s;
}

/* Bolita superior: elevada para indicar que se puede tomar */
.so-ball.so-top {
  transform: translateY(-3px);
  box-shadow:
    inset -3px -4px 6px rgba(0, 0, 0, 0.3),
    inset  3px  3px 6px rgba(255, 255, 255, 0.35),
    0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Tubo seleccionado */
.so-tube.so-sel {
  border-color: #FFD93D;
  box-shadow: 0 0 0 3px #FFD93D, 0 0 20px rgba(255, 217, 61, 0.55);
}
.so-tube.so-sel::before { border-color: #FFD93D; }

/* Tubo resuelto (todo un color): sutil brillo verde */
.so-tube.so-done {
  border-color: #6BCB77;
  box-shadow: 0 0 0 2px #6BCB77, 0 0 10px rgba(107, 203, 119, 0.5);
}
.so-tube.so-done::before { border-color: #6BCB77; }

/* Footer */
.game-footer {
  background: rgba(0, 0, 0, 0.2);
}
.btn-accion {
  background: rgba(255, 255, 255, 0.9);
  color: #0a2e12;
}
.btn-siguiente {
  background: #FFD93D;
  color: #1a0a00;
}
