/* =========================================

   1. 字体与全局背景 (保持不变)

   ========================================= */

/* --- 字体定义 (新版 WOFF) --- */

@font-face {

    font-family: 'MyWebFont';

    src: url('https://nanyang-image.oss-cn-chengdu.aliyuncs.com/static/fonts/MyCustomFont.woff2') format('woff2'); font-display: block;

    font-display: block;

}


body {

    margin: 0;

    font-family: 'MyWebFont', "Microsoft YaHei", sans-serif;

    background-image: url('https://nanyang-image.oss-cn-chengdu.aliyuncs.com/static/images/2.webp');

    background-size: cover;

    background-attachment: fixed;

    background-position: center;

    min-height: 100vh;

    color: #333;

}


/* =========================================

   2. 导航栏

   ========================================= */

.main-nav {

    background-color: rgba(255, 255, 255, 0.9);

    padding: 10px 0;

    text-align: center;

    border-bottom: 1px solid #ddd;

    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

   

    position: sticky;

    top: 0;

    z-index: 1000;


    white-space: nowrap;

    overflow-x: auto;    

    width: 100%;        

}


.main-nav ul {

    margin: 0;

    padding: 0 10px;    

    list-style: none;

    display: inline-block;

}


.main-nav li {

    display: inline-block;

    margin: 0 15px;

}


.main-nav a {

    color: #444;

    text-decoration: none;

    font-size: 16px;

    padding: 10px 0;

    transition: color 0.3s ease;

    position: relative;

    cursor: pointer;

}


.main-nav a:hover, .main-nav a.active {

    color: #000;

}


.main-nav a.active::after {

    content: '';

    position: absolute;

    bottom: 0;

    left: 0;

    width: 100%;

    height: 3px;

    background-color: #CD5C5C;

}


/* =========================================

   3. 主体容器 (已恢复为无背景图状态)

   ========================================= */

.library-container {

    max-width: 1000px;

    margin: 40px auto;

   

    /* 恢复原来的纯净米白色背景 */

    background-color: rgba(253, 251, 245, 0.95);

   

    padding: 50px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.1);

    border-radius: 4px;

    border: 1px solid #e0e0e0;

    min-height: 800px;

}


/* ⚠️ 注意：这里彻底删除了 .library-container::before 相关的代码 */


/* 标题样式 */

.page-title {

    text-align: center;

    color: #333;

    font-size: 2.5rem;

    margin-top: 0;

    margin-bottom: 30px;

    font-family: 'MyWebFont', serif;

}


/* =========================================

   4. 搜索与筛选区域

   ========================================= */

.search-area {

    margin-bottom: 30px;

    padding-bottom: 20px;

    border-bottom: 2px solid #CD5C5C;

}


.search-row-container {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    width: 100%;

    white-space: nowrap;

}


.search-select, .advanced-input {

    flex: 1;

    min-width: 100px;

    padding: 8px 10px;

    font-size: 16px;

    border: 2px solid #CD5C5C;

    border-radius: 25px;

    outline: none;

    font-family: 'MyWebFont', serif;

    background-color: rgba(255, 255, 255, 0.8);

    color: #555;

    cursor: pointer;

    text-align: center;

}


.search-select:hover, .search-select:focus {

    background-color: #fff;

    box-shadow: 0 0 5px rgba(205, 92, 92, 0.3);

}


.search-btn {

    flex: 0 0 auto;

    background-color: #CD5C5C;

    color: white;

    border: none;

    padding: 9px 25px;

    border-radius: 25px;

    cursor: pointer;

    font-size: 16px;

    font-family: 'MyWebFont', serif;

    white-space: nowrap;

}

.search-btn:hover { background-color: #a04040; }


.advanced-link {

    flex: 0 0 auto;

    font-size: 14px; color: #CD5C5C; cursor: pointer; text-decoration: underline; white-space: nowrap;

}


/* =========================================

   5. 标签栏

   ========================================= */

.author-tabs {

    display: flex; justify-content: center; margin-bottom: 20px; gap: 15px;

}

.tab-btn {

    background: none; border: none; cursor: pointer; padding: 10px 25px;

    font-size: 1.2rem; color: #666; font-family: 'MyWebFont', serif;

    border-bottom: 3px solid transparent; transition: 0.3s; text-decoration: none;

}

.tab-btn.active { color: #CD5C5C; font-weight: bold; border-bottom: 3px solid #CD5C5C; }

.tab-btn:hover:not(.active) { color: #CD5C5C; }


/* =========================================

   6. 内容展示区

   ========================================= */

.content-wrapper {

    width: 100%;

    min-height: 600px;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;

}


.timeline-frame {

    width: 100%;

    min-width: 1000px;

    height: 1000px;

    border: none;

    display: block;

}


.work-line {

    border-bottom: 1px dashed #ddd;

    min-width: auto;

}


.work-title-link {

    display: block; padding: 15px 10px; text-decoration: none; color: #444;

    font-size: 18px; font-family: 'MyWebFont', serif; transition: all 0.2s;

}


.work-title-link:hover {

    background-color: #fff; color: #CD5C5C; transform: translateX(5px);

    border-left: 3px solid #CD5C5C; padding-left: 15px;

}


.no-result {

    text-align: center; color: #999; padding: 40px; font-style: italic; font-family: 'MyWebFont', serif;

}


/* =========================================

   7. 检索结果头部布局

   ========================================= */

.result-header {

    display: flex;          

    align-items: center;    

    justify-content: center;

    position: relative;      

    margin-bottom: 20px;

    padding: 0 10px;

}


.result-title {

    color: #CD5C5C;

    font-weight: bold;

    font-size: 1.1rem;

}


.inline-back-btn {

    position: absolute;      

    left: 0;                

    color: #666;

    text-decoration: none;

    font-size: 16px;

    font-weight: bold;

    border: 1px solid #ccc;

    padding: 5px 12px;

    border-radius: 4px;

    transition: all 0.3s;

}


.inline-back-btn:hover {

    color: #fff;

    background-color: #CD5C5C;

    border-color: #CD5C5C;

}


/* =========================================

   8. 【新增】南洋史料专用样式 (Grid)

   ========================================= */

.material-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));

    gap: 25px;

    padding: 20px 0;

    width: 100%;

}


/* ==================================================

   史料卡片样式 (保留了小卡片的背景图)

   ================================================== */

.folder-card {

    position: relative;

    overflow: hidden;

   

    border: 1px solid #ddd;

    border-radius: 8px;

    padding: 25px 15px;

    text-align: center;

    text-decoration: none;

    color: #444;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 120px;

   

    z-index: 1;

    transition: all 0.3s ease;

}


/* 小卡片的背景图层 */

.folder-card::before {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

   

    /* 这里是小卡片的背景 */

    background-image: url('../images/material-card-bg.webp');

    background-size: cover;    

    background-position: center;

   

    /* 淡化程度 */

    opacity: 0.25;

   

    z-index: -1;

    transition: all 0.3s ease;

}


.folder-card:hover {

    transform: translateY(-5px);

    box-shadow: 0 10px 20px hsla(0, 53%, 58%, 0.15);

    border-color: #CD5C5C;

}


.folder-card:hover::before {

    opacity: 0.4;

    transform: scale(1.05);

}


/* 文件夹内容样式 */

.folder-icon {

    font-size: 48px;

    color: #CD5C5C;

    margin-bottom: 15px;

    text-shadow: 2px 2px 0 rgba(0,0,0,0.05);

}


.folder-name {

    font-size: 18px;

    font-weight: bold;

    margin-bottom: 8px;

    font-family: 'MyWebFont', serif;

    line-height: 1.4;

}


.folder-source {

    font-size: 13px;

    color: #999;

    background-color: #f5f5f5;

    padding: 2px 8px;

    border-radius: 10px;

}


/* =========================================

   9. 【新增】史料详情页专用样式

   ========================================= */


/* 左上角悬浮返回键 */

.fixed-back-btn {

    position: fixed;

    top: 30px;

    left: 30px;

    color: #CD5C5C;

    text-decoration: none;

    font-weight: bold;

    background: rgba(255,255,255,0.9);

    padding: 8px 20px;

    border: 1px solid #CD5C5C;

    border-radius: 4px;

    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    transition: all 0.3s;

    z-index: 2000;

    font-family: 'MyWebFont', serif;

}

.fixed-back-btn:hover {

    background: #CD5C5C;

    color: white;

}


/* 底部来源框 */

.source-box {

    margin-top: 60px;

    padding: 20px;

    background-color: rgba(0,0,0,0.03);

    border-left: 5px solid #bbb;      

    color: #333;

    font-size: 16px;

   

    font-family: "SimSun", "Songti SC", "STSong", serif;

    line-height: 1.6;

    text-align: left;

    word-wrap: break-word;

}


/* 右下角悬浮缩放按钮 */

.zoom-controls {

    position: fixed;

    bottom: 40px;

    right: 40px;

    display: flex;

    flex-direction: column;

    gap: 10px;

    z-index: 2000;

}


.zoom-btn {

    width: 45px;

    height: 45px;

    border-radius: 50%;

    border: none;

    background-color: #CD5C5C;

    color: white;

    font-size: 24px;

    cursor: pointer;

    box-shadow: 0 4px 10px rgba(0,0,0,0.3);

    transition: all 0.2s;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 0;

}


.zoom-btn:hover {

    background-color: #a04040;

    transform: scale(1.1);

}


.zoom-btn:active {

    transform: scale(0.9);

}


.reset-btn {

    font-size: 14px;

    background-color: #666;

}

.reset-btn:hover { background-color: #444; }
/* 搜索结果里的摘录文字 */
.search-snippet {
    font-size: 14px;       /* 字小一点 */
    color: #666;           /* 颜色灰一点 */
    margin-top: 5px;       /* 离标题有一点距离 */
    padding-left: 20px;    /* 稍微缩进一点 */
    border-left: 3px solid #eee; /* 左边加个装饰线 */
    line-height: 1.5;
}

.snippet-label {
    color: #d9534f;        /* [摘录] 两个字用红色 */
    font-weight: bold;
    margin-right: 5px;
}
/* =========================================
   10. 【新增】搜索关键词高亮样式
   ========================================= */
.highlight {
    color: #ff0000;            /* 鲜艳的红色 */
    font-weight: bold;         /* 加粗 */
    background-color: yellow;  /* 背景变成黄色 (如果不想要背景色，删掉这行) */
    padding: 0 2px;            /* 左右留一点缝隙 */
    border-radius: 2px;
}