body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f6f8;
  color: #333;
  text-align: center;
}

#treemap-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

#header h1 {
  font-size: 2em;
  margin-bottom: 0.2em;
}

#header p {
  font-size: 1.1em;
  color: #555;
  margin-top: 0;
  margin-bottom: 20px;
}

#buttons {
  margin-bottom: 20px;
}

button {
  margin: 0 5px;
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  background-color: #3498db;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}

button.active,
button:hover {
  background-color: #2980b9;
}

#chart {
  width: 100%;
  overflow: hidden;
  position: relative;
}

svg#treemap {
  width: 100%;
  height: 600px;
}

#tooltip {
  position: absolute;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  pointer-events: none;
  font-size: 13px;
  display: none;
  z-index: 10;
}

.tile {
  stroke: #fff;
  stroke-width: 1px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.tile:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}


text {
  pointer-events: none;
  font-size: 10px;
}

#legend {
  width: 100%;
  max-width: 960px;
  height: auto;
  margin-top: 20px;
}

.legend-item {
  stroke: #ccc;
  stroke-width: 1px;
}
