body {
    padding: 20px;
    background-color: #f8f9fa;
}
.root{
    --primary-color: #0366d6;
}
.file-list {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
}
.file-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 30px;
    height: calc(100vh - 40px);
    overflow-y: auto;
}
.tag {
    display: inline-block;
    background-color: rgba(3, 102, 214, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-right: 5px;
    color: var(--primary-color);
}
.file-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}
.file-item:hover {
    background-color: #f8f9fa;
}
.file-item.active {
    background-color: rgba(3, 102, 214, 0.1);
    border-left: 3px solid var(--primary-color);
}
.file-date {
    font-size: 0.8em;
    color: #6c757d;
}
.loading {
    color: #6c757d;
    font-style: italic;
}
/* 任务列表样式 */
.task-list-item {
    list-style-type: none;
}
.task-list-item-checkbox {
    margin-right: 8px;
}
/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
table, th, td {
    border: 1px solid #ddd;
}
th, td {
    padding: 8px;
    text-align: left;
}
th {
    background-color: #f2f2f2;
}
/* 脚注样式 */
.footnotes {
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 20px;
    padding-top: 10px;
}
/* 图表容器 */
.mermaid, .math-container {
    margin: 20px 0;
    text-align: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}
/* 图片样式 */
.markdown-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 15px 0;
    cursor: zoom-in;
    transition: transform 0.2s;
}
.markdown-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.image-caption {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: -10px;
    margin-bottom: 15px;
}
/* 图片画廊容器 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}
.image-gallery img {
    flex: 1 1 calc(33.333% - 10px);
    min-width: 150px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
}

/* 添加在文件末尾 */
/* 标题样式 */
h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

/* 列表样式 */
ul, ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 强调文本样式 */
strong {
    font-weight: bold;
    color: #333;
}

/* 时间表样式 */
.day-schedule {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.day-schedule h3 {
    color: #2c3e50;
    margin-top: 0;
}

/* 添加在文件末尾 */
.search-container {
    margin-bottom: 15px;
}

#search-input {
    border-radius: 20px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    box-shadow: none;
}

#search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(3, 102, 214, 0.25);
}

.btn-back {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    border: none;
}

.btn-back:hover {
    background-color: #0356b6 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 添加在文件末尾 */
/* 侧边栏和遮罩层样式 */
#sidebar {
    transition: transform 0.3s ease;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    #sidebar.show {
        transform: translateX(0);
    }
    
    .file-content {
        height: calc(100vh - 100px);
    }
    
    #sidebar-close {
        display: block !important;
    }
}

/* 调整文件内容区域在移动端的边距 */
@media (max-width: 767.98px) {
    .file-content {
        margin-top: 20px;
    }
}

/* 添加在文件末尾 */
/* 移动端标题和按钮优化 */
@media (max-width: 767.98px) {
    /* 调整顶部栏内边距 */
    .container-fluid > .d-flex {
        padding: 0.5rem 1rem;
    }
    
    /* 按钮大小调整 */
    .btn-back {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* 汉堡菜单按钮图标大小 */
    #sidebar-toggle .bi {
        font-size: 1.2rem;
    }
    
    /* 关闭按钮大小 */
    #sidebar-close {
        padding: 0.25rem 0.5rem;
    }
    
    /* 文件列表标题大小 */
    .file-list h5 {
        font-size: 1.1rem;
    }
    
    /* 搜索框大小 */
    #search-input {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* 文件项文字大小 */
    .file-item {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    /* 标签大小 */
    .tag {
        font-size: 0.75em;
        padding: 1px 6px;
    }
    
    /* 文件日期大小 */
    .file-date {
        font-size: 0.75em;
    }
}

/* 超小屏幕优化 (小于576px) */
@media (max-width: 575.98px) {
    /* 进一步缩小标题 */
    h1 {
        font-size: 1.3rem !important;
    }
    
    /* 隐藏按钮文字，只显示图标 */
    .btn-back span, #sidebar-toggle span {
        display: none !important;
    }
    
    /* 调整按钮最小宽度 */
    .btn-back {
        min-width: 36px;
    }
    
    /* 缩小侧边栏宽度 */
    #sidebar {
        width: 260px;
    }
}