body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  height: 100vh;
}

#sidebar {
  width: 30%;
  background-color: #f5f5f5;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#graph-container {
  flex-grow: 1;
  position: relative;
}

#graph {
  width: 100%;
  height: 100%;
  background-color: #f9f9f9;
}

.input-group {
  margin-bottom: 15px;
}

input,
button,
select {
  padding: 8px;
  margin: 5px 0;
  width: 100%;
  box-sizing: border-box;
}

button {
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
}

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

h2 {
  margin-top: 0;
  margin-bottom: 15px;
}

.node-info,
.edge-info {
  margin-top: 15px;
  border-top: 1px solid #ddd;
  padding-top: 15px;
}

.address-item,
.poisoned-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0;
  padding: 5px;
  background-color: #e9e9e9;
  border-radius: 3px;
}

.remove-btn {
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 3px 6px;
  cursor: pointer;
  width: auto;
}

.clean-node {
  fill: #4caf50;
  stroke: #45a049;
}

.poisoned-node {
  fill: #f44336;
  stroke: #d32f2f;
}

.clean-edge {
  stroke: #888;
}

.poisoned-edge {
  stroke: #f44336;
}

#legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 5px 0;
}

.legend-color {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

#notification {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  border-radius: 5px;
  display: none;
}

/* Added style for tagged nodes/edges display */
#tagged-elements {
  margin-top: 15px;
  max-height: 200px;
  overflow-y: auto;
}

.tag-list-title {
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
}

textarea {
  padding: 8px;
  margin: 5px 0;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

/* Layout button styling */
#layout-button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#layout-button.active {
  background-color: #e74c3c;
}

#layout-button:hover {
  background-color: #2980b9;
}

#layout-button.active:hover {
  background-color: #c0392b;
}

/* Tips styling */
.tip {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  font-style: italic;
}

/* Enhance the legend */
.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.legend-color {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 4px;
}

/* Make sure the cursor changes when hovering over nodes */
#graph {
  cursor: default;
}
