* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.container::-webkit-scrollbar,
.right-panel::-webkit-scrollbar, 
.left-panel::-webkit-scrollbar,
#article-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

html,
body {
    height: 100%;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

a {
    text-decoration: none !important;
}

#category-container-placeholder {
    background-color: #004295;
    display: block;
}

.top-panel {
    width: 100%;
    max-height: 200px;
    /* 可根据需要调整高度 */
    resize: vertical;
    /* 允许垂直调整大小 */
    min-height: 100px;
    /* 最小高度 */
    display: flex;
    /* 新增：启用flex布局 */
    align-items: center;
    /* 新增：垂直居中 */
}

.main-panel {
    flex: 1;
    width: 100%;
    background-color: rgb(235, 235, 235);
    position: relative;
    overflow: auto;
    z-index: 10; /* 确保不超过下拉菜单的层级 */
}

.title-bar h1 {
    color: rgb(0, 0, 0);
    margin-left: 10px;
}

.left-panel .toggle-btn {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px;
    background-color: #00afffa8;
    color: #edff00;
    border: none;
    cursor: pointer;
    z-index: 2;
}

/* 顶部栏样式 */
.top-bar {
    height: 130px;
    /* background-color: #007bff; */
    display: flex;
    align-items: center;
    padding: 15px 0;
    color: #ffffff;
    margin: 0 auto;
    max-width: 1350px;
    width: 100%;
    position: relative;
}

.top-bar-title {
    margin: 0 20px;
    color: #000000;
    font-weight: 600;
    white-space: nowrap;
}

.site-url {
    font-size: 14px;
    color: #000000;
    white-space: nowrap;
}

#title-editor {
    margin-bottom: 10px;
}

#edit-title {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
}

.folder-icon {
    margin-left: 10px;
    margin-right: 5px;
}

.title {
    margin-right: 5px;
    font-size: 13px;
}

.buttons-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}



.login-btn {
    margin-left: 5px;
    padding: 5px 10px;
    background-color: rgb(88, 86, 213);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.login-btn a {
    color: white;
    text-decoration: none;
    display: block;
    height: 100%;
    width: 100%;
    cursor: pointer;
}

.markdown-editor {
    width: 100%;
    height: calc(100% - 45px);
    max-height: 500px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: rgb(33, 35, 39);
    color: white;
    resize: none;
    font-family: monospace;
    margin-top: 10px;
}

.search-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
    /* 新增：与top-bar保持间距 */
    position: relative;
    width: 300px;
}

#search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    z-index: 9999;
}

.search-box {
    flex: 1;
    height: 33px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 14px;
    background-color: rgb(241, 241, 241);
    width: 100%;
    /* 新增：填满容器 */
}

    /* 添加悬停效果 */
.category-item:hover .subcategory-dropdown {
    display: block !important;
}

.subcategory-dropdown {
    /* 保持原有样式 */
    transition: all 0.3s ease;
}
    
    /* 二级分类悬停效果 */
    .subcategory-dropdown a:hover {
        background-color: rgba(35, 85, 222);
        color: white !important;
    }

/* 隐藏滚动条 */
.subcategory-dropdown::-webkit-scrollbar {
    display: none;
}

/* 缩略图样式 */
.article-thumbnail {
    flex: 0 0 200px;
    margin-right: 20px;
}

.article-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.article-thumbnail:hover img {
    transform: scale(1.03);
}

.article-item {
    display: flex;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 新增卡片布局样式 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9纵横比 */
    overflow: hidden;
}

.thumbnail-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-thumbnail:hover img {
    transform: scale(1.05);
}


.card-title {
    color: #9fa5b4;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-title a {
    color: #7c7c7c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #007bff;
}

.card-meta {
    font-size: 0.9em;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.author {
    color: #007bff;
    font-weight: 500;
}

.divider {
    margin: 0 8px;
    color: #ccc;
}

.date {
    white-space: nowrap;
}

/* 二级分类选中样式 */
    .subcategory-item.active {
        background-color: #003366 !important;
        color: white !important;
    }
    .subcategory-item.active a {
        color: white !important;
    }

    .category-container {
        background-color: #000;
        color: #fff;
        padding: 10px;
        white-space: nowrap;
        overflow-x: auto;
        -ms-overflow-style: none;  /* IE和Edge */
        scrollbar-width: none;  /* Firefox */
    }

.slider-container {
    position: relative;
    z-index: 0;
    margin-top: 0;
}

.slider-item img {
    vertical-align: bottom; /* 消除图片底部间隙 */
}

    .category-item {
        padding: 5px 10px;
        position: relative;
    }

.category-item a {
    color: white;
    text-decoration: none;
}

.category-item a:hover {
    text-decoration: underline;
    color: #ddd;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgb(0, 0, 0);

    cursor: pointer;
}

    .category-list {
        display: flex;
        gap: 15px;
        list-style: none;
        padding: 0;
        margin: 0;
        -ms-overflow-style: none;  /* IE和Edge */
        scrollbar-width: none;  /* Firefox */
    }

/* 滚动条轨道 */
.category-list::-webkit-scrollbar-track,
.category-list::-webkit-scrollbar-thumb,
.category-list::-webkit-scrollbar {
    display: none;
}

.category-list,
.sub-category-list {
    list-style: none;
    /* padding-left: 20px; */
}

.toggle-icon {
    cursor: pointer;
    margin-right: 5px;
    user-select: none;
}

.cate-title {
    padding-left: 0;
    text-align: left;
    display: block;
    text-decoration: none;
    color: rgb(0, 0, 0);
    font-weight: bold;
}



.category-header,
.sub-category-header {

    cursor: pointer;
    display: flex;
    align-items: center;
}

.category-header:hover,
.sub-category-header:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.category-list li {
    color: rgb(0, 0, 0);
    padding: 5px 0;
    cursor: pointer;
    font-size: 14px;
    padding-left: 20px;
}


.new-doc-btn {
    margin-left: 10px;
    padding: 5px;
    background-color: rgb(88, 86, 213);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.right-panel {
    flex: 1;
    height: 100%;
    /* background-color: rgb(235, 235, 235); */
    position: relative;
}

/* 通用链接样式 */
.top-bar a {
    text-decoration: none;
}

/* 条件隐藏样式 */
.hidden {
    display: none !important;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 100000;
}

/* 下拉菜单内容样式 */
.dropdown-content a {
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* 批量操作按钮样式 */
#batch-controls .batch-delete-btn {
    /* 原有样式（如果存在） */
}

.success-btn {
    background-color: #28a745 !important;
}

.warning-btn {
    background-color: #ffc107 !important;
    color: black !important;
}

/* 表单标签样式 */
.form-label {
    font-size: 14px;
    cursor: pointer;
}

/* 复选框样式 */
.select-all-checkbox {
    /* 可添加复选框特定样式 */
}

.CodeMirror {
    height: 500px !important;
    max-height: calc(100% - 45px) !important;
    overflow-y: auto !important;
    z-index: 1;
}

.CodeMirror-scroll {
    z-index: 1;
}

.CodeMirror .CodeMirror-scroll {
    z-index: 1 !important;
}

.CodeMirror .CodeMirror-gutter {
    z-index: 1 !important;
}

.CodeMirror .CodeMirror-lines {
    z-index: 1 !important;
}

.login-modal {
    display: none;
    position: fixed;
    z-index: 100002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.login-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 30%;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.search-results {
    z-index: 1000;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.result-item:hover {
    background-color: #f5f5f5;
}

.result-type {
    font-size: 0.8em;
    color: #666;
    margin-right: 8px;
}

.match-text {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

#article-content {
    height: calc(100% - 85px);
    overflow-y: auto;
    padding: 20px;
}

#article-content h2 {
    margin-bottom: 15px;
    color: #333;
}

#article-content h3 {
    margin: 15px 0;
    color: #666;
}

#article-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

#article-content li {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.search-article-link {
    color: #1890ff;
    text-decoration: none;
}

.search-article-link:hover {
    text-decoration: underline;
}

.article-list-controls {
    margin: 10px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.batch-delete-btn {
    padding: 8px 15px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.batch-delete-btn:hover {
    background-color: #c82333;
}

.article-checkbox {
    margin-right: 8px;
    vertical-align: middle;
}

.article-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

/* 文章列表表头 */
.article-list-header {
    display: flex;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: bold;
}

.article-title-col {
    flex: 2;
    min-width: 200px;
}

.created-time-col,
.updated-time-col {
    flex: 1;
    min-width: 150px;
}

/* 文章项 */
.article-item .article-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 15px;
    text-decoration: none;
    /* 添加这一行代码以去掉超链接的下划线 */
    color: rgb(0, 0, 0);
}

.article-title {
    flex: 2;
    min-width: 200px;
}

.created-time,
.updated-time {
    flex: 1;
    min-width: 150px;
    font-size: 0.9em;
    color: #666;
}

.edit-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    margin-left: 10px;
    padding: 2px 5px;
}

.edit-btn:hover {
    color: #1890ff;
}

/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

/* 分类编辑模态框特殊样式 */
#edit-category-modal {
    z-index: 100000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* 模态框头部 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

/* 表单元素 */
.form-input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-select {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
}

.form-select:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 按钮容器 */
.modal-actions {
    margin-top: 20px;
    text-align: right;
}

.btn-primary {
    background: #1890ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-cancel {
    background: #ddd;
    color: #333;
    border: none;
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.form-select option {
    color: #333 !important;
    background: white !important;
}

.form-select option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
}

/* 编辑模态框样式 */
#editModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.edit-modal-content {
    min-width: 400px;
}

/* 登录模态框专用样式 */
#login-modal.modal {
    display: none;
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#login-modal .modal-content {
    position: relative;
    background: #fff;
    margin: 10% auto;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

/* 模态框内容区域 */
.modal-content {
    position: relative;
    /* padding: 20px; */
}

/* 表单元素布局 */
.form-group {
    margin-bottom: 15px;
}

/* 文章列表 */
.article-excerpt {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 缩略图模式 */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}



.thumbnail-card:hover {
    transform: translateY(-3px);
}


/* 缩略图媒体容器 - 统一控制图片/默认图片的容器 */
.card-media {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 卡片图片样式 - 自适应自身长宽比例 */
.card-image {
    width: 100%;
    height: auto; /* 移除固定高度，改为自动适应比例 */
    display: block; /* 消除图片底部空白 */
    object-fit: cover; /* 保持图片比例并填充容器（可选，根据需求） */
}

/* 默认图片容器 - 无图片时设置默认比例（16:9），保持布局一致性 */
.default-image {
    width: 100%;
    aspect-ratio: 16/9; /* 设置默认宽高比为16:9，可根据需求调整 */
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

/* 调整缩略卡片布局为垂直flex，优化内容排列 */
.thumbnail-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-media {
    flex-shrink: 0; /* 防止媒体容器被压缩 */
}

.card-body {
    flex-grow: 1; /* 让标题区域填充剩余空间 */
    padding: 0.5rem; /* 可选：增加内边距，优化排版 */
}

/* 公共样式 */
.top-tag {
    color: #ff6b6b;
    margin-right: 0.5rem;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 3rem 0;
}

/* 横向子分类菜单样式 */
.subcategory-menu {
    margin: 2rem 0;
    overflow-x: auto;
}

.subcategory-list {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1rem;
    flex-wrap: nowrap;
}

.subcategory-item {
    /* flex: 0 0 280px; */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(130, 130, 130, 0.1);
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.subcategory-item:hover {
    transform: translateY(-4px);
}

.subcategory-inner {
    padding: 1.5rem;
}

.subcategory-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.subcategory-thumbnail img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subcategory-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #333;
}

.subcategory-content .meta {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* 统一输入框样式 */
.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.button-group {
    margin-top: 20px;
    text-align: right;
}

.btn-save {
    background: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-cancel {
    background: #666;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}



#new-cate {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
}

#new-cate option {
    padding: 5px;
    margin: 2px 0;
    background: #f5f5f5;
    border-radius: 3px;
}

#new-cate option:checked {
    background: #1890ff;
    color: white;
}

#editArticleCate option {
    padding-left: 10px;
    line-height: 1.5;
}

#editArticleCate option[selected] {
    background-color: #e6f7ff;
    font-weight: 500;
}


#new-editor-container {
    height: calc(100% - 180px);
    position: relative;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#new-editor-md-container {
    height: 100% !important;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.editormd-preview {
    top: 80px !important;
}

/* 添加错误显示样式 */
.loading {
    padding: 20px;
    color: #666;
    text-align: center;
}

.error-alert {
    padding: 20px;
    background: #ffe6e6;
    border: 1px solid #ff4444;
    border-radius: 4px;
    margin: 20px;
}

.error-alert h3 {
    color: #dc3545;
    margin-bottom: 10px;
}

.error-alert button {
    margin-top: 10px;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 分销团队样式 */
.team-container {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.team-level {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.team-level h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.team-level ul {
    list-style: none;
    padding-left: 20px;
}

.team-level li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.join-time {
    color: #7f8c8d;
    font-size: 0.9em;
}

.commission-summary {
    background: #3498db;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.commission-summary h3 {
    margin: 0 0 10px 0;
}

/* 置顶文章特殊样式 */
.article-item--top {
    font-weight: bold;
    color: #007bff;
    order: -1;
}

    /* 列表模式 */
.article-list {
    /* max-width: 800px; */
    margin: 0 auto;
}
.list-title {
    font-size: 1.8rem;
    border-bottom: 2px solid #eee;
    padding: 2rem 0;
    margin-bottom: 2rem;
}
.list-item {
    display: flex;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 2px 2px 4px rgba(0, 187, 255, 0.186);
}
/* 新增光影动画关键帧 */
@keyframes light-beam {
    0% {
        transform: translateX(-100%) skewX(-20deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(200%) skewX(-20deg);
        opacity: 0;
    }
}
.list-item:hover {
    box-shadow: 10px 2px 10px 10px rgba(0, 153, 255, 0.279);
    transform: translateY(-2px);
}
.item-thumbnail {
    width: 320px;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1.5rem;
}
/* 新增光影效果元素 */
.list-item:hover .item-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0,123,255,0) 0%,
        rgba(0,123,255,0.3) 50%,
        rgba(0,123,255,0) 100%
    );
    animation: light-beam 0.8s linear infinite; /* 改为线性动画并无限循环 */
    pointer-events: none;
    opacity: 0.5; /* 增加透明度使效果更柔和 */
}
}
.item-content {
    flex: 1;
}

.item-title {
    position: relative; /* 为伪元素定位添加 */
    font-size: 1.3rem;
    margin: 0 0 0.8rem;
    color: #003dc0;
}
.post-date {
    color: #003dc0;
}
.item-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 列表项基础样式 */
.article-item {
    margin: 5px 0;
}

/* 添加按钮样式 */
.batch-delete-btn {
    margin-right: 10px;
    /* 给右边按钮添加间距 */
}

/* 保持原有样式基础上，可以调整颜色 */
button[onclick="batchTopArticles()"] {
    background-color: #28a745 !important;
}

/* 文章编辑页样式 */
#editor-container {
    position: relative;
    z-index: 999;
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    /* 添加这个属性来启用垂直滚动条 */
    max-height: calc(100vh);
    /* 根据实际情况调整最大高度 */
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.btn-save,
.btn-publish {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-save {
    background: #4CAF50;
    color: white;
}

.btn-publish {
    background: #2196F3;
    color: white;
}

.btn-save:hover,
.btn-publish:hover {
    opacity: 0.9;
}

/* 调整折叠按钮的悬停效果 */
#toc-toggle:hover {
    background: #e0e0e0;
}

.visibility-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    background: white;
    color: #333;
}

/* 添加置顶按钮样式 */
.btn-top {
    background: #666;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    margin-left: 10px;
}

.btn-top:hover {
    background: #555;
}

.btn-top i {
    margin-right: 5px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, .3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 添加toast样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    background: #333;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

/* 新建文章页样式 */
#new-article-form {
    display: none;
    margin-bottom: 10px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 加载更多按钮样式 */
.modern-load-btn {
    margin: 25px auto;
    display: block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a90e2, #2f80ed);
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modern-load-btn:hover {
    background: linear-gradient(135deg, #63a4ff, #2f80ed);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.modern-load-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 到底啦 */
.modern-load-btn.disabled {
    background: linear-gradient(135deg, #cccccc, #999999);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.modern-load-btn.disabled:hover {
    transform: none;
}

.secret-badge {
    font-size: 0.8em;
    color: #ff4d4d;
    margin-left: 5px;
}



/* 分类内容展示样式 */
.category-content-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    margin-top: 15px;
    line-height: 1.6;
    font-size: 15px;
}

.category-content-display img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
}

.category-content-display h2,
.category-content-display h3 {
    margin: 25px 0 15px;
    color: #2c3e50;
}

.no-content-hint {
    color: #6c757d;
    padding: 20px;
    text-align: center;
    background: #fdfdfd;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .list-item {
        flex-direction: column; /* 切换为上下排列 */
        align-items: flex-start; /* 左对齐 */
    }

    .item-thumbnail {
        height: auto; /* 自适应高度 */
        margin-bottom: 15px; /* 图片与内容之间的间距 */
    }

    .category-title {
        font-size: 24px !important; /* !important用于覆盖内联样式 */
    }

    .subcategory-item {
        flex: 0 0 80%;
    }
    
    .subcategory-list {
        gap: 1rem;
        padding: 0 1rem 1rem;
    }

    .slider-item img {
        max-height: 300px; /* 移动端适当减小高度 */
    }
    
    .category-container {
        position: sticky;
        top: 0;
    }

    /* 登录模态框界面 */
    #login-modal .modal-content {
        margin: 20% auto;
        width: 90%;
    }
    
    #login-modal .modal-actions {
        flex-direction: column;
    }


    .top-panel {
        flex-direction: column;
        /* 手机端改为垂直布局 */
        align-items: stretch;
        padding: 5px;
    }

    .search-container {
        width: 100%;
        /* 手机端填满宽度 */
        margin: 5px 0 0 0;
        /* 调整间距 */
    }

    .top-panel.active {
        display: block;
    }

    .main-panel {
        margin-top: 0;
        height: 100%;
    }

    /* 调整下拉菜单定位 */
    #new-doc-dropdown {
        position: fixed;
        bottom: 60px;
        left: 20px;
        z-index: 100000;
        display: block !important;
    }

    .new-doc-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        font-size: 24px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        background: #4CAF50;
        color: white;
    }

    .dropdown-content {
        /* position: fixed; */
        bottom: 80px;
        /* right: 20px; */
        top: auto !important;
        /* width: 50px; */
        /* min-width: 120px; */
        transform: none !important;
        /* box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); */
    }

    .dropdown-content a {
        padding: 15px;
        font-size: 14px;
    }

    .container {
        position: relative;
    }

    .right-panel {
        resize: none;
    }


    #article-content {
        padding: 10px;
    }

    #article-content>span {
        display: block;
        padding: 10px 5px;
        font-size: 16px;
    }

    .article-list-controls {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }



    #select-all-articles {
        margin: 10px 0;
        display: block;
    }

    .article-item {
        position: relative;
        padding-left: 30px;
        /* 为checkbox留出空间 */
    }

    .article-checkbox {
        position: absolute;
        left: 0px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        width: 12px;
        height: 12px;
    }

    /* 调整文章链接的间距 */
    .article-link {
        flex-direction: column;
        align-items: flex-start !important;
        /* 强制左对齐 */
        padding: 8px 5px !important;
    }

    .article-title {
        flex: 1 0 100%;
        /* 允许元素扩展填充剩余空间 */
        font-size: 14px;
        margin-bottom: 5px;
        text-align: left;
        /* 新增左对齐 */
        padding-left: 8px;
        /* 添加左侧内边距 */
    }

    .created-time {
        flex: 0 0 50%;
        font-size: 12px;
        min-width: auto;
        display: none;
        /* 新增隐藏属性 */
    }

    .updated-time {
        flex: 1 0 100%;
        /* 改为全宽度 */
        font-size: 12px;
        color: #bbbbbb;
        text-align: left;
        /* 新增左对齐 */
        padding-left: 8px;
        /* 与标题对齐 */
        min-width: auto;
        text-align: left;
        /* 新增左对齐 */
        padding-left: 8px;
        /* 与标题对齐 */
        margin-top: -3px;
        /* 调整与标题的间距 */
    }

    #load-more.modern-load-btn {
        width: 90%;
        margin: 15px auto;
        padding: 10px;
        font-size: 14px;
    }

    .article-list-header {
        flex-wrap: wrap;
        padding: 5px;
    }

    .article-title-col,
    .created-time-col,
    .updated-time-col {
        flex: 0 0 100%;
        padding: 3px 0;
    }

    .buttons-container {
        margin: 0 !important;
        /* 清除原有margin */
        margin-left: auto !important;
        /* 强制右对齐 */
        width: auto;
        /* 自适应宽度 */
        flex-wrap: nowrap;
        /* 防止换行 */
        justify-content: flex-end;
        /* 右对齐 */
    }

    .markdown-editor {
        height: calc(100% - 60px);
    }

    .divider {
        display: none;
    }
}


#editor-md-container {
    height: calc(100% - 45px);
    background: #fff;
}

.editormd-fullscreen {
    z-index: 100001;
}