.sofara-backtotop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.3);
}

.sofara-backtotop--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sofara-backtotop:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.45);
    background: var(--primary-dark);
}

.sofara-backtotop::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: rgba(var(--primary-rgb), 0.1);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sofara-backtotop:hover::before {
    opacity: 1;
}

@media (max-width: 576px) {
    .sofara-backtotop {
        bottom: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 0.95rem;
    }
}