/* 主内容区布局 */
.main { padding: 30px 0; }
.layout { display: flex; gap: 30px; }
.article-content { flex: 3; }
.sidebar { flex: 1; }

/* 文章标题区 */
.article-header {
    background: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}
.article-title {
    font-size: 28px;
    color: #2d3748;
    line-height: 1.4;
    margin-bottom: 15px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
    font-size: 14px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}
.meta-item { display: flex; align-items: center; gap: 5px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article-tag {
    font-size: 13px;
    padding: 3px 10px;
    background: #edf2f7;
    border-radius: 4px;
}

/* 文章正文样式 */
.article-body {
    background: white;
    padding: 30px;
    padding-left:40px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.article-body img{
    width:100%;
}

.article-section { margin-bottom: 25px; }
.article-h2 {
    font-size: 22px;
    color: #2d3748;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.article-h3 {
    font-size: 19px;
    color: #2d3748;
    margin: 20px 0 12px;
}
.article-p {
    margin-bottom: 15px;
    color: #4a5568;
}
.article-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 代码块样式（内容页核心） */
.code-block {
    background: #1e1e1e;
    color: #dcdcdc;
    padding: 20px;
    border-radius: 4px;
    font-family: "Consolas", monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 15px 0;
    position: relative;
}
.code-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s;
}
.code-copy:hover {
    background: rgba(255,255,255,0.2);
}
.code-comment { color: #6a9955; } /* 注释 */
.code-keyword { color: #569cd6; } /* 关键字 */
.code-string { color: #ce9178; } /* 字符串 */
.code-function { color: #dcdcaa; } /* 函数 */

/* 文章底部操作区 */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #eee;
    margin-top: 20px;
}
.action-buttons { display: flex; gap: 10px; }
.share-links { display: flex; gap: 10px; }
.share-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    transition: all 0.3s;
}
.share-link:hover {
    background: #2c6ecb;
    color: white;
    text-decoration: none;
}

/* 相关文章 */
.related-articles {
    background: white;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}
.related-title {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2c6ecb;
}
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-item {
    display: flex;
    gap: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eee;
}
.related-item:last-child { border-bottom: none; }
.related-img {
    width: 100px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
}
.related-content { flex: 1; }
.related-item-title {
    font-size: 16px;
    margin-bottom: 5px;
}
.related-item-title a:hover { color: #2c6ecb; }
.related-meta { font-size: 12px; color: #666; }

/* 评论区 */
.comment-section {
    background: white;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.comment-title {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2c6ecb;
}
.comment-form { margin-bottom: 30px; }
.comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 120px;
    font-family: inherit;
    margin-bottom: 10px;
    resize: vertical;
}
.comment-submit { align-self: flex-end; }
.comment-list { display: flex; flex-direction: column; gap: 20px; }
.comment-item {
    padding: 15px;
    border-radius: 4px;
    background: #f9fafb;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}
.comment-author { font-weight: bold; color: #2d3748; }
.comment-time { color: #666; }
.comment-content { font-size: 15px; color: #4a5568; }
