#side-controls {
    position: fixed;
    right: 5px;
    bottom: 80px;
    display: flex;
    flex-direction: column; /* 从下往上排列 */
    gap: 10px;
    z-index: 1000;
}

.f-btn {
    width: 48px;
    height: 48px;
    background: #666;
    opacity: 0.5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
    margin: 10px 5px;
}

.f-btn i { font-size: 22px; width: 24px;height: 24px} /* 图标大小控制 */

.f-btn:active { transform: scale(0.9); }

@media (min-width: 768px) {
    #side-controls,#home-drawer{
        display: none;
    }
    .drawer-bottom {
        position: fixed;
        left: 0;
        bottom: 0px;
        width: 100%;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        z-index: 3000;
        transform: translateY(100%); /* 初始隐藏 */
        transition: transform 0.3s ease-out;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
        display: flex;
        flex-direction: column;
    }

}

@media (max-width: 769px) {
    /* 悬浮层通用容器 */
    .drawer-bottom {
        position: fixed;
        left: 0;
        bottom: 60px;
        width: 100%;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        z-index: 3000;
        transform: translateY(100%); /* 初始隐藏 */
        transition: transform 0.3s ease-out;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
        display: flex;
        flex-direction: column;

    }

}






.drawer-bottom.is-open {
    transform: translateY(0);
}

/* 顶部滑动把手 */
.drawer-handle {
    width: 40px;
    height: 5px;
    background: #ddd;
    border-radius: 3px;
    margin: 12px auto;
}

/* “更多”层中的图标排版 */
.more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 30px 20px;
    text-align: center;
}

.more-item i {
    font-size: 32px;
    color: #76b900;
    display: block;
    margin-bottom: 8px;
}

.more-item span {
    font-size: 13px;
    color: #666;
}

/* 禁用状态（针对目录） */
.more-item.disabled {
    filter: grayscale(1);
    opacity: 0.4;
    pointer-events: none;
}

#home-drawer .home-content{
    height: 320px;
}

#home-thumb{
    background: #182839;
    height: 80%;
}

#home-thumb .home-content{
    background: #182839;
}


/* 缩略图网格容器 */
.thumb-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 严格三列 */
    gap: 12px;
    padding: 15px;
    background: #182839;
}

/* 单个缩略图卡片 */
.thumb-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.thumb-card:active {
    opacity: 0.7; /* 点击反馈 */
}

/* 图片比例容器 */
.thumb-img-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4; /* 根据你的PDF比例调整，如 210/297 */
    background-color: #e0e0e0; /* 预加载背景色 */
    overflow: hidden;
}

.thumb-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 页码信息 */
.thumb-info {
    font-size: 11px;
    color: #666;
    text-align: center;
    padding: 4px 0;
    border-top: 1px solid #eee;
}

/* 高亮当前页 */
.thumb-card.active {
    outline: 2px solid #76b900;
}

/*//由于你现在有了向下滑动手势，用户会本能地尝试按住 drawer-handle 下拉。确保你的 CSS 中手柄是显眼的*/
.drawer-handle {
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff; /* 确保背景色不透明 */
    cursor: row-resize;
    border-radius: 16px 16px 0 0;
}

.drawer-handle span {
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 3px;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
    z-index: 998; /* 确保在 Drawer (999) 下面，在普通页面内容上面 */
    display: none; /* 默认隐藏 */
    backdrop-filter: blur(2px); /* 可选：增加高斯模糊感，更显高级 */
}

/* 当抽屉打开时，body 处于锁定状态，遮罩配合显示 */
body.drawer-open .drawer-overlay {
    display: block;
}

.f-btn {
    display: flex;           /* 开启弹性布局 */
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */

    /* 基础尺寸设置 */
    width: 44px;             /* 举例 */
    height: 44px;            /* 举例 */
    cursor: pointer;
}

/* 确保内部的 i 标签本身也是一个容器 */
.f-btn i {
    display: flex;
    justify-content: center;
    align-items: center;
    /* 移除你之前在行内写的 margin: auto */
}

#thumb-drawer{
    height: 80%;
}


/*滑动拉取缩略图*/
    /* 抽屉主体 */
#thumb-drawer {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 防止外层容器出现滚动条干扰 */
}

/* 内容承载区：这是关键 */
.home-content {
    flex: 1;            /* 占据剩余所有空间 */
    overflow-y: auto;   /* 纵向超出时允许滚动 */

    /* 优化移动端滚动体验 */
    -webkit-overflow-scrolling: touch;

    /* 防止拖动内容时触发浏览器的下拉刷新 */
    overscroll-behavior: contain;
}

/* 网格布局保持整齐 */
.thumb-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 移动端通常一行3个 */
    gap: 10px;
    padding: 15px;
}