/* ===== 暗黑赛博朋克主题 ===== */

/* 自定义颜色变量 */
:root {
    --purple-500: #8b5cf6;
    --purple-600: #7c3aed;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --neon-purple: #bf5af2;
    --neon-blue: #5ac8fa;
    --neon-green: #30d158;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Rajdhani', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

/* 字体 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', 'Noto Sans SC', sans-serif;
}

/* Particles背景 */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a1a 100%);
}

/* 导航链接 */
.nav-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #8b5cf6;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    transition: width 0.3s ease;
}

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

/* 卡片玻璃拟态 */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

/* 霓虹文字 */
.neon-text {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5),
                 0 0 20px rgba(139, 92, 246, 0.3),
                 0 0 30px rgba(139, 92, 246, 0.2);
}

/* 霓虹边框 */
.neon-border {
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3),
                inset 0 0 10px rgba(139, 92, 246, 0.1);
}

/* 渐变按钮 */
.gradient-btn {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border: none;
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gradient-btn::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;
}

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

.gradient-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

/* 打字机效果 */
.typewriter {
    display: inline-block;
    border-right: 2px solid #8b5cf6;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: #8b5cf6; }
}

/* 脉冲动画 */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 浮动动画 */
.float {
    animation: float 3s ease-in-out infinite;
}

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

/* 扫描线效果 */
.scanline {
    position: relative;
    overflow: hidden;
}

.scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(139, 92, 246, 0.05) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
}

/* 网格背景 */
.grid-bg {
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #06b6d4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c3aed, #0891b2);
}

/* 代码块样式 */
.code-block {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Fira Code', 'Courier New', monospace;
    overflow-x: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* 动画延迟 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

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

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

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

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

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

/* 应用动画到卡片 */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.8s ease-out forwards;
    opacity: 0;
}

/* 卡片悬浮增强效果 */
.glass-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

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

.glass-card:hover .icon-wrapper {
    animation: glow 2s infinite;
}

.glass-card:hover .icon-wrapper svg {
    animation: iconSpin 3s linear infinite;
}

/* 按钮闪光动画 */
@keyframes buttonShine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

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

/* Hero区域动画 */
@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    75% {
        transform: translateY(5px) rotate(-1deg);
    }
}

.hero-float {
    animation: heroFloat 6s ease-in-out infinite;
}

/* 霓虹脉冲效果 */
@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(139, 92, 246, 0.5), 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(139, 92, 246, 0.8), 0 0 40px rgba(139, 92, 246, 0.5), 0 0 60px rgba(139, 92, 246, 0.3);
    }
}

.neon-pulse {
    animation: neonPulse 2s ease-in-out infinite;
}
