/**
 * 全局浮动转化按钮
 * 用于首页等页面的全局留资入口
 */

/* ========================================
   全局浮动转化按钮（主按钮）
======================================== */
.global-floating-cta {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.global-floating-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.floating-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #025E49 0%, #027a5e 100%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(2, 94, 73, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.floating-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 28px rgba(2, 94, 73, 0.45);
}

.floating-cta-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 16px rgba(2, 94, 73, 0.3);
}

/* 脉冲动画 - 每8秒提醒一次 */
@keyframes pulse-reminder {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(2, 94, 73, 0.35);
    }
    50% {
        box-shadow: 0 4px 20px rgba(2, 94, 73, 0.35),
                    0 0 0 8px rgba(2, 94, 73, 0.2),
                    0 0 0 16px rgba(2, 94, 73, 0.1);
    }
}

.global-floating-cta.visible .floating-cta-btn {
    animation: pulse-reminder 8s ease-in-out infinite;
}

/* ========================================
   返回顶部按钮（辅助按钮）
======================================== */
.back-to-top-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 998;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.back-to-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top-btn button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    background: #6B7280;
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.back-to-top-btn button:hover {
    background: #4B5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top-btn button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-to-top-btn button svg {
    transition: transform 0.3s ease;
}

.back-to-top-btn button:hover svg {
    transform: translateY(-2px);
}

/* ========================================
   移动端适配
======================================== */
@media (max-width: 768px) {
    .global-floating-cta {
        right: 16px;
        bottom: 70px;
    }

    .floating-cta-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .back-to-top-btn {
        right: 16px;
        bottom: 16px;
    }

    .back-to-top-btn button {
        padding: 11px 18px;
        font-size: 13px;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .global-floating-cta {
        right: 12px;
        bottom: 65px;
    }

    .floating-cta-btn {
        padding: 11px 18px;
        font-size: 13px;
        gap: 6px;
    }

    .back-to-top-btn {
        right: 12px;
        bottom: 12px;
    }

    .back-to-top-btn button {
        padding: 10px 16px;
        font-size: 12px;
        gap: 4px;
    }
}
