*,*::before,*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}


body {
    position: relative;
}

.scroll {
    position: fixed;
    top: 50%;
    right: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: gray;
    text-align: center;
    line-height: 80px;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    z-index: 10000;
}

.scroll.top {
    top: calc(50% - 0px);
}

.scroll.bottom {
    top: calc(50% - 80px);
}


.scroll.top.active {
    visibility: visible;
    opacity: 1;
}

.scroll.top, .scroll.bottom {
    border-radius: 50%;
    visibility: hidden;
    opacity: 0;
    transition: 0.4s;
}

.scroll.bottom.active {
    visibility: visible;
    opacity: 1;
}


