/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 导航链接 */
.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
}

.nav-link:hover {
    color: white;
}

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

/* Hero 标题动画 */
.hero-title span {
    display: inline-block;
    animation: bounce-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
    animation-delay: calc(var(--char-index) * 0.1s);
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 淡入向上 */
.fade-in-up {
    animation: fade-in-up 1s ease-out both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滑入动画 */
.slide-in-left {
    animation: slide-in-left 1s ease-out;
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 动画按钮 */
.animated-button {
    position: relative;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.animated-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.animated-button:hover::before {
    left: 100%;
}

/* 浮动形状 */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #f093fb, #4facfe);
    bottom: 20%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, -50px) rotate(90deg);
    }
    50% {
        transform: translate(-30px, 30px) rotate(180deg);
    }
    75% {
        transform: translate(40px, 20px) rotate(270deg);
    }
}

/* 3D 卡片 */
.card-3d {
    perspective: 1000px;
    height: 300px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-inner {
    transform: rotateY(10deg) rotateX(10deg);
}

.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: box-shadow 0.3s, background 0.3s;
}

.card-3d:hover .card-front {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
}

/* 打字机效果 */
.typing-text {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #667eea;
    animation: typing 3s steps(6) infinite, blink 0.75s step-end infinite;
    width: fit-content;
    margin: 0 auto;
}

@keyframes typing {
    0%, 90%, 100% { width: 0; }
    30%, 60% { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* 故障效果 */
.glitch {
    position: relative;
    animation: glitch-anim 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-anim-1 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    color: #00ffff;
}

.glitch::after {
    animation: glitch-anim-2 0.3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    color: #ff00ff;
}

@keyframes glitch-anim {
    0%, 100% { transform: translate(0); }
}

@keyframes glitch-anim-1 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
    66% { transform: translate(2px, -2px); }
}

@keyframes glitch-anim-2 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(2px, -2px); }
    66% { transform: translate(-2px, 2px); }
}

/* 霓虹灯效果 */
.neon-text {
    color: #fff;
    text-shadow: 
        0 0 10px #667eea,
        0 0 20px #667eea,
        0 0 30px #667eea,
        0 0 40px #764ba2,
        0 0 70px #764ba2,
        0 0 80px #764ba2,
        0 0 100px #764ba2,
        0 0 150px #764ba2;
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 10px #667eea,
            0 0 20px #667eea,
            0 0 30px #667eea,
            0 0 40px #764ba2,
            0 0 70px #764ba2,
            0 0 80px #764ba2,
            0 0 100px #764ba2,
            0 0 150px #764ba2;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* 波浪文字 */
.wave-text span {
    display: inline-block;
    animation: wave 1.5s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

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

/* 涟漪按钮 */
.ripple-button {
    position: relative;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
}

.ripple-button:active {
    transform: scale(0.95);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 磁吸按钮 */
.magnetic-button {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f093fb, #4facfe);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.magnetic-button:hover {
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.5);
}

/* 脉冲按钮 */
.pulse-button {
    position: relative;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(236, 72, 153, 0);
    }
}

/* 进度条 */
.progress-container {
    position: relative;
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color), var(--color));
    border-radius: 15px;
    width: 0;
    animation: progress-fill 2s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes progress-fill {
    from { width: 0; }
    to { width: var(--progress); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    z-index: 1;
}

/* 加载动画 */
.spinner-1 {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.spinner-2 {
    width: 50px;
    height: 50px;
    border: 4px solid transparent;
    border-top-color: #667eea;
    border-right-color: #764ba2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-3 {
    width: 50px;
    height: 50px;
    border: 4px solid #667eea;
    border-radius: 50%;
    animation: spin-scale 1.5s ease-in-out infinite;
}

@keyframes spin-scale {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
        border-width: 4px;
    }
    50% { 
        transform: rotate(180deg) scale(1.5);
        border-width: 2px;
    }
}

.dots-loader {
    display: flex;
    gap: 10px;
}

.dots-loader div {
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: dots-bounce 1.4s infinite ease-in-out both;
}

.dots-loader div:nth-child(1) { animation-delay: -0.32s; }
.dots-loader div:nth-child(2) { animation-delay: -0.16s; }

@keyframes dots-bounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* 社交图标 */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: translateY(-3px);
}

/* 粒子背景容器 */
#particles {
    z-index: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    nav .flex.gap-6 {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 14px;
    }
}
