
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 15px;
  overflow: auto;
}


.container {
  display: flex;
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
  height: auto;
}

.sidebar {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  width: 280px;
  overflow: visible;
}

.main-content {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: visible;
}


h1 {
  color: #2d3748;
  font-size: 22px;
  margin-bottom: 6px;
  font-weight: 700;
}

.subtitle {
  color: #718096;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}


.control-group {
  margin-bottom: 16px;
}

.control-label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.button-group.single {
  grid-template-columns: 1fr;
}

.btn {
  padding: 8px 10px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #4a5568;
  transition: all 0.2s;
  text-align: center;
}

.btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

select {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  color: #2d3748;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

select:hover {
  border-color: #667eea;
}

select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}



#map-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding-top: 0;
  margin-top: -52px;
}

#map {
  width: 100%;
  height: auto;
  max-height: 620px;
}

.state {
  stroke: #fff;
  stroke-width: 0.5px;
  transition: opacity 0.2s;
}

.state:hover {
  opacity: 0.8;
  stroke-width: 1.5px;
}

.tooltip {
  position: absolute;
  background: rgba(45, 55, 72, 0.95);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  pointer-events: none;
  font-size: 13px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.tooltip b {
  color: #a0aec0;
  font-weight: 500;
}

#legend {
  margin-bottom: 8px;
}

.legend-title {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

.legend-subtitle {
  font-size: 12px;
  color: #4a5568;
  margin-bottom: 10px;
  font-weight: 500;
}

canvas {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #718096;
  font-weight: 500;
}

.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  background: white;
  color: #4a5568;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.2s;
}

.zoom-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
}

.data-source {
  max-width: 1600px;
  margin: 12px auto 0;
  font-size: 12px;
  color: #2d3748;
  text-align: left;
}

.data-source a {
  color: #2b6cb0;
  text-decoration: none;
}

.data-source a:hover {
  text-decoration: underline;
}
