/* NavHub 首页样式 - GitHub风格 */

/* 自定义动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 首页特定样式 */
.hero-section {
    animation: fadeIn 1s ease-in-out;
}

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

.feature-card:hover {
    transform: translateY(-5px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-section p {
        font-size: 1.1rem !important;
    }
}

/* GitHub风格增强 */
.github-card {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.github-card:hover {
    border-color: #9ca3af;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* GitHub风格按钮 */
.btn-github-primary {
    background: #1f2937;
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn-github-primary:hover {
    background: #111827;
    transform: translateY(-1px);
}

.btn-github-secondary {
    background: white;
    color: #1f2937;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.btn-github-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* CTA 按钮增强 */
.btn-cta {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-cta::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.6s;
}

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

/* 导航栏增强 */
nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 统计数字动画 */
.stat-number {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.stat-number:nth-child(1) { animation-delay: 0.1s; }
.stat-number:nth-child(2) { animation-delay: 0.2s; }
.stat-number:nth-child(3) { animation-delay: 0.3s; }

/* 特色卡片动画 */
.feature-grid .card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.feature-grid .card:nth-child(1) { animation-delay: 0.1s; }
.feature-grid .card:nth-child(2) { animation-delay: 0.2s; }
.feature-grid .card:nth-child(3) { animation-delay: 0.3s; }
.feature-grid .card:nth-child(4) { animation-delay: 0.4s; }
.feature-grid .card:nth-child(5) { animation-delay: 0.5s; }
.feature-grid .card:nth-child(6) { animation-delay: 0.6s; }

/* 用户评价卡片 */
.testimonial-card {
    animation: fadeInUp 0.7s ease-out;
    animation-fill-mode: both;
}

.testimonial-card:nth-child(1) { animation-delay: 0.2s; }
.testimonial-card:nth-child(2) { animation-delay: 0.4s; }
.testimonial-card:nth-child(3) { animation-delay: 0.6s; }

/* 移动端优化 */
@media (max-width: 640px) {
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .bg-gradient-to-br {
        background: linear-gradient(135deg, 
            hsl(var(--b1)) 0%, 
            hsl(var(--b3)) 100%);
    }
}

/* 字体优化 */
body {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 1, "lnum" 0, "dlig" 0;
}

/* 链接悬停效果 */
a {
    transition: color 0.2s ease;
}

/* 图标悬停效果 */
[data-lucide] {
    transition: transform 0.2s ease;
}

.btn:hover [data-lucide] {
    transform: translateX(2px);
}

/* 页脚链接样式 */
footer a:hover {
    color: oklch(var(--p));
    text-decoration: underline;
}