/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

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

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.6);
}

#back-to-top:active {
    transform: translateY(-2px);
}

#back-to-top svg {
    width: 24px;
    height: 24px;
    color: #0a1628;
    display: block;
    margin: 0 auto;
}

/* Animation on hover */
#back-to-top:hover svg {
    animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    #back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Pulse animation when first appears */
@keyframes pulse {
    0% {
        box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 5px 30px rgba(0, 212, 255, 0.8);
    }
    100% {
        box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
    }
}

#back-to-top.show {
    animation: pulse 2s ease-in-out 3;
}