body {
    font-family: sans-serif;
    background-color: #282c34;
    color: #abb2bf;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

h1 {
    color: #61afef;
    margin-bottom: 30px;
}

.synth-panel {
    display: flex;
    flex-wrap: wrap; /* Allow columns to wrap on smaller screens */
    gap: 30px;
    background-color: #3a3f4b;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    max-width: 1000px; /* Limit max width */
    width: 95%; /* Responsive width */
}

.controls-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px; /* Minimum width for columns */
    flex: 1; /* Allow columns to grow */
}

.controls-column h2 {
    color: #e5c07b;
    margin-bottom: 10px;
    margin-top: 0;
    border-bottom: 1px solid #4b5263;
    padding-bottom: 5px;
    font-size: 1.1em;
}

label {
    font-size: 0.9em;
    color: #abb2bf;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
    margin-bottom: 5px; /* Space below slider */
}
/* Style sliders for better appearance */
input[type=range] {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  height: 8px; /* Specified height */
  background: #5c6370; /* Grey background */
  outline: none; /* Remove outline */
  opacity: 0.9; /* Slightly transparent */
  transition: opacity .2s;
  border-radius: 4px;
}
input[type=range]:hover {
  opacity: 1; /* Full opacity on hover */
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #61afef;
  cursor: pointer;
  border-radius: 50%;
}
input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #61afef;
  cursor: pointer;
  border-radius: 50%;
  border: none; /* Remove Firefox border */
}


span {
    font-size: 0.8em;
    color: #98c379;
    min-width: 30px; /* Ensure space for value */
    display: inline-block; /* Allow min-width */
    margin-left: 5px;
}

button {
    background-color: #61afef;
    color: #282c34;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
    margin-bottom: 10px; /* Space below buttons */
}

button:hover {
    background-color: #529bd5;
}

button:active {
    background-color: #488ac7;
}

select {
    padding: 8px;
    background-color: #4b5263;
    color: #abb2bf;
    border: 1px solid #5c6370;
    border-radius: 4px;
    margin-bottom: 10px; /* Space below selects */
}

#sequencer-display {
    display: flex;
    gap: 4px;
    margin-top: 15px;
    background-color: #21252b;
    padding: 8px;
    border-radius: 4px;
    height: 30px; /* Fixed height */
    align-items: center;
}

.step {
    width: 10px;
    height: 20px;
    background-color: #4b5263; /* Default step color */
    border-radius: 2px;
    opacity: 0.5; /* Default opacity */
    transition: background-color 0.1s ease, opacity 0.1s ease;
    flex-grow: 1; /* Make steps fill the container */
}

.step.active {
    background-color: #e5c07b; /* Highlight active step */
    opacity: 1.0 !important; /* Ensure active step is fully visible */
}

.step.triggered {
    background-color: #98c379; /* Highlight triggered step */
     opacity: 1.0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .synth-panel {
        flex-direction: column; /* Stack columns vertically */
    }
    .controls-column {
        min-width: unset; /* Remove min-width on small screens */
        width: 100%; /* Make columns full width */
    }
}