body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    background-color: #343a40;
    color: white;
    z-index: 1;
}

.nav-bar {
    position: fixed;
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: white;
    background-color: #212529;
    height: 2.5rem;
    width: 100%;
}

.nav-bar-link {
    display: block;
    font-size: 16px;
}

.nav-bar-link #sort-page{
    color: #ffffffcf;
}

a {
    text-decoration: none;
    color: white;
}

.content-page {
    margin-top: 2.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - 4.5rem);
}

.input-related {
    margin-right: 1rem;
}

.input label {
    margin-right: 1rem;
}

.input input,
.controls-action #search-value {
    width: 20rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
}

.btn-format {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    width: auto;
}

.blue-type {
    background-color: #007bff;
    color: white;
}

.blue-type:hover {
    background-color: #0056b3;
}

.red {
    background-color: red;
    color: white;
}

.red:hover {
    background-color: darkred;
}

.yellow {
    background-color: yellow;
    color: black;
}

.green {
    background-color: green;
    color: white;
}

.green:hover {
    background-color: darkgreen;
}

.controls {
    margin-top: 0.75em;
}

.range-speed {
    margin: 0.5em 0 1em 0;
}

#speed {
    cursor: pointer;
}

.svg-container {
    width: 100%;
    max-width: 70%;
    height: 500px;
    max-height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border: 1px solid black;
    border-radius: 0.5rem;
}

#algorithm {
    height: 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    border: 1px solid #ccc;
}

#search-value {
    height: 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    border: 1px solid #ccc;
}

.controls-action {
    display: flex;
    flex-direction: row;
}

@media (max-width: 768px) {
    /* .nav-bar-logo {
        font-size: 18px;
    } */

    .nav-bar-link {
        font-size: 14px;
        padding: 0 5px;
    }

    .input {
        flex-direction: column;
        align-items: center;
    }

    .input input {
        width: 100%;
        max-width: 25rem;
    }

    .btn-format {
        margin-left: 0;
        margin-top: 1rem;
        width: auto;
    }

    .content-page {
        padding: 1rem;
    }

    .svg-container {
        max-width: 90%;
        height: 300px;
        max-height: 60%;
    }

    .input-related {
        margin: 1rem 0;
    }

    .input label {
        margin-bottom: 0.5rem;
    }

    .btn-format {
        margin-top: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    #algorithm,
    #search-value {
        height: 1.25rem;
    }
}

@media (max-width: 575px) {
    /* .nav-bar-logo {
        font-size: 16px;
    } */

    .nav-bar-link {
        font-size: 12px;
        padding: 0 2px;
    }

    .input {
        flex-direction: column;
        align-items: center;
    }

    .input input {
        width: calc(100% - 1rem);
    }

    .content-page {
        padding: 0.5rem;
    }

    .svg-container {
        max-width: 100%;
        height: 200px;
        max-height: 50%;
    }

    .input-related {
        margin: 0.5rem 0;
    }

    .input label {
        margin-bottom: 0.25rem;
    }

    .btn-format {
        margin-left: 0;
        margin-top: 0.25rem;
        padding: 0.25rem 0.5rem;
        width: auto;
    }

    #algorithm,
    #search-value {
        height: 1rem;
    }

    .input-related {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 1rem 0;
    }

    .input,
    .btn-format {
        width: auto;
        text-align: center;
    }
}

@media (min-height: 690px) and (max-heigth: 696px) {
    .input-related {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 388px) {
    body {
        font-size: 0.85rem;
    }
}
