/* 自定义动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    from { text-shadow: 0 0 20px #00d4ff, 0 0 30px #00d4ff, 0 0 40px #00d4ff; }
    to { text-shadow: 0 0 30px #00d4ff, 0 0 40px #00d4ff, 0 0 50px #00d4ff; }
}

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

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 基础动画类 */
.animate-fade-in {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* 导航栏样式 */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #00d4ff;
}

.nav-link.active {
    color: #00d4ff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00d4ff;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero区域样式 */
.hero {
    background: linear-gradient(135deg, #000814 0%, #0a1628 50%, #001d3d 100%);
}

#ai-canvas {
    opacity: 0.6;
}

/* 服务卡片悬停效果 */
.service-card {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card:hover .fas {
    animation: pulse-slow 2s infinite;
}

/* AI大脑可视化 */
.ai-brain-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.ai-brain {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid #00d4ff;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: pulse-slow 3s infinite;
}

.brain-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #00d4ff;
    border-radius: 50%;
    box-shadow: 0 0 20px #00d4ff;
    animation: pulse 2s infinite;
}

.brain-node:nth-child(1) { animation-delay: 0s; }
.brain-node:nth-child(2) { animation-delay: 0.5s; }
.brain-node:nth-child(3) { animation-delay: 1s; }
.brain-node:nth-child(4) { animation-delay: 1.5s; }

.brain-connection {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.brain-connection::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    animation: rotate 15s linear infinite reverse;
}

/* 技术可视化 */
.tech-visualization {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.tech-circle {
    position: absolute;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.tech-circle-1 {
    width: 300px;
    height: 300px;
    top: 0;
    left: 0;
    animation-duration: 20s;
}

.tech-circle-2 {
    width: 200px;
    height: 200px;
    top: 50px;
    left: 50px;
    animation-duration: 15s;
    animation-direction: reverse;
}

.tech-circle-3 {
    width: 100px;
    height: 100px;
    top: 100px;
    left: 100px;
    animation-duration: 10s;
}

.tech-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-slow 3s infinite;
}

/* 滚动动画 */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 表单样式增强 */
.form-control input:focus,
.form-control textarea:focus {
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

/* 按钮悬停效果 */
.btn:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* 卡片悬停效果 */
.card:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ai-brain-container {
        width: 300px;
        height: 300px;
    }
    
    .tech-visualization {
        width: 250px;
        height: 250px;
    }
    
    .tech-circle-1 {
        width: 250px;
        height: 250px;
    }
    
    .tech-circle-2 {
        width: 170px;
        height: 170px;
        top: 40px;
        left: 40px;
    }
    
    .tech-circle-3 {
        width: 90px;
        height: 90px;
        top: 80px;
        left: 80px;
    }
}

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

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00d4ff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示样式 */
.message-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    padding: 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.message-toast.show {
    transform: translateX(0);
}

.message-toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
    border-left: 4px solid #00d4ff;
}

.message-toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-left: 4px solid #ff6b6b;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0099cc;
}