/* 总样式 */
* {
    font-family: "Songti SC","Times New Roman",Georgia,Serif;
}

html {
    scroll-behavior: smooth;
}

.src h3 {
    scroll-margin-top: 100px;
}

p {
    font-size: 16px; 
    line-height: 1.5;
}

a {
    text-decoration: underline;
    color: black;
}

a:hover {
    color: rgba(107, 183, 254, 0.81);
}

.small {
    font-size: 0.8em;
    color: #b59e7d;
    text-align: right;
}

.important {
    font-style: italic;
}

.cross {
    text-decoration: line-through;
}

.bold {
    font-weight: bold;
}

.underline {
    text-decoration: underline;
}

.quotes, .work-name {
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    color: #999;
    margin: 0 3px;
    font-size: 0.95em;
}

.quotes {
    border-left: #cecece solid 3px;
    padding-left: 7px;
    padding-right: 40px;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 20000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain; /* 核心：全屏显示时保留原图比例，不裁剪 */
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* 灯箱关闭按钮 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 20001;
    line-height: 1;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #ccc;
}

/* 灯箱轮播按钮 */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 20001;
    line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.35);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* 灯箱图片计数器 */
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 18px;
    border-radius: 20px;
    z-index: 20001;
    user-select: none;
}

/* 主页 */
.main {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    position: relative;     /* 为 background 提供定位参考 */
}

.main-content {
    display: flex;
    flex-direction: row;
}

.background {
    background-color: #CEC1A8;
    position: absolute;
    top: calc(98px + 1vh);
    bottom: 2vh;
    left: 1.25vw;
    right: 1.25vw;
    opacity: 0.6;
    z-index: -1;
} 

#cat {
    margin-left: 7vw;
    margin-top: calc(10vh + 100px);
    display: flex;
    flex-direction: column;
    justify-content: end;
}

#cat > img {
    max-height: 78dvh;
    max-width: 40vw;
}

.right {
    padding: calc(5vh + 100px) 8vw 2vh 1vw;
    display: flex;
    flex-direction: column;
}

.logo {
    z-index: 0;
}

.logo > img {
    max-height: 40vh;
    max-width: 45vw;
}

.introduction {
    background-color: #fbf7f1;
    border-radius: 30px;
    border: 2px solid #584738;
    padding: 2.5vh 2.5vw;
    font-size: 1.25em; 
    line-height: 1.6;
    margin-top: -8%;
    z-index: 1;
    min-width: fit-content;
}

.update-buttons {
    display: flex;
    flex-direction: row;
}

.update {
    margin-top: 0;
    background-color: #fbf7f1;
    border-radius: 30px;
    border: 2px solid #584738;
    padding: 2vh 2.5vw 2vh 4vw;
    font-size: 20px; 
    line-height: 1.6;
    max-width: fit-content;
}

.update > li a {
    text-decoration: none;
}

.small {
    font-size: 14px;
    font-weight: 600;
    color: #b59e7d;
    text-align: right;
}

#button {
    border-collapse: separate;
    border-spacing: 0 0; /* 核心：这里的 5px 控制行间距，数值越小越紧凑 */
    position: relative;    /* 根据你的页面视觉调整 */
    margin-left: calc(20px + 1vw);
}

#button td:first-child {
    position: relative;
    width: 2vw;          /* 预留足够宽度 */
    height: 5vh;         /* 预留足够高度 */
    display: flex;        /* 开启 flex 布局 */
    align-items: flex-end; /* 核心：强制所有图片在底部对齐 */
    justify-content: center;
}

#button td:last-child {
    font-size: 18px;      /* 稍微缩小字号以适配紧凑布局 */
    font-weight: bold;
    color: #584738;
    padding-left: 2vw;/* 文字也保持底部对齐，视觉更统一 */
    padding-bottom: 2vh;    /* 微调文字高度，使其对齐按钮中心线 */
}

#button img {
    position: absolute;   /* 绝对定位实现重叠 */
    max-width: 50px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.1s ease;
}

#button_red1, #button_green1, #button_blue1 {
    z-index: 1;
}

#button_red, #button_green, #button_blue {
    z-index: 2;
}

.fade-out {
    opacity: 0;
}

.nav {
    list-style: none;
    text-align: end;
    position: fixed;
    top: 0;       /* 明确顶部位置 */
    left: 0;      /* 明确左侧位置，防止偏移 */
    margin: 0;
    padding: 20px calc(10px + 5vw); /* 左右 padding 保持和标题一致 */
    background: #584738;
    width: 100%;
    box-sizing: border-box; /* 重要：防止 padding 撑开总宽度 */
    z-index: 100; /* 确保它在最最前面 */
}

.nav li {
    display: inline-block;
    position: relative;
    text-align: center;
}

.nav li a {
    background: #584738;
    display: inline-table;
    text-decoration: none;
    font-size: 20px;
    text-align: center;
    color: white;
}

.title {
    padding: 10px calc(10px + 2.5vw);
}

.dropdown {
    text-align: center;
    color: white;
    display: block;
    width: 100px;
    background: #584738;
    position: absolute;
    right: 24px;
    top: 39px;
    line-height: 30px;
    padding: 10px;
    display: none;
}

.nav li a:hover {
    color: rgb(67, 130, 255);
}

.nav li:hover .dropdown {
    display: block;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 9999;
    backdrop-filter: blur(3px);
}


.overlay.active {
    display: block;
    opacity: 1;
}

/* 公告板 */
.board-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.announcement-board {
    width: 800px;
    height: 500px;
    background-color: #fbf7f1;
    border-radius: 15px;
    padding: 30px 40px;
    border: 1px solid #cec1ab;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.board-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #cec1ab;
    display: flex;
    justify-content: center;
}

.board-header .note-title {
    font-size: 1.4rem;
    color: #b59e7d;
    font-weight: bold;
}

.board-content {
    flex: 1;
    overflow-y: auto;
    color: #584738;
    line-height: 1.8;
    font-size: 1.1rem;
}

.close-btn-outer {
    position: absolute;
    top: -40px;
    right: -40px;
    font-size: 40px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.close-btn-outer:hover {
    color: #cec1ab;
    transform: scale(1.1);
}

/* 内部标签样式（可选） */
.note-info {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.note-tag {
    font-size: 0.8rem;
    color: #b59e7d;
    background-color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #cec1ab;
}

/* 正文 */
.page-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    margin-top: 100px;
    padding: 0 calc(10px + 0.5vw);
}

/* 侧边栏 */
.left-bar, .right-bar {
    background-color: #fbf7f1;
    border-radius: 15px;
}

.left-bar {
    flex: 1 1 13%;
    position: sticky;
    padding: 20px 10px;
    margin-bottom: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.left-bar > ul > li > a {
    text-decoration: none;
}

.right-bar {
    flex: 1 2 23%;
    position: sticky;
    background-color: #fbf7f1;
    border-radius: 15px;
    padding: 30px calc(5px + 0.75vw);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Essay pagination (rendered below the article column) */
.pagination-container {
    margin: 28px 0 8px;
    padding: 20px 0 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #cec1ab;
}
.pagination-container .page-btn {
    padding: 6px 16px;
    font-size: 13px;
    background-color: #ffffff;
    border: 1px solid #cec1ab;
    color: #584738;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.pagination-container .page-btn:hover:not(:disabled) {
    background-color: #e8dfd3;
    transform: translateY(-1px);
}
.pagination-container .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f5f0e8;
}
.pagination-container .page-info {
    font-size: 13px;
    color: #b59e7d;
    min-width: 80px;
    text-align: center;
}

.bar-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #584738;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.bar-title-right {
    font-size: 1.2em;
    font-weight: bold;
    color: #584738;
    display: flex;
    justify-content: flex-start;
    margin: 0 20px;
}

.right-bar-update {
    color: #fbf7f1;
    border-radius: 15px;
    list-style-type: disc;
}
        
.column-date {
    margin: 10px 0;
    font-weight: bold;
}

.left-bar ul li ul {
    padding-left: 0;
}
        
.left-bar ul ul li {
    list-style: none;
    position: relative;
}

.left-bar a, .right-bar-update a {
    text-decoration: none;
    color: #584738;
    display: block;
    padding: 5px 5px;
    border-radius: 5px;
    transition: all 0.2s;
    font-size: 0.95rem;
}
        
.left-bar a:hover {
    background-color: #e8dfd3;
    color: #333;
    transform: translateX(2px);
    margin-right: 25px;
}
        
.left-bar .active {
    background-color: #584738; /* Dark brown background */
    color: white; /* White text */
    margin-right: 13px;
    font-weight: bold;
}

.right-bar-update ul {
    padding-left: 20px; /* 为实心圆点留出空间 */
    margin-top: 20px;
}

.right-bar-update ul li {
    list-style-type: disc; 
    color: #584738;
    display: list-item;
    margin-bottom: 8px;
    display: list-item;
}

.right-bar-update li {
    display: list-item;
}

.right-bar-update ul li {
    display: list-item;
    list-style-position: outside;
    margin-bottom: 5px;
    clear: both;
    overflow: hidden; /* 清除浮动或配合布局 */
    list-style-type: disc;
    color: #584738;
    position: relative;
    padding-right: 120px; /* 为右侧日期留出空间 */
    list-style-position: outside;
}

.right-bar-update ul li a {
    display: inline-block; /* 恢复为行内块 */
    color: #584738;
    padding: 0;
    font-size: 0.95rem;
    background-color: #e8dfd3;
    padding: 2px 8px;
    border-radius: 5px;
    transition: all 0.2s;
}

.right-bar-update ul li a:hover {
    color: rgba(107, 183, 254, 0.81);
}

.right-bar-update .small {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.8rem;
    color: #888;
    margin-right: 50px;
}

.toggle-btn {
    display: none;
    position: fixed;
    left: 20px;
    top: 25px;
    z-index: 10002;
    cursor: pointer;
    
    /* 核心修改点 */
    flex-direction: column;
    justify-content: center; /* 垂直居中 */
    align-items: center;     /* 水平居中 */
    
    width: 40px;             /* 给一个外框宽度 */
    height: 40px;            /* 给一个明确的高度，gap 才会生效 */
    gap: 6px;                /* 间距设为 6-8px 视觉上最像三横线 */
    
    background: #584738;    /* 建议加个背景色或确保背景不是白色，否则白线看不见 */
    border-radius: 4px;
}

.line {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 5px;
}

/* 当侧边栏激活时，三横线的变化 */


/* 记事 */
.content-container {
    display: inline-block;
    box-sizing: border-box; 
    min-width: 0;
    flex: 1 17 55%;
    max-height: 85vh;
    overflow-y: auto;
}

.note {
    background-color: #fbf7f1;
    border-radius: 15px;
    padding: 20px;
    padding-bottom: 30px;
    margin-bottom: 20px;
    scroll-margin-top: 40px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* 增加平滑过渡动画 */
}

.note-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #cec1ab
}

.note-title {
    font-size: 1.2rem;
    color: #b59e7d;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.note-content p:last-child {
    margin-bottom: 0;
}

/* 1. 图片容器：允许换行并限制最大宽度 */
.note-photo-container {
    display: grid; /* 改用网格布局，比 flex 更像朋友圈 */
    grid-template-columns: repeat(3, 1fr); /* 默认三列 */
    gap: 8px;
    width: 100%;
    margin-top: 15px;
}

.note-photo-container:has(img:only-child) {
    grid-template-columns: 1fr;
    max-width: 300px; /* 单图不宜过大 */
}

/* 2. 容器内的图片：自适应宽度 */
.note-photo-container img {
    width: 100%;
    aspect-ratio: 4 / 3; /* 核心：强制宽高比为 4:3 */
    object-fit: cover;   /* 居中裁剪，不拉伸 */
    border-radius: 4px;
    cursor: zoom-in;     /* 鼠标悬停显示放大镜图标 */
    transition: opacity 0.2s;
}

/* 3. 鼠标悬停效果（可选） */
.note-photo-container img:hover {
    transform: scale(1.02);
}

/* 4. 移动端适配：手机上一行排 1-2 张 */
@media (max-width: 768px) {
    .note-photo-container img {
        flex: 0 0 calc(50% - 10px); /* 手机端一行 2 张 */
        height: 150px;
    }
}

/* 5. Essay 轮播样式 */
.note-photo-container.carousel {
    display: block;
    max-width: 100%;
    margin-top: 15px;
}

.note-photo-container.carousel .photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0ece4;
}

.note-photo-container.carousel .slides-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.note-photo-container.carousel .slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.note-photo-container.carousel .slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
    aspect-ratio: auto;
}

.note-photo-container.carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #584738;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0.7;
}

.note-photo-container.carousel .carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.note-photo-container.carousel .carousel-prev {
    left: 8px;
}

.note-photo-container.carousel .carousel-next {
    right: 8px;
}

.note-photo-container.carousel .carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 10;
}

.note-photo-container.carousel .carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.note-photo-container.carousel .carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
}

/* 移动端轮播按钮更大一些 */
@media (max-width: 768px) {
    .note-photo-container.carousel .carousel-btn {
        width: 32px;
        height: 32px;
    }
    .note-photo-container.carousel .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

.note-photo-container p:first-child {
    margin-top: 0;
}

.note-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 0px;    
}

.note-date {
    justify-content: flex-start;
}

.note-tags {
    gap: 8px;
    justify-content: flex-end;
}

.note-tag {
    font-size: 0.8rem;
    color: #b59e7d;
    background-color: #ffffff;
    margin-right: 2px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #cec1ab;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.note-tag:hover {
    background-color: #f5f0e8;
    transform: translateY(-1px);
}

.note-tag.active {
    background-color: #584738;
    color: white;
    border-color: #584738;
}

/* Tag filter controls */
.tag-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fbf7f1;
    border-radius: 10px;
    border: 1px solid #cec1ab;
}

.tag-filter-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tag-filter-title {
    font-size: 1rem;
    font-weight: bold;
    color: #584738;
}

.tag-filter-clear {
    background-color: #e8dfd3;
    border: 1px solid #cec1ab;
    color: #584738;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-filter-clear:hover {
    background-color: #d9cdbc;
}

.tag-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-filter-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #ffffff;
    border: 1px solid #cec1ab;
    color: #b59e7d;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-filter-tag:hover {
    background-color: #f5f0e8;
}

.tag-filter-tag.active {
    background-color: #584738;
    color: white;
    border-color: #584738;
}

.tag-filter-tag-count {
    font-size: 0.7rem;
    background-color: #e8dfd3;
    color: #584738;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.tag-filter-tag.active .tag-filter-tag-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Note filtering */
.note.hidden {
    display: none;
}

.note.filtered {
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

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

/* 相册 */
.content {
    float: left;
    margin-top: 100px; 
    margin-left: 265px;
}

.gallery {
    display: flex;
    flex-direction: column;
}

.row {
    width: calc(60% + 60px);
    margin-bottom: 15px;
    scroll-margin-top: 120px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
} 

.post {
    background-color: #fbf7f1;
    flex: 1;
    border-radius: 15px;
    padding: 20px 30px;
}

.row-3 {
    width: calc(60% + 60px);
    height:fit-content;
    margin-bottom: 15px;
    scroll-margin-top: 120px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
}

.row-1 {
    width: calc(60% + 60px);
    height:fit-content;
    margin-bottom: 15px;
    scroll-margin-top: 120px;
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.row-1 > .post > .photo {
    border-radius: 0;
    aspect-ratio: 2 / 3;
}

.row-1 > .post > .slides-wrapper > .slide > .photo img {
    object-fit: cover;
}

.right-column-3 {
    flex: 1;
    display: flex;
    flex-direction: column; 
    gap: 15px;
    height: 100%;
}

.right-column-3 > .post > .text {
    margin-top: 10px;
    padding-top: 5px;
    font-size: 12px;
} 

.right-column-3 > .post {
    padding: 10px 15px;
    padding-bottom: 20px;
}

.left-column-3 {
    width: 68%;
}

.left-column-4 {
    width: auto;   
}

.left-column-4 > .post > .slides-wrapper > .slide >img {
    object-fit: cover;
    width: 310px;
}

.right-column-4 > .post {
    margin-top: 25px;
}

.right-column-4 > .post:first-child{
    margin-top: 0px;
}

.photo {
    height: auto;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slides-wrapper {
    display: flex; /* 让 slide 横向排列 */
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out; /* 平滑过渡动画 */
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.text {
    margin-top: 20px;
    text-align: end;
    font-family: "Arial";
    font-style: italic;
    color: #999;
    padding-top: 10px;
    border-top: 1px solid #584738;
    font-size: 14px;
}

.post-date {
    font-size: 0.8em;
    margin-right: 15px;
    font-family: "Arial";
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #584738;
    transition: all 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 2%;
}

.carousel-next {
    right: 2%;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
}

.slide {
    min-width: 100%; /* 每张幻灯片占满容器宽度 */
    height: 100%;
}

.directory-container {
    display: inline-block;
    margin-top: 100px;
    box-sizing: border-box; 
}

.directory {
    float: left;
    width: 50%;
    background-color: #fbf7f1;
    border-radius: 15px;
    padding: 20px 30px 10px 30px;
    margin-left: 265px;
    margin-bottom: 30px;
    scroll-margin-top: 120px;
    overflow: hidden;
}

/* 目录标题区域 */
.directory-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    box-shadow: 2px 2px 1px rgba(0,0,0,0.1);
    /* border-bottom: 1px solid #cec1ab */
}

.directory-title {
    font-size: 1.5rem;
    color: #5a4d3e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.directory-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 0px;    
}

.stats {
    display: flex;
    gap: 15px;
}

.directory-tags {
    margin-right: 15px;
    gap: 8px;
    justify-content: flex-end;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #5a4d3e;
}

.stat-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 推荐词区域 */
.recommendation {
    position: relative;
    margin: 25px 0 20px;
    padding: 0 25px;
}

.recommendation-text {
    font-size: 16px;
    line-height: 1.6;
    color: #999;
    font-style: italic;
    font-family: "PingFang SC";
    padding: 0 10px;
}

.quote {
    color: #b59e7d;
    font-size: 48px;
    font-weight: bold;
    font-family: cursive;
    position: absolute;
    line-height: 1;
}

.quote-left {
    top: -15px;
    left: 0;
}

.quote-right {
    display: inline-block;
    transform: rotate(180deg);
    animation: flipIn 0.6s ease-out forwards;
    bottom: -20px;
    right: 20px;
}

.info {
    margin-top: 10px;
    color: #5a4d3e;
}

/* 底部信息区域 */
.directory-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 5px;
    border-top: 1px solid #e8dfd3;
}

.creation-date {
    color: #7a6c5a;
    font-size: 14px;
}

.expand-btn {
    background-color: #e8dfd3;
    border: none;
    border-radius: 6px;
    margin-top: 5px;;
    padding: 8px 16px;
    font-size: 14px;
    color: #5a4d3e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.expand-btn:hover {
    background-color: #d9cdbc;
    transform: translateY(-2px);
}

.expand-icon {
    transition: transform 0.3s;
}

.expanded .expand-icon {
    transform: rotate(180deg);
}

/* 目录条目列表 */
.directory-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.expanded .directory-content {
    max-height: 1000px;
    margin-top: 25px;
}

.directory-list {
    list-style: none;
}

.directory-item {
    padding: 20px;
    border-bottom: 1px solid #e8dfd3;
    transition: background-color 0.2s;
}

.directory-item:hover {
    background-color: #f5f0e8;
}

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

.item-name {
    font-weight: 700;
    font-size: 18px;
    color: #2c6fb7;
    text-decoration: none;
    transition: color 0.2s;
}

.item-name:hover {
    color: #1a4d8c;
    text-decoration: underline;
}

.item-type {
    font-size: 13px;
    color: #7a6c5a;
    background-color: #f0e9df;
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-recommendation {
    position: relative;
    padding: 0 20px;
    margin-top: 8px;
}

.item-recommendation-text {
    font-size: 14px;
    line-height: 1.5;
    color: #7a6c5a;
    font-style: italic;
    padding: 0 10px;
}

.item-quote {
    color: #b59e7d;
    font-size: 32px;
    font-family: Georgia, "Times New Roman", serif;
    position: absolute;
    line-height: 1;
}

.item-quote-left {
    top: -8px;
    left: 0;
}

.item-quote-right {
    bottom: -15px;
    right: 0;
}

/* 搜索栏 */
.n-search-area {
    max-width: 800px;
    padding: 0 20px;
}

.n-search-box {
    position: relative;
    background: #ffffff;
    border-radius: 30px; /* 统一胶囊圆角 */
    border: 1px solid #e1e8ed;
    box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 交互：点击边框变蓝 */
.n-search-box:focus-within {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.15);
}

.n-search-input-group {
    display: flex;
    align-items: center;
    padding: 15px 25px; /* 统一内边距 */
}

.n-search-icon {
    color: #3498db;
    margin-right: 12px;
    display: flex;
}

#noteSearchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

/* 结果面板 */
.n-results-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(225, 232, 237, 0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 2000;
}

.n-result-item {
    padding: 15px 25px;
    border-bottom: 1px solid #f5f8fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.n-result-item:hover {
    background: #f0f7ff;
    padding-left: 30px; /* 侧滑反馈 */
}

.n-res-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 4px;
    display: block;
}

.n-res-excerpt {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: -webkit-box;
    line-clamp: 1; /* 只显示一行缩略 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.n-stats-bar {
    padding: 10px 25px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

.n-highlight {
    color: #3498db;
    font-weight: 700;
    text-decoration: underline;
}

.n-no-match {
    padding: 30px;
    text-align: center;
    color: #95a5a6;
}

/* 2. Gallery 搜索专属样式（视觉对齐版） */
.g-search-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

.g-search-box {
    position: relative;
    background: #ffffff;
    /* 统一 30px 胶囊圆角 */
    border-radius: 30px; 
    border: 1px solid #e1e8ed;
    box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 交互：点击边框变蓝，与目录页一致 */
.g-search-box:focus-within {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.15);
}

.g-search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 15px 25px;
}

.g-search-icon {
    color: #3498db;
    margin-right: 12px;
    display: flex;
}

#gallerySearchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

/* 结果面板：毛玻璃效果 */
.g-results-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(225, 232, 237, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 2000;
}

.g-result-item {
    padding: 15px 25px;
    border-bottom: 1px solid #f5f8fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.g-result-item:hover {
    background: #f0f7ff;
    padding-left: 30px; /* 侧滑动画 */
}

.g-res-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    display: block;
}

.g-res-date {
    font-size: 0.8rem;
    color: #3498db;
    margin-top: 4px;
    display: block;
}

.g-stats-bar {
    padding: 10px 25px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

.g-highlight {
    color: #3498db;
    font-weight: 700;
    text-decoration: underline;
}

.g-no-match {
    padding: 30px;
    text-align: center;
    color: #95a5a6;
}

/* 2. 目录页搜索栏 CSS 样式 */
.dir-search-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

.dir-search-box {
    position: relative;
    background: #ffffff;
    border-radius: 30px; /* 统一胶囊圆角 */
    border: 1px solid #e1e8ed;
    box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 交互：点击边框变蓝 */
.dir-search-box:focus-within {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.15);
}

.dir-search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.dir-search-icon {
    color: #3498db;
    margin-right: 12px;
    display: flex;
    align-items: center;
}

#dirSearchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333;
    background: transparent;
    padding: 0;
}

/* 结果面板：毛玻璃效果 */
.dir-results-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(225, 232, 237, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 9999;
}

.dir-result-entry {
    padding: 15px 25px;
    border-bottom: 1px solid #f5f8fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dir-result-entry:hover {
    background: #f0f7ff;
    padding-left: 30px;
}

.dir-entry-title {
    font-weight: 600;
    color: #2c3e50;
    display: block;
    font-size: 1rem;
}

.dir-entry-desc {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 4px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-stats-header {
    padding: 10px 25px;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

.dir-highlight {
    color: #3498db;
    font-weight: 700;
    text-decoration: underline;
}

.dir-no-match {
    padding: 25px;
    text-align: center;
    color: #95a5a6;
}

/* 资源页搜索专属样式 */
.src-search-area {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

.src-search-box {
    position: relative;
    background: #ffffff;
    border-radius: 30px; /* 统一胶囊圆角 */
    border: 1px solid #e1e8ed;
    box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 激活状态：边框变蓝 */
.src-search-box:focus-within {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.15);
}

.src-search-input-group {
    display: flex;
    align-items: center;
    padding: 15px 25px;
}

.src-search-icon {
    color: #3498db;
    margin-right: 12px;
    display: flex;
}

#srcSearchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

/* 结果面板 */
.src-results-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(225, 232, 237, 0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 2000;
}

.src-result-item {
    padding: 12px 25px;
    border-bottom: 1px solid #f5f8fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.src-result-item:hover {
    background: #f0f7ff;
    padding-left: 30px;
}

.src-res-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    display: block;
}

.src-res-category {
    font-size: 0.75rem;
    color: #3498db;
    background: #e1f0ff;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
}

.src-stats-bar {
    padding: 10px 25px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

.src-highlight {
    color: #3498db;
    font-weight: 700;
}

.src-no-match {
    padding: 30px;
    text-align: center;
    color: #95a5a6;
}

.note-container-src {
    display: inline-block;
    margin-top: 100px;
    box-sizing: border-box; 
}

.note-container-src > .note {
    width: 100%;
}

.note-container-src > .note > .note-header > .note-title {
    font-size: 28px;
}

.src a {
    display: block;
}

@media (max-width: 768px) {
    #cat {
        display: none;
    }

    .right {
        width: 100vw;
        padding-left: 8vw;
        padding-right: 8vw;
    }

    .title {
        padding: 10px 2.5vw;
    }

    .logo img, .introduction, .update-buttons {
        max-width: 80%;
    }

    .introduction {
        font-size: 1em;
        padding: 15px;
    }

    .update {
        font-size: 1em;
        padding: 10px 5px 10px 30px
    }

    #button {
        margin-left: 30px;
    }

    #button td:last-child {
        display: none;
    } 

    .toggle-btn {
        display: block flex;
    }

    .page-content {
        font-size: 12px !important;
    }

    .left-bar {
        position: fixed !important;
        left: -320px;
        top: 10px;
        width: 260px;
        max-height: 90vh;
        overflow-y: auto;
        background: #fdfaf5;
        z-index: 10001;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px 15px 10px 30px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }

    .left-bar.active {
        left: 10px;
    }

    /* Left-bar mobile improvements */
    .left-bar ul {
        padding-left: 10px;
    }

    .left-bar a {
        font-size: 0.9rem;
        padding: 6px 8px;
        margin-right: 10px;
    }

    .left-bar .active {
        margin-right: 10px;
        padding: 6px 8px;
    }

    .left-bar a:hover {
        margin-right: 10px;
    }

    .column-date {
        font-size: 0.9rem;
        margin: 8px 0;
        font-weight: bold;
        color: #584738;
    }

    .left-bar ul ul {
        margin-left: 5px;
    }

    .toggle-btn.active .line:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg); /* 9px 是根据 gap 计算的偏移 */
    }

    .toggle-btn.active .line:nth-child(2) {
        opacity: 0;
    }

    .toggle-btn.active .line:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    .right-bar {
        display: none;
    }

    .note-photo-container img {
        flex: 0 0 calc(50% - 10px); /* 手机端一行 2 张 */
        height: 150px;
    }

    /* Tag filter mobile adaptations */
    .tag-filter-container {
        padding: 10px;
        margin-bottom: 15px;
    }

    .tag-filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tag-filter-title {
        font-size: 0.9rem;
    }

    .tag-filter-clear {
        font-size: 0.75rem;
        padding: 3px 10px;
        align-self: flex-end;
    }

    .tag-filter-tags {
        gap: 4px;
    }

    .tag-filter-tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .tag-filter-tag-count {
        font-size: 0.6rem;
        padding: 1px 4px;
        min-width: 14px;
    }

    /* 8. 公告板/弹窗适配 */
    .announcement-board {
        width: 90vw !important;
        height: 70vh !important;
        padding: 15px !important;
    }
    .close-btn-outer {
        right: 0 !important;
        top: -35px !important;
    }
}
