.app-back-to-top {
    --back-to-top-bottom: 30px;
    position: fixed;
    right: 30px;
    bottom: var(--back-to-top-bottom);
    z-index: 9999;
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #1a2332;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .4s cubic-bezier(.25, .46, .45, .94);
    pointer-events: none;
}

.app-back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    animation: backToTopBounceInUp .6s cubic-bezier(.25, .46, .45, .94) forwards;
    pointer-events: auto;
}

.app-back-to-top:hover {
    background: #3498db;
    transform: scale(1.1) !important;
    box-shadow: 0 8px 30px rgba(52, 152, 219, .4);
}

.app-back-to-top:active {
    transform: scale(.95) !important;
}

.app-back-to-top:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}

@keyframes backToTopBounceInUp {
    0% { opacity: 0; transform: translateY(40px) scale(.8); }
    60% { opacity: 1; transform: translateY(-8px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .app-back-to-top { transition-duration: .01ms; }
    .app-back-to-top.show { animation: none; }
}
