body{
    font-family: arial;
    margin: 20px 0 30px;
    padding: 0;
}
.sort-blocks{
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 90%;
    margin: 0 auto;
}
.sort-blocks p{
    margin: 5px 0;
    font-size: 14px;
    font-style: italic;
}
#method{
    padding: 10px;
    text-align: дуае;
    width: 310px;
    border-radius: 7px;
    background: #fff;
    margin-bottom: 20px;
}
.input-block{
    display: flex;
    align-items: center;
    font-size: 25px;
    margin: 10px;
    justify-content: center;
}
.btn-input-block{
    width: 30px;
    margin: 8px 5px 0px;
}
.btn-input-block img{
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-input-block:first-child{
    animation: btn-anim 4s infinite ease-in-out;
}
@keyframes btn-anim {
    0% {transform: rotate(0deg)}
    10% { transform: rotate(-30deg)}
    18% {transform: rotate(8deg)}
    20% {transform: rotate(0deg)}
}
.btn-input-block:first-child:hover{
   animation-play-state: paused;
}
.btn-random:hover {
    transform: rotate(-20deg)  scale(1.1);
}

.btn-clear{
    border-radius: 8px;
    padding: 0px;
}
.btn-clear:hover {
    box-shadow: 0 0 0 0px white, 0 0 0 2px #3C82F8;
}
.title-complete-array{
    margin-bottom: 2px !important;
}
.empty-array{
    border-bottom: 2px dashed #ff0909;
    margin-bottom: 0px !important;
    color: #ff0909;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    --webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    --moz-appearance: textfield;
}
input[type="number"]:hover,
input[type="number"]:focus {
    --moz-appearance: number-input;
}
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
.input-sort{
    width: 29px;
    height: 23px;
    padding: 3px 1px;
    text-align: center;
    font-size: 11px;
    margin: 0 2px;
}
canvas{
    max-width: 510px;
}
.speed-block{
    margin: 17px 0 6px;
    font-style: italic;
    font-size: 14px;
}
.speed-btn:after{
    content: "c";
    font-style: italic;
}
.speed-btn{
    cursor: pointer;
    margin: 0px 4px;
    font-size: 12px;
    font-style: normal;
    border: 1px solid #000;
    border-radius: 6px;
    padding: 3px 4px;
    transition: all 0.2s;
}
.speed-btn:hover{
    box-shadow: 0 0 0 2px white, 0 0 0 4px #3C82F8;
}
#speed-btn{
    margin-top: 10px;
    display: inline-block;
}
.active{
    background: linear-gradient(45deg, #61B6F6, #017EDB);
    border: none;
    color: #fff;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #3C82F8;
    transition: all 0.2s;
}
.code-block{
    text-align: left;
    width: 470px;
    background: #e3e3e380;
    border: 1px solid #76767680;
    border-radius: 5px;
    padding: 10px 20px;
    margin: 20px 0 7px;
    color: #2d2d2d;
    box-shadow: 4px 0px 0 8px white, -5px 0 0 2px #3C82F8;
}
.code-block span{
    font-weight: 900;
    color: #000;
    position: relative;
    margin-left: 10px;
    cursor: pointer;
}
.code-block span:before {
    content: '';
    position: absolute;
    width: 1px;
    height: 0px;
    top: 3px;
    left: -13px;
    border-left: 8px solid #000;
    border-right: 8px solid #e3e3e300;
    border-top: 6px solid #e3e3e300;
    border-bottom: 6px solid #e3e3e300;
    transition: all 0.1s;
}
.active-code span:before {
    transform-origin: 25% 50%;
    transform: rotate(90deg);
    transition: all 0.1s;
}
pre{
    display: none;
}
.active-code{
    display: block;
}
button{
    border-radius: 10px;
    color: white;
    transition: .2s linear;
    background: linear-gradient(45deg, #61B6F6, #017EDB);
    border: none;
    padding: 10px 30px;
    font-size: 15px;
    text-transform: uppercase;
    margin: 20px 0 5px;
}

button:hover {
    box-shadow: 0 0 0 2px white, 0 0 0 4px #3C82F8;
}
#original-array{
    text-align: left;
    width: 500px;
    font-size: 13px;
    font-style: normal; 
    margin: 10px 0;
}
.git-link{
    margin: 0 auto;
    display: block;
    width: 35px;
}
.git-link img{
    width: 100%;
}
@media (max-width: 600px) {
    .sort-blocks {
        width: 90%;
        text-align: center;
        margin: 0 auto;
    }
    .input-block {
        font-size: 15px;
        margin: 10px 5px;
        flex-wrap: wrap;
        margin: 0 auto;
    }
    .input-sort {
        width: 26px;
        height: 21px;
        padding: 3px 0px;
        text-align: center;
        font-size: 12px;
        margin: 7px 2px;
    }
    canvas{
        max-width: 400px;
    }
    #original-array{
        max-width: 400px;
        font-size: 13px;
    }
}
@media (max-width: 550px) {
    .code-block {
        width: 370px;
        padding: 10px 10px;
        margin: 20px 0 5px;
        font-size: 14px;
    }
    .active-code pre {
        font-size: 11px;
    }
}
@media (max-width: 450px) {
    canvas {
        max-width: 300px;
    }
    #original-array{
        max-width: 300px;
        font-size: 10.5px;
    }
    .code-block {
        width: 300px;
        padding: 10px 10px;
        margin: 20px 0 5px;
        font-size: 14px;
    }
    .active-code pre {
        font-size: 9.5px;
    }
}
@media (max-width: 400px) { 
    .code-block {
        width: 270px;
        padding: 10px 10px;
        margin: 20px 0 5px;
        font-size: 14px;
    }
    .active-code pre {
        font-size: 8px;
    }
    #original-array{
        font-size: 10px;
        letter-spacing: 0;
    }
}