/* 文章页面专用样式 */

.post-page .main-content {
    padding: 20px 0;
}

.post-container {
    margin-top: 60px;
    padding: 40px 0;
    background: #f6f6f6;
}

.post-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* 文章内容区域 */
.post-content {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(26, 26, 26, 0.1);
}

.post-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 24px;
}

.post-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.publish-time {
    font-size: 13px;
    color: #8590a6;
}

.post-meta-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.post-meta .author-info {
    display: flex;
    align-items: center;
}

.post-meta .avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta .author-details {
    margin-left: 16px;
}

.post-meta .author-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    display: block;
    margin-bottom: 4px;
}

.meta-info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-info span {
    font-size: 13px;
    color: #8590a6;
    display: flex;
    align-items: center;
}

.meta-info i {
    margin-right: 4px;
}

.meta-info .category a {
    text-decoration: none;
    color: #8590a6;
}
.meta-info .tags a {
    display: inline-block;
    margin: 2px;
    padding: 2px 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    color: #555;
    text-decoration: none;
    font-size: 12px;
}

.meta-info .tags a:hover {
    background-color: #0084ff;
    color: #fff;
}

.post-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid #e1e4e8;
    border-radius: 20px;
    background: #fff;
    color: #586069;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #f6f8fa;
    border-color: #0084ff;
    color: #0084ff;
}

.action-btn i {
    margin-right: 6px;
}

.action-btn.liked,
.action-btn.bookmarked {
    background: #0084ff;
    color: #fff;
    border-color: #0084ff;
}

.action-btn.liked:hover,
.action-btn.bookmarked:hover {
    background: #0073e6;
}

.likes-count {
    margin-left: 6px;
    font-size: 13px;
    background-color: #e1e4e8;
    color: #586069;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.action-btn.liked .likes-count,
.action-btn.bookmarked .likes-count {
    background-color: #fff;
    color: #0084ff;
}

/* 文章正文 */
.post-body {
    font-size: 16px;
    line-height: 1.8;
    color: #1a1a1a;
    margin-bottom: 40px;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    margin: 32px 0 16px 0;
    font-weight: 600;
    line-height: 1.4;
}

.post-body h1 { font-size: 24px; }
.post-body h2 { font-size: 22px; }
.post-body h3 { font-size: 20px; }
.post-body h4 { font-size: 18px; }
.post-body h5 { font-size: 16px; }
.post-body h6 { font-size: 14px; }

.post-body p {
    margin-bottom: 16px;
}

.post-body a {
    color: #0084ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.post-body a:hover {
    border-bottom-color: #0084ff;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-body blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    background: #f8f9fa;
    border-left: 4px solid #0084ff;
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

.post-body code {
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #e83e8c;
}

.post-body pre {
    background: #f6f8fa;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid #e1e4e8;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: #24292e;
}

.post-body ul,
.post-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    overflow: hidden;
}

.post-body th,
.post-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e1e4e8;
}

.post-body th {
    background: #f6f8fa;
    font-weight: 600;
}

/* 文章底部 */
.post-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.post-stats {
    display: flex;
    gap: 20px;
}

.post-stats span {
    font-size: 14px;
    color: #8590a6;
    display: flex;
    align-items: center;
}

.post-stats i {
    margin-right: 6px;
}

.post-navigation {
    display: flex;
    gap: 16px;
}

.post-navigation a {
    color: #0084ff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.post-navigation a:hover {
    opacity: 0.8;
}

/* 文章页侧边栏 */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-sidebar .widget {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(26, 26, 26, 0.1);
}

.author-card-widget .author-card {
    text-align: center;
}

.author-card-widget .author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.author-card-widget h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.author-description {
    font-size: 14px;
    color: #8590a6;
    line-height: 1.5;
    margin-bottom: 16px;
}

.author-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.stat-item .label {
    color: #8590a6;
    font-size: 14px;
}

.follow-btn {
    width: 100%;
    padding: 10px;
    background-color: #0084ff;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.follow-btn.followed,
.follow-btn:hover {
    background-color: #0069d9;
}

.follow-btn.followed {
    background-color: #e1e4e8;
    color: #586069;
    cursor: not-allowed;
}

/* 相关文章 */
.related-posts ul {
    list-style: none;
    padding: 0;
}

.related-posts li {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.related-posts li:last-child {
    border-bottom: none;
}

.related-posts a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-posts h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
    transition: color 0.3s;
}

.related-posts a:hover h4 {
    color: #0084ff;
}

.related-posts p {
    font-size: 13px;
    color: #8590a6;
    line-height: 1.4;
    margin-bottom: 4px;
}

.related-posts .post-date {
    font-size: 12px;
    color: #8590a6;
}

/* 目录 */
.toc-widget {
    position: sticky;
    top: 80px;
}

.toc {
    max-height: 400px;
    overflow-y: auto;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    display: block;
    padding: 4px 0;
    color: #8590a6;
    text-decoration: none;
    font-size: 14px;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: all 0.3s;
}

.toc a:hover,
.toc a.active {
    color: #0084ff;
    border-left-color: #0084ff;
}

.toc ul ul a {
    padding-left: 24px;
    font-size: 13px;
}

.toc ul ul ul a {
    padding-left: 36px;
}

/* 评论区域 */
.comments-section {
    background: #f6f6f6;
    padding: 40px 0;
}

.comments-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(26, 26, 26, 0.1);
}

.comments-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 32px;
    color: #1a1a1a;
    border-bottom: 2px solid #0084ff;
    padding-bottom: 12px;
}

/* 评论表单 */
.comment-form-wrapper {
    margin-bottom: 40px;
}

.logged-in-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.logged-in-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logged-in-user a {
    color: #0084ff;
    text-decoration: none;
    margin-left: auto;
}

.comment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.comment-fields input {
    padding: 12px 16px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.comment-fields input:focus {
    border-color: #0084ff;
}

.comment-textarea textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s;
}

.comment-textarea textarea:focus {
    border-color: #0084ff;
}

.comment-submit {
    margin-top: 16px;
    text-align: right;
}

.submit-btn {
    padding: 12px 24px;
    background: #0084ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background: #0066cc;
}

/* 评论列表 */
.comments-list {
    margin-top: 40px;
}

.comment-item {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.comment-author {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.comment-time {
    font-size: 13px;
    color: #8590a6;
}

.comment-reply a {
    font-size: 13px;
    color: #0084ff;
    text-decoration: none;
    margin-left: auto;
}

.comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
}

.comment-children {
    margin-top: 20px;
    padding-left: 20px;
    border-left: 2px solid #f0f0f0;
}

.comments-closed {
    text-align: center;
    padding: 40px;
    color: #8590a6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .post-container {
        padding: 20px 0;
    }
    
    .post-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .post-content {
        padding: 24px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .post-actions {
        gap: 8px;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .post-body {
        font-size: 15px;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .toc-widget {
        position: static;
    }
    
    .comments-wrapper {
        padding: 24px;
    }
    
    .comment-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 20px;
    }
    
    .post-meta .avatar img {
        width: 50px;
        height: 50px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .post-body {
        font-size: 14px;
    }
} 