/* ===== 文章页整体背景 ===== */
body.single, .single-post {
    background: #f5f6fa;
}

/* ===== 主容器 ===== */
.single-container {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    display: flex;
    gap: 32px;
    padding: 0 16px 40px 16px;
    box-sizing: border-box;
    align-items: flex-start;
}

/* ===== 主内容区 ===== */
.single-main {
    flex: 1 1 0%;
    min-width: 0;
}
.single-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 32px 32px 36px 32px;
    margin-bottom: 24px;
}

.breadcrumb {
    font-size: 14px;
    color: #888;
    margin-bottom: 18px;
}
.breadcrumb a {
    color: #26A4E4;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

.single-title {
    color: #222;
    position: relative;
    font-weight: bold;
    margin-left: 0;
    padding-left: 0;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #888;
    font-size: 14px;
    margin-bottom: 18px;
}
.entry-content {
    color: #333;
    line-height: 1.8;
    font-size: 16px;
}
.entry-content p {
    margin-bottom: 18px;
}

.post-navigation {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.nav-previous,
.nav-next {
    flex: 1;
    font-size: 15px;
}
.nav-previous {
    text-align: left;
}
.nav-next {
    text-align: right;
}
.nav-links a {
    color: #26A4E4;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-links a:hover {
    text-decoration: underline;
    color: #007bff;
}

/* ===== 侧边栏 ===== */
.single-sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 24px 18px;
    margin-bottom: 12px;
}
.widget-title {
    font-size: 18px;
    color: #222;
    margin: 0 0 16px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* ===== 侧边栏卡片特殊样式（如积分、二维码等） ===== */
.widget-point, .widget-qrcode {
    text-align: center;
    padding-top: 18px;
    padding-bottom: 18px;
}
.widget-point .point-num {
    font-size: 32px;
    color: #26A4E4;
    font-weight: bold;
    margin: 8px 0 12px 0;
}
.widget-qrcode img {
    width: 180px;
    height: 180px;
    margin: 0 auto 10px auto;
    display: block;
}

/* ===== 搜索、标签、目录等 ===== */
.widget input[type="search"], .widget input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* ===== 移动端适配 ===== */
@media (max-width: 1000px) {
    .single-container {
        flex-direction: column;
        gap: 0;
        padding: 0 4px 24px 4px;
    }
    .single-sidebar,
    #secondary,
    .widget-area {
        display: none !important;
    }
}
@media (max-width: 600px) {
    .single-content {
        padding: 14px 2px 18px 2px;
    }
    .widget {
        padding: 10px 2px;
    }
    .single-title {
        font-size: 18px;
    }
    .widget-qrcode img {
        width: 120px;
        height: 120px;
    }
}
@media (min-width: 1000px) {
    #secondary, .widget-area, .single-sidebar {
        width: 340px;
        min-width: 340px;
        max-width: 340px;
        box-sizing: border-box;
        overflow: visible !important;
        display: block !important;
        position: static !important;
    }
    #secondary.toc-only .widget:not(.widget_toc) {
        display: none !important;
    }
}

/* 文章目录竖线+圆点（H2/H3对齐，H3更小） */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.toc-list::before {
    content: '';
    position: absolute;
    left: 16px; /* 竖线和圆点中心 */
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    z-index: 0;
}
.toc-list li {
    position: relative;
    margin-bottom: 16px;
    padding-left: 36px;
    min-height: 20px;
}
.toc-list li:last-child {
    margin-bottom: 0;
}
/* 默认圆点（H2） */
.toc-list li::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    z-index: 1;
    transition: border-color 0.2s, background 0.2s;
}
/* H3 圆点更小，依然在同一竖线上 */
.toc-list li.ml-4 {
    padding-left: 36px; /* 不再右移竖线 */
}
.toc-list li.ml-4::before {
    left: 13px; /* 让小圆点中心和大圆点中心对齐 */
    width: 6px;
    height: 6px;
    top: 9px;
    border-width: 2px;
    background: #fff;
    border-color: #cbd5e1;
}
/* 高亮圆点 */
.toc-list li a.active,
.toc-list li.active::before {
    background: #ffffff !important;
    border-color: #2563eb !important;
}
.toc-list li.ml-4 a.active,
.toc-list li.ml-4.active::before {
    border-color: #2563eb !important;
}
/* 目录链接样式 */
.toc-list li a {
    display: block;
    color: #333;
    font-size: 15px;
    padding: 2px 8px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    position: relative;
    z-index: 2;
}
.toc-list li a.active {
    background: #e0e7ff;
    color: #2563eb;
    font-weight: bold;
    z-index: 2;
}
.toc-list li a:hover {
    background: #f1f5f9;
    color: #2563eb;
}

#toc-container {
    max-height: 480px;
    overflow-y: auto;
}

/* 侧边栏搜索表单内嵌图标按钮美化 */
.widget_search .search-form {
    position: relative;
    margin-top: 8px;
    display: block;
}
.widget_search .search-field {
    width: 100%;
    padding: 10px 38px 10px 14px; /* 右侧留空间 */
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background: #fafbfc;
    color: #333;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.widget_search .search-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #dbeafe;
}
.widget_search .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #3b82f6;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}
.widget_search .search-submit:hover {
    color: #2563eb;
}
.widget_search .fa-search {
    font-size: 18px;
}

/* 文章底部 上一篇/下一篇卡片风格导航样式 */
.post-bottom-navigation-cards {
    display: flex;
    gap: 24px;
    margin: -10px 0 0 0;
}
.nav-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 18px 18px 12px 18px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.nav-card-prev .nav-label {
    text-align: left;
}
.nav-card-next .nav-label {
    text-align: right;
}
.nav-label {
    font-size: 15px;
    color: #888;
    margin-bottom: 8px;
}
.nav-title {
    font-size: 16px;
    color: #2563eb;
    font-weight: bold;
    word-break: break-all;
}
.nav-title a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-title a:hover {
    color: #007bff;
    text-decoration: underline;
}
.no-more {
    color: #aaa;
    font-weight: normal;
    font-size: 15px;
}
@media (max-width: 800px) {
    .post-bottom-navigation-cards {
        flex-direction: column;
        gap: 12px;
    }
    .nav-card .nav-label,
    .nav-card .nav-title {
        text-align: left !important;
    }
}

/* 侧边栏标签云美化 */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-top: 6px;
}
.widget_tag_cloud .tagcloud a {
    display: inline-block;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 15px;
    line-height: 1.6;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(37,99,235,0.04);
    font-weight: 500;
    border: 1px solid #e0e7ef;
    margin: 0 !important;
    background: #f1f5f9;
    color: #2563eb;
}
.widget_tag_cloud .tagcloud a:hover {
    filter: brightness(0.95);
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
    border-color: #2563eb;
    text-decoration: none;
    color: #fff !important;
}
.widget_tag_cloud .tagcloud a:nth-child(6n+1) { background: #e0e7ff; color: #2563eb; }
.widget_tag_cloud .tagcloud a:nth-child(6n+2) { background: #fef9c3; color: #b45309; }
.widget_tag_cloud .tagcloud a:nth-child(6n+3) { background: #fce7f3; color: #be185d; }
.widget_tag_cloud .tagcloud a:nth-child(6n+4) { background: #d1fae5; color: #047857; }
.widget_tag_cloud .tagcloud a:nth-child(6n+5) { background: #fee2e2; color: #b91c1c; }
.widget_tag_cloud .tagcloud a:nth-child(6n)   { background: #e0f2fe; color: #0369a1; }

/* h2、h3：黑色+竖杠 */
.entry-content h2,
.entry-content h3 {
    color: #222;
    position: relative;
    font-weight: bold;
    margin-left: 0;
    padding-left: 12px;
}
.entry-content h2::before,
.entry-content h3::before {
    content: '';
    display: inline-block;
    position: absolute;
    left: 0;
    top: 0.18em;
    width: 4px;
    height: 1.2em;
    background: #26A4E4;
    border-radius: 2px;
}

/* h4：黑色，无竖杠、无圆点 */
.entry-content h4 {
    color: #222;
    font-weight: bold;
    margin-left: 0;
    padding-left: 0;
    position: static;
}
.entry-content h4::before {
    display: none !important;
}

/* strong加粗标题和正文p：灰色+蓝色圆点 */
.entry-content p,
.entry-content strong {
    color: #7f7f7f;
    position: relative;
    margin-left: 0;
    padding-left: 12px;
    font-weight: normal;
}
.entry-content p::before,
.entry-content strong::before {
    content: '';
    display: inline-block;
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 6px;
    height: 6px;
    background: #26A4E4;
    border-radius: 50%;
}

/* strong加粗标题单独加粗 */
.entry-content strong {
    font-weight: bold;
}

.entry-content p::after {
    content: '';
    display: inline-block;
}
