/* 
 * CTA按钮组件样式
 * 包含所有按钮相关的样式、容器和动画效果
 */

/* 固定底部容器 - 悬浮效果 */
.fixed-bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.95) 20%, rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cta-container {
    max-width: 375px;
    margin: 0 auto;
}

.cta-button {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border: none;
    border-radius: 24px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
    
    /* 呼吸动画 */
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    }
}

.cta-button:active {
    transform: scale(0.98);
    animation-play-state: paused;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    will-change: transform, opacity;
    transform: translateZ(0); /* 启用硬件加速 */
    opacity: 0;
    transition: left 0.5s ease-out, opacity 0.3s ease-out;
}

/* 悬停时的扫光效果（保持原有功能） */
.cta-button:hover::before {
    left: 120%;
    opacity: 1;
}

/* 自动扫光动画 */
.cta-button.auto-shine::before {
    animation: autoShine 0.8s ease-out;
}

@keyframes autoShine {
    0% { 
        left: -120%; 
        opacity: 0;
    }
    20% { 
        left: -60%; 
        opacity: 0.6;
    }
    50% { 
        left: 0%; 
        opacity: 1;
    }
    80% { 
        left: 60%; 
        opacity: 0.6;
    }
    100% { 
        left: 120%; 
        opacity: 0;
    }
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.cta-helper-text {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.3;
}

/* 响应式设计 */
@media (min-width: 375px) {
    .cta-container {
        max-width: 400px;
    }
}

@media (min-width: 414px) {
    .cta-container {
        max-width: 440px;
    }
}

@media (min-width: 768px) {
    .cta-container {
        max-width: 600px;
        padding: 0 20px;
    }
    
    .cta-button {
        font-size: 18px;
        height: 52px;
    }
    
    .fixed-bottom-cta {
        padding: 20px 40px;
    }
} 