body {
  margin: 0;
  padding: 0;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

#info-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 350px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  z-index: 1;
  transition: transform 0.3s ease, opacity 0.3s ease;
  font-family: sans-serif;
}

#info-panel.collapsed {
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
}

#info-panel h1 {
  margin: 0 0 10px 0;
  font-size: 20px;
  color: #333;
}

#info-panel h3 {
  margin: 20px 0 10px 0;
  font-size: 16px;
  color: #333;
}

#info-panel p {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 15px;
}

#info-panel a {
  color: #2563eb;
  text-decoration: none;
}

#info-panel a:hover {
  text-decoration: underline;
}

.panel-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #666;
  border: 1px solid #ddd;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.panel-toggle:hover {
  background: #f5f5f5;
  color: #333;
  border-color: #999;
  transform: scale(1.05);
}

#show-panel-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  background: white;
  color: #333;
  padding: 12px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#show-panel-btn:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

#show-panel-btn.visible {
  display: flex;
}

.filters label {
  display: block;
  margin: 8px 0;
  font-size: 14px;
}

.filters input[type="checkbox"] {
  margin-right: 8px;
}

.year-filter {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.year-slider-group {
  margin-top: 8px;
}

.year-slider-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.year-slider {
  width: 100%;
  margin: 8px 0;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #ddd;
  outline: none;
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #2563eb;
  cursor: pointer;
  border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #2563eb;
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

.active-filter {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

#legend {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

#legend h3 {
  margin: 0 0 10px 0;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.legend-color {
  width: 30px;
  height: 20px;
  margin-right: 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

#data-sources {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

#data-sources p {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 10px;
}

#github-repo {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

#github-repo p {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.maplibregl-popup-content {
  font-family: sans-serif;
}

.maplibregl-popup-content a {
  color: #2563eb;
  text-decoration: none;
}

.maplibregl-popup-content a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  #info-panel {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    max-height: 85vh;
  }

  #show-panel-btn {
    top: 10px;
    left: 10px;
  }
}
