/* Ensure body and html take full viewport */
body, html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;  /* Stack elements (canvas and controls) */
    align-items: center;      /* Center horizontally */
    justify-content: flex-start; /* Align everything from the top */
    overflow: hidden; /* Prevent unwanted scrolling */
}

/* Wrapper to center everything */
#wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Make the container take full space but leave room for controls */
#container {
    flex-grow: 1;  /* Make it take most available space */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 85vh; /* Reduce height slightly so controls fit */
    max-height: 85vh; /* Ensures it doesn't take the full screen */
}

/* Make the canvas dynamically resize */
canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Controls section at the bottom */
#controls {
    width: 100%;  /* Ensure it spans the entire width */
    height: 15vh; /* Set height to take the remaining space */
    min-height: 100px; /* Ensure it doesn't collapse */
    padding: 10px;
    background: rgba(0, 0, 0, 0.5); /* Optional: Semi-transparent background */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;  /* Ensure buttons don't overflow */
    gap: 10px;  /* Space between buttons */
    overflow-y: auto; /* Allows scrolling if controls overflow */
}
