/* ============================================================
   回到顶部按钮 - 优雅圆角
============================================================ */

.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 28px;
    z-index: 999;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08), 0 4px 20px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

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

.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(76,140,212,0.15), 0 10px 30px rgba(76,140,212,0.08);
}

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

/* 图标 */
.back-to-top-icon {
    width: 20px;
    height: 20px;
    color: #888;
    transition: all 0.3s ease;
}

.back-to-top:hover .back-to-top-icon {
    color: #4C8CD4;
}

/* 百分比 */
.back-to-top-percent {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #4C8CD4;
    background: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.back-to-top.show .back-to-top-percent {
    opacity: 1;
}

/* 环形进度背景 */
.back-to-top::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(#4C8CD4 var(--progress, 0%), transparent var(--progress, 0%));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
    transition: opacity 0.3s ease;
    opacity: 0;
}

.back-to-top.show::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 24px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
    .back-to-top-icon {
        width: 17px;
        height: 17px;
    }
    .back-to-top-percent {
        top: -26px;
        font-size: 10px;
        padding: 2px 6px;
    }
}