/* 渐变背景动画 */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    position: relative;
    overflow-x: hidden;
    background-color: #ffffff;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(24, 144, 255, 0.15), 
        rgba(255, 255, 255, 0.9), 
        rgba(0, 210, 180, 0.15), 
        rgba(255, 255, 255, 0.9), 
        rgba(24, 144, 255, 0.15));
    background-size: 300% 300%;
    z-index: -1;
    animation: gradientBG 10s ease infinite;
}

/* 标题颜色渐变动画 */
@keyframes colorShift {
    0% {
        color: #1890ff;
        text-shadow: 0 0 5px rgba(24, 144, 255, 0.3);
    }
    25% {
        color: #36a6ff;
        text-shadow: 0 0 10px rgba(54, 166, 255, 0.4);
    }
    50% {
        color: #00d2b4;
        text-shadow: 0 0 15px rgba(0, 210, 180, 0.5);
    }
    75% {
        color: #36a6ff;
        text-shadow: 0 0 10px rgba(54, 166, 255, 0.4);
    }
    100% {
        color: #1890ff;
        text-shadow: 0 0 5px rgba(24, 144, 255, 0.3);
    }
}

@keyframes expandWidth {
    0% {
        width: 0;
    }
    100% {
        width: 180px;
    }
}

.logo {
    animation: colorShift 6s ease-in-out infinite;
    position: relative;
}

.logo::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #1890ff, #00d2b4, #1890ff);
    background-size: 200% 100%;
    animation: gradientBorder 3s ease infinite, expandWidth 2s ease-out forwards;
}

/* 卡片发光效果 */
@keyframes cardGlow {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 25px rgba(24, 144, 255, 0.25);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

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

.optimization-card {
    position: relative;
    overflow: hidden;
}

.optimization-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1890ff, #00d2b4, #1890ff);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientBorder 3s ease infinite;
}

.optimization-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to top, rgba(24, 144, 255, 0.05), transparent);
    transition: height 0.5s ease;
    z-index: -1;
}

.optimization-card:hover {
    animation: cardGlow 3s infinite;
}

.optimization-card:hover::before {
    opacity: 1;
}

.optimization-card:hover::after {
    height: 100%;
}

/* 标题渐变效果 */
@keyframes titleGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.optimization-card .title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    color: #1890ff; /* 默认颜色，确保在不支持渐变的情况下也有颜色 */
    background: linear-gradient(90deg, #1890ff, #00d2b4, #1890ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* 标准语法 */
    /* text-fill-color不是标准属性，只使用-webkit前缀版本 */
    animation: titleGradient 6s linear infinite;
    transition: all 0.3s ease;
}

.optimization-card:hover .title {
    transform: scale(1.05);
    text-shadow: 0 0 8px rgba(24, 144, 255, 0.3);
}

/* 图标动画效果 */
@keyframes iconPulse {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0.8;
    }
}

.optimization-card .icon {
    transition: all 0.3s ease;
}

.optimization-card:hover .icon {
    animation: iconPulse 2s ease infinite;
    background: linear-gradient(90deg, #1890ff, #00d2b4, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* 标准语法 */
    /* text-fill-color不是标准属性，只使用-webkit前缀版本 */
    background-size: 200% auto;
}

/* 大脑卡片效果 */
.brain-card {
    position: relative;
    overflow: hidden;
}

.brain-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1890ff, #00d2b4, #1890ff);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientBorder 3s ease infinite;
}

.brain-card:hover {
    animation: cardGlow 3s infinite;
}

.brain-card:hover::before {
    opacity: 1;
}

.brain-card .title {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    color: #1890ff; /* 默认颜色，确保在不支持渐变的情况下也有颜色 */
    background: linear-gradient(90deg, #1890ff, #00d2b4, #1890ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* 标准语法 */
    /* text-fill-color不是标准属性，只使用-webkit前缀版本 */
    animation: titleGradient 6s linear infinite;
    transition: all 0.3s ease;
}

.brain-card:hover .title {
    transform: scale(1.05);
    text-shadow: 0 0 8px rgba(24, 144, 255, 0.3);
}

.brain-card .icon {
    transition: all 0.3s ease;
}

.brain-card:hover .icon {
    animation: iconPulse 2s ease infinite;
    background: linear-gradient(90deg, #1890ff, #00d2b4, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* 标准语法 */
    /* text-fill-color不是标准属性，只使用-webkit前缀版本 */
    background-size: 200% auto;
}

/* 列表项动画 */
@keyframes featureHighlight {
    0% {
        color: #666;
        transform: translateX(0);
    }
    50% {
        color: #1890ff;
        transform: translateX(3px);
    }
    100% {
        color: #666;
        transform: translateX(0);
    }
}

.brain-card .features li {
    transition: all 0.3s ease;
}

.brain-card:hover .features li {
    animation: featureHighlight 2s ease infinite;
    animation-delay: calc(0.1s * var(--i, 0));
}

.brain-card:hover .features li:before {
    animation: iconPulse 2s ease infinite;
    animation-delay: calc(0.1s * var(--i, 0));
    background: linear-gradient(90deg, #1890ff, #00d2b4, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* 标准语法 */
    /* text-fill-color不是标准属性，只使用-webkit前缀版本 */
    background-size: 200% auto;
}

/* 为每个列表项添加不同的延迟 */
.brain-card .features li:nth-child(1) {
    --i: 1;
}
.brain-card .features li:nth-child(2) {
    --i: 2;
}
.brain-card .features li:nth-child(3) {
    --i: 3;
}
.brain-card .features li:nth-child(4) {
    --i: 4;
}

/* 页面标题效果 */
h2 {
    position: relative;
    display: inline-block;
    color: #1890ff; /* 默认颜色，确保在不支持渐变的情况下也有颜色 */
    background: linear-gradient(90deg, #1890ff, #00d2b4, #1890ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* 标准语法 */
    /* text-fill-color不是标准属性，只使用-webkit前缀版本 */
    animation: titleGradient 6s linear infinite;
    transition: all 0.3s ease;
}

/* 语言切换器样式 */
@keyframes selectGlow {
    0% {
        box-shadow: 0 0 0 rgba(24, 144, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(24, 144, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 0 rgba(24, 144, 255, 0.2);
    }
}

@keyframes langSwitcherFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.language-switcher::before {
    content: "🌐";
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    animation: langSwitcherFloat 3s ease infinite;
}

.language-switcher select {
    padding: 8px 15px;
    border: 2px solid transparent;
    border-radius: 20px;
    background: white;
    color: #1890ff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    background-image: linear-gradient(white, white), 
                      linear-gradient(90deg, #1890ff, #00d2b4);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.language-switcher select:hover {
    background-image: linear-gradient(white, white), 
                      linear-gradient(90deg, #1890ff, #00d2b4, #1890ff);
    animation: selectGlow 2s infinite;
    transform: scale(1.05);
    color: #00d2b4;
}

.language-switcher select:focus {
    outline: none;
    animation: selectGlow 2s infinite;
}

/* 页脚链接效果 */
@keyframes linkGlow {
    0% {
        text-shadow: 0 0 0 rgba(24, 144, 255, 0);
    }
    50% {
        text-shadow: 0 0 15px rgba(24, 144, 255, 0.6);
    }
    100% {
        text-shadow: 0 0 0 rgba(24, 144, 255, 0);
    }
}

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

footer {
    position: relative;
    padding: 20px 0;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #1890ff, #00d2b4, #1890ff, rgba(255, 255, 255, 0));
    background-size: 200% 100%;
    animation: footerGradient 5s ease infinite;
}