/**
 * 回到顶部按钮样式
 * 全局浮动按钮，滚动时显示
 */

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-5px);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top i {
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .back-to-top {
        right: 20px;
        bottom: 60px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        right: 15px;
        bottom: 50px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top i {
        font-size: 18px;
    }
}

/* 动画效果 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.back-to-top.show {
    animation: bounceIn 0.5s ease;
}

/* 可选的不同颜色主题 */
.back-to-top.theme-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.back-to-top.theme-blue:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.back-to-top.theme-orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 12px rgba(250, 112, 154, 0.4);
}

.back-to-top.theme-orange:hover {
    background: linear-gradient(135deg, #fee140 0%, #fa709a 100%);
    box-shadow: 0 6px 20px rgba(250, 112, 154, 0.6);
}

.back-to-top.theme-green {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    box-shadow: 0 4px 12px rgba(48, 207, 208, 0.4);
}

.back-to-top.theme-green:hover {
    background: linear-gradient(135deg, #330867 0%, #30cfd0 100%);
    box-shadow: 0 6px 20px rgba(48, 207, 208, 0.6);
}

/* 避免与其他固定元素冲突 */
.back-to-top {
    pointer-events: auto;
}

.back-to-top:not(.show) {
    pointer-events: none;
}

