body {
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: #f4f6fa;
  height: 100vh;
}

#main {
  display: flex;
  flex: 1;
}

#sidebar {
  width: 220px;
  padding: 20px;
  background: #2c3e50;
  color: white;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#sidebar h2 {
  margin-top: 0;
  font-size: 20px;
  border-bottom: 1px solid #7f8c8d;
  padding-bottom: 10px;
}

.alg-btn {
  display: block;
  margin: 10px 0;
  padding: 10px;
  background: #34495e;
  cursor: pointer;
  text-align: center;
  border-radius: 5px;
  transition: background 0.3s;
  color: white;
}

.alg-btn:hover { background: #3d566e; }
.alg-btn.active { background: #1abc9c; }

#graph-area {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

#graph {
  flex: none; 
  border: 1px solid #ccc;
  background: white;
  border-radius: 8px;
}

circle {
  stroke:#333;
  stroke-width:1px;
}

line {
  stroke:#999;
  stroke-width:2px;
}

#info {
  margin-top: 20px;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-size: 15px;
  line-height: 1.8;
  color: #2c3e50;
}

#info h3 {
  margin-top: 0;
  font-size: 18px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
}

#info p {
  margin: 8px 0;
}

.section h2 {
  cursor: pointer;
  margin-bottom: 10px;
}

.section.collapsed .alg-btn {
  display: none;
}

.section.collapsed .alg-btn {
  display: none; 
}

.section h2 {
  cursor: pointer;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  
}

.section h2 .arrow {
  font-size: 16px;
  margin-right: 8px;
  transition: transform 0.3s ease;
}
