.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, box-shadow;
}

.card-hover:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.nav-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.nav-card-dark {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.smooth-scroll {
    scroll-behavior: smooth;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-shapes::before,
.floating-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float-shapes 20s infinite linear;
}

.floating-shapes::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: -10s;
}

.floating-shapes::after {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes float-shapes {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(90deg); }
    50% { transform: translateY(-15px) rotate(180deg); }
    75% { transform: translateY(-45px) rotate(270deg); }
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.neon-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 0 40px rgba(59, 130, 246, 0.1);
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { 
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 30px rgba(59, 130, 246, 0.3), 0 0 40px rgba(59, 130, 246, 0.1);
    }
    100% { 
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8), 0 0 60px rgba(59, 130, 246, 0.6), 0 0 80px rgba(59, 130, 246, 0.4);
    }
}

.text-shadow {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.morphism-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

/* 优化边界显示 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 防止内容溢出 */
* {
    box-sizing: border-box;
}

/* 优化移动端显示 */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .nav-card {
        margin: 0 0.25rem;
        padding: 0.75rem 1rem;
    }
    
    nav {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .nav-card {
        margin: 0 0.125rem;
        padding: 0.5rem 0.75rem;
    }
    
    nav {
        padding: 0 0.25rem;
        top: 0.5rem;
    }
    
    .gradient-text {
        font-size: 0.875rem;
    }
}

/* 导航栏居中优化 */
.nav-card {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 确保导航栏在不同屏幕尺寸下居中 */
@media (min-width: 1280px) {
    .nav-card {
        max-width: 1200px;
    }
}

@media (max-width: 1279px) and (min-width: 1024px) {
    .nav-card {
        max-width: 1024px;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .nav-card {
        max-width: 768px;
    }
}

/* 导航链接hover效果优化 */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* 修复动画元素消失问题 */
.animate-fade-in,
.animate-slide-up,
.animate-scale-in {
    visibility: visible !important;
}

/* 确保动画元素在JavaScript加载前也能显示 */
.animate-fade-in:not([style*="opacity: 0"]) {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.animate-slide-up:not([style*="opacity: 0"]) {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.animate-scale-in:not([style*="opacity: 0"]) {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* 暗色模式样式 */
.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
}

.dark body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.dark .nav-card,
.dark .nav-card-dark {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.dark .nav-card a,
.dark .nav-card button,
.dark #mobile-menu a,
.dark #mobile-menu button {
    color: var(--text-secondary);
}

.dark .nav-card a:hover,
.dark .nav-card button:hover,
.dark #mobile-menu a:hover,
.dark #mobile-menu button:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}

.dark .section {
    background-color: var(--bg-primary);
}

.dark .bg-gradient-to-br {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.dark .card-hover {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.dark .text-gray-600,
.dark .text-gray-700 {
    color: var(--text-secondary);
}

.dark .text-gray-800 {
    color: var(--text-primary);
}

.dark .morphism-card {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid var(--border-color);
}

.dark .bg-white {
    background-color: var(--bg-card);
}

.dark footer {
    background-color: var(--bg-secondary);
}
