/* ==========================================
   BACK TO TOP BUTTON
   Position: Bottom Left
   ========================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9990;
    
    width: 50px;
    height: 50px;
    border-radius: 50%;
    
    background: var(--darker, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    
    cursor: pointer;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary, #ff6b35);
    border-color: var(--primary, #ff6b35);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Mobile */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .back-to-top {
            bottom: max(20px, env(safe-area-inset-bottom));
            left: max(20px, env(safe-area-inset-left));
        }
    }
}