:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background: #f8f9fa;
    padding-top: 70px;
}

/* 导航栏样式已移至 includes/header.php */

/* 文章容器 */
.article-main-layout {
    max-width: 1500px;
    margin: 40px auto 0;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 240px;
    gap: 20px;
    align-items: start;
}

.article-container {
    max-width: none;
    margin: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 文章头部 */
.article-header {
    padding: 40px;
    border-bottom: 1px solid #eee;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 30px;
    color: #666;
    font-size: 14px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta i {
    color: var(--primary-color);
}

/* 文章封面 */
.article-cover {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* 文章内容 */
.article-content {
    padding: 40px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

.article-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

/* 文章底部 */
.article-footer {
    padding: 30px 40px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn.copy {
    background: #667eea;
}

.share-btn.wechat {
    background: #07C160;
}

.share-btn.weibo {
    background: #E6162D;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.back-btn:hover {
    color: var(--secondary-color);
    text-decoration: none;
    transform: translateX(-5px);
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* 相关推荐和常见问题 */
.related-section {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
}

.section-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.section-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
    color: #222;
}

.related-article-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.related-article-item:last-child {
    border-bottom: none;
}

.related-article-item:hover {
    background: #f8f9fa;
    padding-left: 8px;
}

.related-article-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.related-article-link:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.related-article-cover {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    flex-shrink: 0;
}

.related-article-info {
    flex: 1;
    padding: 0;
}

.related-article-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-meta {
    font-size: 0.85rem;
    color: #999;
}

.faq-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.faq-link:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.faq-icon {
    color: var(--primary-color);
    margin-top: 3px;
    flex-shrink: 0;
}

.faq-content {
    flex: 1;
}

.faq-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.faq-summary {
    font-size: 0.9rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.internal-links-box ul {
    margin: 0;
    padding-left: 18px;
}

.internal-links-box li {
    margin-bottom: 10px;
}

.internal-links-box li:last-child {
    margin-bottom: 0;
}

.internal-links-box a {
    color: #333;
    text-decoration: none;
}

.internal-links-box a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 左右侧栏布局 */
.article-main-center {
    min-width: 0;
}

.side-section {
    margin: 0;
    padding: 0;
    margin-top: 18px;
    position: sticky;
    top: 130px;
    align-self: start;
}

.side-section .section-box {
    margin-bottom: 20px;
}

/* 中间常见问题区域 */
.center-extra {
    margin-top: 30px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .article-main-layout {
        grid-template-columns: 220px minmax(0, 1fr) 220px;
    }
}

@media (max-width: 992px) {
    .article-main-layout {
        grid-template-columns: 1fr;
    }

    .article-main-center {
        order: 1;
    }

    .side-section {
        position: static;
        top: auto;
    }

    .side-section.left-side {
        order: 2;
    }

    .side-section.right-side {
        order: 3;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .article-main-layout {
        margin-top: 20px;
        gap: 15px;
    }

    .article-container {
        margin: 0;
        border-radius: 8px;
    }

    .article-header {
        padding: 25px 20px;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-content {
        padding: 25px 20px;
        font-size: 15px;
    }

    .article-footer {
        padding: 20px;
    }

    .article-meta {
        gap: 15px;
    }
}
