/* 循证医学博客 - 专业医学主题配色 */
/* 主色：绿色系（健康、生命）辅助色：蓝色系（专业、科学） */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #0ea5e9;
    --secondary-dark: #0284c7;
    --accent-color: #06b6d4;
    --background-color: #f0fdf4;
    --surface-color: #ffffff;
    --surface-hover: #ecfdf5;
    --text-primary: #064e3b;
    --text-secondary: #047857;
    --text-muted: #6b7280;
    --border-color: #d1fae5;
    --shadow-color: rgba(16, 185, 129, 0.1);
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
    --gradient-hero: linear-gradient(135deg, #064e3b 0%, #047857 50%, #0ea5e9 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--border-color);
    z-index: 1000;
    padding: 16px 0;
    box-shadow: 0 2px 20px var(--shadow-color);
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

/* 英雄区 */
.hero {
    background: var(--gradient-hero);
    padding: 140px 20px 80px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
}

/* 分类网格 */
.categories {
    padding: 80px 20px;
    background: var(--surface-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 16px auto 0;
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--primary-light);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.category-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 文章列表 */
.articles {
    padding: 80px 20px;
    background: var(--background-color);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.article-card {
    background: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.article-image {
    height: 180px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.article-content {
    padding: 24px;
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--surface-hover);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.article-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
}

.article-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 文章详情页 */
.article-header {
    background: var(--gradient-hero);
    padding: 120px 20px 60px;
    color: white;
    text-align: center;
}

.article-header .container {
    max-width: 800px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    background: var(--surface-color);
}

.article-body h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 20px;
    padding-left: 16px;
    border-left: 4px solid var(--primary-color);
}

.article-body h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 30px 0 15px;
}

.article-body p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.9;
}

.article-body ul, .article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.8;
}

/* 相关文章 */
.related-articles {
    padding: 60px 20px;
    background: var(--background-color);
}

/* 外链区域 */
.external-links {
    padding: 60px 20px;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.external-links h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.links-grid a {
    padding: 8px 16px;
    background: var(--surface-hover);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.links-grid a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 页脚 */
.footer {
    background: var(--gradient-hero);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-body h2 {
        font-size: 1.5rem;
    }
}

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

.category-card, .article-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(2), .article-card:nth-child(2) {
    animation-delay: 0.1s;
}

.category-card:nth-child(3), .article-card:nth-child(3) {
    animation-delay: 0.2s;
}

.category-card:nth-child(4), .article-card:nth-child(4) {
    animation-delay: 0.3s;
}
