* {
    margin: 0px;
    padding: 0px;
    font-family: /* 'Cascadia code', */
    sans-serif;
    font-size: medium;
    font-weight: bold;
    /* text-transform: uppercase; */
}

:root {
    --lightgray: #efefef;
    --white: #fff;
    --black: rgba(0, 0, 0, 0.8);
    --bounceEasing: cubic-bezier(0.51, 0.92, 0.24, 1.15);
}

nav {
    background-image: linear-gradient(#614385, #516395);
    color: white;
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 30% 60%;
    grid-template-columns: 30% 60%;
    -webkit-column-gap: 10%;
    column-gap: 10%;
    padding: 0% 5%;
}

nav .array-inputs {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 60% 40%;
    grid-template-columns: 60% 40%;
    place-content: center;
    padding: 5% 0%;
}

nav .array-inputs #array_size {
    padding: 5% 0%;
}

#home {
    margin-top: 10px;
    cursor: pointer;
    position: absolute;
    left: 90%;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-ms-track {
    width: 100%;
    cursor: pointer;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

/* Chrome */

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: 1px solid #000000;
    height: 30px;
    width: 16px;
    border-radius: 3px;
    background-image: linear-gradient(#614385, #516395);
    cursor: pointer;
    margin-top: -14px;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}

/* Firefox */

input[type=range]::-moz-range-thumb {
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    border: 1px solid #000000;
    height: 30px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}

/* IE */

input[type=range]::-ms-thumb {
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    border: 1px solid #000000;
    height: 30px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    background-image: linear-gradient(to bottom right, #20BF55, #01BAEF);
    border-radius: 5px;
    border: 0.1px solid #01BAEF;
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background-image: linear-gradient(to bottom right, #20BF55, #01BAEF);
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    background-image: linear-gradient(to bottom right, #20BF55, #01BAEF);
    border-radius: 1.3px;
    border: 0.2px solid #010101;
}

input[type=range]::-ms-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;
    background: transparent;
    border-color: transparent;
    border-width: 16px 0;
    color: transparent;
}

input[type=range]::-ms-fill-lower {
    background: #2a6495;
    border: 0.2px solid #010101;
    border-radius: 2.6px;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}

input[type=range]:focus::-ms-fill-lower {
    background-image: linear-gradient(to bottom right, #20BF55, #01BAEF);
}

input[type=range]::-ms-fill-upper {
    background-image: linear-gradient(to bottom right, #20BF55, #01BAEF);
    border: 0.2px solid #010101;
    border-radius: 2.6px;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}

input[type=range]:focus::-ms-fill-upper {
    background-image: linear-gradient(to bottom right, #20BF55, #01BAEF);
}

nav .array-inputs #sorting_speed {
    padding: 5% 0%;
}

nav .array-inputs #generate_array {
    background-color: transparent;
    border: none;
    outline: none;
    color: white;
    padding: 4% 0% 0% 0%;
    padding-left: 20%;
}

nav .array-inputs #generate_array:hover {
    cursor: pointer;
}

nav .header_right {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

nav .header_right .nav-heading {
    display: inline-block;
    font-size: xx-large;
    padding: 3% 0%;
}

nav .header_right .algos {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (16.66667%);
    grid-template-columns: repeat(6, 16.66667%);
    place-content: center;
    padding: 2% 0%;
}

nav .header_right .algos button {
    background-color: transparent;
    border: none;
    color: white;
    outline: none;
    padding: 5% 0%;
    -webkit-transition: all .2s ease;
    transition: all .2s ease
}

nav .header_right .algos button:hover {
    background-color: #D23FF6;
    cursor: pointer;
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
}

nav .header_right .algos .disabled {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
}

section {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 20% 80%;
    grid-template-columns: 20% 80%;
}

section #legends {
    padding: 20% 0%;
    height: 140px;
    display: flex;
    margin-top: 20%;
    margin-left: 5%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rebeccapurple;
}

section #array_container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: 85%;
    height: 70vh;
    margin-left: 30px;
    margin-right: 30px;
}

#legends button {
    text-align: center;
    font-size: 16px;
    margin: 8px 0px;
    color: white;
    width: 200px;
}

.down-arrow {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    margin-top: -5%;
    margin-bottom: 5%;
}

.chevron {
    position: absolute;
    width: 28px;
    height: 8px;
    opacity: 0;
    transform: scale3d(0.5, 0.5, 0.5);
    animation: move 3s ease-out infinite;
}

.chevron:first-child {
    animation: move 3s ease-out 1s infinite;
}

.chevron:nth-child(2) {
    animation: move 3s ease-out 2s infinite;
}

.chevron:before, .chevron:after {
    content: ' ';
    position: absolute;
    top: 0;
    height: 100%;
    width: 51%;
    background: linear-gradient(to bottom right, #3859B2, #D23FF6);
}

.chevron:before {
    left: 0;
    transform: skew(0deg, 30deg);
}

.chevron:after {
    right: 0;
    width: 50%;
    transform: skew(0deg, -30deg);
}

@keyframes move {
    25% {
        opacity: 1;
    }
    33% {
        opacity: 1;
        transform: translateY(30px);
    }
    67% {
        opacity: 1;
        transform: translateY(40px);
    }
    100% {
        opacity: 0;
        transform: translateY(55px) scale3d(0.5, 0.5, 0.5);
    }
}

.text {
    display: block;
    margin-top: 125px;
    font-family: sans-serif;
    font-size: 12px;
    color: #000;
    text-transform: uppercase;
    white-space: nowrap;
}

/* MODAL  */

.open-modal {
    font-weight: bold;
    background: var(--blue);
    color: var(--white);
    padding: 0.75rem 1.75rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--black);
    cursor: pointer;
    visibility: hidden;
    opacity: 1;
    transition: all 0.35s ease-in;
}

.modal.is-visible {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    color: red;
    font-size: 14px;
}

.modal-dialog {
    position: relative;
    max-width: 82vh;
    max-height: 80vh;
    border-radius: 5px;
    background: var(--white);
    overflow: auto;
    cursor: default;
}

.modal-dialog>* {
    padding: 1rem;
}

.modal-header, .modal-footer {
    background: var(--lightgray);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    font-size: 14px;
}

.modal-header .close-modal {
    font-size: 1rem;
}

/* ANIMATIONS
–––––––––––––––––––––––––––––––––––––––––––––––––– */

[data-animation] .modal-dialog {
    opacity: 0;
    transition: all 0.5s var(--bounceEasing);
}

[data-animation].is-visible .modal-dialog {
    opacity: 1;
    transition-delay: 0.2s;
}

[data-animation="slideInOutDown"] .modal-dialog {
    transform: translateY(100%);
}

[data-animation="slideInOutTop"] .modal-dialog {
    transform: translateY(-100%);
}

[data-animation="slideInOutLeft"] .modal-dialog {
    transform: translateX(-100%);
}

[data-animation="slideInOutRight"] .modal-dialog {
    transform: translateX(100%);
}

[data-animation="zoomInOut"] .modal-dialog {
    transform: scale(0.2);
}

[data-animation="rotateInOutDown"] .modal-dialog {
    transform-origin: top left;
    transform: rotate(-1turn);
}

[data-animation="mixInAnimations"].is-visible .modal-dialog {
    animation: mixInAnimations 2s 0.2s linear forwards;
}

[data-animation="slideInOutDown"].is-visible .modal-dialog, [data-animation="slideInOutTop"].is-visible .modal-dialog, [data-animation="slideInOutLeft"].is-visible .modal-dialog, [data-animation="slideInOutRight"].is-visible .modal-dialog, [data-animation="zoomInOut"].is-visible .modal-dialog, [data-animation="rotateInOutDown"].is-visible .modal-dialog {
    transform: none;
}

.about {
    background-color: #fff;
    border: 0;
    outline: 0;
    padding: 8px;
    font-size: 1.2rem;
    color: white;
    font-family: monospace;
    box-shadow: 2px 5px 10px #0057ab;
    transition: all 0.3s;
    cursor: pointer;
    border-radius: 5px;
}

.about:hover {
    box-shadow: 0px 15px 25px -5px #0057ab;
    transform: scale(1.03);
}

.about:active {
    box-shadow: 0px 4px 8px #0065c8;
    transform: scale(0.98);
}

@media only screen and (max-width: 600px) {
    section {
        display: block;
    }
    section #array_container {
        margin: 0px;
    }
    nav .array-inputs {
        display: flex;
        flex-direction: column;
    }
    nav .array-inputs p {
        display: none;
    }
    nav .array-inputs input {
        margin-top: 5px;
    }
    nav .array-inputs #generate_array {
        padding-left: 4%;
    }
    nav .header_right .algos button {
        font-size: 8px;
    }
    nav .header_right .algos {
        display: block;
    }
    .down-arrow {
        margin-top: -30%;
    }
}

.icon-row {
    display: flex;
    flex-direction: row;
    margin-left: 85%;
}

.icon-row img {
    margin-left: 30px;
    cursor: pointer;
}