html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
}

#sidebar-container {
  min-width: 250px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#sidebar {
  width: auto;
  max-width: 300px;
  padding: 10px;
  box-sizing: border-box;
  border-right: 1px solid lightgray;
  overflow-y: hidden;
  flex: 1;
}

#main {
  flex: 1;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

#search-container {
  width: 100%;
  margin-bottom: 10px;
  position: relative;
}

#search-input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  font-size: 14px;
  border: 1px solid silver;
  border-radius: 4px;
}

#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: white;
  border: 1px solid silver;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#search-results div {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

#search-results div:hover {
  background-color: #f0f0f0;
}

#mynetwork {
  width: 100%;
  flex: 1;
  background-color: aliceblue;
  border: 1px solid lightgray;
  min-height: 400px;
}

#toggle-button {
  margin: 5px;
  padding: 5px 10px;
  cursor: pointer;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
}

#toggle-button:hover {
  background-color: #e0e0e0;
}

/* Legend item (checkbox + color swatch + label) */
.legend-item {
  display: flex;
  align-items: center;
  padding: 6px 0;
  gap: 8px;
}

.legend-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Color swatch box */
.color-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.legend-item label {
  font-size: 13px;
  color: #555;
  cursor: pointer;
  flex: 1;
}

#legend {
  max-height: none;
  overflow-y: hidden;
}

.control-buttons {
  margin: 10px 0;
}

.control-buttons button {
  margin-right: 5px;
  padding: 5px 10px;
  cursor: pointer;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 3px;
}

.control-buttons button:hover {
  background-color: #45a049;
}

.stats-list {
  list-style: none;
  padding: 0;
}

.stats-list li {
  padding: 5px 0;
  font-size: 14px;
}

h3 {
  margin: 15px 0 10px 0;
  font-size: 16px;
}

h4 {
  margin: 0 0 10px 0;
  font-size: 18px;
}
