:root {
    --primary: #4275cd;
    --bg: #f8fafc;
    --panel: #2c3e50;
    --text: #1e293b;
}


.container {
    /* Changed from flex to block layout */
    display: block; 
    width: 100%;
    max-width: 900px; /* Reduced max-width for a more compact vertical layout */
    /* Removed fixed height constraint (80vh) */
    background: var(--panel);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.controls {
    /* Full width for the control panel */
    width: auto; 
    padding: 20px;
    background-color: #2c3e50;
    border-bottom: 1px solid #ffffff; /* Separator at the bottom */
    border-right: none; /* Removed vertical separator */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: visible; /* Prevent controls from scrolling */
}

h2 { margin-top: 0; font-size: 1.25rem; }

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #363638;
    border-radius: 4px;
    background: rgb(255, 255, 255);
}

select {
    max-width: 100px;
    min-width: 75px;
    flex-basis: auto;
    flex-grow: 1 ;
    padding: 0.5rem;
    border: 1px solid #363638;
    border-radius: 4px;
    background: rgb(132, 166, 246);
}

button {
    padding: 0.75rem;
    background-color: var(--primary);
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

button:hover { background-color: #1d4ed8; }

.results {
    /* Keep results layout the same */
    margin-top: 0; 
    background: rgb(255, 255, 255);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #363638;
}

.results p { margin: 0.5rem 0; font-size: 0.9rem; }

.canvas-container {
    /* Container for the graph */
    width: 100%;
    height: 400px; /* Give the canvas a fixed height */
    padding: 20px;
    box-sizing: border-box; /* Ensures padding is included in the 100% width */
}

canvas {
    width: 100%;
    height: 100%;
    background-color: #000000;
    cursor: crosshair;
    border-radius: 4px;
}

.bg-dark-indigo {
    background-color: #2c3e50; /* Deep Slate Blue/Dark Indigo */
}