.sidebar *,
.editor-container *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* 确保菜单样式不被nodes页面样式影响 */
.nav-wrapper {
    background-color: #fff !important;
    height: 64px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 9999 !important;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    /* 参考数据页面：设置最小宽度确保布局稳定 */
    min-width: 1200px;
    overflow-y: scroll; /* 强制显示滚动条 */
}

.container {
    margin: 0;
    padding: 0;
    max-width: 100%; /* 完全按照NHANES的设置 */
}

/* 编辑器头部 */
.editor-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.editor-header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.divider {
    color: #ddd;
}

.edit-status {
    color: #666;
    font-size: 14px;
}

.header-right {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-draft {
    background: #f4f4f4;
    color: #666;
}

.btn-publish {
    background: #ca0c16;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* 编辑器主体 */
.editor-container {
    max-width: 1600px; /* 增加最大宽度以适应两栏布局 */
    margin: 76px auto 10px; /* 减少底部margin */
    padding: 0 16px;
    display: flex;
    gap: 20px;
}

.editor-main {
    flex: 1;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.title-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.title-input {
    width: 100%;
    font-size: 24px;
    border: none;
    outline: none;
    padding: 10px 0;
}

.category-section {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.category-item label {
    white-space: nowrap;
    color: #333;
    font-size: 14px;
    margin: 0;
    min-width: 42px;
}

.category-item select {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #999999;
    border-radius: 4px;
    outline: none;
    color: #333;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item select:hover {
    border-color: #bbb;
}

.category-item select:focus {
    border-color: #ca0c16;
    box-shadow: 0 0 0 2px rgba(202, 12, 22, 0.1);
}

/* 移除编辑器响应式调整 - 任何时候都不合并成一栏 */

@media (max-width: 768px) {
    .category-section {
        padding: 10px 15px;
        gap: 15px;
    }

    .category-item {
        width: 100%;
        min-width: unset;
    }

    .category-item select {
        width: 100%;
    }
}

.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #999999;
    border-radius: 6px;
    min-width: 300px;
    background: #fff;
    transition: all 0.3s ease;
}

.tags-input-container:focus-within {
    border-color: #ca0c16;
    box-shadow: 0 0 0 2px rgba(202, 12, 22, 0.1);
}

#tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-right: 4px;
}

.tag {
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
    border: 1px solid #999999;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #ebebeb;
    border-color: #d0d0d0;
}

.tag-remove {
    cursor: pointer;
    color: #666;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tag-remove:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #ca0c16;
}

.tag-remove i {
    font-size: 12px;
}

#tags-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 120px;
    font-size: 14px;
    padding: 4px;
    color: #333;
}

#tags-input::placeholder {
    color: #999;
}

#tags-input:disabled {
    background: transparent;
    cursor: not-allowed;
}

#tags-input.error {
    color: #ca0c16;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 标签输入容器响应式调整 */
@media (max-width: 768px) {
    .tags-input-container {
        min-width: 100%;
    }
    
    #tags-input {
        min-width: 80px;
    }
}

.editor-section {
    padding: 20px;
}

.editor-tabs {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.tab-btn.active {
    color: #ca0c16;
    border-bottom: 2px solid #ca0c16;
}

/* 编辑器侧边栏 */
.editor-sidebar {
    width: 300px;
    align-self: flex-start;
    position: sticky;
    top: 0px;
}

.sidebar-section {
    background: var(--light-bg, white);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.cover-upload {
    border: 2px dashed #999999;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.cover-upload:hover {
    border-color: #ca0c16;
}

#cover-preview {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cover-preview img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* 封面图片容器 */
.cover-image-container {
    position: relative;
    width: 100%;
}

/* 封面图片删除按钮 */
.cover-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cover-remove-btn:hover {
    background-color: rgba(202, 12, 22, 0.8);
    transform: scale(1.1);
}

.cover-remove-btn i {
    font-size: 14px;
}

/* 深色模式下的删除按钮 */
.theme-dark .cover-remove-btn {
    background-color: rgba(255, 255, 255, 0.2);
}

.theme-dark .cover-remove-btn:hover {
    background-color: rgba(202, 12, 22, 0.8);
}

.setting-item {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ca0c16;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Markdown 编辑器自定义样式 */
.EasyMDEContainer {
    border: none !important;
}

.editor-toolbar {
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-bottom: none;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: 2px;
}

.toolbar-divider {
    width: 1px;
    background: #dee2e6;
    margin: 0 5px;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    font-size: 14px;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.toolbar-btn.active {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #ca0c16;
}

.toolbar-btn i {
    font-size: 16px;
}

/* 编辑器内容区域样式 */
.editor-content {
    border: 1px solid #e9ecef;
    display: flex;
    height: calc(100vh - 400px); /* 减少高度，减少底部空白 */
    min-height: 500px; /* 设置最小高度确保可用性 */
}

.editor-wrapper {
    flex: 1;
    position: relative;
    min-width: 0; /* 防止flex项目溢出 */
}

.preview-wrapper {
    flex: 1;
    padding: 15px 20px; /* 减少上下padding */
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    min-width: 0; /* 防止flex项目溢出 */
}

/* 强制保持布局一致 - 确保两个区域始终占据相同的空间 */
.editor-content .editor-wrapper,
.editor-content .preview-wrapper {
    flex: 1 !important;
    width: 0 !important; /* 强制flex项目等宽 */
    min-width: 0 !important; /* 防止flex项目溢出 */
}

/* 更具体的规则确保优先级 */
.editor-container .editor-main .editor-content .editor-wrapper,
.editor-container .editor-main .editor-content .preview-wrapper {
    flex: 1 !important;
    width: 0 !important;
    min-width: 0 !important;
}

/* 预览模式样式 */
.preview-mode .editor-wrapper {
    display: none !important;
}

.preview-mode .preview-wrapper {
    display: block !important;
    flex: 1 !important;
}

/* 编辑模式样式 */
.editor-mode .editor-wrapper {
    display: block !important;
    flex: 1 !important;
}

.editor-mode .preview-wrapper {
    display: none !important;
}

.preview-wrapper.markdown-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.preview-wrapper .error {
    color: #ca0c16;
    padding: 20px;
    text-align: center;
    background: #fff5f5;
    border-radius: 4px;
    margin: 20px 0;
}

#editor {
    width: 100%;
    height: 100%;
    padding: 15px 20px; /* 减少上下padding */
    border: none;
    resize: none;
    outline: none;
    font-size: 16px;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#preview {
    font-size: 16px;
    line-height: 1.6;
}

/* 预览模式样式 - 已移动到上面，这里删除重复定义 */

/* 全屏模式样式 */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #fff;
}

.fullscreen .editor-content {
    height: calc(100vh - 56px);
}

/* 编辑器占位符样式 */
#editor::placeholder {
    color: #adb5bd;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #999999;
}

h1 {
    color: #2c3e50;
}

.new-post-btn, .back-btn, .submit-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.new-post-btn:hover, .back-btn:hover, .submit-btn:hover {
    background-color: #2980b9;
}

.post-card {
    background: var(--light-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.post-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.post-cover img:hover {
    transform: scale(1.05);
}

.post-content-wrapper {
    padding: 20px;
}

.post-title {
    margin: 0 0 10px;
    font-size: 1.5em;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #ca0c16;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.post-category {
    background: #f0f0f0;

    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #CA0C16 !important;
}

.post-category:hover {
    background: #e0e0e0;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tag {
    background: #f8f8f8;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #999999;
}

.post-tag:hover {
    background: #e8e8e8;
}

/* 黑夜模式下增加 post-category 和 post-tag 的暗度 */
:root:not([data-theme="light"]) .post-category {
    background: rgba(80, 80, 80, 0.8) !important;
    color:#cccccc!important;
}

:root:not([data-theme="light"]) .post-category:hover {
    background: rgba(90, 90, 90, 0.9) !important;
}

:root:not([data-theme="light"]) .post-tag {
    background: rgba(80, 80, 80, 0.8) !important;
    color: #999999 !important;
}

:root:not([data-theme="light"]) .post-tag:hover {
    background: rgba(90, 90, 90, 0.9) !important;
}

.post-stats {
    margin-left: auto;
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-preview {
    color: #666;
    line-height: 1.6;
    margin: 15px 0;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.post-date {
    color: #999;
    font-size: 0.9em;
}

.read-more {
    color: #ca0c16;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.read-more:hover {
    opacity: 0.8;
}

/* 加载更多按钮 */
.load-more {
    background: #f5f5f5;
    color: #666;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-more:hover {
    background: #e8e8e8;
}

/* 文章详情页样式 */
.post-detail {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out;
}

.post-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-detail-header h1 {
    font-size: 2em;
    margin: 0 0 20px;
    color: #333;
    line-height: 1.4;
}

.post-detail .post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
    font-size: 0.9em;
}

.post-detail .post-meta i {
    margin-right: 5px;
    color: #999;
}

.post-detail .post-category,
.post-detail .post-tag {
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-detail .post-category:hover,
.post-detail .post-tag:hover {
    color: #ca0c16;
}

.post-detail .post-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.markdown-body {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin: 1.5em 0 1em;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.markdown-body h1 { font-size: 2em; }
.markdown-body h2 { font-size: 1.75em; }
.markdown-body h3 { font-size: 1.5em; }
.markdown-body h4 { font-size: 1.25em; }
.markdown-body h5 { font-size: 1.1em; }
.markdown-body h6 { font-size: 1em; }

.markdown-body p {
    margin: 1em 0;
    line-height: 1.8;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.markdown-body pre {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #2d2d2d !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin: 1em 0 !important;
}

.markdown-body pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
    width: max-content !important;
    min-width: 100% !important;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #fff !important;
    background: none !important;
    padding: 0 !important;
}

.markdown-body code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    background: #f5f5f5;
    color: #ca0c16;
}

.markdown-body blockquote {
    border-left: 4px solid #ca0c16;
    margin: 1em 0;
    padding: 0.5em 1em;
    background: #f8f8f8;
    color: #666;
    font-style: italic;
}

.markdown-body ul,
.markdown-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

.markdown-body li {
    margin: 0.5em 0;
}

.markdown-body a {
    color: #ca0c16;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.markdown-body a:hover {
    border-color: #ca0c16;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2em 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.markdown-body th,
.markdown-body td {
    padding: 8px;
    border: 1px solid #eee;
    text-align: left;
}

.markdown-body th {
    background: #f5f5f5;
    font-weight: 600;
}

.post-detail-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 黑夜模式下 post-detail-header 和 post-detail-footer 的分割线颜色 */
:root:not([data-theme="light"]) .post-detail-header {
    border-bottom-color: #99999950;
}

:root:not([data-theme="light"]) .post-detail-footer {
    border-top-color: #99999950;
}

.post-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-like,
.btn-edit,
.btn-back {
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 1em;
    text-decoration: none;
}

.btn-like {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.btn-like:hover {
    color: #ca0c16;
}

.btn-like.liked {
    color: #ca0c16;
    animation: like-animation 0.3s ease-in-out;
}

.btn-like.liking {
    pointer-events: none;
    opacity: 0.8;
    animation: pulse 1s infinite;
}

.btn-like.liked-success {
    animation: success-animation 0.6s ease-in-out;
}

.btn-like:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-like.liked:disabled {
    color: #ca0c16;
    opacity: 1;
}

.btn-like i {
    font-size: 16px;
}

.btn-like span {
    font-size: 14px;
    margin-left: 4px;
}

.btn-edit {
    background: none;
    border: 1px solid #2d333b;
    color: #2d333b;
}

.btn-edit:hover {
    background: #2d333b;
    color: #fff;
}

.btn-back {
    background: #f5f5f5;
    color: #666;
    border: none;
}

.btn-back:hover {
    background: #e8e8e8;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .post-detail {
        padding: 20px;
        margin: 10px;
    }

    .post-detail-header h1 {
        font-size: 1.5em;
    }

    .post-detail .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .post-actions {
        flex-direction: column;
    }

    .btn-like,
    .btn-back {
        width: 100%;
        justify-content: center;
    }

    .markdown-body {
        font-size: 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease-out;
}

/* 加载中动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ca0c16;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 编辑页面样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #999999;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    font-size: 16px;
    margin-top: 20px;
}

/* 编辑页面新增样式 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group.half {
    flex: 1;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #999999;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
}

.image-upload-container {
    border: 2px dashed #999999;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    background-color: #fafafa;
    cursor: pointer;
    transition: border-color 0.3s;
}

.image-upload-container:hover {
    border-color: #3498db;
}

.image-input {
    display: none;
}

.image-preview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.upload-text {
    color: #666;
}

.button-group {
    display: flex;
    gap: 10px;
}

.submit-btn {
    flex: 2;
}

.save-draft-btn {
    flex: 1;
    background-color: #95a5a6;
}

.save-draft-btn:hover {
    background-color: #7f8c8d;
}

/* TinyMCE 编辑器自定义样式 */
.tox-tinymce {
    border-radius: 4px !important;
    border-color: #999999 !important;
}

.tox .tox-statusbar {
    border-top: 1px solid #999999 !important;
}

/* 博客主页样式 */
.blog-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.header-content h1 {
    margin: 0;
    font-size: 24px;
}

.btn-write {
    background: #ca0c16;
    color: white;
}

.main-container {
    max-width: 1600px; /* 增加最大宽度以适应两栏布局 */
    margin: 20px auto;
    padding: 0 16px;
    display: flex;
    gap: 30px;
    /* 参考数据页面：设置最小宽度并允许水平滚动 */
    min-width: 1200px;
    overflow-x: auto;
    overflow-y: hidden;
}

.content-area {
    flex: 1;
}

.posts-filter {
    background: white;
    border-radius: 4px;
    padding: 15px 20px;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-item {
    color: #666;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
}

.filter-item.active {
    color: #ca0c16;
}

.post-card {
    background: var(--light-bg, white);
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.post-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.post-content-wrapper {
    padding: 20px;
}

.post-header {
    margin-bottom: 15px;
}

.post-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    text-decoration: none;
}

.post-title:hover {
    color: #ca0c16;
}

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

.post-tags {
    display: flex;
    gap: 8px;
}

.post-tag {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: #999999;
}

.post-stats {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 14px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-preview {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.sidebar {
    width: 300px;
    align-self: flex-start;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    border-bottom: 1px solid #99999950;
}

.category-item:hover {
    color: #ca0c16;
}

.category-count {
    color: #999;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.tag-item {
    background: #f5f5f5;
    padding: 5px 12px;
    border-radius: 15px;
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.tag-item:hover {
    background: #ca0c16;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(202, 12, 22, 0.2);
}

.tag-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

.tag-item:hover .tag-count {
    background: rgba(255, 255, 255, 0.2);
}

/* 移除所有响应式布局调整 - 任何时候都保持两栏布局 */

/* 标签云响应式调整 */
@media (max-width: 768px) {
    .tags-cloud {
        gap: 8px;
        padding: 8px;
    }
    
    .tag-item {
        padding: 4px 10px;
        font-size: 13px !important;
    }
    
    .tag-count {
        padding: 1px 4px;
        font-size: 11px;
    }
}

.btn-back {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #e8e8e8;
}

/* 添加图标动画 */
.icon-like {
    transition: transform 0.2s;
}

.btn-like:hover .icon-like {
    transform: scale(1.2);
}

/* 优化代码高亮 */
pre[class*="language-"] {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

code[class*="language-"] {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: none !important;
}

/* 预览按钮样式 */
#previewBtn {
    position: relative;
    transition: all 0.3s ease;
}

#previewBtn.active {
    background: #e9ecef;
    color: #ca0c16;
}

#previewBtn:hover {
    background: #e9ecef;
}

/* 编辑器和预览区域的滚动条样式 */
.editor-wrapper textarea,
.preview-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.editor-wrapper textarea::-webkit-scrollbar,
.preview-wrapper::-webkit-scrollbar {
    width: 6px;
}

.editor-wrapper textarea::-webkit-scrollbar-track,
.preview-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.editor-wrapper textarea::-webkit-scrollbar-thumb,
.preview-wrapper::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.editor-wrapper textarea::-webkit-scrollbar-thumb:hover,
.preview-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

/* 预览区域的代码块样式 */
.preview-wrapper pre {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #2d2d2d !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin: 1em 0 !important;
}

.preview-wrapper pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
    width: max-content !important;
    min-width: 100% !important;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #fff !important;
    background: none !important;
    padding: 0 !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .preview-wrapper {
        padding: 10px 15px; /* 移动端进一步减少padding */
    }
    
    .preview-wrapper.markdown-body {
        font-size: 15px;
    }
    
    /* 确保在移动端也保持布局一致 */
    .editor-content .editor-wrapper,
    .editor-content .preview-wrapper {
        flex: 1 !important;
        width: 0 !important;
    }
    
    /* 移动端进一步减少编辑器高度 */
    .editor-content {
        height: calc(100vh - 350px);
        min-height: 400px;
    }
}

/* 编辑器图片样式 */
.editor-image,
.post-image {
    max-width: 100%;
    border-radius: 6px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-error {
    padding: 20px;
    background: #fff5f5;
    color: #ca0c16;
    border: 1px dashed #ca0c16;
    border-radius: 4px;
    text-align: center;
    margin: 10px 0;
}

/* 预览区域图片控制 */
.preview-wrapper img,
.markdown-body img {
    max-width: 100%;
    display: block;
    margin: 15px auto;
    border-radius: 6px;
}

/* 评论区样式 */
.post-comments {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px;
}

.comments-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-count {
    background: #ca0c16;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 14px;
    display: inline-block;
}

.comment-form {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 20px;
}

.comment-author-input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #999999;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

.comment-author-input:focus {
    border-color: #ca0c16;
}

.comment-input {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 1px solid #999999;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    font-size: 14px;
    line-height: 1.6;
    transition: border-color 0.3s;
    margin-bottom: 15px;
}

.comment-input:focus {
    border-color: #ca0c16;
}

.comment-form-footer {
    display: flex;
    justify-content: flex-end;
}

.comment-submit {
    padding: 8px 20px;
    background: #ca0c16;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.comment-submit:hover {
    background-color: #a80a12;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    animation: fadeIn 0.3s;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: bold;
    color: #333;
}

.comment-date {
    color: #999;
    font-size: 12px;
}

.comment-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-like,
.comment-reply {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 12px;
    transition: color 0.2s;
}

.comment-like:hover,
.comment-reply:hover {
    color: #ca0c16;
}

.comment-like.liked {
    color: #ca0c16;
}

.no-comments {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.comments-disabled {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #666;
    margin-top: 30px;
    border: 1px dashed #999999;
}

.comments-disabled i {
    font-size: 32px;
    margin-bottom: 15px;
    color: #999;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .post-comments {
        padding: 15px;
    }
    
    .comment-form {
        padding: 10px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .comment-item {
        gap: 10px;
    }
    
    .comment-author {
        font-size: 14px;
    }
    
    .comment-date {
        font-size: 11px;
    }
    
    .comment-text {
        font-size: 14px;
    }
}

/* 代码块工具栏样式 */
.code-block-container {
    position: relative;
    margin: 1em 0;
    max-width: 100% !important;
    overflow: hidden !important;
    border-radius: 8px;
}

.code-block-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 28px;
    padding: 0 10px;
    background: #2d2d2d;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid #444;
}

.code-block-lang {
    margin-right: auto;
    font-size: 12px;
    color: #ccc;
    text-transform: uppercase;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    border-radius: 4px;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.copy-btn.copied {
    color: #8bdc6f;
    background: rgba(139, 220, 111, 0.1);
}

.code-block-container pre {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 适配深色和浅色主题 */
.theme-light .code-block-toolbar {
    background: #f5f5f5;
    border-bottom: 1px solid #999999;
}

.theme-light .code-block-lang,
.theme-light .copy-btn {
    color: #666;
}

.theme-light .copy-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.theme-light .copy-btn.copied {
    color: #4a8c34;
    background: rgba(74, 140, 52, 0.1);
}

/* 自定义文本框样式 */
.custom-textbox {
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    text-align: center;
}

.textbox-content {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px dashed #d0d0d0;
    text-align: left;
}

.textbox-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #ca0c16;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.textbox-button:hover {
    background-color: #a80a12;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 30px 0;
    gap: 15px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 15px;
    border: 1px solid #999999;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #f5f5f5;
    border-color: #999999;
}

.pagination-btn.active {
    background-color: #ca0c16;
    color: #fff;
    border-color: #ca0c16;
}

.pagination-btn.prev-btn,
.pagination-btn.next-btn {
    padding: 8px 16px;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.theme-dark .pagination-btn {
    background-color: #2d333b;
    border-color: #444c56;
    color: #adbac7;
}

.theme-dark .pagination-btn:hover:not(.disabled) {
    background-color: #353b43;
}

.theme-dark .pagination-btn.active {
    background-color: #ca0c16;
    color: white;
    border-color: #ca0c16;
}

.theme-dark .pagination-ellipsis {
    color: #adbac7;
}

/* 没有文章的提示样式 */
.no-posts {
    text-align: center;
    padding: 50px 0;
    color: #666;
}

.no-posts i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.no-posts p {
    font-size: 16px;
}

/* 每页条数选择器样式 */
.page-size-selector {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.page-size-selector span {
    font-size: 14px;
    color: #999999;
    white-space: nowrap;
}

.page-size-options {
    display: flex;
    gap: 5px;
}

.page-size-btn {
    padding: 5px 10px;
    border: 1px solid #999999;
    border-radius: 4px;
    background-color: var(--light-bg, #fff);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.page-size-btn:hover {
    background-color: #f5f5f5;
}

.page-size-btn.active {
    background-color: #ca0c16;
    color: #fff;
    border-color: #ca0c16;
}

.theme-dark .page-size-selector span {
    color: #999999;
}

.theme-dark .page-size-btn {
    background-color: var(--light-bg, #2d333b);
    border-color: #444c56;
    color: #adbac7;
}

.theme-dark .page-size-btn:hover {
    background-color: #353b43;
}

.theme-dark .page-size-btn.active {
    background-color: #ca0c16;
    color: white;
    border-color: #ca0c16;
}

/* 调整在侧边栏中的搜索容器样式 */
.sidebar-section .search-container {
    margin: 0;
    padding: 0;
}

.sidebar-section .search-box {
    max-width: 100%;
}

/* 调整侧边栏中的过滤器样式 */


.sidebar-section .filter-item {
    width: 100%;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: var(--light-bg, #f8f8f8);
    border: 1px solid #999999;
    transition: all 0.2s ease;
    text-align: center;
}


.sidebar-section .filter-item.active {
    background-color: var(--light-bg, #ffffff);
    color: #ca0c16;
    border: 1px solid #ca0c16;
}







/* 添加搜索高亮样式 */
.highlight-text {
    background-color: #fffacd;
    padding: 2px 0;
    border-radius: 2px;
    color: #333;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    margin: 0 1px;
}

/* 组合搜索每个关键词使用不同颜色高亮 */
.highlight-text:nth-of-type(3n+1) {
    background-color: #fffacd;
}

.highlight-text:nth-of-type(3n+2) {
    background-color: #e6f7ff;
}

.highlight-text:nth-of-type(3n+3) {
    background-color: #f6e6ff;
}

.theme-dark .highlight-text {
    background-color: #35281e;
    color: #ffcc00;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

/* 深色模式下组合搜索每个关键词使用不同颜色高亮 */
.theme-dark .highlight-text:nth-of-type(3n+1) {
    background-color: #35281e;
    color: #ffcc00;
}

.theme-dark .highlight-text:nth-of-type(3n+2) {
    background-color: #1a2733;
    color: #66ccff;
}

.theme-dark .highlight-text:nth-of-type(3n+3) {
    background-color: #2d1a33;
    color: #cc99ff;
}

/* 首页链接样式优化 */
.home-link {
    color: #ca0c16;
    text-decoration: none;
    font-weight: 500;
    font-size: 24px;
    transition: all 0.3s ease;
    display: inline-block;
}

.home-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(202, 12, 22, 0.2);
}

/* 返回首页链接样式 */
.back-btn.home-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #ca0c16;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    gap: 6px;
}

.back-btn.home-link:hover {
    background-color: #a80a12;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-btn.home-link i {
    font-size: 16px;
}

/* 写文章按钮样式优化 */
.btn-write.home-style {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #ca0c16;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    gap: 6px;
}

.btn-write.home-style:hover {
    background-color: #a80a12;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-write.home-style i {
    font-size: 16px;
}

/* 发布文章按钮样式优化 */
.btn-publish.modern-style {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #ca0c16;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    gap: 6px;
    border: none;
    cursor: pointer;
}

.btn-publish.modern-style:hover {
    background-color: #a80a12;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-publish.modern-style i {
    font-size: 16px;
}

/* 保存草稿按钮样式优化 */
.btn-draft.modern-style {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #808080;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    gap: 6px;
    border: none;
    cursor: pointer;
}

.btn-draft.modern-style:hover {
    background-color: #666666;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-draft.modern-style i {
    font-size: 16px;
}

/* 多选删除功能样式优化 */
.multi-select-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f8f8;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #ca0c16;
}

.theme-dark .multi-select-bar {
    background: #2d333b;
    color: #adbac7;
    border-left-color: #ca0c16;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.multi-select-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.multi-select-counter {
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    min-width: 90px;
    text-align: center;
}

.theme-dark .multi-select-counter {
    background: rgba(255, 255, 255, 0.1);
}

.multi-delete-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #ca0c16;
    color: white;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    gap: 8px;
    font-weight: 500;
}

.multi-delete-btn:hover {
    background-color: #a80a12;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.multi-delete-btn:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.select-all-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ca0c16;
}

.select-all-container span {
    font-weight: 500;
}

.post-checkbox {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    accent-color: #ca0c16;
    opacity: 0;
    visibility: hidden;
}

.post-card:hover .post-checkbox {
    opacity: 0.7;
}

.post-card.selected .post-checkbox {
    opacity: 1;
}

.post-card.selected {
    border-color: #ca0c16;
    box-shadow: 0 0 0 2px rgba(202, 12, 22, 0.2);
    background-color: rgba(202, 12, 22, 0.03);
}

.theme-dark .post-card.selected {
    border-color: #ca0c16;
    box-shadow: 0 0 0 2px rgba(202, 12, 22, 0.3);
    background-color: rgba(202, 12, 22, 0.1);
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 18px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 9999;
    max-width: 400px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-message {
    font-size: 14px;
    color: #333;
}

.notification.success .notification-icon {
    color: #2ecc71;
}

.notification.error .notification-icon {
    color: #e74c3c;
}

.notification.info .notification-icon {
    color: #3498db;
}

.theme-dark .notification {
    background: #2d333b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-dark .notification-message {
    color: #adbac7;
}

/* 为多选操作添加过渡动画 */
.post-card {
    position: relative;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes checkboxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.post-checkbox:checked {
    animation: checkboxPulse 0.3s ease;
}

/* 管理文章按钮 */
.manage-posts-btn {
    width: 100%;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #999999;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: #333;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.manage-posts-btn:hover {
    background-color: #f0f0f0;
    border-color: #999999;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.manage-posts-btn.active {
    background-color: #ca0c16;
    color: white;
    border-color: #ca0c16;
}

.manage-posts-btn.active:hover {
    background-color: #a80a12;
}

.theme-dark .manage-posts-btn {
    background-color: #2d333b;
    border-color: #444c56;
    color: #adbac7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-dark .manage-posts-btn:hover {
    background-color: #353b43;
    border-color: #555;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.theme-dark .manage-posts-btn.active {
    background-color: #ca0c16;
    color: white;
    border-color: #ca0c16;
}

.theme-dark .manage-posts-btn.active:hover {
    background-color: #a80a12;
}

/* 滚动条样式 - 按照NHANES设置，固定尺寸不随页面缩放变化 */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
}

::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

/* 深色模式滚动条 */
.theme-dark ::-webkit-scrollbar-track {
    background: #2d333b !important;
}

.theme-dark ::-webkit-scrollbar-thumb {
    background: #444c56 !important;
}

/* 文本选择样式 */
::selection {
    background: rgba(56, 139, 253, 0.4);
}

.theme-dark ::selection {
    background: rgba(56, 139, 253, 0.4);
}

/* 用户选择 */
.user-select-none {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 文本换行 */
.text-wrap {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-word;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* 模糊效果 */
.backdrop-blur {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* 主题切换按钮容器 */
.theme-switcher-sidebar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 15px;
}

/* 主题切换按钮基础样式 */
.theme-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #999999;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* 主题切换按钮图标 */
.theme-btn i {
    font-size: 16px;
    color: #666;
}

/* 浅色主题按钮 - 当深色主题激活时 */
.theme-btn[data-theme="light"] {
    background-color: #f5f5f5;
}

/* 深色主题按钮 - 当浅色主题激活时 */
.theme-btn[data-theme="dark"] {
    background-color: #2d333b;
}

/* 主题切换按钮激活状态 */
.theme-btn.active {
    border-color: #ca0c16;
    background-color: transparent;
}

/* 激活状态下的图标颜色 */
.theme-btn.active i {
    color: #f39c12;
}

/* 深色模式下的基础样式 */
.theme-dark .theme-btn {
    border-color: #999999;
}

/* 深色模式下的激活状态 */
.theme-dark .theme-btn.active {
    border-color: #ca0c16;
}

/* 移除之前的重复样式 */
.theme-switcher {
    display: none !important;
}

@keyframes like-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes success-animation {
    0% { transform: scale(1); }
    20% { transform: scale(1.4); }
    40% { transform: scale(0.9); }
    60% { transform: scale(1.2); }
    80% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* 代码块横向滚动优化样式 */
/* 确保所有代码块都能正确处理横向滚动 */

/* 基础代码块样式 - 适用于所有 pre 元素 */
pre {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 确保 code 元素不会破坏布局 */
pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
}

/* 自定义代码块容器 */
.code-block {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #2d2d2d;
    padding: 16px;
    border-radius: 8px;
    margin: 1em 0;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    color: #fff;
}

/* 强化 markdown-body 中的代码块样式 */
.markdown-body pre {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #2d2d2d !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin: 1em 0 !important;
}

.markdown-body pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
}

/* 预览区域代码块样式强化 */
.preview-wrapper pre {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #2d2d2d !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin: 1em 0 !important;
}

.preview-wrapper pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
    width: max-content !important;
    min-width: 100% !important;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #fff !important;
    background: none !important;
    padding: 0 !important;
}

/* Prism.js 代码高亮兼容 */
pre[class*="language-"] {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

code[class*="language-"] {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: none !important;
}

/* 代码块容器样式强化 */
.code-block-container {
    position: relative;
    margin: 1em 0;
    max-width: 100% !important;
    overflow: hidden !important;
    border-radius: 8px;
}

.code-block-container pre {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 确保文章详情页面的代码块也能正确滚动 */
.post-detail .markdown-body pre,
.post-detail-content pre {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.post-detail .markdown-body pre code,
.post-detail-content pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
}

/* 自定义滚动条样式 - 仅针对代码块 */
pre::-webkit-scrollbar {
    height: 8px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

pre::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
}

pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-radius: 4px !important;
}

pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.code-block::-webkit-scrollbar {
    height: 8px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.code-block::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
}

.code-block::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-radius: 4px !important;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* 深色模式下的代码块滚动条 */
.theme-dark pre::-webkit-scrollbar {
    height: 8px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.theme-dark pre::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.theme-dark pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.theme-dark pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* 浅色模式下的代码块样式调整 */
.theme-light .markdown-body pre,
.theme-light .preview-wrapper pre,
.theme-light .code-block {
    background: #f8f8f8 !important;
    color: #333 !important;
    border: 1px solid #999999 !important;
}

.theme-light .markdown-body pre code,
.theme-light .preview-wrapper pre code,
.theme-light .code-block code {
    color: #333 !important;
}

/* 浅色模式下的滚动条 */
.theme-light pre::-webkit-scrollbar {
    height: 8px !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.theme-light pre::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

.theme-light pre::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2) !important;
}

.theme-light pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

/* 响应式优化 - 移动设备上的代码块 */
@media (max-width: 768px) {
    pre {
        font-size: 12px !important;
        padding: 12px !important;
    }
    
    .markdown-body pre {
        font-size: 12px !important;
        padding: 12px !important;
    }
    
    .preview-wrapper pre {
        font-size: 12px !important;
        padding: 12px !important;
    }
    
    .code-block {
        font-size: 12px !important;
        padding: 12px !important;
    }
    
    /* 移动设备上的滚动条稍微细一些 */
    pre::-webkit-scrollbar,
    .code-block::-webkit-scrollbar {
        height: 6px !important;
    }
}

/* 确保容器不会被代码块撑破 */
.container,
.content-area,
.post-detail,
.post-detail-content,
.markdown-body {
    overflow-x: hidden !important;
}

/* 特殊情况：如果代码块在表格中 */
table pre {
    min-width: 200px !important;
    max-width: 100% !important;
}

/* 确保行内代码不受影响 */
code:not(pre code) {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.markdown-body code:not(pre code) {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    background: #f5f5f5 !important;
    color: #ca0c16 !important;
    padding: 0.2em 0.4em !important;
    border-radius: 3px !important;
    font-size: 0.9em !important;
}

.theme-dark .markdown-body code:not(pre code) {
    background: #2d333b !important;
    color: #ff6b6b !important;
}

/* 深色模式下的代码块样式调整 */
.theme-dark .markdown-body pre,
.theme-dark .preview-wrapper pre,
.theme-dark .code-block {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #333333 !important;
}

.theme-dark .markdown-body pre code,
.theme-dark .preview-wrapper pre code,
.theme-dark .code-block code {
    color: #ffffff !important;
    background: none !important;
}

/* 深色模式下的代码块工具栏 */
.theme-dark .code-block-toolbar {
    background: #000000 !important;
    border-bottom: 1px solid #333333 !important;
}

.theme-dark .code-block-lang,
.theme-dark .copy-btn {
    color: #cccccc !important;
}

.theme-dark .copy-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.theme-dark .copy-btn.copied {
    color: #8bdc6f !important;
    background: rgba(139, 220, 111, 0.1) !important;
}

/* 深色模式下的代码块滚动条 */
.theme-dark pre::-webkit-scrollbar {
    height: 8px !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.theme-dark pre::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.theme-dark pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.theme-dark pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
} 

/* CSS变量定义和兜底覆盖样式 */
:root {
    --light-bg: #E8E5E0;    /* 统一的浅色背景 */
    
    /* Ant Design Token 覆盖 - 已注释，让组件使用原本颜色 */
    /*
    --ant-color-bg-container: #E8E5E0;
    --ant-color-bg-layout: #E8E5E0;
    --ant-color-fill-alter: #E8E5E0;
    --ant-color-fill-content: #E8E5E0;
    --ant-color-bg-spotlight: #E8E5E0;
    */
}

/* 兜底覆盖内联样式中的背景色 - 已注释，避免过度覆盖 */
/*
[style*="background"] {
    background-color: var(--light-bg) !important;
}
*/

/* Ant Design 组件全面覆盖 - 已注释，避免过度覆盖 */
/*
.ant-input,
.ant-input-affix-wrapper,
.ant-input-affix-wrapper-focused,
.ant-input-group-addon,
.ant-select-selector,
.ant-select-selection-search-input,
.ant-picker,
.ant-picker-input,
.ant-radio-wrapper,
.ant-radio-button-wrapper,
.ant-checkbox-wrapper,
.ant-btn-default,
.ant-btn:not(.ant-btn-primary):not(.ant-btn-danger),
.ant-descriptions,
.ant-descriptions-item,
.ant-descriptions-item-content,
.ant-descriptions-item-label,
.ant-card,
.ant-card-body,
.ant-card-head,
.ant-list,
.ant-list-item,
.ant-table,
.ant-table-thead > tr > th,
.ant-table-tbody > tr > td,
.ant-table-container,
.ant-table-content,
.ant-empty,
.ant-empty-description,
.ant-form,
.ant-form-item,
.ant-form-item-control,
.ant-form-item-control-input,
.ant-pro-table,
.ant-pro-table-search,
.ant-pro-table-list-toolbar,
.ant-pro-card,
.ant-pro-form,
.ant-tabs-content,
.ant-tabs-tabpane,
.ant-modal,
.ant-modal-content,
.ant-modal-header,
.ant-modal-body,
.ant-drawer,
.ant-drawer-content,
.ant-drawer-body,
.ant-popover,
.ant-popover-content,
.ant-popover-inner,
.ant-tooltip,
.ant-tooltip-content,
.ant-tooltip-inner,
.ant-dropdown,
.ant-dropdown-menu,
.ant-menu,
.ant-menu-item,
.ant-layout,
.ant-layout-content,
.ant-layout-sider,
.ant-affix,
.ant-anchor,
.ant-breadcrumb,
.ant-steps,
.ant-steps-item,
.ant-pagination,
.ant-pagination-item,
.ant-tag,
.ant-tag-checkable,
.ant-alert,
.ant-notification,
.ant-message,
.ant-drawer-header,
.ant-collapse,
.ant-collapse-item,
.ant-collapse-header,
.ant-collapse-content,
.ant-collapse-content-box,
.ant-timeline,
.ant-timeline-item,
.ant-timeline-item-content,
.ant-tree,
.ant-tree-treenode,
.ant-upload,
.ant-upload-list,
.ant-upload-list-item,
.ant-transfer,
.ant-transfer-list,
.ant-transfer-list-header,
.ant-transfer-list-body,
.ant-cascader,
.ant-cascader-menu,
.ant-time-picker,
.ant-calendar,
.ant-calendar-picker,
.result-placeholder,
.search-container,
.filter-container,
.placeholder-area,
.table-header,
.form-wrapper,
.search-form,
.filter-form,
.content-wrapper,
.main-wrapper,
.layout-content,
.page-wrapper,
.placeholder-box {
    background: var(--light-bg) !important;
    background-color: var(--light-bg) !important;
}
*/

/* 更全面的内联样式覆盖 - 已注释，避免过度覆盖 */
/* 纯白色背景 */
/*
*[style*="background:#fff"],
*[style*="background: #fff"],
*[style*="background:#ffffff"],
*[style*="background: #ffffff"],
*[style*="background-color:#fff"],
*[style*="background-color: #fff"],
*[style*="background-color:#ffffff"],
*[style*="background-color: #ffffff"],
*[style*="background:white"],
*[style*="background: white"],
*[style*="background-color:white"],
*[style*="background-color: white"],
*[style*="background:rgb(255,255,255)"],
*[style*="background: rgb(255,255,255)"],
*[style*="background:rgb(255, 255, 255)"],
*[style*="background: rgb(255, 255, 255)"],
*[style*="background-color:rgb(255,255,255)"],
*[style*="background-color: rgb(255,255,255)"],
*[style*="background-color:rgb(255, 255, 255)"],
*[style*="background-color: rgb(255, 255, 255)"],
*[style*="background:rgba(255,255,255,1)"],
*[style*="background: rgba(255,255,255,1)"],
*[style*="background:rgba(255, 255, 255, 1)"],
*[style*="background: rgba(255, 255, 255, 1)"],
*[style*="background-color:rgba(255,255,255,1)"],
*[style*="background-color: rgba(255,255,255,1)"],
*[style*="background-color:rgba(255, 255, 255, 1)"],
*[style*="background-color: rgba(255, 255, 255, 1)"] {
    background: var(--light-bg) !important;
    background-color: var(--light-bg) !important;
}
*/

/* 常见的浅灰色背景 - 已注释，避免过度覆盖 */
/*
*[style*="#f0f0f0"],
*[style*="#f1f1f1"],
*[style*="#f2f2f2"],
*[style*="#f3f3f3"],
*[style*="#f4f4f4"],
*[style*="#f5f5f5"],
*[style*="#f6f6f6"],
*[style*="#f7f7f7"],
*[style*="#f8f8f8"],
*[style*="#f9f9f9"],
*[style*="#fafafa"],
*[style*="#fbfbfb"],
*[style*="#fcfcfc"],
*[style*="#fdfdfd"],
*[style*="#fefefe"],
*[style*="#f0f2f5"],
*[style*="#f6f7f8"],
*[style*="#f9f9fb"],
*[style*="#f1f2f3"],
*[style*="#f4f5f6"],
*[style*="#f7f8f9"],
*[style*="#fafafb"],
*[style*="#fbfcfd"],
*[style*="#f8f9fa"],
*[style*="#f5f6f7"],
*[style*="#f2f3f4"],
*[style*="#eff0f1"],
*[style*="#ecedee"],
*[style*="#e9eaeb"],
*[style*="#e6e7e8"],
*[style*="#e3e4e5"],
*[style*="#e0e1e2"],
*[style*="#dddede"],
*[style*="#dadada"],
*[style*="rgb(240,240,240)"],
*[style*="rgb(245,245,245)"],
*[style*="rgb(250,250,250)"],
*[style*="rgb(248,249,250)"],
*[style*="rgb(240,242,245)"],
*[style*="rgb(246,247,248)"],
*[style*="rgb(249,249,251)"] {
    background: var(--light-bg) !important;
    background-color: var(--light-bg) !important;
}
*/

/* 重置基础样式 */

/* 表格单元格点击功能样式 - 仅针对第二列列名为original_vars的表格 */

/* 可点击的original_vars单元格样式 */
.clickable-original-vars {
    cursor: pointer !important;
    transition: all 0.2s ease;
    position: relative;
}

/* 鼠标悬停时的简单效果 */
.clickable-original-vars:hover {
    background-color: #e3f2fd !important;
    color: #1565c0 !important;
}

/* 悬停时显示放大镜图标 */
.clickable-original-vars:hover::after {
    content: '🔍';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 12px;
    opacity: 0.8;
    pointer-events: none;
}

/* ==== 从post.html提取的样式 ==== */

/* 代码块横向滚动优化 */
/* 确保代码块能正确处理横向滚动 */
.markdown-body pre {
    overflow-x: auto !important;
    overflow-y: auto !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 8px;
    padding: 16px;
    margin: 0;
    border: 1px solid;
}

/* 包装容器的外边距 */
.code-block-wrapper {
    margin: 16px 0;
}

.markdown-body pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
    width: max-content !important;
    min-width: 100% !important;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: none;
    font-family: Consolas, Monaco, 'Courier New', monospace !important;
    font-size: 14px;
    line-height: 1.6;
    tab-size: 4;
}

/* 确保容器不会被代码块撑破 */
.post-detail,
.post-detail-content,
.markdown-body {
    overflow-x: hidden !important;
}

/* 代码块自定义滚动条 */
.markdown-body pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
}

.markdown-body pre::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.markdown-body pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-body pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 滚动条交汇处的角落样式 */
.markdown-body pre::-webkit-scrollbar-corner {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 4px 0;
}

/* 浅色模式下的滚动条 */
.theme-light .markdown-body pre::-webkit-scrollbar {
    background-color: rgba(0, 0, 0, 0.05);
}

.theme-light .markdown-body pre::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.02);
}

.theme-light .markdown-body pre::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .markdown-body pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 0, 0, 0.15);
}

.theme-light .markdown-body pre::-webkit-scrollbar-corner {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 代码块样式选项 */
/* 浅色主题 */
.theme-light .markdown-body pre {
    background-color: #f6f8fa;
}
.theme-light .markdown-body pre code {
    color: #24292e;
}
.theme-light .markdown-body pre::before {
    background: #e1e4e8;
    color: #57606a;
}

/* 深色主题（默认） */
.theme-dark .markdown-body pre {
    background-color: #000000 !important;
    border: 1px solid #333333 !important;
}
.theme-dark .markdown-body pre code {
    color: #ffffff !important;
}
.theme-dark .markdown-body pre::before {
    background: #000000 !important;
    color: #cccccc !important;
}

.theme-light .markdown-body pre {
    border-color: #e1e4e8;
}

.theme-dark .markdown-body pre {
    border-color: #30363d;
}

.markdown-body code {
    font-family: Consolas, Monaco, 'Courier New', monospace !important;
    font-size: 85%;
    padding: 0.2em 0.4em;
    margin: 0;
    border-radius: 4px;
}

/* 行内代码样式 */
.theme-light .markdown-body :not(pre) > code {
    background-color: #f6f8fa;
    color: #24292e;
    border: 1px solid #e1e4e8;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.theme-dark .markdown-body :not(pre) > code {
    background-color: #1f2428;
    color: #c9d1d9;
    border: 1px solid #30363d;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* 代码块语言标签 */
.markdown-body pre::before {
    content: none !important; /* 不显示语言标签 */
}

/* 调整代码块内边距，移除为语言标签预留的空间 */
.markdown-body pre {
    padding-top: 16px !important; /* 恢复正常内边距 */
}

/* 代码块复制按钮样式 */
.copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #999999;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: all 0.2s;
    z-index: 2;
}

.markdown-body pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #999999;
}

.copy-btn.copied {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* 深色主题下的按钮样式调整 */
.theme-dark .copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
    border-color: #30363d;
}

.theme-dark .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-dark .markdown-body pre::before {
    background: rgba(255, 255, 255, 0.1);
    color: #8b949e;
}

/* 代码块折叠状态样式 */
.code-collapsed {
    position: relative;
    border: 1px solid #EEEEEE !important;
}

/* 确保 code-collapsed 的 pre 元素也没有边框 */
.markdown-body pre.code-collapsed {
    border: 1px solid #EEEEEE !important;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .code-toolbar .theme-select,
    .code-toolbar .copy-btn {
        height: 32px;
        font-size: 11px;
        min-width: 60px;
        padding: 0 8px;
    }
}

/* 移除重复的复制按钮样式 */
pre > .copy-btn {
    display: none !important;
}

/* 代码块和代码相关的所有字体设置 */
.hljs {
    font-family: Consolas, Monaco, 'Courier New', monospace !important;
}

.markdown-body pre,
.markdown-body pre code,
.markdown-body code,
.hljs {
    font-family: Consolas, Monaco, 'Courier New', monospace !important;
}

/* 确保主题CSS优先级 */
.markdown-body pre code.hljs {
    background: inherit !important;
    color: inherit !important;
}

/* 主题切换时的过渡效果 */
.markdown-body pre code {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 统一按钮样式 - 分页和每页条数 */
.pagination-btn,
.page-size-btn {
    padding: 8px 15px;
    border: 1px solid #999999;
    border-radius: 4px;
    background-color: var(--light-bg, #fff);
    cursor: pointer;
    font-size: 14px;
    min-width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* 统一悬停状态 */
.pagination-btn:hover:not(.disabled),
.page-size-btn:hover {
    background-color: #f5f5f5;
    border-color: #999999;
}

/* 统一激活状态 */
.pagination-btn.active,
.page-size-btn.active {
    background-color: #ca0c16;
    color: #fff;
    border-color: #ca0c16;
}

/* 深色模式下的统一样式 */
.theme-dark .pagination-btn,
.theme-dark .page-size-btn {
    background-color: var(--light-bg, #2d333b);
    border-color: #444c56;
    color: #adbac7;
}

.theme-dark .pagination-btn:hover:not(.disabled),
.theme-dark .page-size-btn:hover {
    background-color: #353b43;
}

.theme-dark .pagination-btn.active,
.theme-dark .page-size-btn.active {
    background-color: #ca0c16;
    color: #fff;
    border-color: #ca0c16;
}

.theme-switcher-sidebar {
    display: flex;
    gap: 10px;
}

.theme-switcher-sidebar .theme-btn {
    flex: 1;
    width: 100%;
}

/* 移除重复的主题按钮样式定义 */
.theme-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .theme-switcher {
        bottom: 20px;
        right: 20px;
        padding: 8px;
    }
}

/* 主题选择下拉菜单 */
.theme-select {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #999999;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23666' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    min-width: 100px;
}

.theme-select:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: #999999;
}

/* 代码块容器样式 */
.code-block-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* 代码工具栏样式 - 固定在容器右上角 */
.code-toolbar {
    position: absolute;
    top: 22px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    padding: 4px;
    backdrop-filter: blur(4px);
    opacity: 1;
}

/* 浅色主题下的工具栏背景 */
.theme-light .code-toolbar {
    background: rgba(255, 255, 255, 0.9);
}

/* 深色主题下的工具栏背景 */
.theme-dark .code-toolbar {
    background: rgba(0, 0, 0, 0.8);
}

/* 复制按钮 */
.code-toolbar .copy-btn {
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #999999;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 70px;
    white-space: nowrap;
    position: static;
    opacity: 1;
}

.code-toolbar .copy-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #999999;
}

.code-toolbar .copy-btn.copied {
    background: #ca0c16;
    color: white;
    border-color: #ca0c16;
}

/* 深色主题下的工具栏样式 */
.theme-dark .code-toolbar .theme-select,
.theme-dark .code-toolbar .copy-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
    border-color: #30363d;
}

.theme-dark .code-toolbar .theme-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23c9d1d9' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
}

.theme-dark .code-toolbar .theme-select:hover,
.theme-dark .code-toolbar .copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.theme-dark .code-toolbar .copy-btn.copied {
    background: #ca0c16;
    color: white;
    border-color: #ca0c16;
}

.write-post-btn {
    position: fixed;
    bottom: 200px;
    right: 0;
    transform: translateX(calc(100% - 35px));
    background: #ca0c16;
    color: white;
    padding: 10px 12px;
    border-radius: 20px 0 0 20px;
    cursor: pointer;
    box-shadow: -2px 0 8px rgba(0,0,0,0.15);
    z-index: 9997;
    font-size: 13px;
    display: flex;
    align-items: center;
    border: none;
    transition: transform 0.3s ease;
}

.write-post-btn:hover {
    background: #a30911;
    transform: translateX(0);
}

.write-post-btn span {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-left: 4px;
    white-space: nowrap;
}

.write-post-btn:hover span {
    opacity: 1;
}

.write-post-btn::before {
    content: '\f303';  /* Font Awesome edit icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
}

.theme-dark .write-post-btn {
    background: #ca0c16;
    color: #fff;
}

.theme-dark .write-post-btn:hover {
    background: #a30911;
}

.main-container {
    margin-top: 30px;  /* 增加与菜单的间距 */
}

/* 私密代码块样式 */
.vip-only {
    background: rgba(0,0,0,0.05) !important;
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-dark .vip-only {
    background: rgba(255,255,255,0.05) !important;
}

.vip-only code {
    color: #666 !important;
    text-align: center;
    font-style: italic;
}

.theme-dark .vip-only code {
    color: #999 !important;
}

.vip-notice {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255,182,0,0.1), rgba(219,166,99,0.1));
    border-radius: 0 8px 0 8px;
    text-align: center;
}

.theme-dark .vip-notice {
    background: linear-gradient(135deg, rgba(255,182,0,0.2), rgba(219,166,99,0.2));
}

.vip-notice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.vip-notice i {
    font-size: 24px;
    color: #dba663;
}

.vip-notice h3 {
    margin: 0;
    color: #dba663;
    font-size: 14px;
}

.vip-notice p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

.theme-dark .vip-notice p {
    color: #aaa;
}

.upgrade-btn {
    padding: 4px 12px;
    background: linear-gradient(90deg, #FFB800, #DBA663);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219,166,99,0.2);
}

/* 深色模式下的代码块滚动条 */
.theme-dark .markdown-body pre::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.theme-dark .markdown-body pre::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-radius: 4px !important;
}

.theme-dark .markdown-body pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.theme-dark .markdown-body pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.theme-dark .markdown-body pre::-webkit-scrollbar-corner {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-radius: 0 0 4px 0 !important;
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.back-to-top:hover {
    transform: translateY(-2px);
    background-color: transparent;
}

/* 图标放大动画 */
.back-to-top i {
    transition: transform 0.3s ease;
    font-weight: 900;
}

.back-to-top:hover i {
    transform: scale(2);
}

.back-to-top.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==== 从edit.html提取的样式 ==== */

.editor-container {
    margin-top: 20px;  /* 减小与菜单的间距 */
}

.editor-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 9997;
}

.modern-style {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    transition: all 0.3s ease;
}

.btn-draft {
    background: #f5f5f5;
    color: #555;
}

.btn-publish {
    background: #ca0c16;
    color: white;
}

.btn-draft:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

.btn-publish:hover {
    background: #a30911;
    transform: translateY(-2px);
}

.theme-dark .btn-draft {
    background: #2d333b;
    color: #adbac7;
}

.theme-dark .btn-publish {
    background: #ca0c16;
    color: #fff;
}

.theme-dark .btn-draft:hover {
    background: #353b43;
}

.theme-dark .btn-publish:hover {
    background: #a30911;
}

/* 预览区域代码块样式 */
.preview-wrapper .markdown-body pre {
    overflow-x: auto !important;
    overflow-y: auto !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 8px;
    padding: 16px;
    margin: 0;
    border: 1px solid;
}

/* 包装容器的外边距 */
.preview-wrapper .code-block-wrapper {
    margin: 16px 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.preview-wrapper .markdown-body pre code {
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: block !important;
    overflow: visible !important;
    max-width: none !important;
    width: max-content !important;
    min-width: 100% !important;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: none;
    font-family: Consolas, Monaco, 'Courier New', monospace !important;
    font-size: 14px;
    line-height: 1.6;
    tab-size: 4;
}

/* 隐藏代码工具栏 - 不再显示复制按钮 */
.preview-wrapper .code-toolbar {
    display: none !important;
}

/* 代码块自定义滚动条 */
.preview-wrapper .markdown-body pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
}

.preview-wrapper .markdown-body pre::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.preview-wrapper .markdown-body pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-wrapper .markdown-body pre::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 滚动条交汇处的角落样式 */
.preview-wrapper .markdown-body pre::-webkit-scrollbar-corner {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 4px 0;
}

/* 深色主题下的代码块样式 */
.preview-wrapper .markdown-body pre {
    background-color: #000000 !important;
    border: 1px solid #333333 !important;
}
.preview-wrapper .markdown-body pre code {
    color: #ffffff !important;
}

.preview-wrapper .markdown-body pre {
    border-color: #30363d;
}

.preview-wrapper .markdown-body code {
    font-family: Consolas, Monaco, 'Courier New', monospace !important;
    font-size: 85%;
    padding: 0.2em 0.4em;
    margin: 0;
    border-radius: 4px;
}

/* 行内代码样式 */
.preview-wrapper .markdown-body :not(pre) > code {
    background-color: #1f2428;
    color: #c9d1d9;
    border: 1px solid #30363d;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

