body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden; /* Prevent scrollbars */
}

.input-control {
    width: 90%;
}

.restart-btn {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}

#wrapper {
    display: flex;
    height: 100%;
    position: relative;
}

#sidebar {
    width: 300px;
    background-color: #f8f9fa;
    height: 100%;
    overflow-x: hidden;
    position: absolute; /* For z-index positioning */
    left: 0;
    transition: transform 0.3s ease; /* Smooth sliding effect */
    z-index: 1000; /* Ensure it stays on top of the canvas */
}

#sidebar.collapsed {
    transform: translateX(-100%); /* Slide off-screen */
}

#separator {
    width: 10px;
    background-color: #ccc;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute; /* Position relative to the viewport */
    left: 300px; /* Align to the right edge of the sidebar */
    transition: left 0.3s ease; /* Smooth sliding effect */
    z-index: 1000; /* Ensure it is clickable */
}

#separator.collapsed {
    left: 0; /* Position when sidebar is collapsed */
}

#toggleIcon::before {
    content: '\f078'; /* Font Awesome icon code for "chevron-right" */
    font-family: 'Font Awesome 5 Free', serif;
    font-weight: 900;
    color: #333;
}

#sidebar.collapsed ~ #separator #toggleIcon::before {
    content: '\f077'; /* Font Awesome icon code for "chevron-left" */
}

#canvasContainer {
    flex-grow: 1;
    height: 100%;
    margin-left: 310px; /* Initial margin to account for sidebar and separator */
    transition: margin-left 0.3s ease; /* Smooth transition for canvas expansion */
}

#controls-touch, #controls-non-touch {
    display: none;
}