.tool-container {
  max-width: 850px;
  margin: 40px auto;
  padding: 0 20px;
}

.tool-container h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.tool-container p {
  color: #666;
  margin-bottom: 20px;
}

.controls-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
  background: white;
  border: 1px solid #eee;
  border-radius: 10px;
}

.option {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #555;
}

.option select {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 13px;
}

.option input[type="range"] {
  margin-top: 6px;
  width: 160px;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.action-row button {
  padding: 10px 22px;
  background: #185fa5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.action-row button:hover:not(:disabled) {
  background: #0c447c;
}

.action-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-row button.secondary {
  background: white;
  color: #185fa5;
  border: 1px solid #185fa5;
}

.action-row button.secondary:hover:not(:disabled) {
  background: #f0f6fc;
}

.canvas-wrap {
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

#vizCanvas {
  max-width: 100%;
  height: auto;
}

.legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #555;
  margin-bottom: 10px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
}

.dot.default { background: #185fa5; }
.dot.comparing { background: #e0a800; }
.dot.sorted { background: #2f8a2f; }

.status-msg {
  font-size: 13px;
  color: #666;
}

@media (max-width: 600px) {
  .controls-row {
    flex-direction: column;
    gap: 14px;
  }
}