body {
  font-family: 'Arial', sans-serif;
  background-color: #f4f4f9;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

#loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: bold;
  color: #333;
  z-index: 1000;
}

.player-setup {
  display: none;
  text-align: center;
  margin: 20px auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  width: 300px;
  z-index: 1000;
}

.player-setup input {
  margin: 10px 0;
  padding: 5px;
  font-size: 14px;
  width: 80%;
}

#start-game-button {
  margin: 20px auto 0;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: block;
}

#start-game-button:hover:not(:disabled) {
  background-color: #0056b3;
}

#start-game-button:disabled {
  background-color: #9bb8d8;
  cursor: not-allowed;
}

.game-container {
  display: none;
  text-align: center;
  margin: 20px auto;
}

#turn-indicator {
  font-weight: bold;
  font-size: 18px;
  color: #007bff;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.color-label {
  width: 150px;
  height: 100px;
  border: none;
  outline: none;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.2s ease;
  background-size: cover;
  background-position: center;
}

.color-label:hover,
.color-label:focus-visible {
  opacity: 1;
  transform: scale(1.05);
}

#world-map-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 999;
}

#world-map {
  width: 100%;
  height: 100%;
}

#selected-country {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  z-index: 1000;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin: 0;
}

#next-player {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  display: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#next-player:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .player-setup,
  .game-container {
    width: 90%;
  }

  .color-label {
    width: 100px;
    height: 75px;
  }

  #next-player {
    padding: 10px 20px;
    font-size: 16px;
  }
}

#num-players {
  margin: 10px 0;
  padding: 5px 10px;
  font-size: 16px;
}

#player-names-container input {
  display: block;
  margin: 5px auto;
  padding: 10px;
  font-size: 14px;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}
