#quarto-content {
    overflow: hidden;
}

#viz-container {
    position: relative;
    height: 400px;
    overflow: visible;
}

#swarm-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hidden-element {
    visibility: hidden;
}

canvas {
    display: block;
    pointer-events: none; /* Allow clicking through canvas */
    z-index: 1000; /* Keep canvas on top */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* overflow: visible; */
}

#distribution-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#distribution-container svg {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#ui-container {
    display: flex;
    width: 80%;
    flex: 0 0 auto;
    flex-direction: row;
    margin-bottom: 1em;
    margin: 0 auto;
}

#controls-container {
    width: 50%;
    min-width: 300px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#controls-container>div {
    width: 100%;
}

#controls-container span {
}

#controls-container input[type="range"] {
    width: 100%;
}

#indicator-container {
    width: 50%;
    padding: 20px;
    align-content: center;
    text-align: center;
}

#stuff {
    margin-bottom: 2em;
}


@media screen and (max-width: 600px) {
    /* Only UI layout changes needed now */
    #ui-container {
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
    }

    #controls-container,
    #indicator-container {
        width: 100%;
        padding: 10px;
    }

    #indicator-container {
        order: -1;
    }
}