/* --- START OF FILE style.css --- */

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: 1600px; /* Increased max width to accommodate all columns */
    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;
    display: block; /* Ensure labels take full width */
    margin-bottom: 2px; /* Small space below label */
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
    margin-bottom: 0px; /* Reduce space below slider */
    vertical-align: middle;
}
/* 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: 35px; /* Ensure space for value */
    display: inline-block; /* Allow min-width */
    margin-left: 5px;
    vertical-align: middle;
    margin-bottom: 5px; /* Space below value */
}

.osc-controls, .bass-osc-controls, .sub-osc-controls, .sequencer-controls, .glide-controls, .phrase-controls, .scene-controls, .reverb-controls {
    border: 1px solid #4b5263;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 12px;
    background-color: rgba(59, 66, 82, 0.6);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 10px 0;
    vertical-align: middle;
}

/* Per-step velocity dots */
.step-velocity {
    width: 5px;
    height: 5px;
    background-color: #98c379;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.step {
    position: relative;
}

small {
    font-size: 0.7em;
    color: #5c6370;
    display: block; /* Place hint below slider */
    margin-bottom: 8px; /* Space below hint */
    margin-top: -2px; /* Pull hint closer to slider */
}


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 */
    width: 100%; /* Make buttons fill column width */
    box-sizing: border-box; /* Include padding in width */
}

/* Small buttons for phrase controls */
.small-button {
    padding: 5px 10px;
    font-size: 0.9em;
    margin: 0 5px;
    width: auto;
    display: inline-block;
}

.phrase-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    margin-bottom: 5px;
}

.phrase-selector {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.phrase-selector select {
    flex: 1;
    margin-bottom: 0;
}

.phrase-selector button {
    width: auto;
    padding: 5px 8px;
    margin-bottom: 0;
}

.phrase-controls h3 {
    color: #98c379;
    font-size: 1em;
    margin: 10px 0 5px 0;
}

#phrase-chain {
    width: 100%;
    padding: 8px;
    background-color: #4b5263;
    color: #abb2bf;
    border: 1px solid #5c6370;
    border-radius: 4px;
    margin-bottom: 5px;
    box-sizing: border-box;
}

/* Scene Storage Styles */
.scene-controls h3 {
    color: #98c379;
    font-size: 1em;
    margin: 10px 0 5px 0;
}

.scene-slots {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.scene-button {
    flex: 1;
    padding: 8px 5px;
    background-color: #4b5263;
    border: 1px solid #5c6370;
    transition: all 0.3s ease;
}

.scene-button.active {
    background-color: #98c379;
    color: #282c34;
}

.scene-button:hover:not(.active) {
    background-color: #5c6370;
}

.scene-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scene-action-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.scene-action-row input[type="range"] {
    flex: 1;
    margin: 0;
}

.scene-action-row .small-button {
    flex: 1;
}

/* Reverb toggle row style */
.reverb-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.reverb-toggle-row .small-button {
    flex: 0 0 auto;
}

.reverb-toggle-row label {
    margin-bottom: 0;
    margin-left: 5px;
}

.reverb-toggle-row select {
    flex: 1;
    margin-bottom: 0;
}

/* Reverb enable button styles */
button#reverb-enabled {
    background-color: #5c6370; /* Default OFF state color */
    color: #abb2bf;
}

button#reverb-enabled.active {
    background-color: #98c379; /* Greenish ON state color */
    color: #282c34;
}

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

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

/* Specific styling for toggle buttons */
button#start-stop.active { /* Use active class for Stop state */
     background-color: #e06c75; /* Reddish color for stop state */
     color: #282c34;
}
button#start-stop.active:hover {
    background-color: #d15c65;
}

button#limiter-toggle {
    background-color: #5c6370; /* Default OFF state color */
    color: #abb2bf;
}
button#limiter-toggle.active {
    background-color: #98c379; /* Greenish ON state color */
    color: #282c34;
}
button#limiter-toggle:hover,
button#tooltips-toggle:hover {
    opacity: 0.9;
}


select, input[type="text"] {
    padding: 8px;
    background-color: #4b5263;
    color: #abb2bf;
    border: 1px solid #5c6370;
    border-radius: 4px;
    margin-bottom: 10px; /* Space below selects */
    width: 100%; /* Make selects fill column width */
    box-sizing: border-box; /* Include padding in width */
}

#sequencer-display {
    display: flex;
    gap: 4px;
    margin-top: 10px; /* Reduced margin */
    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;
     /* Add a subtle flash effect */
     animation: trigger-flash 0.2s ease-out;
}

@keyframes trigger-flash {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background-color: #c678dd; } /* Optional color flash */
    100% { transform: scale(1); }
}


/* Responsive adjustments */
@media (max-width: 1200px) { /* Adjust breakpoint for more columns */
    .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 */
    }
}

/* Add these styles to style.css */

/* Chord Progression Controls */
.chord-progression-controls {
    border: 1px solid #4b5263;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 12px;
    background-color: rgba(59, 66, 82, 0.6);
}

.custom-progression {
    border: 1px solid #4b5263;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 12px;
    background-color: rgba(59, 66, 82, 0.6);
}

.custom-progression h3,
.progression-display h3 {
    color: #98c379;
    font-size: 1em;
    margin: 10px 0 5px 0;
}

.chord-slots {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.chord-button {
    flex: 1;
    min-width: 40px;
    padding: 8px 5px;
    background-color: #4b5263;
    border: 1px solid #5c6370;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.chord-button.active {
    background-color: #98c379;
    color: #282c34;
}

.chord-button:hover:not(.active) {
    background-color: #5c6370;
}

.progression-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.progression-actions .small-button {
    flex: 1;
    min-width: 60px;
}

.progression-display {
    border: 1px solid #4b5263;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 12px;
    background-color: rgba(59, 66, 82, 0.6);
}

#progression-analysis {
    font-family: monospace;
    padding: 8px;
    border-radius: 4px;
    background-color: #282c34;
    height: 40px;
    overflow-x: auto;
    white-space: nowrap;
    color: #e5c07b;
    display: flex;
    align-items: center;
}

.progression-playback {
    border: 1px solid #4b5263;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 12px;
    background-color: rgba(59, 66, 82, 0.6);
}

.progression-playback .scene-action-row {
    margin-bottom: 8px;
}

/* Remove redundant responsive adjustment as we've updated the main max-width */

/* --- END OF FILE style.css --- */