* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #1a1a1a;
  color: white;
}

.navbar {
  background-color: #333;
  padding: 10px;
  text-align: center;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
}

.contenedor {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  min-height: calc(100vh - 60px);
}

.contenedor_uno {
  width: 70%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #414040;
  border-radius: 10px;
}

.mensaje-juego {
  display: none;
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 30px;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 8px;
  color: white;
  z-index: 100;
}

.mensaje-juego.game-over {
  background-color: #ff4444;
  border: 2px solid #cc0000;
}

.mensaje-juego.exito {
  background-color: #32cd32;
  border: 2px solid #228b22;
}

.tablero {
  display: grid;
  grid-template-columns: repeat(5, 80px);
  gap: 5px;
  padding: 20px;
  background-color: #666;
  margin-bottom: 20px;
  border-radius: 10px;
}

.tablero div {
  width: 80px;
  height: 80px;
  background-color: white;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.robot {
  background-color: #e0e0e0;
}

.robot-img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.pista {
  background-color: #90ee90 !important;
  border: 2px solid #00aa00 !important;
}

.botones {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.movimientos {
  display: flex;
  gap: 10px;
}

.comando {
  width: 80px;
  height: 80px;
  background-color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 2rem;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  border-radius: 5px;
}

#up {
  background-color: #4682b4;
}

#left {
  background-color: #9acd32;
}

#right {
  background-color: #ffa500;
}

#loop {
  background-color: #a02cd6;
}

.comando:hover {
  transform: scale(1.1);
  border: 2px solid #fff;
}

.acciones {
  display: flex;
  gap: 10px;
}

.accion {
  width: 100px;
  height: 50px;
  background-color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  border-radius: 5px;
}

.accion:hover {
  transform: translateY(-2px);
  border: 2px solid #fff;
}

#accion-ejecutar {
  background-color: #32cd32;
}

#accion-regresar {
  background-color: #8b4513;
}

#accion-configurar {
  background-color: #6a5acd;
}

.accion.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.contenedor_dos {
  width: 28%;
  padding: 15px;
  background-color: #333;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-radius: 10px;
}

.info-panel {
  background-color: #444;
  padding: 15px;
  border-radius: 5px;
}

.info-panel h3 {
  color: #ffd700;
  font-size: 18px;
  margin: 0 0 10px 0;
}

.lista select {
  width: 100%;
  height: 300px;
  background-color: #333;
  color: white;
  padding: 5px;
  font-family: monospace;
  font-size: 14px;
  border-radius: 5px;
}

.robot-img.bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.lista select option.executing {
  background-color: #ffd700 !important;
  color: #000 !important;
  font-weight: bold;
}


.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-contenido {
  background-color: #414040;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-contenido h3 {
  color: #ffd700;
  font-size: 18px;
  margin: 0 0 10px 0;
}

.form-campos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-campos label {
  font-weight: bold;
}

.form-campos input {
  padding: 8px;
  background-color: #555;
  color: white;
  border: 2px solid #666;
  border-radius: 5px;
  font-family: Arial, sans-serif;
}

.modal-acciones {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

#accion-entrar {
  background-color: #32cd32;
}

#accion-cancelar {
  background-color: #8b4513;
}



.modal-acciones .accion {
  margin-top: 15px;
  cursor: pointer;
  padding: 5px 15px;
  background: #007bff;
  color: white;
  border-radius: 5px;
  display: inline-block;
}
