/* =========================================
   全局返回顶部悬浮按钮
   ========================================= */

.cen-back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f08519;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

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

.cen-back-to-top:hover {
    background: #d97711;
}

.cen-back-to-top svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.cen-back-to-top__text {
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

/* 有文字时按钮稍大 */
.cen-back-to-top:has(.cen-back-to-top__text) {
    width: auto;
    height: auto;
    min-width: 48px;
    padding: 10px 14px;
    border-radius: 24px;
}

@media (max-width: 768px) {
    .cen-back-to-top {
        right: 16px;
        bottom: 16px;
    }
}
