/* ===== Basic Page Styling ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fdfdfd;
  color: #333;
}

/* ===== Wraps all content ===== */
.container {
  text-align: center;
  padding: 20px;
}

/* ===== Page Title ===== */
h1 {
  margin-bottom: 0;
  font-size: 28px;
}
.subtitle {
  font-size: 16px;
  color: #555;
  margin-top: 5px;
}

/* ===== Year Slider Section aligned right ===== */
.slider-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-right: 40px;
  margin-top: 15px;
  font-size: 16px;
}
#yearSlider {
  width: 250px;
}
#selectedYear {
  font-weight: bold;
}

/* ===== Glow Animation for Year Slider ===== */
#yearSlider.glow {
  animation: glowEffect 0.8s ease-in-out;
}
@keyframes glowEffect {
  0% {
    box-shadow: 0 0 0px rgba(33, 113, 181, 0.8);
  }
  50% {
    box-shadow: 0 0 12px rgba(33, 113, 181, 0.8);
  }
  100% {
    box-shadow: 0 0 0px rgba(33, 113, 181, 0.8);
  }
}

/* ===== Styled Year Label with Hourglass ===== */
.year-label {
  font-weight: bold;
  font-size: 18px;
  color: #2171b5;
  background-color: #e7f1fc;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(33, 113, 181, 0.4);
  transition: all 0.3s ease;
}

/* ===== Map Styling ===== */
#map {
  height: 75vh;
  width: 95%;
  margin: auto;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
}

/* ===== Charts Area ===== */
.chart-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  margin-top: 40px;
}
.chart-half {
  flex: 1;
  max-width: 48%;
}
canvas {
  width: 100% !important;
  height: auto !important;
}

/* ===== Dropdown Styling ===== */
#countrySelect {
  padding: 6px;
  margin: 10px 0;
  font-size: 14px;
}

/* ===== GINI Index Legend Box Styling ===== */
.legend {
  background: white;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  width: 200px;
  text-align: left;
}
.legend i {
  width: 18px;
  height: 12px;
  float: left;
  margin-right: 8px;
  opacity: 0.9;
  border: 1px solid #aaa;
}
