body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.3;
  color: #333;
  margin: 0 auto;
  padding: 0;
  background-color: #f8f9fa;
  overflow: auto;
  min-height: 100vh;
  position: relative;
}

/* Layout containers */
.container {
  max-width: 1680px;
  height: 950px;
  margin: 0 auto;
  padding: 0 5px;
  display: grid;
  grid-template-columns: 650px 1fr;
  grid-template-rows: auto;
  gap: 10px;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.left-column .viz-container:first-child {
  flex-grow: 1.5;
}

.left-column .viz-container:last-child {
  flex-grow: 1;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.right-column .viz-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.map-barchart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 780px;
}

#map-chart {
  margin-bottom: 40px;
}

.vertical-barchart-container {
  display: flex;
  flex-direction: column;
  background: transparent;
}

.vertical-barchart-container h3 {
  background: transparent;
  padding: 0;
  margin-top: 0;
  margin-bottom: 2px;
}

.vertical-barchart-container h3 {
  margin-top: 0;
  text-align: left;
}

#bar-chart {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  height: 100%;
  white-space: nowrap;
  background-color: transparent;
}

.viz-container {
  position: relative;
  background-color: white;
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.map-container {
  background-color: white;
}

/* Typography */
h1 {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 8px;
  color: #2c3e50;
  font-size: 20px;
}

h3 {
  color: #2c3e50;
  margin-bottom: 4px;
  font-size: 14px;
}

.description {
  text-align: left;
  margin-bottom: 8px;
  color: #666;
  font-size: 11px;
  line-height: 1.2;
}

.instructions {
  text-align: left;
  font-size: 11px;
  color: #666;
  margin-top: 5px;
  margin-bottom: 5px;
  font-style: italic;
}

/* SVG styling */
svg {
  border: 1px solid #E9ECEF;
  border-radius: 6px;
  padding: 5px;
  background-color: white;
}

/* Common visualization elements */
.city {
  cursor: pointer;
}

.attribute {
  font-weight: bold;
  cursor: move;
}

/* Unified tooltip styling for all tooltips */
.tooltip {
  position: absolute;
  opacity: 0; /* Hidden by default, controlled by D3 */
  background-color: rgba(0, 0, 0, 0.8); /* Darker, semi-transparent background */
  color: white; /* White text */
  border: none;
  padding: 8px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  font-size: 12px;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 200px;
  z-index: 10000;
  pointer-events: none;
  transition: opacity 0.15s;
}

.tooltip-title {
  color: #fff; /* White text on dark background */
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}

/* Common chart elements */
.axis text {
  font-size: 9px;
  fill: #666;
}

.axis line, .axis path {
  stroke: #ddd;
  stroke-width: 0.5px;
}

/* Color palette for consistent visualization */
.primary-color { fill: #3498db; stroke: #3498db; }
.secondary-color { fill: #e74c3c; stroke: #e74c3c; }
.highlight-color { fill: #2ecc71; stroke: #2ecc71; }

/* Legend styling */
.legend-group text {
  font-size: 9px;
  fill: #666;
}

/* Force directed graph horizontal legend */
.horizontal-legend {
  display: flex;
  flex-wrap: wrap;
  font-size: 9px;
}

.horizontal-legend .legend-item {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

/* Dropdown Styles */
label {
  font-size: 10px;
  font-weight: 600;
  color: #333;
  margin-right: 10px;
}

h3 {
  font-size: 12;
}

select {
  font-family: 'Proxima Nova', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  padding: 2px 2px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease-in-out;
  margin: 2px 2px 2px 2px;
  width: 130px;
  height: 25px;
}

select:hover {
  border-color: #007bff;
}

select:focus {
  border-color: #0056b3;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Love Header Styles */
.love-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e9ecef;
  padding: 4px 0;
  text-align: center;
  font-size: 11px;
  color: #666;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  z-index: 1000;
}

.love-header p {
  margin: 0;
  padding: 0;
}

.love-header a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s;
}

.love-header a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Glassmorphic Background Styles */
#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Mobile Warning Styles */
#mobile-warning {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(248, 249, 250, 0.75);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(8px);
}

.warning-content {
  background-color: white;
  max-width: 90%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.warning-content h2 {
  color: #e74c3c;
  margin-bottom: 15px;
}

.warning-content p {
  font-size: 16px;
  line-height: 1.5;
  color: #333;
}

.warning-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Media Query for Mobile and Tablet Devices */
@media only screen and (max-width: 1024px) {
  #mobile-warning {
    display: flex;
  }
  
  .container {
    /* Prevent scrolling behind the overlay */
    overflow: hidden;
    pointer-events: none;
  }

  .warning-content {
    max-width: 80%;
    padding: 20px;
    border-radius: 15px;
  }

.warning-content h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #1d1d1d;
}

.warning-content p {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin-top: 5px;
  }
}

