/* 返回顶部按钮样式 */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9998;
}

/* 显示状态 */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 悬停效果 */
.back-to-top:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    transform: translateY(-3px);
}

/* 按下效果 */
.back-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* 图标样式 */
.back-to-top-icon {
    width: 24px;
    height: 24px;
}

/* 脉冲动画（可选，吸引注意力） */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }
}

.back-to-top.show {
    animation: pulse 2s infinite;
}

.back-to-top:hover {
    animation: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top-icon {
        width: 20px;
        height: 20px;
    }
}

/* 避免与灯箱按钮重叠 */
.image-lightbox {
    z-index: 9999;
}
