@media screen and (max-width: 600px) {
    body{
        font-size: .9em;
    }
    #page{
        top:0;
        right:0;
        bottom: 0;
        left: 0;
    }
    .item{
        height: 90px;
        width: 90px;
        margin: 1.25px;
        border-radius: 8px;
        border-width: 2px;
    }

    #searchField {
        flex-grow: 1;
        width: 100%;  /* Make the text field take up full width */
    }

    /* Group other elements together in one line */
    div.search > *:not(#searchField) {
        flex-grow: 0;
        width: auto;
    }

    div.search {
        justify-content: flex-start;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    /* Ensure the button, select, and advanced link are on the same line */
    #searchButton, #searchSelect, #advancedSearchButton {
        flex-basis: auto; /* Don't force full width */
    }
    
    /* Center align elements on the second line, if necessary */
    div.search > *:not(#searchField) {
        display: inline-flex;
    }
    #advancedSearchButton{
        margin-left: auto;
        font-size: 100%;
    }
    .controls>div{
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        padding: 2px 4px;
        font-size: 90%;
    }

}