/* Global Dark Mode Styling */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #121212;
    color: #e0e0e0;
  }
  h1 {
    text-align: center;
    color: #f0f0f0;
  }
  
  /* Container holding the buttons and canvas */
  #simulationContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
  }
  
  /* Button panel styling */
  #buttonPanel {
    display: flex;
    flex-direction: column;
    margin-right: 20px;
  }
  #buttonPanel button {
    margin-bottom: 10px;
    background-color: #333;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }
  #buttonPanel button:hover {
    background-color: #444;
    transform: scale(1.05);
  }
  
  /* Style for the canvas */
  canvas {
    display: block;
    border: 1px solid #444;
    background-color: #1e1e1e;
  }
  
  /* Other controls styling */
  #controls {
    max-width: 800px;
    margin: 20px auto;
  }
  .control-group {
    margin-bottom: 10px;
  }
  .control-group label {
    display: inline-block;
    width: 250px;
  }
  .control-group input[type="text"],
  .control-group input[type="number"] {
    margin-right: 10px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    padding: 3px;
    transition: border-color 0.2s ease;
  }
  .control-group input[type="text"]:hover,
  .control-group input[type="number"]:hover {
    border-color: #777;
  }
  
  /* ---------- Custom Slider Styling ---------- */
  input[type="range"] {
    width: 100%;
    background: transparent;
    margin: 10px 0;
  }
  input[type="range"]:focus {
    outline: none;
  }
  input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(
      to right,
      #555 0%,
      #555 calc(var(--default, 50%) - 1px),
      #f00 calc(var(--default, 50%) - 1px),
      #f00 calc(var(--default, 50%) + 1px),
      #555 calc(var(--default, 50%) + 1px),
      #555 100%
    );
    border-radius: 3px;
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #bbb;
    margin-top: -5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
  }
  input[type="range"]:hover::-webkit-slider-thumb {
    background: #e0e0e0;
    transform: scale(1.2);
  }
  input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(
      to right,
      #555 0%,
      #555 calc(var(--default, 50%) - 1px),
      #f00 calc(var(--default, 50%) - 1px),
      #f00 calc(var(--default, 50%) + 1px),
      #555 calc(var(--default, 50%) + 1px),
      #555 100%
    );
    border-radius: 3px;
  }
  input[type="range"]::-moz-range-thumb {
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #bbb;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }
  input[type="range"]:hover::-moz-range-thumb {
    background: #e0e0e0;
    transform: scale(1.2);
  }
  