
:root {
  /* Agent colors */
  --color-herd: rgba(224, 156, 156, 0.8);
  --color-shepherd: rgba(70, 70, 70, 0.9);
  --color-target: rgba(0, 0, 0, 0.8);
  --color-centroid-herd: rgba(222, 156, 156, 0.7);
  --color-centroid-shepherd: rgba(70, 70, 70, 0.6);
  
  /* UI colors */
  --color-accent: rgba(0, 100, 200, 0.6);
  --color-border: rgba(0, 0, 0, 0.2);
  --color-text: rgba(0, 0, 0, 0.8);
  --color-text-muted: rgba(0, 0, 0, 0.6);
  --color-text-subtle: rgba(0, 0, 0, 0.5);
}




/* === CANVAS STYLING === */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: rgba(245, 245, 245, 1); /* #ffffff */
}

canvas {
  display: block;
}

/* ===== REPO FOOTER ===== */
#repo-link {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 10;
}

#repo-link a {
  font-family: monospace;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

#repo-link a:hover {
  color: rgba(0, 0, 0, 0.8);
}

/* ===== CONTROL PANEL ===== */
#control-panel {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  z-index: 10;
  color: var(--color-text);
  max-height: 90vh;
  overflow-y: auto;
  max-width: 380px;
}

.panel-section {
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}

.panel-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-weight: 300;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  color: var(--color-text);
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 4px;
}

.collapsible-header .section-title {
  margin-bottom: 0;
  flex: 1;
}

.collapsible-toggle {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--color-text-muted);
  border-right: none;
  border-bottom: none;
  transform: rotate(-45deg);
  transition: transform 0.2s;
  margin-left: 8px;
}

.collapsible-toggle.open {
  transform: rotate(45deg);
}

.collapsible-content {
  display: none;
}

.collapsible-content.open {
  display: block;
}

/* ===== CURSOR MODE IN TITLE ===== */
.title-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 4px;
}

.title-with-toggle .section-title {
  margin-bottom: 0;
  flex-shrink: 0;
}

.title-with-toggle .toggle-switch {
  flex-shrink: 0;
}

/* ===== SLIDER STYLING ===== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 8px;
  width: 8px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  margin-top: -2.5px;
  cursor: pointer;
}

/* === Firefox Support === */
input[type="range"]::-moz-range-track {
  height: 3px;
  background: rgba(0, 0, 0, 0.15);
}

input[type="range"]::-moz-range-thumb {
  height: 8px;
  width: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* ===== SLIDER LAYOUT ===== */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slider-group-title {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.slider-label {
  flex-shrink: 0;
  font-size: 8px;
  color: var(--color-text-subtle);
  min-width: 20px;
}

.slider-value {
  flex-shrink: 0;
  min-width: 28px;
  text-align: right;
  font-size: 10px;
}

.slider-row input[type="range"] {
  flex-grow: 1;
  width: auto;
}

/* ===== MULTI-SLIDER CONTROL ===== */
.multi-slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.multi-slider-track {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  cursor: default;
}

.multi-slider-track-bg {
  position: absolute;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.multi-slider-label {
  position: absolute;
  font-size: 7px;
  font-weight: 600;
  text-transform: lowercase;
  color: rgba(0, 0, 0, 0.6);
  letter-spacing: 0.3px;
  white-space: nowrap;
  transform: translateX(-50%);
  top: -3px;
  pointer-events: none;
}

.multi-slider-button {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.5);
  cursor: grab;
  transform: translate(-50%, -50%);
  top: 50%;
  padding: 0;
  transition: opacity 0.1s, box-shadow 0.1s;
}

.multi-slider-button:hover {
  opacity: 0.85;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.multi-slider-button.dragging {
  cursor: grabbing;
  opacity: 1;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.multi-slider-value {
  position: absolute;
  font-size: 9px;
  color: rgba(0, 0, 0, 0.8);
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  bottom: -6px;
  pointer-events: none;
  min-width: 28px;
  text-align: center;
}

/* ===== VISUALIZATION SECTION ===== */
.visualization-section {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.circle-container {
  flex-shrink: 0;
  background: rgba(240, 240, 240, 0.8);
  border-radius: 4px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.circle-svg {
  display: block;
  margin: 0 auto;
}

.sliders-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  white-space: nowrap;
}

.toggle-switch input[type="checkbox"] {
  display: none;
}

.toggle-switch-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.toggle-switch-slider {
  display: inline-block;
  width: 32px;
  height: 14px;
  background: var(--color-herd);
  border-radius: 7px;
  margin: 0 4px;
  position: relative;
  transition: background 0.2s;
}

.toggle-switch-slider:before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  left: 2px;
  top: 2px;
  transition: left 0.2s;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-switch-label .toggle-switch-slider {
  background: var(--color-shepherd);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-switch-label .toggle-switch-slider:before {
  left: 20px;
}

/* ===== UTILITY CLASSES ===== */
.toggle-switch--compact {
  margin: 0;
}

.label-inline {
  font-size: 9px;
  color: rgba(0, 0, 0, 0.6);
}

.input-row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.label-uppercase {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.label-lowercase{
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  text-transform: lowercase;
  letter-spacing: 0.5px;
}

.number-input {
  width: 40px;
  font-size: 10px;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  text-align: center;
}

.section-divider {
  margin-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 8px;
}

.info-box {
  padding: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-box-label {
  font-size: 8px;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}

.info-box-value {
  float: right;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}
