/* ==========================================================================
   神经科学配件创新发展趋势与应用实践 - 全功能 Halo/CMS 文章详情规范 CSS
   包含 12 大核心组件、边界异常处理、响应式自适应布局
   ========================================================================== */

:root {
    --primary-blue: #4D6FF9;
    --bullet-blue: #0443FB; /* 无序序号专用蓝色 */
    --primary-hover: #3b5de0;
    --primary-light: #ecf1ff;
    --primary-border: #c7d5ff;
    --tag-bg: #ecf1ff;
    --tag-text: #4D6FF9;

    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;

    --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.08);

    --post-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Noto Sans SC", sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.65;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Page Wrapper */
.page-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 24px 40px 24px;
}

.post-page {
    font-family: var(--post-font-family);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-blue);
}

.breadcrumb .separator {
    color: #cbd5e1;
}

.breadcrumb .current {
    color: var(--text-body);
    font-weight: 500;
    word-break: break-word;
}

/* Main Layout Grid */
.main-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.article-container {
    flex: 1;
    min-width: 0;
}

.sidebar-container {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 96px;
}

/* Common Card Base */
.card-box {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

/* Article Detail Card */
.article-detail-card {
    padding: 32px 38px;
    margin-bottom: 24px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ==================== 一、文章顶部 (Article Header) ==================== */
.article-header {
    margin-bottom: 28px;
}

.category-tag-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.category-tag {
    display: inline-block;
    background-color: var(--tag-bg);
    color: var(--tag-text);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
}

.article-main-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.35;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
    word-break: break-word;
}

.article-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    background-color: #f8fafc;
    border-left: 3px solid var(--primary-blue);
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
}

.hero-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 380px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    background-color: #f1f5f9;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-widget-shell {
    overflow-anchor: none;
}

/* Author & Meta Row */
.author-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.author-detail {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
}

.author-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.meta-info-list {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Tags & Share Bar */
.tags-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.tags-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.label-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.tag-item {
    background-color: #ecf1ff;
    color: var(--primary-blue);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.tag-item:hover {
    background-color: #dde6ff;
}

.share-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn svg {
    width: 15px;
    height: 15px;
}

.share-btn:hover {
    background-color: var(--primary-blue);
    color: #ffffff;
}

/* ==================== 二、正文基础元素 (Body Headings & Paragraphs) ==================== */
.article-body {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.8;
}

.article-body h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
    margin-top: 38px;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary-blue);
    line-height: 1.4;
}

.article-body h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin-top: 32px;
    margin-bottom: 14px;
    line-height: 1.4;
    letter-spacing: -0.1px;
}

.article-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-heading);
    margin-top: 24px;
    margin-bottom: 10px;
}

.article-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin-top: 20px;
    margin-bottom: 8px;
}

.article-body h5 {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    margin-top: 16px;
    margin-bottom: 6px;
}

.article-body h6 {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-top: 14px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.paragraph {
    margin-bottom: 16px;
    color: #334155;
}

.styled-hr {
    border: none;
    height: 1px;
    background-color: #e2e8f0;
    margin: 32px 0;
}

/* ==================== 三、文字格式 (Text Styles & Highlights) ==================== */
.article-body strong {
    font-weight: 700;
    color: #0f172a;
}

.article-body em {
    font-style: italic;
    color: #334155;
}

.article-body u {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body del {
    text-decoration: line-through;
    color: #94a3b8;
}

.article-body a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.article-body a:hover {
    color: var(--primary-hover);
}

.article-body sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.5em;
}

.article-body sub {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    bottom: -0.25em;
}

/* Color Utilities */
.text-red { color: #ef4444; }
.text-green { color: #10b981; }
.text-blue { color: var(--primary-blue); }
.text-gray { color: #64748b; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }

/* Highlights */
mark.highlight-yellow {
    background-color: #fef08a;
    color: #854d0e;
    padding: 2px 6px;
    border-radius: 4px;
}

mark.highlight-blue {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==================== 四、引用与提示 (Blockquotes) ==================== */
.standard-blockquote {
    border-left: 4px solid var(--primary-blue);
    background-color: #f8fafc;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    color: #475569;
    font-size: 14px;
}

.complex-blockquote {
    border-left: 4px solid var(--primary-blue);
    background-color: #f0f4ff;
    padding: 20px 24px;
    border-radius: 0 10px 10px 0;
    margin: 24px 0;
}

.quote-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.quote-box {
    background-color: #ecf1ff;
    border-radius: 8px;
    padding: 24px 32px;
    margin: 28px 0;
    position: relative;
}

.quote-content {
    font-size: 15px;
    font-weight: 600;
    color: #4D6FF9;
    line-height: 1.7;
    text-align: center;
    position: relative;
    z-index: 1;
}

.quote-content::before {
    content: "“";
    font-size: 32px;
    font-family: Georgia, serif;
    color: #4D6FF9;
    margin-right: 8px;
}

.quote-content::after {
    content: "”";
    font-size: 32px;
    font-family: Georgia, serif;
    color: #4D6FF9;
    margin-left: 8px;
}

.quote-author {
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
    margin-top: 12px;
}

/* ==================== 五、列表系统与蓝色无序圆点 ==================== */
.custom-ul {
    margin: 16px 0 24px 24px;
    color: var(--text-body);
}

.custom-ul li::marker {
    color: var(--bullet-blue); /* 指定 0443FB 蓝色 */
    font-size: 1.1em;
}

.custom-ul li, .custom-ol li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.custom-ul ul, .custom-ol ol {
    margin: 6px 0 6px 20px;
}

/* 应用场景专属列表组件 (.app-list) */
.app-list {
    list-style: none;
    margin: 16px 0 24px 0;
}

.app-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-body);
}

/* 核心要求：前面的无序序号为 0443FB 蓝色 */
.app-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    top: -2px;
    color: var(--bullet-blue); /* #0443FB */
    font-size: 20px;
    font-weight: bold;
}

.app-list strong {
    color: var(--text-heading);
}

/* Task Lists */
.task-list {
    list-style: none;
    margin: 16px 0 24px 0;
    padding: 0;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-item.completed .task-checkbox {
    background-color: var(--primary-blue);
    color: #ffffff;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #94a3b8;
}

.task-item.pending .task-checkbox {
    border: 2px solid #cbd5e1;
    background-color: #ffffff;
}

/* ==================== 六、图片与画廊 (Images & Galleries) ==================== */
.img-container {
    margin: 20px 0;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.img-left {
    float: left;
    margin: 0 20px 16px 0;
    max-width: 45%;
}

.img-right {
    float: right;
    margin: 0 0 16px 20px;
    max-width: 45%;
}

.img-center {
    margin: 20px auto;
    display: block;
    text-align: center;
}

.img-portrait {
    max-width: 240px;
    height: auto;
    border-radius: 8px;
}

.img-tall {
    max-height: 380px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

figure.article-figure {
    margin: 20px 0;
    text-align: center;
}

figure.article-figure img {
    max-width: 100%;
    border-radius: 8px;
}

figcaption.figure-caption {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* Multi-photo Galleries */
.gallery-grid {
    display: grid;
    gap: 14px;
    margin: 20px 0 28px 0;
}

.gallery-grid.col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-grid.col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    height: 140px;
    background-color: #f1f5f9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* 经典 3 卡片场景展示 */
.scenes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 28px;
}

.scene-card {
    text-align: center;
}

.scene-img-box {
    width: 100%;
    height: 135px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.scene-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.scene-card:hover .scene-img-box img {
    transform: scale(1.04);
}

.scene-caption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* ==================== 七、表格系统 (Tables) ==================== */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0 28px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
    white-space: nowrap;
}

.custom-table th {
    background-color: #f8fafc;
    color: var(--text-heading);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-body);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:nth-child(even) {
    background-color: #fafafa;
}

.custom-table tr:hover {
    background-color: #f1f5f9;
}

/* ==================== 八、代码系统 (Code Blocks) ==================== */
.code-block-wrapper {
    border-radius: 8px;
    overflow: hidden;
    margin: 24px 0 28px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.code-header {
    background-color: #1e293b;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 12px;
    font-family: monospace;
}

.code-copy-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.btn-icon {
    width: 14px;
    height: 14px;
}

.code-copy-btn:hover {
    color: #ffffff;
}

.code-body {
    background-color: #0f172a;
    padding: 16px;
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
}

.code-line {
    display: flex;
}

.line-num {
    width: 28px;
    color: #475569;
    user-select: none;
    text-align: right;
    padding-right: 14px;
}

.line-content {
    color: #e2e8f0;
    white-space: pre;
}

.code-keyword { color: #c084fc; font-weight: 600; }
.code-variable { color: #38bdf8; }
.code-string { color: #4ade80; }
.code-number { color: #facc15; }
.code-func { color: #60a5fa; }

/* ==================== 九、多媒体 (Multimedia: Audio, Video, Iframe) ==================== */
.media-container {
    margin: 24px 0;
}

.custom-audio-player {
    width: 100%;
    border-radius: 8px;
    outline: none;
    background-color: #f1f5f9;
}

.responsive-video-box {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000000;
    margin: 16px 0;
}

.responsive-video-box video {
    width: 100%;
    height: auto;
    display: block;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    background-color: #0f172a;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.media-error-box {
    background-color: #fef2f2;
    border: 1px dashed #fca5a5;
    border-radius: 8px;
    padding: 16px 20px;
    color: #991b1b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

/* ==================== 十、特殊结构 (Accordions & Multi-Columns) ==================== */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 28px;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.accordion-header {
    background-color: #f8fafc;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    user-select: none;
}

.accordion-title-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bullet-chevron {
    width: 14px;
    height: 14px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.accordion-item.collapsed .accordion-header {
    color: var(--text-heading);
}

.accordion-item.collapsed .bullet-chevron {
    color: var(--text-muted);
}

.accordion-item.collapsed .arrow-icon {
    color: var(--text-muted);
    transform: rotate(180deg);
}

.accordion-body {
    padding: 14px 18px 14px 38px;
    background-color: #ffffff;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    line-height: 1.6;
}

.accordion-item.collapsed .accordion-body {
    display: none;
}

.grid-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.grid-col-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
}

/* ==================== 十一、对齐与缩进 (Alignments & Indents) ==================== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-indent { text-indent: 2em; }
.indent-level-1 { padding-left: 20px; }
.indent-level-2 { padding-left: 40px; }

/* ==================== 十二、文章底部 (Article Footer Nav & Comments) ==================== */
.article-nav-bar {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 36px;
    margin-bottom: 32px;
}

.nav-link-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    gap: 4px;
}

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

.nav-link-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.nav-label {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link-item.next .nav-label {
    justify-content: flex-end;
}

.nav-icon {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

.nav-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    transition: color 0.2s ease;
}

.nav-link-item:hover .nav-title {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Comments Section */
.comments-section {
    margin-top: 24px;
    padding: 24px 28px 28px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.comments-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-blue);
    font-size: 14px;
}

.comments-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.sort-dropdown-box {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.dropdown-icon {
    width: 14px;
    height: 14px;
}

.comment-input-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.user-avatar-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
}

.user-avatar-placeholder svg {
    width: 22px;
    height: 22px;
}

.comment-textarea {
    flex: 1;
    height: 76px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 13px;
    background-color: #f8fafc;
    resize: none;
    outline: none;
    transition: border 0.2s ease;
}

.comment-textarea:focus {
    border-color: var(--primary-blue);
    background-color: #ffffff;
}

.comment-submit-btn {
    background-color: var(--primary-blue);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-end;
    box-shadow: 0 4px 12px rgba(77, 111, 249, 0.25);
}

.comment-submit-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(77, 111, 249, 0.35);
}

/* Comments Disabled State */
.comments-disabled-box {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================== 侧边栏 Widget (Sidebar Widgets) ==================== */
.sidebar-card {
    padding: 20px 22px;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* TOC Widget */
.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.article-toc-card .toc-list {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.toc-item a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    padding: 2px 0;
    transition: color 0.2s ease;
}

.toc-item.sub-item {
    padding-left: 16px;
}

.toc-item a:hover,
.toc-item.active a {
    color: var(--primary-blue);
    font-weight: 600;
}

.toc-bottom-links {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.toc-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.toc-bottom-links a:hover {
    color: var(--primary-blue);
}

.link-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Recommended Articles Widget */
.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommend-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
}

.recommend-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f1f5f9;
}

.recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recommend-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.recommend-item:hover .recommend-item-title {
    color: var(--primary-blue);
}

.recommend-item-meta {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    gap: 10px;
}

/* Tag Cloud Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cloud-tag {
    background-color: #f1f5f9;
    color: var(--text-body);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cloud-tag:hover {
    background-color: var(--primary-light);
    color: var(--primary-blue);
}

/* Bottom CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #3b5de0 0%, #4D6FF9 50%, #2a4acb 100%);
    border-radius: 14px;
    padding: 32px 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    margin-top: 36px;
    box-shadow: 0 10px 30px rgba(77, 111, 249, 0.28);
}

.cta-text-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cta-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.cta-desc {
    font-size: 14px;
    color: #dbeafe;
}

.cta-btn {
    background-color: #ffffff;
    color: #4D6FF9;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-arrow {
    width: 16px;
    height: 16px;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* ==================== 响应式自适应 (Responsive Queries) ==================== */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar-container {
        width: 100%;
        position: static;
    }

    .grid-col-2, .grid-col-3, .scenes-grid, .gallery-grid.col-3, .gallery-grid.col-2 {
        grid-template-columns: 1fr;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 28px 24px;
    }
    
    .img-left, .img-right {
        float: none;
        max-width: 100%;
        margin: 16px 0;
    }
}

@media (max-width: 640px) {
    .page-container {
        padding: 12px 14px 28px 14px;
    }

    .article-detail-card {
        padding: 20px 16px;
    }

    .comments-section {
        padding: 20px 16px 22px;
    }

    .article-main-title {
        font-size: 22px;
    }

    .article-body h1 {
        font-size: 20px;
    }

    .article-body h2 {
        font-size: 18px;
    }

    .author-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Halo editor output normalization. */
.post-page.page-container { max-width: 1400px; margin: 0 auto; }
.article-body { color: var(--text-body); }
.article-body p { margin: 0 0 1.15em; }
.article-body img, .article-body video, .article-body iframe, .article-body audio { max-width: 100%; }
.article-body img { height: auto; border-radius: 8px; }
.article-body figure { margin: 28px 0; text-align: center; }
.article-body figcaption { margin-top: 10px; color: var(--text-muted); font-size: 13px; }
.article-body blockquote { margin: 24px 0; padding: 18px 24px; border-left: 4px solid #1a62ff; background: #f2f6ff; color: #334155; border-radius: 0 8px 8px 0; }
.article-body ul, .article-body ol { margin: 1em 0 1.25em; padding-left: 1.7em; }
.article-body li { margin: .4em 0; }
.article-body hr { margin: 36px 0; border: 0; border-top: 1px solid var(--border-color); }
.article-body table { width: 100%; min-width: 560px; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.article-body .tableWrapper { overflow-x: auto; margin: 24px 0; }
.article-body th, .article-body td { padding: 11px 14px; border: 1px solid var(--border-color); text-align: left; }
.article-body th { background: #f1f5fb; color: var(--text-heading); font-weight: 700; }
.article-body code { padding: 2px 6px; border-radius: 4px; background: #eef2f7; color: #be185d; font: 0.9em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-body pre { overflow-x: auto; margin: 24px 0; padding: 18px 20px; border-radius: 8px; background: #0f172a; color: #e2e8f0; }
.article-body pre code { padding: 0; background: transparent; color: inherit; }
.article-body .task-list { list-style: none; padding-left: 0; }
.article-body .task-list li { display: flex; gap: 8px; align-items: flex-start; }
.article-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.nav-article { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--border-color); border-radius: 10px; color: inherit; text-decoration: none; background: var(--bg-card); }
.nav-article span { color: var(--text-muted); font-size: 13px; }
.nav-article strong { color: var(--text-heading); }
.nav-article.next { text-align: right; }
.toc-empty { color: var(--text-muted); font-size: 13px; }
.toc-item { display: block; padding: 5px 0; color: var(--text-muted); text-decoration: none; font-size: 13px; }
.toc-item:hover { color: var(--primary-blue); }
.toc-level-1 { font-weight: 700; color: var(--text-heading); }
.toc-level-3, .toc-level-4, .toc-level-5, .toc-level-6 { padding-left: 14px; }
.post-page { padding-top: 104px; }
.comment-widget-shell {
    margin-top: 0;
    --halo-cw-base-font-family: var(--post-font-family);
    --halo-cw-base-font-size: 14px;
    --halo-cw-base-rounded: 8px;
    --halo-cw-avatar-rounded: 50%;
    --halo-cw-primary-1-color: var(--primary-blue);
    --halo-cw-primary-2-color: #b9c8ff;
    --halo-cw-primary-3-color: var(--primary-light);
    --halo-cw-muted-1-color: var(--border-color);
    --halo-cw-muted-2-color: #f1f5f9;
    --halo-cw-muted-3-color: #ffffff;
    --halo-cw-text-1-color: var(--text-heading);
    --halo-cw-text-2-color: var(--text-muted);
    --halo-cw-text-3-color: var(--text-light);
}
.comment-widget-shell comment-widget { display: block; width: 100%; }
.recommend-item { color: inherit; }
.recommend-thumb { display: grid; place-items: center; color: #1a62ff; }
.recommend-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recommend-info { min-width: 0; }
.article-body blockquote { display: block !important; margin: 24px 0 !important; padding: 18px 24px !important; border-left: 4px solid #1a62ff !important; border-radius: 0 8px 8px 0 !important; background: #f0f4ff !important; color: #334155 !important; }
.article-body blockquote p { margin: 0 0 8px !important; color: #334155 !important; }
.article-body blockquote p:last-child { margin-bottom: 0 !important; }
.article-body blockquote::before { content: '“'; display: block; height: 10px; color: #1a62ff; font: 700 30px/18px Georgia, serif; }
.article-body .code-block-wrapper { margin: 24px 0 28px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(15, 23, 42, .14); }
.article-body .code-block-wrapper .code-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #1e293b; color: #94a3b8; font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-body .code-block-wrapper .code-copy-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #94a3b8; cursor: pointer; font: inherit; }
.article-body .code-block-wrapper .code-copy-btn:hover { color: #fff; }
.article-body .code-block-wrapper pre { margin: 0 !important; border: 0; border-radius: 0; box-shadow: none; }
.article-body > ul:not([data-type="taskList"]), .article-body ul:not([data-type="taskList"]) ul { list-style-type: disc; padding-left: 30px; margin: 18px 0 24px; }
.article-body > ol, .article-body ol ol { list-style-type: decimal; padding-left: 30px; margin: 18px 0 24px; }
.article-body > ul:not([data-type="taskList"]) li::marker { color: var(--bullet-blue); font-size: 1.05em; }
.article-body > ol li::marker { color: var(--primary-blue); font-weight: 700; }
.article-body pre { display: block; width: 100%; overflow-x: auto; margin: 24px 0 28px; padding: 20px 22px; border: 1px solid #1e293b; border-radius: 8px; background: #0f172a !important; color: #e2e8f0 !important; box-shadow: 0 4px 12px rgba(15, 23, 42, .14); white-space: pre; }
.article-body pre code { display: block; padding: 0; border: 0; background: transparent !important; color: #e2e8f0 !important; font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.article-body details { margin: 24px 0; border: 1px solid var(--border-color); border-radius: 8px; background: #f8fafc; overflow: hidden; }
.article-body details summary { padding: 14px 18px; cursor: pointer; list-style: none; color: var(--text-heading); font-weight: 700; background: #f1f5fb; }
.article-body details summary::-webkit-details-marker { display: none; }
.article-body details summary::before { content: '›'; display: inline-block; margin-right: 10px; color: var(--primary-blue); font-size: 20px; line-height: 12px; transition: transform .2s ease; }
.article-body details[open] summary::before { transform: rotate(90deg); }
.article-body details > [data-type="detailsContent"] { padding: 16px 18px 6px; }
.article-body .columns { display: flex; width: 100%; gap: 1em; margin: 24px 0; align-items: stretch; }
.article-body .column { min-width: 0; flex: 1 1 0; box-sizing: border-box; padding: 16px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; }
.article-body ul[data-type="taskList"] { list-style: none; margin: 18px 0 26px; padding: 0; }
.article-body li[data-type="taskItem"] { display: flex; align-items: flex-start; gap: 10px; margin: 9px 0; }
.article-body li[data-type="taskItem"] > label { flex: 0 0 18px; margin-top: 4px; }
.article-body li[data-type="taskItem"] > label input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary-blue); }
.article-body li[data-type="taskItem"] > div { flex: 1; min-width: 0; }
.article-body li[data-type="taskItem"][data-checked="true"] > div { color: #94a3b8; text-decoration: line-through; }
.article-body > div[style*="overflow-x"] { overflow-x: auto !important; margin: 22px 0 28px; border: 1px solid var(--border-color); border-radius: 8px; }
.article-body > div[style*="overflow-x"] table { min-width: 560px; width: 100%; margin: 0; border-collapse: collapse; }
.article-body > div[style*="overflow-x"] th, .article-body > div[style*="overflow-x"] td { padding: 12px 16px; border: 1px solid var(--border-color); }
.article-body > div[style*="overflow-x"] th { background: #f8fafc; color: var(--text-heading); font-weight: 700; }
.article-body pre { border: 1px solid #1e293b; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
@media (max-width: 900px) { .article-navigation { grid-template-columns: 1fr; } .nav-article.next { text-align: left; } }

/* Comprehensive tablet and phone adaptation for Halo editor output. */
@media (max-width: 992px) {
    .post-page {
        width: 100%;
        padding-top: 92px;
    }

    .post-page.page-container {
        max-width: 760px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .main-layout,
    .article-container,
    .article-detail-card,
    .article-body,
    .sidebar-container,
    .comment-widget-shell {
        min-width: 0;
        max-width: 100%;
    }

    .article-detail-card {
        padding: 28px 30px;
    }

    .article-main-title {
        font-size: 27px;
    }

    .sidebar-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .article-toc-card,
    .sidebar-container .sidebar-card:last-child {
        grid-column: 1 / -1;
    }

    .article-toc-card .toc-list {
        max-height: 320px;
    }
}

@media (max-width: 768px) {
    .post-page {
        padding-top: 82px;
    }

    .post-page.page-container {
        padding: 12px 14px 30px;
    }

    .breadcrumb {
        gap: 6px;
        margin-bottom: 14px;
        font-size: 12px;
        line-height: 1.5;
    }

    .breadcrumb .current {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .main-layout {
        gap: 18px;
    }

    .article-detail-card {
        margin-bottom: 18px;
        padding: 22px 18px;
        border-radius: 10px;
    }

    .article-header {
        margin-bottom: 22px;
    }

    .category-tag-group {
        margin-bottom: 11px;
    }

    .article-main-title {
        margin-bottom: 12px;
        font-size: 22px;
        line-height: 1.4;
        letter-spacing: 0;
    }

    .article-subtitle {
        margin-bottom: 18px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .hero-image-wrapper {
        aspect-ratio: 16 / 10;
        max-height: none;
        margin-bottom: 18px;
        border-radius: 8px;
    }

    .hero-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .author-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-bottom: 18px;
    }

    .author-info {
        width: 100%;
    }

    .author-detail {
        min-width: 0;
    }

    .author-name {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .meta-info-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
        font-size: 12px;
    }

    .meta-item {
        display: grid;
        grid-template-columns: 16px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 8px;
        min-height: 54px;
        min-width: 0;
        padding: 8px 10px;
        border: 1px solid #e8edf5;
        border-radius: 8px;
        background: #f8fafc;
    }

    .meta-item::before {
        content: attr(data-meta-label);
        grid-column: 2;
        color: var(--text-light);
        font-size: 10px;
        line-height: 1.2;
    }

    .meta-item .meta-icon {
        grid-column: 1;
        grid-row: 1 / 3;
        color: var(--primary-blue);
    }

    .meta-item > time,
    .meta-item > span {
        grid-column: 2;
        min-width: 0;
        overflow: hidden;
        color: var(--text-body);
        font-weight: 600;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tags-share-bar,
    .tags-group {
        align-items: flex-start;
    }

    .tags-share-bar {
        margin-top: 16px;
        margin-bottom: 20px;
    }

    .article-body {
        font-size: 14px;
        line-height: 1.78;
        overflow-wrap: anywhere;
    }

    .article-body h1 {
        margin-top: 30px;
        padding-left: 10px;
        font-size: 20px;
    }

    .article-body h2 { margin-top: 27px; font-size: 18px; }
    .article-body h3 { margin-top: 22px; font-size: 16px; }
    .article-body h4 { font-size: 15px; }
    .article-body h5 { font-size: 14px; }
    .article-body h6 { font-size: 13px; }

    .article-body figure,
    .article-body blockquote,
    .article-body pre,
    .article-body details,
    .article-body .columns,
    .article-body .tableWrapper,
    .article-body > div[style*="overflow-x"] {
        margin-top: 18px !important;
        margin-bottom: 22px !important;
    }

    .article-body blockquote {
        padding: 15px 16px !important;
    }

    .article-body .columns {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .article-body .column {
        width: 100%;
        padding: 14px;
    }

    .article-body .tableWrapper,
    .article-body > div[style*="overflow-x"],
    .article-body > table {
        display: block;
        max-width: 100%;
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .article-body table,
    .article-body > table {
        min-width: 520px;
        font-size: 13px;
    }

    .article-body th,
    .article-body td,
    .article-body > div[style*="overflow-x"] th,
    .article-body > div[style*="overflow-x"] td {
        padding: 9px 11px;
    }

    .article-body pre {
        max-width: 100%;
        padding: 16px;
        font-size: 12px;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .article-body pre code {
        font-size: 12px;
        line-height: 1.65;
    }

    .article-body .code-block-wrapper .code-header {
        gap: 12px;
        padding: 9px 12px;
    }

    .article-body details summary {
        padding: 12px 14px;
    }

    .article-body details > [data-type="detailsContent"] {
        padding: 14px 14px 4px;
    }

    .article-body .gallery-grid,
    .article-body .scenes-grid,
    .article-body .grid-col-2,
    .article-body .grid-col-3 {
        grid-template-columns: 1fr !important;
    }

    .article-body img,
    .article-body video,
    .article-body iframe,
    .article-body audio,
    .article-body embed,
    .article-body object {
        max-width: 100%;
    }

    .article-body iframe:not(.iframe-wrapper iframe) {
        width: 100%;
        min-height: 220px;
    }

    .article-navigation {
        gap: 12px;
        margin: 18px 0;
    }

    .nav-article {
        padding: 15px 16px;
    }

    .comments-section {
        margin-top: 18px;
        padding: 20px 16px 22px;
        overflow: hidden;
    }

    .comments-header {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .comment-widget-shell {
        width: 100%;
        overflow: hidden;
        --halo-cw-base-font-size: 13px;
        --halo-cw-avatar-size: 34px;
    }

    .comment-widget-shell comment-widget {
        min-width: 0;
        max-width: 100%;
    }

    .sidebar-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .post-page.page-container {
        padding-right: 10px;
        padding-left: 10px;
    }

    .article-detail-card,
    .comments-section {
        padding-right: 14px;
        padding-left: 14px;
    }

    .article-main-title {
        font-size: 21px;
    }

    .author-avatar {
        width: 38px;
        height: 38px;
    }

    .meta-info-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-body > ul:not([data-type="taskList"]),
    .article-body ul:not([data-type="taskList"]) ul,
    .article-body > ol,
    .article-body ol ol {
        padding-left: 24px;
    }

    .comments-heading-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .comments-title {
        font-size: 17px;
    }
}
