/* Base styling for clarity and structure */
body, html {
  margin: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f0f2f5;
  color: #333;
}

/* Layout container to handle flexible layout */
#container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
}

/* Map styling for clean separation */
#map {
  flex: 1;
  height: 100%;
  border-right: 2px solid #ccc;
}

/* Chart area styling for enhanced readability */
#chart {
  flex: 1;
  background-color: #ffffff;
  padding: 1em;
  overflow-y: auto;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

#chart h4 {
  margin: 0.5em 0;
  color: #444;
  font-size: 1rem;
}

#chart ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  margin-left: 55px;
}

#chart ul li {
  padding: 0.3em 0;
  border-bottom: 1px solid #eee;
  text-align: left;
}

#chart p {
  margin: 0.5em 0;
  margin-left: 55px;
}

#chart div[style*='background-color'] {
  display: flex;
  align-items: center;
  margin-bottom: 0.3em;
  margin-left: 55px;
}

#chart div[style*='background-color'] span {
  margin-left: 0.5em;
  font-size: 0.9em;
}

.wind-arrow-icon {
  color: #007bff;
  font-weight: bold;
  font-size: 1rem;
}

#chart ul li:hover {
  background-color: #f9f9f9;
}

@media (max-width: 768px) {
  #container {
    flex-direction: column;
  }
  #map, #chart {
    flex: none;
    height: 50vh;
  }
}

/* Playability meter styling */
#playability-spectrum-container {
  position: relative;
  height: 10px;
  width: 90%;
  margin: 0.5em 0 1em 55px;
  background: linear-gradient(to right, red, orange, yellow, green);
  border-radius: 5px;
}

#playability-pointer {
  position: absolute;
  top: -5px;
  width: 16px;
  height: 16px;
  background: #333;
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 0.4s ease;
  border: 2px solid #fff;
}

#playability-label {
  font-size: 1.2em;
  margin-left: 55px;
  margin-top: 0.5em;
  color: #333;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin-left: 10px; /* spacing from Clear button */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(22px);
}