/* Modern CSS for states visualization */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  text-align: center;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 300;
  color: #2c3e50;
}

header p {
  margin: 0.5rem 0 0 0;
  color: #7f8c8d;
  font-size: 1.1rem;
}

#map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: calc(100vh - 120px);
}

#loading {
  font-size: 1.2rem;
  color: white;
  text-align: center;
}

/* State styling */
.subunit {
  stroke: #2c3e50;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.subunit.OKLAHOMA { fill: #f8f9fa; }
.subunit.COLORADO { 
  fill: #2971AF; 
  transition: all 0.3s ease;
  stroke: #1a365d;
  stroke-width: 2;
}
.subunit.COLORADO:hover {
  fill: #357abd;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  stroke-width: 2.5;
}
.subunit.UTAH { 
  fill: #16A085; 
  transition: all 0.3s ease;
  stroke: #1a365d;
  stroke-width: 2;
}
.subunit.UTAH:hover {
  fill: #138D75;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  stroke-width: 2.5;
}
.subunit.KANSAS { fill: #f8f9fa; }
.subunit.NEW\.MEXICO { fill: #f8f9fa; }
.subunit[class*="NEW"] { fill: #f8f9fa; }
.subunit[class*="MEXICO"] { fill: #f8f9fa; }
.subunit.ARIZONA { fill: #f8f9fa; }
.subunit.WYOMING { fill: #f8f9fa; }
.subunit.NEBRASKA { fill: #f8f9fa; }

.subunit-boundary {
  fill: none;
  stroke: #34495e;
  stroke-width: 1;
  stroke-linejoin: round;
}

.subunit-boundary.NEBRASKA {
  stroke: #7f8c8d;
}

.subunit-label {
  fill: #2c3e50;
  fill-opacity: 0.8;
  font-size: 18px;
  font-weight: 500;
  text-anchor: middle;
  pointer-events: none;
}

.subunit-label.COLORADO {
  fill: white;
  font-weight: 600;
  font-size: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.subunit-label.UTAH {
  fill: white;
  font-weight: 600;
  font-size: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.subunit-label[class*="NEW"],
.subunit-label[class*="MEXICO"] {
  fill: #2c3e50;
  fill-opacity: 0.8;
}

.place-label {
  font-size: 12px;
  fill: white;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

text {
  font-family: inherit;
}

.error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid #e74c3c;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  #map-container {
    padding: 1rem;
  }
  
  .subunit-label {
    font-size: 14px;
  }
  
  .place-label {
    font-size: 10px;
  }
}