/* Custom Scrollbar */
::-webkit-scrollbar {
    width: .5rem;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--accent-color), transparent 20%);
    border-radius: 6px;
    border: 3px solid var(--bg-main);

    &:hover {
        background: var(--accent-color);
    }
}

::-webkit-scrollbar-corner {
    background: var(--bg-main);
}

/* Standard Scrollbar (Firefox) */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--bg-main);
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 99999;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;

    &.visible {
        opacity: 1 !important;
        visibility: visible !important;
    }

    &:hover {
        transform: translateY(-.2rem);
        color: #fff;
        box-shadow: 0 .4rem .8rem rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 2rem;
        height: 2rem;
    }
}
