* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background: #fff;
}

.container {
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    height: 100%;
    margin: 0;
    padding: 20px 0 0;
    background-color: #333;
    position: fixed;
    overflow: auto;
}

.sidebar a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 16px;
}

.sidebar a:hover {
    background-color: #555;
}

.search-form {
    padding: 16px;
}

.search-form input,
.search-form button {
    width: 100%;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    font: inherit;
}

.search-form button {
    margin-bottom: 0;
    color: white;
    background: #555;
    border-color: #555;
    cursor: pointer;
}

.search-form button:hover {
    background: #777;
}

.content {
    min-height: 100vh;
    margin-left: 200px;
    padding: 20px;
}

@media screen and (max-width: 700px) {
    .sidebar {
        width: 100%;
        height: auto;
        padding-top: 0;
        position: relative;
    }

    .sidebar a {
        float: left;
    }

    .search-form {
        clear: both;
        display: flex;
        gap: 8px;
        padding: 8px;
    }

    .search-form input,
    .search-form button {
        margin-bottom: 0;
    }

    .search-form input {
        flex: 1;
    }

    .search-form button {
        width: auto;
    }

    .content {
        min-height: calc(100vh - 51px);
        margin-left: 0;
    }
}

@media screen and (max-width: 400px) {
    .sidebar a {
        float: none;
        text-align: center;
    }

    .search-form {
        display: block;
    }

    .search-form input,
    .search-form button {
        width: 100%;
        margin-bottom: 8px;
    }

    .search-form button {
        margin-bottom: 0;
    }
}
