/**
 * 文章详情页 - 简约现代风格
 */

/* ========================================
   主容器
   ======================================== */
.single-post-page {
    background: #fff;
    padding: 0;
}

/* ========================================
   文章头部
   ======================================== */
.post-header {
    padding: 60px 0 40px;
    background: #fafafa;
}

.post-header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.post-category {
    display: inline-block;
    padding: 6px 14px;
    background: #0066cc;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.post-category:hover {
    background: #0052a3;
}

.post-heading {
    font-size: 40px;
    line-height: 1.3;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.meta-author {
    font-weight: 500;
}

.meta-separator {
    color: #ddd;
}

.meta-date,
.meta-views {
    color: #999;
}

/* ========================================
   特色图片
   ======================================== */
.post-thumbnail {
    margin-bottom: 60px;
}

.post-thumbnail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 0;
}

.post-thumbnail-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ========================================
   文章内容
   ======================================== */
.post-body {
    padding: 0 0 60px;
}

.post-body-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.post-content > * {
    margin-bottom: 1.5em;
}

.post-content h2 {
    font-size: 32px;
    line-height: 1.3;
    font-weight: 700;
    color: #1a1a1a;
    margin: 2em 0 0.75em;
}

.post-content h3 {
    font-size: 26px;
    line-height: 1.4;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.5em 0 0.5em;
}

.post-content h4 {
    font-size: 22px;
    line-height: 1.4;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.25em 0 0.5em;
}

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

.post-content ul,
.post-content ol {
    padding-left: 28px;
    margin: 1.5em 0;
}

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

.post-content a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 102, 204, 0.3);
    transition: all 0.3s;
}

.post-content a:hover {
    border-bottom-color: #0066cc;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
}

.post-content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    border-left: 4px solid #0066cc;
    background: #f8f9fa;
    color: #555;
    font-style: italic;
}

.post-content code {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.post-content pre {
    background: #1a1a1a;
    color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.post-content pre code {
    background: none;
    color: #f8f9fa;
    padding: 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
}

.post-content table th,
.post-content table td {
    padding: 12px;
    border: 1px solid #e5e5e5;
    text-align: left;
}

.post-content table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1a1a1a;
}

/* ========================================
   标签和分享
   ======================================== */
.post-footer-meta {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tags-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.tag-link {
    padding: 6px 14px;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-link:hover {
    background: #0066cc;
    color: #fff;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.share-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    color: #666;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.share-link:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* 中国社交平台颜色 */
.share-wechat:hover {
    background: #07c160;
}

.share-weibo:hover {
    background: #e6162d;
}

.share-qzone:hover {
    background: #ffc200;
}

.share-douban:hover {
    background: #00b51d;
}

/* 分隔线 */
.share-divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 4px;
}

/* 国际平台颜色 */
.share-facebook:hover {
    background: #1877f2;
}

.share-twitter:hover {
    background: #1da1f2;
}

.share-linkedin:hover {
    background: #0077b5;
}

/* ========================================
   文章导航
   ======================================== */
.post-navigation {
    padding: 20px 0;
    background: #fafafa;
}

.post-navigation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.nav-link.nav-prev {
    justify-self: start;
}

.nav-link.nav-next {
    justify-self: end;
    flex-direction: row-reverse;
}

.nav-link:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.nav-arrow {
    font-size: 24px;
    color: #0066cc;
    flex-shrink: 0;
}

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.nav-link.nav-next .nav-content {
    text-align: right;
}

.nav-label {
    font-size: 13px;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-link:hover .nav-title {
    color: #0066cc;
}

/* ========================================
   相关文章
   ======================================== */
.related-posts {
    padding: 80px 0;
    background: #fff;
}

.related-posts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.related-heading {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 40px;
    text-align: center;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.related-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: transparent;
}

.related-thumb {
    display: block;
    line-height: 0;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-item:hover .related-thumb img {
    transform: scale(1.05);
}

.related-info {
    padding: 20px;
}

.related-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px;
}

.related-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.related-title a:hover {
    color: #0066cc;
}

.related-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 12px;
}

.related-date {
    font-size: 13px;
    color: #999;
}

/* ========================================
   评论区
   ======================================== */
.post-comments {
    padding: 0px 0;
    background: #fafafa;
}

.post-comments-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .related-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .post-header {
        padding: 40px 0 30px;
    }
    
    .post-heading {
        font-size: 32px;
    }
    
    .post-content {
        font-size: 17px;
    }
    
    .post-content h2 {
        font-size: 28px;
    }
    
    .post-content h3 {
        font-size: 22px;
    }
    
    .post-navigation-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-link {
        padding: 18px 20px;
        gap: 12px;
    }
    
    .nav-link.nav-prev,
    .nav-link.nav-next {
        justify-self: stretch;
    }
    
    .nav-arrow {
        font-size: 20px;
    }
    
    .nav-title {
        font-size: 15px;
    }
    
    .related-list {
        grid-template-columns: 1fr;
    }
    
    .related-heading {
        font-size: 28px;
    }
    
    /* 移动端评论表单改为单列 - 强制覆盖 */
    .single-post-page .comment-form,
    .single-post-page .post-comments .comment-form,
    body.single-post .single-post-page .comment-form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .single-post-page .comment-form-author,
    .single-post-page .comment-form-email,
    .single-post-page .comment-form-url,
    .single-post-page .comment-form .comment-form-author,
    .single-post-page .comment-form .comment-form-email,
    .single-post-page .comment-form .comment-form-url {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
}

@media (max-width: 480px) {
    .post-header-container,
    .post-thumbnail-container,
    .post-body-container,
    .post-navigation-container,
    .related-posts-container,
    .post-comments-container {
        padding: 0 16px;
    }
    
    .post-heading {
        font-size: 28px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .post-meta {
        font-size: 13px;
    }
}

/* ========================================
   评论区容器
   ======================================== */
.post-comments {
    background: #fafafa;
    padding: 0px 0;
}

.post-comments-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 评论区整体样式 - 借鉴 rife-free */
.single-post-page .post-comments .comments-area {
    background: #FAFAFA !important;
    padding: 40px !important;
    margin: 0 !important;
}

.single-post-page .post-comments #respond {
    margin: 50px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.single-post-page .post-comments #respond:first-child {
    margin-top: 0 !important;
}

/* 确保评论表单样式正确应用 */
.single-post-page .comment-form {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

.single-post-page .comment-form-comment {
    grid-column: 1 / -1 !important;
}

.single-post-page .comment-form-cookies-consent {
    grid-column: 1 / -1 !important;
}

.single-post-page .form-submit {
    grid-column: 1 / -1 !important;
}


/* 隐藏评论列表的项目符号 */
.comment-list,
.comment-list .children {
    list-style: none !important;
    padding-left: 0 !important;
}

.comment-list li,
.comment-list .children li {
    list-style: none !important;
    list-style-type: none !important;
}

.comment .comment {
    margin-left: 40px;
}


/* ========================================
   微信二维码弹窗
   ======================================== */
.wechat-qr-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.wechat-qr-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wechat-qr-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.wechat-qr-close:hover {
    color: #333;
}

.wechat-qr-content h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

/* 标签切换 */
.wechat-share-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wechat-tab {
    flex: 1;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.wechat-tab:hover {
    color: #07c160;
}

.wechat-tab.active {
    color: #07c160;
    border-bottom-color: #07c160;
    font-weight: 600;
}

/* 面板 */
.wechat-panel {
    display: none;
}

.wechat-panel.active {
    display: block;
}

/* 二维码面板 */
#wechat-qr-code {
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wechat-qr-code img {
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 10px;
}

/* 复制链接面板 */
.copy-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#share-link-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
}

.copy-btn {
    padding: 10px 20px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #06ad56;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* 提示文字 */
.wechat-tip {
    margin: 15px 0 0 0;
    font-size: 13px;
    color: #666;
    text-align: left;
    line-height: 1.8;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
}

.step-number {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: #07c160;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 5px;
}

/* 响应式 */
@media (max-width: 768px) {
    .share-links {
        gap: 8px;
    }
    
    .share-link {
        width: 32px;
        height: 32px;
    }
    
    .share-link svg {
        width: 16px;
        height: 16px;
    }
    
    .wechat-qr-content {
        margin: 0 20px;
        padding: 25px;
    }
}
