/* 爱卡云 - 高级动画与交互效果 */

/* 滚动渐入动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,82,217,0.4); }
    50% { box-shadow: 0 0 0 15px rgba(0,82,217,0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0,82,217,0.3); }
    50% { box-shadow: 0 0 40px rgba(0,82,217,0.6); }
}

/* 滚动触发动画类 */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) !important;
}

.animate-fade-up {
    transform: translateY(30px);
}

.animate-fade-left {
    transform: translateX(-30px);
}

.animate-fade-right {
    transform: translateX(30px);
}

.animate-scale {
    transform: scale(0.9);
}

/* Banner高级效果 */
.aikayun-banner {
    position: relative;
    overflow: hidden;
}

.aikayun-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: gradientMove 15s ease infinite;
    background-size: 400% 400%;
}

.aikayun-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(81,212,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(20,102,237,0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* 粒子背景效果 */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

/* 产品卡片高级悬停效果 */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.product-card:hover::before {
    left: 100%;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #002ab1, #0052d9, #1466ed, #51d4ff);
    background-size: 300% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 2;
}

.product-card:hover::after {
    transform: scaleX(1);
    animation: shimmer 2s linear infinite;
}

/* 热门标签动画 */
.product-card.hot .hot-badge {
    animation: pulse 2s infinite;
}

/* 优势卡片3D效果 */
.feature-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px) rotateX(2deg);
}

.feature-card .feature-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    animation: glow 2s ease infinite;
}

/* 数据中心卡片 */
.datacenter-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.datacenter-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0,82,217,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    border-radius: 50%;
}

.datacenter-card:hover::before {
    width: 200%;
    height: 200%;
}

.datacenter-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: #0052d9;
}

/* 按钮高级效果 */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-white {
    position: relative;
    overflow: hidden;
}

.btn-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,82,217,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-white:hover::before {
    left: 100%;
}

/* CTA区域动画 */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: gradientMove 10s ease infinite;
    background-size: 400% 400%;
}

/* 导航栏毛玻璃效果增强 */
.aikayun-header.scrolled {
    background: rgba(255,255,255,0.88) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

/* 解决方案切换动画 */
.solution-content {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.solution-content.switching {
    opacity: 0;
    transform: translateX(20px);
}

/* 价格数字动画 */
.price {
    background: linear-gradient(135deg, #002ab1, #0052d9, #1466ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 标签徽章 */
.badge {
    position: relative;
    overflow: hidden;
}

.badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
}

/* 统计数字 */
.aikayun-banner-stat h3 {
    background: linear-gradient(135deg, #fff, #51d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 页脚链接下划线动画 */
.aikayun-footer a {
    position: relative;
}

.aikayun-footer ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #51d4ff;
    transition: width 0.3s ease;
}

.aikayun-footer ul li a:hover::after {
    width: 100%;
}

/* 侧边工具栏 */
.aside-tools > div {
    position: relative;
    overflow: hidden;
}

.aside-tools > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0052d9, #1466ed);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aside-tools > div:hover::before {
    opacity: 1;
}

.aside-tools > div:hover span {
    color: white;
    position: relative;
    z-index: 1;
}

/* 产品分类标签 */
.product-tab {
    position: relative;
    transition: all 0.3s ease;
}

.product-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #002ab1, #0052d9, #1466ed);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.product-tab.active::after {
    width: 60%;
}

/* 解决方案标签 */
.solution-tab {
    position: relative;
    transition: all 0.3s ease;
}

.solution-tab.active {
    background: linear-gradient(135deg, #002ab1, #0052d9) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0,82,217,0.3) !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f7fa;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0052d9, #1466ed);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #002ab1, #0052d9);
}

/* 选中文字颜色 */
::selection {
    background: rgba(0,82,217,0.2);
    color: #0052d9;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
