body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #222;
    color: #eee;
    margin: 0;
    overflow: hidden;
}

.container {
    background-color: #333;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

h1 {
    color: #4CAF50;
    margin-bottom: 5px;
}

canvas {
    background-color: #111;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    margin-bottom: 5px;
}

/* New style for the info text */
.info-text {
    margin-top: 5px;
    font-size: 1.1em;
    color: #bbb;
    min-height: 20px; /* To prevent layout shift */
}

.controls {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

input[type="range"] {
    width: 200px;
    -webkit-appearance: none;
    appearance: none;
    background: #555;
    outline: none;
    border-radius: 5px;
    height: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid #eee;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid #eee;
}

input[type="number"] {
    width: 80px; /* Adjust width for number input */
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #444;
    color: #eee;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield; /* Hide Firefox spinner arrows */
}

/* Hide Webkit spinner arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

label {
    font-size: 18px;
}

/* Style for the new select dropdown */
select {
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #444;
    color: #eee;
    font-family: Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
}

select:hover {
    border-color: #4CAF50;
}

#speedValue,
#volumeValue,
#crazinessValue,
#musicalityValue,
#bitDepthValue,
#densityValue {
    min-width: 40px; /* Adjust width for value display */
    display: inline-block;
    text-align: left;
}

.formula-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.formula-editor label {
    font-size: 18px;
    margin-bottom: 5px;
}

.formula-editor textarea {
    width: 90%;
    max-width: 760px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #444;
    color: #eee;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    resize: vertical;
}

/* New styles for random generator */
.random-generator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid #444;
    margin-top: 15px;
}

.random-generator h2 {
    color: #4CAF50;
    margin-bottom: 5px;
    font-size: 20px;
}

/* New styles for formula navigation buttons */
.formula-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}