/**
 * 极客库独立博客频道 (/blog/) 专属样式
 * 完美继承 jikeku-base.css 的明暗主题变量与渐变卡片美学
 */

.blog-hero {
    padding: 50px 0 36px;
    text-align: center;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    margin-bottom: 16px;
}

body.dark-theme .blog-hero-badge {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.blog-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.blog-hero-desc {
    font-size: 1.05rem;
    opacity: 0.78;
    max-width: 720px;
    margin: 0 auto 28px;
}

/* 搜索框与分类筛选栏 */
.blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-theme .blog-toolbar {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-cat-pill {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.04);
    color: inherit;
    transition: all 0.2s ease;
}

.blog-cat-pill:hover,
.blog-cat-pill.is-active {
    background: #2563eb;
    color: #ffffff;
}

body.dark-theme .blog-cat-pill {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .blog-cat-pill:hover,
body.dark-theme .blog-cat-pill.is-active {
    background: #3b82f6;
    color: #ffffff;
}

.blog-search-form {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 4px 6px 4px 16px;
    transition: border-color 0.2s;
}

.blog-search-form:focus-within {
    border-color: #2563eb;
}

body.dark-theme .blog-search-form {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.blog-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: inherit;
    width: 190px;
}

.blog-search-btn {
    border: none;
    background: #2563eb;
    color: #fff;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.blog-search-btn:hover {
    background: #1d4ed8;
}

/* 文章卡片网格 */
.blog-section {
    padding-bottom: 70px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.09);
}

body.dark-theme .blog-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

body.dark-theme .blog-card:hover {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.blog-card-thumb {
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff, #dbeafe);
}

body.dark-theme .blog-card-thumb {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.04);
}

.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12.5px;
}

.blog-card-cat {
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    text-decoration: none;
}

body.dark-theme .blog-card-cat {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.blog-card-date {
    opacity: 0.65;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 10px;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: #2563eb;
}

body.dark-theme .blog-card-title a:hover {
    color: #60a5fa;
}

.blog-card-excerpt {
    font-size: 0.94rem;
    line-height: 1.68;
    opacity: 0.78;
    margin-bottom: 20px;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 13.5px;
}

body.dark-theme .blog-card-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

body.dark-theme .blog-read-more {
    color: #60a5fa;
}

/* 分页 */
.blog-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.blog-pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-pagination .page-numbers {
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
    background: #2563eb;
    color: #ffffff;
}

body.dark-theme .blog-pagination .page-numbers {
    background: rgba(255, 255, 255, 0.08);
}

/* 单篇文章详情页（与顶部菜单栏 1200px 容器完全同宽，自适应各类屏幕） */
.single-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 36px 0 80px;
}

/* 继续阅读模块 */
.continue-reading-section {
    margin-top: 40px;
}

.continue-reading-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.continue-reading-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
}

.continue-reading-all {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.continue-reading-all:hover {
    text-decoration: underline;
}

body.dark-theme .continue-reading-title {
    color: #ffffff;
}

body.dark-theme .continue-reading-all {
    color: #60a5fa;
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    opacity: 0.72;
    margin-bottom: 24px;
}

.blog-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: #2563eb;
}

.single-article-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 44px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

body.dark-theme .single-article-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}

.single-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
    opacity: 0.72;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

body.dark-theme .single-meta {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.single-featured-img {
    margin-bottom: 28px;
    border-radius: 14px;
    overflow: hidden;
}

.single-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}

.single-content {
    font-size: 1.06rem;
    line-height: 1.85;
}

.single-content h2,
.single-content h3 {
    margin: 1.8em 0 0.8em;
    font-weight: 700;
}

.single-content p {
    margin-bottom: 1.25em;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
}

.single-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
}

.single-content code {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.9em;
}

.single-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.single-content blockquote {
    border-left: 4px solid #2563eb;
    padding: 12px 20px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 0 10px 10px 0;
    margin: 20px 0;
}

.single-tags {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.dark-theme .single-tags {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.single-tags a {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    text-decoration: none;
}

.single-tags a:hover {
    background: #2563eb;
    color: #ffffff;
}

body.dark-theme .single-tags a {
    background: rgba(255, 255, 255, 0.08);
}

.post-navigation-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px;
}

.post-nav-card {
    background: #ffffff;
    padding: 18px 22px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.post-nav-card:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
}

body.dark-theme .post-nav-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}

.post-nav-label {
    font-size: 12px;
    opacity: 0.65;
    margin-bottom: 4px;
    display: block;
}

.post-nav-title {
    font-weight: 600;
    font-size: 15px;
}

@media (max-width: 1024px) {
    .blog-hero-title {
        font-size: 2.15rem;
    }
    .blog-grid {
        gap: 20px;
    }
    .single-article-card {
        padding: 32px 28px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 34px 0 24px;
    }
    .blog-hero-title {
        font-size: 1.75rem;
    }
    .blog-hero-desc {
        font-size: 0.95rem;
        margin-bottom: 18px;
    }
    .blog-toolbar {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    .blog-cat-pill {
        padding: 6px 12px;
        font-size: 12.5px;
    }
    .blog-card-body {
        padding: 18px;
    }
    .blog-card-title {
        font-size: 1.12rem;
    }
    .single-container {
        padding: 20px 0 50px;
    }
    .single-article-card {
        padding: 22px 16px;
        border-radius: 16px;
    }
    .single-title {
        font-size: 1.5rem;
    }
    .single-content {
        font-size: 1rem;
        line-height: 1.78;
    }
    .post-navigation-cards {
        grid-template-columns: 1fr;
    }
    .blog-search-form {
        width: 100%;
    }
    .blog-search-input {
        flex: 1;
        width: auto;
    }
}

/* ========================================================
   代码块与 AI 提示词块：自动换行不截断 + 语法高亮 + 最多 3 行折叠
   ======================================================== */
.single-content pre,
.single-content pre code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    overflow-x: hidden !important;
    line-height: 1.65;
}

.single-content pre {
    background: #0d1117 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
}

.jikeku-copyable-block {
    position: relative;
    padding-top: 44px !important;
}

.single-content blockquote.jikeku-copyable-block {
    padding: 44px 20px 18px 20px !important;
}

.jikeku-code-collapsed {
    max-height: var(--jikeku-max-h, 110px) !important;
    overflow: hidden !important;
    position: relative;
}

.jikeku-code-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 36px;
    background: linear-gradient(to bottom, transparent, rgba(13, 17, 23, 0.92));
    pointer-events: none;
}

.single-content blockquote.jikeku-code-collapsed::after {
    background: linear-gradient(to bottom, transparent, rgba(241, 245, 249, 0.95));
}

body.dark-theme .single-content blockquote.jikeku-code-collapsed::after {
    background: linear-gradient(to bottom, transparent, rgba(30, 41, 59, 0.95));
}

.jikeku-expand-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: -12px;
    margin-bottom: 18px;
}

.jikeku-expand-btn {
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.25);
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jikeku-expand-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

body.dark-theme .jikeku-expand-btn {
    background: rgba(96, 165, 250, 0.14);
    border-color: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

body.dark-theme .jikeku-expand-btn:hover {
    background: #3b82f6;
    color: #ffffff;
}

.single-content blockquote.jikeku-copyable-block {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    padding: 44px 20px 18px 20px !important;
}

body.dark-theme .single-content blockquote.jikeku-copyable-block {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(96, 165, 250, 0.25);
    border-left-color: #60a5fa;
}

.jikeku-copy-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(30, 41, 59, 0.75);
    color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.single-content blockquote .jikeku-copy-btn {
    background: #ffffff;
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body.dark-theme .single-content blockquote .jikeku-copy-btn {
    background: rgba(15, 23, 42, 0.85);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

.jikeku-copy-btn:hover {
    transform: translateY(-1px);
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.jikeku-copy-btn.is-copied {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* ========================================================
   评论区统一美化（圆角大气、明暗主题适配）
   ======================================================== */
.comments-area {
    color: inherit;
}

.comments-title,
.comment-reply-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-notes,
.logged-in-as {
    font-size: 13.5px;
    opacity: 0.72;
    margin-bottom: 18px;
}

.logged-in-as a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

body.dark-theme .logged-in-as a {
    color: #60a5fa;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-form p {
    margin: 0;
}

.comment-form label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.85;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.02);
    color: inherit;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.6;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.comment-form textarea {
    min-height: 130px;
    resize: vertical;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body.dark-theme .comment-form textarea,
body.dark-theme .comment-form input[type="text"],
body.dark-theme .comment-form input[type="email"],
body.dark-theme .comment-form input[type="url"] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .comment-form textarea:focus,
body.dark-theme .comment-form input[type="text"]:focus,
body.dark-theme .comment-form input[type="email"]:focus,
body.dark-theme .comment-form input[type="url"]:focus {
    background: rgba(15, 23, 42, 0.9);
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.comment-form-cookies-consent label {
    margin: 0 !important;
    font-weight: 400 !important;
    cursor: pointer;
}

.comment-form .form-submit {
    margin-top: 4px;
}

.comment-form .form-submit .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    transition: all 0.25s ease;
}

.comment-form .form-submit .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

/* 评论列表美化 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-list .comment-body {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-theme .comment-list .comment-body {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author img.avatar {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.comment-metadata {
    font-size: 12.5px;
    opacity: 0.65;
    margin-bottom: 10px;
}

.comment-content p {
    margin: 0;
    line-height: 1.7;
}

.comment-list .reply {
    margin-top: 10px;
}

.comment-reply-link {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    text-decoration: none;
}

.comment-reply-link:hover {
    background: #2563eb;
    color: #ffffff;
}

/* ========================================================
   黑夜模式 (dark-theme) 全站文章与 UI 彻底黑白反转高对比度适配
   ======================================================== */
body.dark-theme {
    color: #f1f5f9;
}

body.dark-theme .blog-hero-title,
body.dark-theme .blog-card-title,
body.dark-theme .single-title,
body.dark-theme .post-nav-title,
body.dark-theme .comments-title,
body.dark-theme .comment-reply-title {
    color: #ffffff;
}

body.dark-theme .blog-hero-desc,
body.dark-theme .blog-card-excerpt,
body.dark-theme .blog-card-date,
body.dark-theme .single-meta,
body.dark-theme .blog-breadcrumb,
body.dark-theme .comment-metadata,
body.dark-theme .post-nav-label,
body.dark-theme .comment-notes,
body.dark-theme .logged-in-as {
    color: #cbd5e1;
    opacity: 1;
}

body.dark-theme .blog-card,
body.dark-theme .single-article-card,
body.dark-theme .post-nav-card {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

/* 强制反转文章正文（包含从外部复制粘贴自带深灰字体/白色背景的 HTML 内容） */
body.dark-theme .single-content {
    color: #e2e8f0;
}

body.dark-theme .single-content h1,
body.dark-theme .single-content h2,
body.dark-theme .single-content h3,
body.dark-theme .single-content h4,
body.dark-theme .single-content h5,
body.dark-theme .single-content h6 {
    color: #ffffff !important;
}

body.dark-theme .single-content p,
body.dark-theme .single-content li,
body.dark-theme .single-content dt,
body.dark-theme .single-content dd,
body.dark-theme .single-content td,
body.dark-theme .single-content th,
body.dark-theme .single-content strong,
body.dark-theme .single-content b,
body.dark-theme .single-content em,
body.dark-theme .single-content span:not([class*="hljs"]):not(.jikeku-copy-btn *),
body.dark-theme .single-content div:not([class*="wp-block-code"]):not([class*="highlight"]) {
    color: #e2e8f0 !important;
    background-color: transparent !important;
}

body.dark-theme .single-content a {
    color: #60a5fa !important;
}

body.dark-theme .single-content a:hover {
    color: #93c5fd !important;
}

body.dark-theme .single-content code {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
}

body.dark-theme .single-content pre {
    background: #0d1117 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .single-content blockquote,
body.dark-theme .single-content blockquote p,
body.dark-theme .single-content blockquote span {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #f1f5f9 !important;
}

body.dark-theme .single-content table {
    border-collapse: collapse;
}

body.dark-theme .single-content th,
body.dark-theme .single-content td {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .single-content th {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

body.dark-theme .single-content hr {
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .comment-content p {
    color: #e2e8f0;
}

/* 兼容文章自带深色概览卡片，确保内部介绍文字始终亮白清晰 */
.tts-overview-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 0 0 28px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
}
.tts-overview-kicker {
    font-size: 13px !important;
    color: #38bdf8 !important;
    font-weight: 700;
    margin: 0 0 8px !important;
}
.tts-overview-title {
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.38 !important;
    margin: 0 0 10px !important;
    color: #ffffff !important;
}
.tts-overview-card p,
.tts-overview-card .tts-overview-desc {
    color: #e2e8f0 !important;
}

/* 内置“数字章节标题”与“避坑提醒框”全局样式（全站原生支持，黑夜模式自动适配） */
.tts-ch-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 26px !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
    color: #0f172a;
    margin: 36px 0 20px !important;
    padding: 0 0 12px !important;
    border-bottom: 4px solid #2563eb;
}
.tts-ch-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 21px;
    font-weight: 900;
    flex-shrink: 0;
}
body.dark-theme .tts-ch-heading {
    color: #ffffff !important;
    border-bottom-color: #3b82f6;
}
body.dark-theme .tts-ch-num {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.jk-warn-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    color: #92400e;
}
.jk-warn-box p {
    margin: 0 !important;
}
body.dark-theme .jk-warn-box {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    border-left-color: #f59e0b !important;
}
body.dark-theme .jk-warn-box p,
body.dark-theme .jk-warn-box strong {
    color: #fde68a !important;
}

/* ========================================================
   永久内置全套 .tts-* 教程排版样式（前后台一致，不受编辑器过滤影响）
   ======================================================== */
.tts-blog-article { font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif; color: #111827; line-height: 1.85; font-size: 18px; max-width: 100% !important; margin: 0 auto; }

/* 解除文章内部所有外部容器（如 .tts-c-wrap 等）的固定宽度限制，实现全宽度自适应 */
.single-content > *,
.single-content .tts-c-wrap,
.single-content .wp-block-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
}

.single-content .tts-c-figure img,
.single-content figure.wp-block-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* 黑夜模式对 .tts-c-* 组件的自适应适配 */
body.dark-theme .tts-c-yt-bar {
    background: rgba(220, 38, 38, 0.14) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    border-left-color: #ef4444 !important;
}
body.dark-theme .tts-c-yt-title { color: #fca5a5 !important; }
body.dark-theme .tts-c-yt-sub { color: #e2e8f0 !important; }
body.dark-theme .tts-c-summary {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}
body.dark-theme .tts-c-sec-title {
    color: #ffffff !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}
.tts-blog-article p { margin: 0 0 14px; font-size: 17.5px; color: #1f2937; }
.tts-blog-article code { background: #f1f5f9; color: #0f172a; padding: 2px 6px; border-radius: 5px; font-size: 0.9em; font-family: "JetBrains Mono", Consolas, monospace; }
.tts-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tts-badge { display: inline-block; background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(56, 189, 248, 0.45); color: #7dd3fc !important; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.tts-toc { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.tts-toc a { color: #e2e8f0 !important; background: rgba(255, 255, 255, 0.09); text-decoration: none !important; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 8px; transition: all 0.15s; }
.tts-toc a:hover { background: #2563eb; color: #ffffff !important; }
.tts-links-box { background: rgba(37, 99, 235, 0.03); border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 14px; padding: 16px 20px; margin: 0 0 26px; }
.tts-links-title { font-size: 15.5px; font-weight: 700; color: #0f172a; margin: 0 0 12px; }
.tts-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tts-link-card { display: flex; flex-direction: column; justify-content: center; gap: 3px; background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.07); border-radius: 10px; padding: 10px 14px; text-decoration: none !important; color: #0f172a; transition: all 0.2s ease; }
.tts-link-card:hover { border-color: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08); }
.tts-link-card strong { color: #2563eb; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.tts-link-card span { font-size: 12.5px; color: #64748b; line-height: 1.45; word-break: break-word; }
.tts-ch-section { margin: 38px 0 44px; padding-bottom: 8px; }
.tts-step-list { margin: 0 0 18px; padding-left: 26px; color: #1f2937; }
.tts-step-list li { margin-bottom: 10px; font-size: 17.5px; line-height: 1.75; }
.tts-key-note { background: #f1f5f9; border-radius: 10px; padding: 14px 18px; margin: 0 0 18px; color: #1e293b; font-size: 17px; }
.tts-code-card { border: 1px solid #1e293b; border-radius: 12px; overflow: hidden; margin: 16px 0 20px; background: #0b1120; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12); }
.tts-code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #1e293b; color: #e2e8f0; font-size: 14.5px; font-weight: 700; border-radius: 10px; margin-top: 18px; margin-bottom: 8px; }
.tts-code-card .tts-code-head { margin-top: 0; margin-bottom: 0; border-radius: 0; }
.tts-copy-btn { background: #2563eb; color: #ffffff !important; border: none; border-radius: 6px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease; }
.tts-copy-btn:hover { background: #1d4ed8; }
.tts-copy-btn.is-copied { background: #10b981 !important; }
/* 按钮移入代码框内部右上角后的精准定位 */
.jikeku-has-inner-copy { position: relative !important; }
.jikeku-has-inner-copy .tts-copy-btn { position: absolute; top: 10px; right: 12px; z-index: 2; }
.jikeku-copy-inline-pad { padding-right: 136px !important; }
.tts-code-pre { margin: 0 !important; padding: 16px 18px !important; background: #0b1120 !important; color: #7dd3fc !important; font-family: "JetBrains Mono", Consolas, Monaco, monospace; font-size: 15.5px; line-height: 1.65; white-space: pre-wrap !important; word-break: break-word !important; }
.tts-code-pre code { background: transparent !important; padding: 0 !important; font-size: inherit; color: inherit; }
.tts-pitfall-box { background: #fef2f2; border: 1px solid #fecaca; border-left: 6px solid #dc2626; border-radius: 10px; padding: 15px 18px; margin: 18px 0; color: #7f1d1d; }
.tts-pitfall-box strong { display: block; font-size: 16.5px; color: #b91c1c; margin-bottom: 8px; }
.tts-pitfall-item { margin-bottom: 6px; font-size: 16px; line-height: 1.7; }
.tts-pitfall-item:last-child { margin-bottom: 0; }
.tts-glossary-table { width: 100%; border-collapse: collapse; margin: 14px 0 28px; font-size: 15.5px; }
.tts-glossary-table th, .tts-glossary-table td { border: 1px solid #e2e8f0; padding: 10px 12px; text-align: left; }
.tts-glossary-table th { background: #f8fafc; font-weight: 700; color: #0f172a; }

/* 黑夜模式对 .tts-* 组件的完整适配 */
body.dark-theme .tts-links-box { background: rgba(255, 255, 255, 0.03) !important; border-color: rgba(255, 255, 255, 0.08) !important; }
body.dark-theme .tts-links-title { color: #ffffff !important; }
body.dark-theme .tts-link-card { background: #1e293b !important; border-color: rgba(255, 255, 255, 0.1) !important; }
body.dark-theme .tts-link-card:hover { border-color: #60a5fa !important; }
body.dark-theme .tts-link-card strong { color: #60a5fa !important; }
body.dark-theme .tts-link-card span { color: #94a3b8 !important; }
body.dark-theme .tts-key-note { background: #0f172a !important; color: #e2e8f0 !important; }
body.dark-theme .tts-pitfall-box { background: rgba(220, 38, 38, 0.14) !important; border-color: rgba(248, 113, 113, 0.35) !important; border-left-color: #ef4444 !important; }
body.dark-theme .tts-pitfall-box strong { color: #fca5a5 !important; }
body.dark-theme .tts-pitfall-item { color: #fecaca !important; }



