#filterAndSearch {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Distribute space between elements */
    width: 100%;
    position: relative; /* For absolute positioning of search bar */
}

#themeIcons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

#search {
    position: absolute;
    left: 50%;
    width: 40vw !important;
    transform: translateX(-50%); /* Perfect center alignment */
}

#themeIcons img {
    width: 75px;
    height: 75px;
}

#themeIcons img:hover {
    cursor: pointer;
    transform: translateY(-5px);
    transition: transform 0.3s;
}

/* Add a spacer to balance the layout */
.spacer {
    width: calc(75px * 5 + 10px * 4); /* Same width as icons container */
    flex-shrink: 0;
    visibility: hidden; /* Make invisible but maintain space */
}

@media screen and (max-width: 1150px) {
    #themeIcons img {
        width: 50px;
        height: 50px;
        margin-top: 0;
    }

    #themeIcons {
        margin-bottom: 1rem;
        width: 100%;
        justify-content: center;
    }

    .spacer {
        width: 0 /* calc(40px * 5 + 10px * 4); /* Adjust for smaller icons */
    }

    #filterAndSearch {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    #search {
        position: static;
        width: 100% !important;
        max-width: 80vw !important;
        margin-top: 0 !important;
        transform: translateX(0);
    }
}