/* Scroll to Bottom Button Styles */
.scroll-to-bottom-btn {
    position: fixed;
    bottom: 50%;
    transform: translateY(50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s infinite;
    overflow: hidden;
}

/* When at bottom, change background color */
.scroll-to-bottom-btn.at-bottom {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

/* Hover state when AT bottom */
.scroll-to-bottom-btn.at-bottom:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

/* Hover state when NOT at bottom */
.scroll-to-bottom-btn:not(.at-bottom):hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.scroll-to-bottom-btn i {
    color: white;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: bounce 1.5s infinite;
    display: inline-block;
}

/* Icon animation for arrow up */
.scroll-to-bottom-btn.at-bottom i {
    animation: bounceUp 1.5s infinite;
}

/* Icon animation for arrow down */
.scroll-to-bottom-btn.not-at-bottom i {
    animation: bounce 1.5s infinite;
}

/* Icon rotation animation */
@keyframes rotateIn {
    0% {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

/* Left positioned button */
.scroll-left {
    left: 20px;
}

/* Right positioned button */
.scroll-right {
    right: 20px;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Bounce animation for icon (down arrow) */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Bounce animation for icon (up arrow) */
@keyframes bounceUp {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .scroll-to-bottom-btn {
        width: 45px;
        height: 45px;
        bottom: 30px;
        transform: none;
        animation: none;
    }
    
    .scroll-left {
        left: 15px;
    }
    
    .scroll-right {
        right: 15px;
    }
    
    .scroll-to-bottom-btn:hover {
        transform: scale(1.05);
    }

    .scroll-to-bottom-btn i {
        animation: none;
    }
}

/* Hide on very small screens */
@media (max-width: 480px) {
    .scroll-right {
        display: none;
    }
}
