/* 全局适配 */
.wwtalk-container img,
.wwtalk-container table,
.wwtalk-container pre,
.wwtalk-container code,
.wwtalk-container iframe {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}
.wwtalk-container table {
    table-layout: fixed;
    width: 100%;
}

/* 容器更宽松、间距更大 */
.wwtalk-container {
    display: flex;
    gap: 40px;
    max-width: 1300px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 40px 25px;
    align-items: flex-start;
}

/* 文章内容区域更宽松 */
.single-post-article {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 900px;
    background: #fff;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.03);
}

/* 标题区域间距更舒服 */
.single-post-header {
    margin-bottom: 60px;
}
.single-post-featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}
.featured-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}
.single-post-header-content {
    padding: 0;
}
.single-post-title {
    font-size: 32px;
    line-height: 1.5;
    color: #222;
    margin-bottom: 25px;
    word-break: break-all;
}
.single-post-meta {
    color: #999;
    font-size: 15px;
    margin-bottom: 0;
}

/* 文章目录更宽松 */
.article-toc {
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 50px;
    box-sizing: border-box;
}
.toc-title {
    font-weight: 700;
    margin-bottom: 20px;
    color: #222;
    font-size: 17px;
}
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-list li {
    margin-bottom: 14px;
    font-size: 15px;
}
.toc-list li.h3 {
    padding-left: 20px;
    font-size: 14px;
}
.toc-list a {
    color: #0073aa;
    text-decoration: none;
}
.toc-list a:hover {
    color: #005580;
    text-decoration: underline;
}

/* 文章正文间距全面加大，不拥挤 */
.single-post-content {
    padding: 0;
    line-height: 1.9;
    color: #333;
    font-size: 17px;
    box-sizing: border-box;
    width: 100%;
    overflow-wrap: break-word;
}
.single-post-content p {
    margin-bottom: 32px;
}
.single-post-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 50px 0 25px;
    color: #111;
}
.single-post-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 45px 0 22px;
    color: #111;
}
.content-anchor {
    scroll-margin-top: 30px;
}

/* 文章底部更宽松 */
.single-post-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}
.single-post-tags {
    margin-bottom: 40px;
}
.tags-label {
    font-weight: 700;
    color: #333;
}
.tag-link {
    display: inline-block;
    background: #f6f6f6;
    color: #555;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 上/下一篇文章间距加大 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin: 50px 0;
    padding: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.nav-previous, .nav-next {
    flex: 1;
    min-width: 0;
}
.nav-next {
    text-align: right;
}
.nav-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}
.nav-title a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    display: block;
}
.nav-title a:hover {
    color: #005580;
    text-decoration: underline;
}

/* 相关推荐更宽松 */
.related-posts {
    margin-top: 60px;
    background: #fff9f0;
    padding: 25px;
    border-radius: 10px;
}
.related-title {
    font-size: 19px;
    border-left: 4px solid #0073aa;
    padding-left: 12px;
    margin-bottom: 25px;
    font-weight: 700;
    color: #222;
}
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-list li {
    margin-bottom: 14px;
}
.related-list li:last-child {
    margin-bottom: 0;
}
.related-list a {
    color: #444;
    text-decoration: none;
    font-size: 15px;
    display: block;
}
.related-list a:hover {
    color: #0073aa;
}

/* 侧边栏整体重构 */
.single-post-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 40px;
    min-width: 0;
}
.sidebar-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 30px 24px;
    box-sizing: border-box;
    box-shadow: 0 0 20px rgba(0,0,0,0.03);
}
.sidebar-title {
    font-size: 18px;
    border-left: 4px solid #0073aa;
    padding-left: 12px;
    margin-top: 0;
    margin-bottom: 25px;
    color: #222;
    font-weight: 700;
}

/* 随机推荐图文流样式 */
.random-posts-widget {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.random-post-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 4px;
}
.random-post-item:hover {
    background: #f0f7ff;
    transform: translateX(5px); /* 悬浮时向右轻微移动 */
}
.random-post-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.random-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证缩略图完美裁剪填充 */
    transition: transform 0.5s ease;
}
.random-post-item:hover .random-post-thumb img {
    transform: scale(1.1); /* 鼠标移上去图片微放大 */
}
.random-post-thumb.default-thumb span {
    font-size: 20px;
}
.random-post-info {
    flex: 1;
    min-width: 0;
}
.random-post-title {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: #444;
    font-weight: 500;
    margin-bottom: 4px;
    /* 严格限制最多显示2行，超出隐藏显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.random-post-item:hover .random-post-title {
    color: #0073aa;
}
.random-post-date {
    display: block;
    font-size: 12px;
    color: #bbb;
}

/* 侧边栏底部独立首页按钮 */
.sidebar-home-btn {
    display: block;
    margin-top: 20px;
    padding: 14px;
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    text-decoration: none;
    color: #0073aa;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.03);
}
.sidebar-home-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    box-shadow: 0 5px 15px rgba(0,115,170,0.15);
}

.no-data {
    color: #aaa;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

/* 响应式更宽松 */
@media (max-width:992px){
    .wwtalk-container {
        flex-direction: column;
        padding: 30px 15px;
        gap: 30px;
    }
    .single-post-sidebar {
        width: 100%;
        margin-top: 0;
        position: static;
    }
    .single-post-article {
        padding: 35px 25px;
    }
}
@media (max-width:768px){
    .single-post-title {
        font-size: 26px;
    }
    .single-post-article {
        padding: 25px 20px;
    }
}