/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 7rem;          /* 与咨询按钮错开，避免重叠 */
    right: 2.5rem;
    z-index: 9998;         /* 低于弹窗（99999），高于普通内容 */
    display: none;         /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s;
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(79, 70, 229, 0.9);
    transform: scale(1.05);
}

.back-to-top:active {
    transform: scale(0.92);
}

/* 移动端适配：按钮稍小，位置调整 */
@media (max-width: 640px) {
    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 6rem;
        right: 1.5rem;
    }
    .back-to-top svg {
        width: 22px;
        height: 22px;
    }
}