html,
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #E6E5D2;
    /* Beige background */
}

canvas {
    display: block;
}

#controls {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 640px;
    background-color: #E6E5D2;
    border: 1px solid #E65331;
    padding: 0;
    margin: 24px;
    color: #E65331;
    font-family: 'Junicode', sans-serif;
    font-size: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    box-sizing: border-box;
    width: calc(100% - 48px);
    /* Adjust width to account for 24px left and 24px right margin */

}

/* Container for each slider/label pair */
.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    border-right: 1px solid #E65331;
    padding: 20px;
    box-sizing: border-box;
}

#controls .control-group:last-child {
    border-right: none;
}



#controls p {
    margin: 0 0 10px 0;
    font-size: 16px;
    letter-spacing: 1px;
}

#controls button {
    margin-top: 10px;
    padding: 8px 20px;
    background: #E65331;
    color: #E6E5D2;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

#reset-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    /* Ensure it's on top */
    margin: 0 !important;
    /* Override any default margins */
}

#controls button:hover,
#reset-btn:hover {
    background: #c44225;
}

/* Custom Slider Styling */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    border: 1px solid #E65331;
    height: 8px;
    padding: 2px;
    box-sizing: border-box;
}

input[type=range]:focus {
    outline: none;
}

/* Webkit (Chrome, Safari, Edge) */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    height: 100%;
    width: 10px;
    /* Rectangular thumb to look like a filler block or just a block */
    background: #E65331;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 0;
    border: none;
    box-shadow: -1000px 0 0 1000px #E65331;
    /* Trick to fill the left side */
}

/* Overflow hidden on the input is needed for the box-shadow fill trick to work properly within the border */
input[type=range] {
    overflow: hidden;
}

/* Firefox */
input[type=range]::-moz-range-track {
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent;
}

input[type=range]::-moz-range-thumb {
    height: 100%;
    width: 10px;
    border: none;
    background: #E65331;
    cursor: pointer;
}

input[type=range]::-moz-range-progress {
    background-color: #E65331;
    height: 100%;
}