/* 文章页面样式 */

/* 文章容器 */
.article-container {
    display: flex;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    gap: 30px;
}

/* 主要文章内容 */
article {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

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

.article-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 0.95rem;
}

.article-date, .article-category {
    display: flex;
    align-items: center;
}

.article-category a {
    color: #4e7eff;
    text-decoration: none;
    transition: color 0.3s;
}

.article-category a:hover {
    color: #3354cc;
    text-decoration: underline;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tags .tag a {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f5f5f5;
    color: #666;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.article-tags .tag a:hover {
    background-color: #e5e5e5;
    color: #333;
}

/* 文章内容 */
.article-content {
    padding: 30px;
    line-height: 1.8;
    color: #444;
}

.article-content h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 1.5em 0 0.8em;
    position: relative;
    padding-bottom: 10px;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #4e7eff;
}

.article-content h3 {
    font-size: 1.4rem;
    color: #333;
    margin: 1.3em 0 0.7em;
}

.article-content p {
    margin-bottom: 1.2em;
    font-size: 1.05rem;
}

.article-content a {
    color: #4e7eff;
    text-decoration: none;
    border-bottom: 1px dotted #4e7eff;
    transition: all 0.3s;
}

.article-content a:hover {
    color: #3354cc;
    border-bottom: 1px solid #3354cc;
}

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

.article-content li {
    margin-bottom: 0.5em;
}

.article-content strong {
    font-weight: 600;
    color: #333;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 15px 20px 15px 30px;
    background-color: #f9f9f9;
    border-left: 4px solid #4e7eff;
    font-style: italic;
    color: #555;
}

.article-content blockquote p {
    margin: 0;
}

.article-content blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
    color: #777;
    font-style: normal;
}

.article-image {
    margin: 2em 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.article-image img {
    width: 100%;
    display: block;
}

.article-image .image-caption {
    background-color: #f5f5f5;
    padding: 10px 15px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin: 0;
}

/* 代码块 */
.code-block {
    margin: 1.5em 0;
    background-color: #f8f8f8;
    border-radius: 6px;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

/* 行内代码 */
.article-content code:not(pre code) {
    background-color: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

/* 文章底部 */
.article-footer {
    padding: 20px 30px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.article-share {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.article-share span {
    margin-right: 10px;
    color: #666;
    font-size: 0.9rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #666;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: #4e7eff;
    color: white;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.article-prev, .article-next {
    max-width: 45%;
}

.article-nav a {
    display: block;
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.article-nav a:hover {
    background-color: #f9f9f9;
    border-color: #ddd;
}

.article-nav span {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.article-nav h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 侧边栏 */
.article-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.article-sidebar > div {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.author-info {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.author-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.author-info p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.author-social a {
    color: #666;
    transition: color 0.3s;
}

.author-social a:hover {
    color: #4e7eff;
}

.related-articles h3, .popular-tags h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-articles li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f0f0f0;
}

.related-articles li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-articles a {
    display: block;
    color: #444;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.related-articles a:hover {
    color: #4e7eff;
}

.related-date {
    display: block;
    font-size: 0.8rem;
    color: #888;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud .tag {
    padding: 6px 12px;
    background-color: #f5f5f5;
    color: #666;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tags-cloud .tag:hover {
    background-color: #e5e5e5;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .article-container {
        flex-direction: column;
    }
    
    .article-sidebar {
        width: 100%;
        order: 2;
    }
    
    article {
        order: 1;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 20px;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-footer {
        padding: 15px 20px;
    }
    
    .article-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-prev, .article-next {
        max-width: 100%;
    }
} 