#search {
    position: absolute;
    right: 1em;
    top: 1em;
}

html, body, #sigma-container {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

#sidebar {
    position: absolute;
    top: 1em;
    left: 1em;
    background: white;
    padding: 0.5em;
    border-radius: 5px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1em; /* Space between the legend and gravity filter */
    width: 20%;
}

#build-selection {
    padding: 3em;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: white;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.5em; /* Adds space between slider and values */
}

#legend {
    background: white;
    padding: 1em;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

#color-scale-legend {
    display: block;
    flex-direction: column;
    margin-top: 10px;
}

#color-scale-legend span {
    display: inline-block;
    font-size: 12px;
    margin-top: 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
}

.legend-color {
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    border-radius: 50%;
}

#color-scale-gradient {
    display: flex;
    height: 10px;
}

#gravity-filter {
    padding: 3em;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: white;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.5em; /* Adds space between slider and values */
}

#gravity-filter input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

#gravity-filter span {
    font-size: 14px;
    font-weight: bold;
}

#toggle-menu{
    padding: 1em;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: white;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    align-items: center;
}
 #toggle-container {
     display: flex;
     gap: 10px;
     margin-top: 1em;
     justify-content: center;
 }

.toggle-option {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background-color: #e0e0e0;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    margin: 5px;
}

.toggle-option::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 10;
}

/* Show tooltip on hover */
.toggle-option:hover::after {
    opacity: 1;
}

.toggle-option.active {
    background-color: #3498db;
    color: white;
}

.toggle-option:hover {
    background-color: #b3d8f7;
}

select, button {
    margin: 10px 0;
    padding: 10px;
    font-size: 16px;
}



