.scroll-to-top-arrow {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0BF9C5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(11, 249, 197, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    outline: none;
    user-select: none;
}

.scroll-to-top-arrow::before {
    content: '';
    width: 16px;
    height: 16px;
    border-top: 3px solid #000;
    border-right: 3px solid #000;
    transform: rotate(-45deg);
    margin-top: 4px;
    transition: all 0.3s ease;
}

.scroll-to-top-arrow.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top-arrow:hover {
    background: #000;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.scroll-to-top-arrow:hover::before {
    border-color: #0BF9C5;
}

.scroll-to-top-arrow:active {
    transform: translateY(-1px) scale(0.95);
    box-shadow: 0 2px 15px rgba(11, 249, 197, 0.4);
}

.scroll-to-top-arrow:focus {
    outline: 2px solid #0BF9C5;
    outline-offset: 3px;
}

.scroll-to-top-arrow.pulse {
    animation: scroll-pulse 0.6s ease-out;
}

@keyframes scroll-pulse {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 20px rgba(11, 249, 197, 0.3);
    }
    50% {
        transform: translateY(-2px) scale(1.1);
        box-shadow: 0 8px 30px rgba(11, 249, 197, 0.5);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 20px rgba(11, 249, 197, 0.3);
    }
}

.scroll-to-top-arrow.scrolling {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: scroll-rotating 0.8s ease-in-out;
}

.scroll-to-top-arrow.scrolling::before {
    border-color: #0BF9C5;
}

@keyframes scroll-rotating {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

@media (max-width: 768px) {
    .scroll-to-top-arrow {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .scroll-to-top-arrow::before {
        width: 14px;
        height: 14px;
        border-width: 2.5px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top-arrow {
        bottom: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
    }
    
    .scroll-to-top-arrow::before {
        width: 12px;
        height: 12px;
        border-width: 2px;
        margin-top: 3px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .scroll-to-top-arrow {
        bottom: 25px;
        right: 25px;
        width: 48px;
        height: 48px;
    }
}

@media (min-width: 1200px) {
    .scroll-to-top-arrow {
        bottom: 40px;
        right: 40px;
        width: 55px;
        height: 55px;
    }
    
    .scroll-to-top-arrow::before {
        width: 18px;
        height: 18px;
        border-width: 3.5px;
    }
}

body.likhun-dark .scroll-to-top-arrow {
    background: #0BF9C5;
    box-shadow: 0 4px 20px rgba(11, 249, 197, 0.4);
}

body.likhun-dark .scroll-to-top-arrow::before {
    border-color: #000;
}

body.likhun-dark .scroll-to-top-arrow:hover {
    background: #fff;
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}

body.likhun-dark .scroll-to-top-arrow:hover::before {
    border-color: #0BF9C5;
}

body.likhun-dark .scroll-to-top-arrow.scrolling {
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.likhun-dark .scroll-to-top-arrow.scrolling::before {
    border-color: #0BF9C5;
}

.scroll-to-top-arrow {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-to-top-arrow {
        transition: opacity 0.3s ease;
    }
    
    .scroll-to-top-arrow.pulse,
    .scroll-to-top-arrow.scrolling {
        animation: none;
    }
    
    .scroll-to-top-arrow:hover {
        transform: none;
    }
}