body {
  background-color: #2a2f4d;
  color: #4a4e69;
  padding: 20px;
}

.contenedor {
  max-width: 900px;
  margin: auto;
  background: #fdf5e6;
  padding: 20px;
  border-radius: 8px;
}

.contenedor.lista {
  max-width: 1800px;
}

.botones.lista {
  display: flex;
  justify-content: center;
  flex-wrap: wrap-reverse;
}

.botones.lista .boton {
  width: 265px;
}

.texto-repartido {
  text-wrap: balance;
}

.enlace:not([href]) {
  color: blue;
  cursor: pointer;
}

.enlace:not([href]):hover {
  color: blue;
  text-decoration: underline;
}

.ciudad {
  color: #4a5585;
  font-weight: 900;
}

.jugadores, .paneles {
  display: grid;
  gap: 20px;
}

.jugadores {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
}

.inputJugador, #inputNumJugadores {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-weight: bolder;
}

.inputJugador::placeholder, #inputNumJugadores::placeholder {
  font-weight: initial;
}

.inputJugador:hover, .#inputNumJugadores:hover {
  border-color: #4a4e69;
}

.inputJugador:focus, .#inputNumJugadores:focus {
  border-color: #4a5585;
}

.inputJugador:disabled, .#inputNumJugadores:disabled {
  background-color: #eee;
  color: #4a4e69;
  pointer-events: none;
}

.paneles {
  grid-template-columns: repeat(2, 1fr);
}

#cuadroResultado {
  border-radius: 8px;
  padding: 15px 20px;
  border: 2px solid #ddd;
  background-color: white;
}

#cuadroResultado.deshabilitado {
  background-color: #eee;
}

#ganador {
  font-size: 1.5rem;
  color: #c79d2a;
  font-weight: bold;
}

.boton {
  padding: 14px;
  border: none;
  border-radius: 8px;
  background-color: #4a5585;
  color: white;
  font-weight: bold;
  outline: none;
}

.boton:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  display: none;
}

.boton:hover {
  color: white;
  text-decoration: none;
}

.cuadroDialogo {
  border-width: 2px;
  border-radius: 8px;
  background-color: #fdf5e6;
  max-width: calc(100% - 80px);
  max-height: calc(100% - 80px);
}

.cuadroDialogo#dialogoNumJugadores, .cuadroDialogo#dialogoListaCiudades {
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
}

.cuadroDialogo::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

.cuadroDialogo#dialogoNumJugadores::backdrop, .cuadroDialogo#dialogoListaCiudades::backdrop {
  background-color: #2a2f4d;
}

.cuadroDialogo .boton {
  padding: 10px 24px;
}

@media (max-width: 750px) {
  .jugadores {
    grid-template-columns: repeat(2, 1fr);
  }

  .paneles {
    grid-template-columns: 1fr;
  }
}

.cuadricula {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
  row-rule: 2px solid #4a5585;
  column-rule: 2px solid #4a5585;
}

.casilla {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 1700px) {
  .cuadricula {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (max-width: 1525px) {
  .cuadricula {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1325px) {
  .cuadricula {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1125px) {
  .cuadricula {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .cuadricula {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 715px) {
  .cuadricula {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .cuadricula {
    grid-template-columns: repeat(1, 1fr);
  }
}