/* ===== 文章详情页样式 =====
         两版共用：article-detail.html（SSI 主版）& article-detail-1.html（旧版备份）
         ===== 1. 全局 ===== */
:root {
    --primary: #4CAF50;
    --primary-light: #81C784;
    --primary-dark: #388E3C;
    --secondary: #8BC34A;
    --accent: #CDDC39;
    --dark-bg: #121212;
    --darker-bg: #0A0A0A;
    --card-bg: #1E1E1E;
    --card-light: #252525;
    --card-border: #333333;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;
    --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 2. 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 15px 0;
    background-color: rgba(10, 10, 10, 0.98);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 28px;
}

.logo span {
    color: white;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* ===== 3. 文章详情 ===== */
.article-detail {
    padding: 140px 0 80px;
}

.article-detail .category-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.article-detail h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-detail .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    color: var(--text-secondary);
    font-size: 14px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 35px;
}

.article-detail .meta i {
    margin-right: 6px;
    color: var(--primary);
}

.article-detail .cover {
    width: 100%;
    height: 320px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1a3a1a, #2d5a2d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 40px;
}

.article-detail .content {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 2;
}

.article-detail .content h2 {
    color: var(--text-primary);
    font-size: 28px;
    margin: 40px 0 15px;
}

.article-detail .content h3 {
    color: var(--text-primary);
    font-size: 22px;
    margin: 30px 0 12px;
}

.article-detail .content p {
    margin-bottom: 20px;
}

.article-detail .content ul,
.article-detail .content ol {
    margin: 15px 0 25px 25px;
}

.article-detail .content li {
    margin-bottom: 10px;
}

.article-detail .content .highlight-box {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--primary);
    padding: 20px 25px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

.article-detail .content .highlight-box p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.article-detail .content .highlight-box strong {
    color: var(--primary);
}

.article-detail .content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 25px 0;
}

/* ===== 4. 文章底部分享 ===== */
.article-bottom {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--card-border);
}

.article-bottom .share {
    display: flex;
    gap: 15px;
    align-items: center;
}

.article-bottom .share span {
    color: var(--text-secondary);
    font-size: 14px;
}

.article-bottom .share a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.article-bottom .share a:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ===== 5. 相关文章 ===== */
.related-articles {
    padding: 60px 0 100px;
    background: rgba(0, 0, 0, 0.2);
}

.related-articles h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--card-border);
    transition: all 0.3s;
}

.related-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.related-card .tag {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.related-card h4 {
    font-size: 16px;
    margin: 10px 0 8px;
    line-height: 1.4;
}

.related-card p {
    color: var(--text-secondary);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 6. 返回按钮 ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 30px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary);
}

/* ===== 7. 页脚 ===== */
.footer {
    background-color: var(--dark-bg);
    padding: 80px 0 40px;
    border-top: 1px solid var(--card-border);
}

/* SSI 主版（article-detail.html）：页脚来自公共 partial，其容器需与全站 1200px 一致 */
.footer .container {
    max-width: 1200px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== 8. 响应式 ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }

    .nav-links, .nav-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .article-detail {
        padding: 120px 0 60px;
    }

    .article-detail h1 {
        font-size: 28px;
    }

    .article-detail .cover {
        height: 180px;
        font-size: 40px;
    }

    .article-detail .content {
        font-size: 16px;
    }

    .article-detail .content h2 {
        font-size: 24px;
    }

    .article-detail .content h3 {
        font-size: 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 9. 移动菜单 ===== */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--darker-bg);
    padding: 20px;
    border-top: 1px solid var(--card-border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.mobile-nav-links a {
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid var(--card-border);
}

.mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}