

.zib-pv-size {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.zib-pv-loading {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.zib-pv-error {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.zib-pv-error {
    color: #e74c3c;
}

.zib-dl-files-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.zib-dl-files-panel {
    flex: 1;
}

.zib-dl-size {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.zib-dl-file-list {
    padding: 8px 6px;
    overflow-y: auto;
    flex: 1;
}

.zib-dl-list-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
}

.zib-dl-list-item:hover {
    background: #fafafa;
}

.zib-dl-list-item .zib-dl-icon {
    color: #999;
    flex-shrink: 0;
}

.zib-dl-list-item .zib-dl-name {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zib-dl-download-btn {
    padding: 5px 14px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
}

.zib-dl-download-btn:hover {
    background: #155cb0;
}

.zib-dl-loading {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.zib-dl-empty,
.zib-dl-error {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.zib-dl-error {
    color: #e74c3c;
}

/* 右侧文件列表分页条 */
.zib-dl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 6px;
}

.zib-dl-page-btn {
    padding: 4px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
}

.zib-dl-page-btn:hover:not(:disabled) {
    border-color: #1a73e8;
    color: #1a73e8;
}

.zib-dl-page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.zib-dl-page-info {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

/* ========== 搜索框容器（2026-09-27 改版：输入框与按钮合成一体） ==========
   旧样式是「灰底大盒子（#e2e8f0 + 20px 内边距）里放一个白输入框和一个蓝按钮」——
   三块各自有边框/底色，读起来像三个独立控件，而不是「一个搜索框」。
   现在：容器透明（那层灰底不表达任何信息，是纯视觉噪音），
   白底 + 细描边的**长方形（小圆角）**只画在 .zib-*-search-box 上，
   输入框无边框、按钮嵌在右端。
   宽度：外面那层容器上限 960px，这里再收到 **480px（一半）并居中** ——
   搜索框只需要够输入的长度，撑满整行会把「输入 + 按钮」这对关系拉散。
   ★ 只缩这一层、不缩 .zib-*-search-container：搜索结果列表要照旧占满 960px，
     一起缩窄会让结果行的表头/文件名/按钮挤在一起。
   ★ 深色模式的对应规则在文件下方的「夜间模式支持」一节，两处要一起改。 */
.zib-search-form-wrap {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: 480px;          /* 容器上限 960px 的一半 */
    margin: 0 auto 16px;       /* 居中；16px 是原来的下间距 */
    box-shadow: none;
    transition: none;
}

.zib-search-form-wrap:hover {
    box-shadow: none;
}

/* ========== 预览搜索 ========== */
.zib-pv-search-container {
    max-width: 960px;
    margin: 0 auto;
}

/* 输入 + 按钮合成一体：外壳负责描边与圆角，里面两件都不画边框。
   ★ 用 :focus-within 让「点进输入框」时高亮的是**整个搜索框** ——
     焦点环画在输入框自己身上，看起来会像只有左半边被选中。
   ★ 形状是「长方形带一点圆角」：外壳 8px，内部两件 4px。
     内部圆角 = 外壳圆角 − padding（8 − 4）—— 给大了按钮的角会从外壳的弧里
     探出来，给小了按钮四角会出现一圈白缝。 */
.zib-pv-search-box {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    padding: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zib-pv-search-box:hover {
    border-color: #c9d2dc;
}

.zib-pv-search-box:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
}

.zib-pv-search-input {
    flex: 1;
    min-width: 0;
    padding: 9px 16px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    background: transparent;
    color: #1a1a1a;
    box-shadow: none;
    transition: none;
    -webkit-appearance: none;
    appearance: none;
}

.zib-pv-search-input::placeholder {
    color: #9aa0a6;
}

/* ★ 输入框自己不再有任何边框/阴影 —— 高亮交给上面的 :focus-within 外壳。
   少了这两条，旧的 :hover/:focus 会把边框画回输入框上，把胶囊切断。 */
.zib-pv-search-input:hover,
.zib-pv-search-input:focus {
    border: none;
    box-shadow: none;
}

.zib-pv-search-btn {
    flex-shrink: 0;
    padding: 9px 22px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: background 0.2s ease;
    min-width: 84px;
    white-space: nowrap;
}

.zib-pv-search-btn:hover {
    background: #1557b0;
}

.zib-pv-search-btn:active {
    background: #0f4a99;
}

.zib-pv-search-results,
.zib-dl-search-results {
    min-height: 60px;
}

.zib-pv-search-placeholder,
.zib-dl-search-placeholder {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 13px;
    background: #fafafa;
    border-radius: 6px;
}

/* ========== 搜索结果列表（参考 zib-123pan 网盘风格） ========== */
.zib-search-list {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 列表头部 */
.zib-search-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    min-height: 40px;
}

.zib-search-header-icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    flex-shrink: 0;
}

.zib-search-header-name {
    flex: 1 1 0%;
    min-width: 0;
}

.zib-search-header-size {
    flex: 0 0 10%;
    min-width: 80px;
    text-align: right;
    margin-right: 12px;
}

.zib-search-header-action {
    flex: 0 0 12%;
    min-width: 92px;
    text-align: right;
}

/* 列表项 */
.zib-pv-search-item,
.zib-dl-search-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 48px;
    animation: zibSearchFadeIn 0.3s ease-out both;
}

.zib-pv-search-item:hover,
.zib-dl-search-item:hover {
    background: #e6f4ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zib-pv-search-item:last-child,
.zib-dl-search-item:last-child {
    border-bottom: none;
}

/* ★ 下载搜索结果行**不再是可点区域**（2026-09-27 用户要求：点文件名不再下载，
   必须点右侧「下载」按钮）。所以把「可点」的三个视觉承诺一起去掉 ——
   cursor: pointer / 上浮 / 投影，留着它们等于告诉用户「这一行能点」，
   点下去却没反应，比原来更糟。悬停底色保留但调淡，只为横向读行时不串行。
   ★ 预览搜索行（.zib-pv-search-item）仍然可点（点文件名进预览），
     所以这里**只针对下载侧**写，不能把共用的那条选择器一起改掉。 */
.zib-dl-search-item {
    cursor: default;
}

.zib-dl-search-item:hover {
    background: #f8fafc;
    transform: none;
    box-shadow: none;
}

.zib-dl-search-item:hover .zib-search-name {
    color: #212529;
}

/* 图标 */
.zib-search-icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.zib-pv-search-dir .zib-search-icon,
.zib-dl-search-dir .zib-search-icon {
    color: #f0c040;
}

.zib-pv-search-file .zib-search-icon,
.zib-dl-search-file .zib-search-icon {
    color: #1976d2;
}

.zib-pv-search-file.zib-pv-pdf .zib-search-icon {
    color: #e74c3c;
}

/* 文件名 */
.zib-search-name {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 0%;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.zib-search-name-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

.zib-pv-search-item:hover .zib-search-name,
.zib-dl-search-item:hover .zib-search-name {
    color: #1976d2;
}

/* 文件权限标签（普通 / 特殊） */
.zib-file-tag {
    flex-shrink: 0;
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    border-radius: 4px;
    border: 1px solid #dcdcdc;
    vertical-align: middle;
}

.zib-file-tag-normal {
    color: #3fb950;
    background: transparent;
}

.zib-file-tag-special {
    color: #d29922;
    background: transparent;
}

/* 文件大小 */
.zib-search-size {
    flex: 0 0 10%;
    min-width: 80px;
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    margin-right: 12px;
    flex-shrink: 0;
}

/* 操作按钮 / 标记 */
.zib-search-badge {
    flex: 0 0 12%;
    min-width: 92px;
    text-align: right;
}

.zib-pv-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.zib-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 12%;
    min-width: 92px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    height: 28px;
    border-radius: 4px;
    background: #1976d2;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.zib-search-btn:hover {
    background: #1565c0;
    transform: translateY(-1px);
}

/* 搜索关键词高亮 */
.zib-pv-search-item mark,
.zib-dl-search-item mark {
    background: none;
    color: #dc2626;
    font-weight: bold;
    padding: 0;
}

/* 搜索统计信息
   ★ 2026-09-27：这一条（以及下面的 .zib-search-stats-count、夜间模式里的对应两条）
   当前**没有元素使用** —— 用户要求去掉搜索结果顶部的「本页找到 N 个文件」，
   functions.php 里已不再输出。**故意保留样式**，理由与后台 CSS 的旧类名一致：
   历史缓存页面（CDN/浏览器里带旧 hash 的 HTML）仍可能渲染出这个元素，
   删掉样式会让它变成一块裸文本。以后要恢复只需把 PHP 那一行加回来。 */
.zib-search-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
}

/* 空状态 / 无结果 */
.zib-pv-search-empty,
.zib-dl-search-empty {
    text-align: center;
    padding: 2rem 1rem;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 1rem 0;
}

.zib-pv-search-empty::before,
.zib-dl-search-empty::before {
    content: '\1F50D';
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.zib-search-empty-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.zib-search-empty-tip {
    font-size: 0.875rem;
    color: #666;
}

/* 占位状态（未搜索时） */
.zib-pv-search-placeholder,
.zib-dl-search-placeholder {
    text-align: center;
    padding: 2rem 1rem;
    color: #9aa0a6;
    font-size: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.zib-search-placeholder-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.zib-search-placeholder-text {
    font-size: 14px;
    color: #9aa0a6;
}

/* loading 旋转动画 */
.zib-pv-loading,
.zib-dl-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 12px;
    color: #666;
    font-size: 14px;
}

.zib-pv-loading::before,
.zib-dl-loading::before {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid #e8eaed;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: zibSearchSpin 0.8s linear infinite;
}

@keyframes zibSearchSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 淡入动画 */
@keyframes zibSearchFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zib-pv-search-item:nth-child(1),
.zib-dl-search-item:nth-child(1) { animation-delay: 0.05s; }
.zib-pv-search-item:nth-child(2),
.zib-dl-search-item:nth-child(2) { animation-delay: 0.1s; }
.zib-pv-search-item:nth-child(3),
.zib-dl-search-item:nth-child(3) { animation-delay: 0.15s; }
.zib-pv-search-item:nth-child(4),
.zib-dl-search-item:nth-child(4) { animation-delay: 0.2s; }
.zib-pv-search-item:nth-child(5),
.zib-dl-search-item:nth-child(5) { animation-delay: 0.25s; }
.zib-pv-search-item:nth-child(n+6),
.zib-dl-search-item:nth-child(n+6) { animation-delay: 0.3s; }

/* ========== 下载搜索容器 ========== */
.zib-dl-search-container {
    max-width: 960px;
    margin: 0 auto;
}

/* 与预览侧逐条对称（见上面 .zib-pv-search-box 的说明：外壳 8px / 内部 4px）。 */
.zib-dl-search-box {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    padding: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zib-dl-search-box:hover {
    border-color: #c9d2dc;
}

.zib-dl-search-box:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
}

.zib-dl-search-input {
    flex: 1;
    min-width: 0;
    padding: 9px 16px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    background: transparent;
    color: #1a1a1a;
    box-shadow: none;
    transition: none;
    -webkit-appearance: none;
    appearance: none;
}

.zib-dl-search-input::placeholder {
    color: #9aa0a6;
}

.zib-dl-search-input:hover,
.zib-dl-search-input:focus {
    border: none;
    box-shadow: none;
}

.zib-dl-search-btn {
    flex-shrink: 0;
    padding: 9px 22px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: background 0.2s ease;
    min-width: 84px;
    white-space: nowrap;
}

.zib-dl-search-btn:hover {
    background: #1557b0;
}

.zib-dl-search-btn:active {
    background: #0f4a99;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .zib-search-header {
        display: none;
    }

    .zib-pv-search-item,
    .zib-dl-search-item {
        display: grid;
        grid-template-columns: 20px 1fr;
        grid-template-rows: auto auto;
        gap: 4px 12px;
        padding: 12px 16px;
        min-height: auto;
        align-items: start;
    }

    .zib-search-icon {
        grid-column: 1;
        grid-row: 1;
        margin-right: 0;
        align-self: start;
    }

    .zib-search-name {
        grid-column: 2;
        grid-row: 1;
        line-height: 1.3;
        font-size: 13px;
    }

    .zib-search-name-text {
        white-space: normal;
        word-break: break-word;
    }

    .zib-search-size {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
        margin-right: 0;
        font-size: 11px;
        color: #868e96;
    }

    .zib-search-badge,
    .zib-search-btn {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;
    }

    .zib-search-btn {
        min-width: 50px;
        padding: 3px 10px;
        font-size: 11px;
        height: 24px;
    }
}

/* ========== 分页 ========== */
.zib-pv-pagination,
.zib-dl-pagination {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.zib-pv-page-btn,
.zib-dl-page-btn {
    padding: 6px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.zib-pv-page-btn:hover,
.zib-dl-page-btn:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.zib-pv-page-btn[disabled],
.zib-dl-page-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.zib-pv-page-info,
.zib-dl-page-info {
    font-size: 13px;
    color: #666;
}

/* ========== 搜索模式 ========== */
.zib-pv-search-options,
.zib-dl-search-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #555;
}

.zib-pv-search-mode,
.zib-dl-search-mode {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    accent-color: #1a73e8;
}

.zib-pv-search-mode-tip,
.zib-dl-search-mode-tip {
    color: #999;
    font-size: 12px;
}

/* ========== 弹窗 ========== */
.zib-pv-modal-overlay,
.zib-dl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1030;
}

.zib-pv-modal,
.zib-dl-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    padding: 24px;
}

.zib-pv-modal-body,
.zib-dl-modal-body {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.zib-pv-modal-actions,
.zib-dl-modal-actions {
    margin-top: 20px;
    text-align: right;
}

.zib-pv-modal-btn,
.zib-dl-modal-btn {
    padding: 8px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* ===== 次数用完专用弹窗（zol-quota-modal）=====
   简洁风格：标题 + 副文案居中 + 一行两个胶囊按钮 */
.zol-quota-modal {
    padding: 28px 26px 22px;
    text-align: center;
    border-radius: 12px;
    max-width: 380px;
}

/* 标题 / 副文案 */
.zol-quota-modal .zib-pv-modal-title,
.zol-quota-modal .zib-dl-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    text-align: center;
}

.zol-quota-modal .zib-pv-modal-sub,
.zol-quota-modal .zib-dl-modal-sub {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 22px;
    text-align: center;
}

/* 操作区：两个按钮并排一行、等宽居中；颜色套用站点「下载按钮」样式 */
.zol-quota-modal .zib-pv-modal-actions,
.zol-quota-modal .zib-dl-modal-actions {
    margin-top: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
}

.zol-quota-modal .zol-quota-btn {
    box-sizing: border-box;
    flex: 1;
    text-align: center;
    padding: 6px 14px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    line-height: 1.5;
}

.zol-quota-modal .zol-quota-btn:hover {
    background: #155cb0;
    color: #fff;
    opacity: 1;
}

/* 「明天再来」灰色次按钮：弱化视觉，与蓝色主按钮（开通会员）形成主次 */
.zol-quota-modal .zol-quota-btn--ghost {
    background: #f0f1f2;
    color: #666;
}

.zol-quota-modal .zol-quota-btn--ghost:hover {
    background: #e3e5e7;
    color: #444;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {

    .zib-dl-files-panel {
        min-height: 60vh;
    }

    /* 搜索模式紧凑排布 */
    .zib-pv-search-options,
    .zib-dl-search-options {
        gap: 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {

    /* 窄屏给次数弹窗更多可用宽度：压缩横向内边距 + 标题字号，保证
       「您当前身份（订阅者）没有特殊文件下载权限」这类长标题一行放得下 */
    .zol-quota-modal {
        padding: 24px 14px 18px;
    }

    .zol-quota-modal .zib-pv-modal-title,
    .zol-quota-modal .zib-dl-modal-title {
        font-size: 14px;
    }
}

/* ========== 夜间模式支持 ========== */
/* 容器现在是透明的，深色模式也不需要给它底色 —— 只留「输入+按钮」那层胶囊。
   原来的 #2d3748 灰卡在深色下会变成一块多余的深色方块。 */
body.dark-theme .zib-search-form-wrap,
body[data-theme="dark"] .zib-search-form-wrap,
html[data-theme="dark"] .zib-search-form-wrap,
html.dark .zib-search-form-wrap,
body.dark .zib-search-form-wrap {
    background: transparent !important;
    border-color: transparent !important;
}

body.dark-theme .zib-pv-search-box,
body[data-theme="dark"] .zib-pv-search-box,
html[data-theme="dark"] .zib-pv-search-box,
html.dark .zib-pv-search-box,
body.dark .zib-pv-search-box,
body.dark-theme .zib-dl-search-box,
body[data-theme="dark"] .zib-dl-search-box,
html[data-theme="dark"] .zib-dl-search-box,
html.dark .zib-dl-search-box,
body.dark .zib-dl-search-box {
    background: #1f2430 !important;
    border-color: #3d4657 !important;
}

body.dark-theme .zib-pv-search-box:focus-within,
body[data-theme="dark"] .zib-pv-search-box:focus-within,
html[data-theme="dark"] .zib-pv-search-box:focus-within,
html.dark .zib-pv-search-box:focus-within,
body.dark .zib-pv-search-box:focus-within,
body.dark-theme .zib-dl-search-box:focus-within,
body[data-theme="dark"] .zib-dl-search-box:focus-within,
html[data-theme="dark"] .zib-dl-search-box:focus-within,
html.dark .zib-dl-search-box:focus-within,
body.dark .zib-dl-search-box:focus-within {
    border-color: #63b3ed !important;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.18) !important;
}

/* 输入框自己已经透明无边框（底色由上面那层胶囊给），这里只改文字色。 */
body.dark-theme .zib-pv-search-input,
body[data-theme="dark"] .zib-pv-search-input,
html[data-theme="dark"] .zib-pv-search-input,
html.dark .zib-pv-search-input,
body.dark .zib-pv-search-input,
body.dark-theme .zib-dl-search-input,
body[data-theme="dark"] .zib-dl-search-input,
html[data-theme="dark"] .zib-dl-search-input,
html.dark .zib-dl-search-input,
body.dark .zib-dl-search-input {
    background: transparent !important;
    border-color: transparent !important;
    color: #f0f0f0 !important;
}

body.dark-theme .zib-pv-search-input::placeholder,
body[data-theme="dark"] .zib-pv-search-input::placeholder,
html[data-theme="dark"] .zib-pv-search-input::placeholder,
html.dark .zib-pv-search-input::placeholder,
body.dark .zib-pv-search-input::placeholder,
body.dark-theme .zib-dl-search-input::placeholder,
body[data-theme="dark"] .zib-dl-search-input::placeholder,
html[data-theme="dark"] .zib-dl-search-input::placeholder,
html.dark .zib-dl-search-input::placeholder,
body.dark .zib-dl-search-input::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
}

body.dark-theme .zib-search-list,
body[data-theme="dark"] .zib-search-list,
html[data-theme="dark"] .zib-search-list,
html.dark .zib-search-list,
body.dark .zib-search-list {
    background: #1a202c !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

body.dark-theme .zib-search-header,
body[data-theme="dark"] .zib-search-header,
html[data-theme="dark"] .zib-search-header,
html.dark .zib-search-header,
body.dark .zib-search-header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%) !important;
    border-bottom: 2px solid #4a5568 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .zib-search-stats,
body[data-theme="dark"] .zib-search-stats,
html[data-theme="dark"] .zib-search-stats,
html.dark .zib-search-stats,
body.dark .zib-search-stats {
    background: #2d3748 !important;
    border-bottom: 1px solid #4a5568 !important;
    color: #a0aec0 !important;
}

body.dark-theme .zib-pv-search-item,
body[data-theme="dark"] .zib-pv-search-item,
html[data-theme="dark"] .zib-pv-search-item,
html.dark .zib-pv-search-item,
body.dark .zib-pv-search-item,
body.dark-theme .zib-dl-search-item,
body[data-theme="dark"] .zib-dl-search-item,
html[data-theme="dark"] .zib-dl-search-item,
html.dark .zib-dl-search-item,
body.dark .zib-dl-search-item {
    background: #1a202c !important;
    border-bottom: 1px solid #4a5568 !important;
}

body.dark-theme .zib-pv-search-item:hover,
body[data-theme="dark"] .zib-pv-search-item:hover,
html[data-theme="dark"] .zib-pv-search-item:hover,
html.dark .zib-pv-search-item:hover,
body.dark .zib-pv-search-item:hover,
body.dark-theme .zib-dl-search-item:hover,
body[data-theme="dark"] .zib-dl-search-item:hover,
html[data-theme="dark"] .zib-dl-search-item:hover,
html.dark .zib-dl-search-item:hover,
body.dark .zib-dl-search-item:hover {
    background: rgba(99, 179, 237, 0.18) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

body.dark-theme .zib-search-name,
body[data-theme="dark"] .zib-search-name,
html[data-theme="dark"] .zib-search-name,
html.dark .zib-search-name,
body.dark .zib-search-name {
    color: #e2e8f0 !important;
}

body.dark-theme .zib-search-name:hover,
body[data-theme="dark"] .zib-search-name:hover,
html[data-theme="dark"] .zib-search-name:hover,
html.dark .zib-search-name:hover,
body.dark .zib-search-name:hover {
    color: #63b3ed !important;
}

body.dark-theme .zib-search-size,
body[data-theme="dark"] .zib-search-size,
html[data-theme="dark"] .zib-search-size,
html.dark .zib-search-size,
body.dark .zib-search-size {
    color: #a0aec0 !important;
}

body.dark-theme .zib-pv-search-empty,
body[data-theme="dark"] .zib-pv-search-empty,
html[data-theme="dark"] .zib-pv-search-empty,
html.dark .zib-pv-search-empty,
body.dark .zib-pv-search-empty,
body.dark-theme .zib-dl-search-empty,
body[data-theme="dark"] .zib-dl-search-empty,
html[data-theme="dark"] .zib-dl-search-empty,
html.dark .zib-dl-search-empty,
body.dark .zib-dl-search-empty {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}

body.dark-theme .zib-search-empty-title,
body[data-theme="dark"] .zib-search-empty-title,
html[data-theme="dark"] .zib-search-empty-title,
html.dark .zib-search-empty-title,
body.dark .zib-search-empty-title {
    color: #e2e8f0 !important;
}

body.dark-theme .zib-search-empty-tip,
body[data-theme="dark"] .zib-search-empty-tip,
html[data-theme="dark"] .zib-search-empty-tip,
html.dark .zib-search-empty-tip,
body.dark .zib-search-empty-tip {
    color: #a0aec0 !important;
}

body.dark-theme .zib-pv-search-placeholder,
body[data-theme="dark"] .zib-pv-search-placeholder,
html[data-theme="dark"] .zib-pv-search-placeholder,
html.dark .zib-pv-search-placeholder,
body.dark .zib-pv-search-placeholder,
body.dark-theme .zib-dl-search-placeholder,
body[data-theme="dark"] .zib-dl-search-placeholder,
html[data-theme="dark"] .zib-dl-search-placeholder,
html.dark .zib-dl-search-placeholder,
body.dark .zib-dl-search-placeholder {
    background: #2d3748 !important;
    color: #718096 !important;
}

body.dark-theme .zib-search-placeholder-text,
body[data-theme="dark"] .zib-search-placeholder-text,
html[data-theme="dark"] .zib-search-placeholder-text,
html.dark .zib-search-placeholder-text,
body.dark .zib-search-placeholder-text {
    color: #a0aec0 !important;
}

body.dark-theme .zib-pv-search-item mark,
body[data-theme="dark"] .zib-pv-search-item mark,
html[data-theme="dark"] .zib-pv-search-item mark,
html.dark .zib-pv-search-item mark,
body.dark .zib-pv-search-item mark,
body.dark-theme .zib-dl-search-item mark,
body[data-theme="dark"] .zib-dl-search-item mark,
html[data-theme="dark"] .zib-dl-search-item mark,
html.dark .zib-dl-search-item mark,
body.dark .zib-dl-search-item mark {
    color: #f87171 !important;
    background: none !important;
}

body.dark-theme .zib-pv-loading::before,
body[data-theme="dark"] .zib-pv-loading::before,
html[data-theme="dark"] .zib-pv-loading::before,
html.dark .zib-pv-loading::before,
body.dark .zib-pv-loading::before,
body.dark-theme .zib-dl-loading::before,
body[data-theme="dark"] .zib-dl-loading::before,
html[data-theme="dark"] .zib-dl-loading::before,
html.dark .zib-dl-loading::before,
body.dark .zib-dl-loading::before {
    border-color: #4a5568 !important;
    border-top-color: #63b3ed !important;
}

body.dark-theme .zib-pv-page-btn,
body[data-theme="dark"] .zib-pv-page-btn,
html[data-theme="dark"] .zib-pv-page-btn,
html.dark .zib-pv-page-btn,
body.dark .zib-pv-page-btn,
body.dark-theme .zib-dl-page-btn,
body[data-theme="dark"] .zib-dl-page-btn,
html[data-theme="dark"] .zib-dl-page-btn,
html.dark .zib-dl-page-btn,
body.dark .zib-dl-page-btn {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .zib-pv-page-btn:hover,
body[data-theme="dark"] .zib-pv-page-btn:hover,
html[data-theme="dark"] .zib-pv-page-btn:hover,
html.dark .zib-pv-page-btn:hover,
body.dark .zib-pv-page-btn:hover,
body.dark-theme .zib-dl-page-btn:hover,
body[data-theme="dark"] .zib-dl-page-btn:hover,
html[data-theme="dark"] .zib-dl-page-btn:hover,
html.dark .zib-dl-page-btn:hover,
body.dark .zib-dl-page-btn:hover {
    border-color: #63b3ed !important;
    color: #63b3ed !important;
}

body.dark-theme .zib-pv-page-info,
body[data-theme="dark"] .zib-pv-page-info,
html[data-theme="dark"] .zib-pv-page-info,
html.dark .zib-pv-page-info,
body.dark .zib-pv-page-info,
body.dark-theme .zib-dl-page-info,
body[data-theme="dark"] .zib-dl-page-info,
html[data-theme="dark"] .zib-dl-page-info,
html.dark .zib-dl-page-info,
body.dark .zib-dl-page-info {
    color: #a0aec0 !important;
}

/* 夜间模式标签 */
body.dark-theme .zib-file-tag,
body[data-theme="dark"] .zib-file-tag,
html[data-theme="dark"] .zib-file-tag,
html.dark .zib-file-tag,
body.dark .zib-file-tag {
    border-color: #4a5568 !important;
}

body.dark-theme .zib-file-tag-normal,
body[data-theme="dark"] .zib-file-tag-normal,
html[data-theme="dark"] .zib-file-tag-normal,
html.dark .zib-file-tag-normal,
body.dark .zib-file-tag-normal {
    color: #68d391 !important;
}

body.dark-theme .zib-file-tag-special,
body[data-theme="dark"] .zib-file-tag-special,
html[data-theme="dark"] .zib-file-tag-special,
html.dark .zib-file-tag-special,
body.dark .zib-file-tag-special {
    color: #f6ad55 !important;
}

/* ========== 搜索：不闪屏加载态 + 慢搜索提示（2026-09-27 新增） ==========
   为什么需要这一节：OpenList 未建索引时，一次 fs/search 是一次真实的目录遍历，
   动辄十几秒。原实现每次搜索都先把结果区整块换成「正在搜索...」——
   用户看到的是「内容消失 → 一片空白 → 内容出现」，比慢本身更难受，
   而且页面高度剧烈跳动，正在看的那一行会跑掉。
   现在：有旧结果可留时只压暗 + 禁止点击（容器上的 .is-searching），
   只有首次搜索（还没有结果）才显示转圈块。

   放在文件末尾是为了不被上面 1400+ 行里的同名规则意外覆盖；
   深色主题的覆盖紧跟在同一处，避免以后加主题时漏掉这一节。 */
.zib-pv-search-container.is-searching .zib-pv-search-results,
.zib-dl-search-container.is-searching .zib-dl-search-results {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* 按钮同步压暗，让「现在不能点」这件事一眼可见（同时 JS 会置 disabled） */
.zib-pv-search-container.is-searching .zib-pv-search-btn,
.zib-dl-search-container.is-searching .zib-dl-search-btn {
    opacity: 0.65;
}

.zib-pv-search-slow,
.zib-dl-search-slow {
    margin: 10px 0 0;
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: #856404;
    background: #fff8e5;
    border: 1px solid #ffe08a;
    border-radius: 6px;
}

body.dark-theme .zib-pv-search-slow,
body[data-theme="dark"] .zib-pv-search-slow,
html[data-theme="dark"] .zib-pv-search-slow,
html.dark .zib-pv-search-slow,
body.dark .zib-pv-search-slow,
body.dark-theme .zib-dl-search-slow,
body[data-theme="dark"] .zib-dl-search-slow,
html[data-theme="dark"] .zib-dl-search-slow,
html.dark .zib-dl-search-slow,
body.dark .zib-dl-search-slow {
    color: #f6d365;
    background: rgba(246, 211, 101, 0.12);
    border-color: rgba(246, 211, 101, 0.35);
}

/* ==========================================================================
   点击后的即时反馈：「获取中…」
   --------------------------------------------------------------------------
   为什么非要有这一层：点一次下载（或预览），后端最坏要串 3 次上游
   （fs/link → fs/get → admin/setting/get），慢的时候好几秒。
   期间界面**毫无变化**，用户的结论必然是「点了没反应」，于是再点一次 ——
   而第二次会被管理器里的 downloading / previewing 锁直接吞掉，
   表现成「点了两次都没反应」，看起来更像坏了。
   所以：点击后立刻在被点的那一项上盖一层「获取中…」。

   ★★ 目录树（.zib-file）**故意不在名单里** —— 这是用户明确要求的
      （「点击目录树 pdf 文件名不要显示加载中」）。
      理由不只是「不想要」：树里的行是紧凑型（padding 3px 8px /
      min-height 22px / font-size 13px），铺满整行的纱会**把文件名整个盖掉**，
      而文件名正是用户刚点过、要用来确认「我点的是哪个文件」的东西。
      预览侧另有面板级的反馈（右侧查看器本身在加载），
      所以树这一行不给反馈并不会让人以为「点了没反应」。
      ★ 以后要加回来，先把这段读完 —— 这是取舍，不是漏写。
      JS 侧对应的是 main.js 里「树文件点击故意不传 el」那处注释。

   ★ 文案走 ::after，绝不用 JS 改 text()：被点的是**整行**，
     里面有文件名、图标、大小、按钮，改文字会把它们全抹掉。
   ★ 用「铺满整行的纱」而不是角落小徽标：角落徽标会和右侧的
     大小列 / 下载按钮打架（徽标比按钮宽），只能靠隐藏按钮 + 加
     padding 去躲，反而把行宽搞跳。铺满整行则完全不依赖子元素布局。
   ★ 纱的颜色走 CSS 变量，深浅主题只改两个变量值 —— 否则这里要写
     7 种主题根 × 3 个元素选择器 = 21 条规则。
   ========================================================================== */

.zib-pv-search-item.is-loading,
.zib-dl-search-item.is-loading,
.zib-dl-list-item.is-loading {
    position: relative;
}

.zib-pv-search-item.is-loading::after,
.zib-dl-search-item.is-loading::after,
.zib-dl-list-item.is-loading::after {
    content: "获取中…";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--zol-loading-fg, #1a73e8);
    background: var(--zol-loading-bg, rgba(255, 255, 255, 0.84));
    pointer-events: none;
    z-index: 3;
}

/* 纱的颜色变量：默认浅色，深色主题下改这两个值即可 */
body.dark-theme,
body[data-theme="dark"],
html[data-theme="dark"],
html.dark,
body.dark {
    --zol-loading-fg: #8ab8ff;
    --zol-loading-bg: rgba(28, 30, 34, 0.84);
}

/* ★ 下载进行中的加载状态，放在「下载」按钮里（用户要求：变成「下载中」即可）。
   JS 把 .is-loading 加在 .zib-dl-download-btn 上，视觉上按钮文案原地切换。
   其余更复杂的反馈（滑动进度条、toast 等）已按用户要求移除 ——
   全局「正在生成下载链接」的说明交给居中的全屏遮罩做。 */
.zib-dl-download-btn.is-loading {
    position: relative;
    color: transparent;          /* 隐藏原「下载」文案 */
    background: #155cb0;         /* 加载态稍加深，区分可点状态 */
    pointer-events: none;        /* 加载中不可再点 */
    cursor: default;
}

.zib-dl-download-btn.is-loading::after {
    content: "下载中…";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #fff;
}

/* ★ 下载中加载反馈 —— 两部分分离：
   ① 容器加 .is-downloading：搜索结果/文件列表区域压暗、禁用（只盖这里）。
   ② .zib-openlist-overlay：position:fixed 固定在**视口正中央**的转圈+文案，
      无论滚动到哪都在屏幕中间，不会因容器高而上飘/下沉。 */
.zib-dl-search-container.is-downloading,
.zib-dl-container.is-downloading {
    pointer-events: none;      /* 该区域下载期间不可操作 */
    opacity: 0.55;             /* 压暗直观呈现「正在处理」 */
}

.zib-openlist-overlay {
    position: fixed;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 26px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
body.dark-theme .zib-openlist-overlay,
body[data-theme="dark"] .zib-openlist-overlay,
html[data-theme="dark"] .zib-openlist-overlay,
html.dark .zib-openlist-overlay,
body.dark .zib-openlist-overlay {
    background: rgba(38, 40, 47, 0.96);
}

.zib-openlist-overlay-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(26, 115, 232, 0.25);
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: zol-overlay-spin 0.8s linear infinite;
}

.zib-openlist-overlay-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
body.dark-theme .zib-openlist-overlay-text,
body[data-theme="dark"] .zib-openlist-overlay-text,
html[data-theme="dark"] .zib-openlist-overlay-text,
html.dark .zib-openlist-overlay-text,
body.dark .zib-openlist-overlay-text {
    color: #eee;
}

@keyframes zol-overlay-spin {
    to { transform: rotate(360deg); }
}

/* layout.css */
.zib-openlist-container-layout {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 100%;
    font-size: 12px;
    height: 100vh;
    border: 0px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.directory-layout {
    flex: 1;
    height: calc(100% - 60px);
    position: relative;
    display: flex;
}

.directory-panel {
    width: 25%;
    height: 100%;
    background: #f8f9fa;
    border-right: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    transition: width 0s linear;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-header {
   
    background: #337ab7;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.panel-title {
    font-weight: 600;
    color: #ffffff !important;
    font-size: 16px;
    flex: 1;
    text-align: center;
    cursor: default;
    user-select: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 16px;
    transition: all 0.2s ease;
    z-index: 10;
}

.sidebar-toggle:hover {
    background: #edf2f7;
    color: #2d3748;
}

/* 预览面板样式 */
.preview-panel {
    flex: 1;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* 目录面板折叠状态 */
.directory-layout.collapsed .directory-panel {
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* 移除folder-children-container的隐藏，保留文件夹功能 */
.directory-layout.collapsed .directory-panel .directory-panel-placeholder,
.directory-layout.collapsed .directory-panel .panel-title,
.directory-layout.collapsed .directory-panel .filter-section,
.directory-layout.collapsed .directory-panel .sidebar-toggle,
.directory-layout.collapsed .directory-panel .panel-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* 保持folder-children-container可见，但可以调整其样式 */
.directory-layout.collapsed .directory-panel .folder-children-container {
    /* 可以在这里添加collapsed状态下的特殊样式，但不隐藏 */
}

/* 移动端特殊处理 */
@media (max-width: 768px) {
    .directory-layout {
        position: relative;
        overflow: hidden;
    }
    
    .directory-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 250px;
        height: 100%;
        transform: translateX(0);
        transition: transform 0s linear;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        max-width: 80%;
        z-index: 100;
    }
    
    /* 目录面板折叠状态 - 移动端 */
    .directory-layout.collapsed .directory-panel {
        transform: translateX(-100%);
    }
    
    /* 移动端：确保folder-children-container始终可见 */
    .directory-layout.collapsed .directory-panel .folder-children-container {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        width: auto !important;
        opacity: 1 !important;
        overflow: visible !important;
        padding: initial !important;
        margin: initial !important;
        border: initial !important;
    }
    
    /* 移动端：其他元素在collapsed状态下的显示控制 */
    .directory-layout.collapsed .directory-panel .directory-panel-placeholder,
    .directory-layout.collapsed .directory-panel .panel-title,
    .directory-layout.collapsed .directory-panel .filter-section,
    .directory-layout.collapsed .directory-panel .sidebar-toggle,
    .directory-layout.collapsed .directory-panel .panel-header {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        width: auto !important;
        opacity: 1 !important;
        overflow: visible !important;
        padding: initial !important;
        margin: initial !important;
        border: initial !important;
    }
    
    .preview-panel {
        width: 100%;
        height: 100%;
    }
}

/* 预览面板样式已删除，等待重新设计 */

.folder-children-container {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
}

/* PDF预览区域样式已删除，等待重新设计 */

/* 预览占位符样式已删除，等待重新设计 */

/* PDF预览容器样式已删除，等待重新设计 */

/* PDF查看器iframe样式已删除，等待重新设计 */

/* filter.css - 四列自适应布局版 */
.filter-section {
    padding: 8px 5px 8px 5px;
    background: #337ab7;
    display: flex;
    flex-wrap: wrap;

    align-items: center;
    border-radius: 8px;
    margin-bottom: 2px;
    border: none;
    min-height: 60px;
}

/* 隐藏组名称显示 */
.filter-group-name {
    display: none;
}

.filter-row {
    margin-bottom: 0;
    flex: 1 1 calc(25% - 8px);
    min-width: 140px;
    max-width: none;
}

.filter-select {
    width: 100%;
    padding: 8px 28px 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.98);
    color: #333333;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #ffffff;
    background-color: #ffffff;
}

.filter-select:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.8);
    background-color: #ffffff;
}

.filter-select:disabled {
    background-color: rgba(255, 255, 255, 0.6);
    color: #999999;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.3);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cccccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.filter-select.loading {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='12' r='10' stroke='%23555555' stroke-width='2' fill='none' stroke-dasharray='31.416' stroke-dashoffset='31.416'%3e%3canimate attributeName='stroke-dasharray' dur='2s' values='0 31.416;15.708 15.708;0 31.416' repeatCount='indefinite'/%3e%3canimate attributeName='stroke-dashoffset' dur='2s' values='0;-15.708;-31.416' repeatCount='indefinite'/%3e%3c/circle%3e%3c/svg%3e");
    background-position: right 6px center;
    background-size: 14px;
}

/* 下拉菜单选项优化 */
.filter-select option {
    padding: 10px 14px;
    background-color: #ffffff;
    color: #333333;
    font-weight: 400;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.filter-select option:hover,
.filter-select option:focus {
    background-color: #f5f8ff !important;
    color: #4a90e2;
}

.filter-select option:checked {
    background-color: #edf5ff !important;
    color: #2c6cb9;
    font-weight: 500;
}

/* 美化下拉菜单外观 */
select.filter-select {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 自定义下拉菜单样式 - 仅适用于现代浏览器 */
@supports ((-webkit-appearance: none) or (-moz-appearance: none) or (appearance: none)) {
    select.filter-select::-ms-expand {
        display: none;
    }
    
    select.filter-select option:first-of-type {
        border-top-left-radius: 4px;
        border-top-right-radius: 4px;
    }
    
    select.filter-select option:last-of-type {
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
        border-bottom: none;
    }
}

/* 删除了.query-button相关的所有样式 */

/* 响应式设计 - 移动端适配（与PC端保持一致的四列布局） */
@media (max-width: 768px) {
    .filter-section {
        padding: 8px 5px;
        background: #337ab7;
        display: flex;
        flex-wrap: wrap;
        
        align-items: center;
        border-radius: 0; /* 移除圆角，让蓝色背景贴边 */
        margin: 0; /* 去掉外边距，消除白色空隙 */
        border: none;
        min-height: 50px;
    }
    
    /* 隐藏组名称显示 - 移动端 */
    .filter-group-name {
        display: none;
    }
    
    .filter-row {
        margin-bottom: 0;
        flex: 1 1 calc(25% - 6px); /* 与PC端一样的四列布局 */
        min-width: 115px; /* 移动端优化最小宽度 */
        max-width: none;
    }
    
    .filter-select {
        width: 100%;
        padding: 7px 24px 7px 8px;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 4px;
        font-size: 12px;
        box-sizing: border-box;
        background-color: rgba(255, 255, 255, 0.98);
        color: #333333;
        transition: all 0.2s ease;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 4px center;
        background-size: 12px;
        font-weight: 500;
        cursor: pointer;
    }
    
    .filter-select:focus {
        outline: none;
        border-color: #ffffff;
        background-color: #ffffff;
    }
    
    .filter-select:hover:not(:disabled) {
        border-color: rgba(255, 255, 255, 0.8);
        background-color: #ffffff;
    }
    
    .filter-select:disabled {
        background-color: rgba(255, 255, 255, 0.6);
        color: #999999;
        cursor: not-allowed;
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    /* 移动端下拉菜单选项样式 */
    .filter-select option {
        padding: 6px 8px;
        background-color: #ffffff;
        color: #333333;
        font-weight: 400;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .filter-section {
        padding: 6px 4px;
        
        margin: 0px 0px 1px 0px; /* 小屏幕也去掉外边距 */
        border-radius: 0; /* 小屏幕也移除圆角 */
        min-height: 45px;
    }
    
    .filter-row {
        flex: 1 1 calc(25% - 4.5px); /* 小屏幕也保持四列布局 */
        min-width: 80px;
    }
    
    .filter-select {
        padding: 6px 20px 6px 6px;
        font-size: 11px;
        border-radius: 3px;
        background-size: 10px;
        background-position: right 3px center;
    }
    
    .filter-select option {
        padding: 5px 6px;
        font-size: 11px;
    }
}

/* folder.css - 紧凑型文件管理器样式 - PC端 */

/* 基础重置和容器样式 */
.zib-folder-root,
.zib-folder {
    margin: 0;
    padding: 0;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 文件管理器风格的目录面板 */
.directory-panel {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 文件夹容器 */
.folder-children-container {
    background: #ffffff;
    padding: 8px 8px 8px 4px; /* 减少左内边距，优化整体布局 */
    overflow-y: auto;
    max-height: calc(100vh - 25%);
}

/* 文件夹头部样式 - 类似Windows资源管理器 */
.folder-header {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    margin: 1px 0;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    font-size: 13px;
    line-height: 1.3;
    min-height: 24px;
}

.folder-header:hover {
    background-color: #f0f4f8;
}

.folder-header.selected {
    background-color: #0078d4;
    color: white;
}

/* 文件夹图标 */
.folder-header .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    font-size: 14px;
    color: #fbbf24;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-header.selected .icon {
    color: white;
}

/* 文件夹名称 */
.folder-header .name {
    flex: 1;
    color: #374151;
    font-weight: 400;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.4;
    overflow: visible;
}

.folder-header.selected .name {
    color: white;
    font-weight: 500;
}

/* 文件样式 - 紧凑型 */
.zib-file {
    display: flex;
    align-items: center;
    padding: 3px 8px;
    margin: 1px 0;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    font-size: 13px;
    line-height: 1.3;
    min-height: 22px;
}

.zib-file:hover {
    background-color: #f0f4f8;
}

.zib-file.selected {
    background-color: #2b96f3;
    color: white;
}

/* 文件图标 */
.zib-file .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    font-size: 12px;
    color: #6b7280;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zib-file.selected .icon {
    color: white;
}

/* SVG文件图标样式 */
.file-icon-svg {
    width: 16px !important;
    height: 16px !important;
    display: block;
    flex-shrink: 0;
}

.zib-file .file-icon-svg {
    width: 16px !important;
    height: 16px !important;
}

/* 文件名称 */
.zib-file .name {
    flex: 1;
    color: #374151;
    font-weight: 400;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.4;
    overflow: visible;
}

.zib-file.selected .name {
    color: white;
}

/* 文件夹子项容器 */
.folder-children {
    display: none !important;
    margin-left: 16px;
    border-left: 1px solid #e5e7eb;
    padding-left: 8px;
    position: relative;
}

/* 只移除根目录级别的连接线，保留内部层级连接线 */
.zib-folder-root > .folder-children {
    border-left: none;
    margin-left: 0px;  /* 减少根目录子项的左边距 */
    padding-left: 0px; /* 减少根目录子项的左内边距 */
}

/* 多个挂载路径并列时，每个根前面的一条标题。
   只有根数量 > 1 时才由 PHP 渲染这个节点 —— 单挂载时 DOM 与以前完全一致。
   没有它的话，几段目录直接堆在一起，看不出哪段属于哪个挂载点。 */
.zib-folder-root-label {
    display: block;
    margin: 0 0 4px;
    padding: 5px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #374151;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    /* 路径可能很长（中文目录名 + 多层），宁可折行也别省略号 ——
       省略了就看不出是哪个挂载点了 */
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* 第二个及以后的根，跟上一段拉开距离；第一个不额外留上边距 */
.zib-folder-root + .zib-folder-root .zib-folder-root-label {
    margin-top: 12px;
}

.zib-folder.expanded > .folder-children,
.zib-folder-root.expanded > .folder-children {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

/* 展开/折叠指示器 */
.folder-header::before {
    content: '▶';
    width: 12px;
    height: 12px;
    margin-right: 4px;
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zib-folder.expanded > .folder-header::before,
.zib-folder-root.expanded > .folder-header::before {
    transform: rotate(90deg);
}

/* 文件类型图标颜色 - 保留用于非SVG图标的兼容性 */
.zib-file[data-extension="pdf"] .icon:not(.file-icon-svg) {
    color: #ef4444;
}

.zib-file[data-extension="doc"] .icon:not(.file-icon-svg),
.zib-file[data-extension="docx"] .icon:not(.file-icon-svg) {
    color: #2563eb;
}

.zib-file[data-extension="xls"] .icon:not(.file-icon-svg),
.zib-file[data-extension="xlsx"] .icon:not(.file-icon-svg) {
    color: #059669;
}

.zib-file[data-extension="ppt"] .icon:not(.file-icon-svg),
.zib-file[data-extension="pptx"] .icon:not(.file-icon-svg) {
    color: #dc2626;
}

.zib-file[data-extension="txt"] .icon:not(.file-icon-svg) {
    color: #6b7280;
}

.zib-file[data-extension="jpg"] .icon:not(.file-icon-svg),
.zib-file[data-extension="jpeg"] .icon:not(.file-icon-svg),
.zib-file[data-extension="png"] .icon:not(.file-icon-svg),
.zib-file[data-extension="gif"] .icon:not(.file-icon-svg) {
    color: #7c3aed;
}

/* 加载状态 */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
    gap: 12px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-weight: 500;
    color: #374151;
}

/* 占位符样式 */
.directory-panel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
}

.error-placeholder {
    padding: 20px;
    margin: 8px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
}

/* 滚动条样式 */
.folder-children-container::-webkit-scrollbar {
    width: 8px;
}

.folder-children-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.folder-children-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.folder-children-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}



.modal-actions {
    margin-top: 25px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* PC端按钮样式 */
@media (min-width: 769px) {
    .close-btn,
     .close-btn.action-close {
        min-width: 120px;
        max-width: 180px;
        height: 44px;
        border-radius: 10px;
        padding: 0;
    }
}

.close-btn:hover,
 .close-btn.action-close:hover {
    background: linear-gradient(135deg, #3a7eef 0%, #1a65e0 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(58, 134, 255, 0.35);
}

.close-btn,
.close-btn.action-close {
    background-color: #f0f2f5;
    color: #555;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    flex: 1;
    margin: 0 5px;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
}

.close-btn:hover,
.close-btn.action-close:hover {
    background-color: #e5e7eb;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 新增的模态框样式 */
.zib-openlist-preview-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    display: block !important;
}

.zib-openlist-modal-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 450px !important;
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    z-index: 1000000 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

.zib-openlist-modal-header {
    padding: 15px 20px !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.zib-openlist-modal-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    color: #333 !important;
    font-weight: 600 !important;
}

.zib-openlist-modal-body {
    padding: 30px !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    
    .modal-actions {
        flex-direction: row !important;
        justify-content: space-between !important;
        width: 100%;
        gap: 10px;
    }
    
    .close-btn,
     .close-btn.action-close {
        width: 48% !important;
        max-width: none;
        flex: none;
        margin: 0;
        height: 44px !important;
        padding: 0 !important;
        font-size: 16px;
        box-sizing: border-box;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
    }
    
    .zib-openlist-modal-content {
        width: 95% !important;
        max-width: none !important;
        max-height: 95vh !important;
    }
    
    .zib-openlist-modal-body {
        padding: 20px !important;
    }
}

/* 针对小屏幕手机的额外优化 */
@media (max-width: 480px) {
    
    .close-btn,
     .close-btn.action-close {
        padding: 12px 15px;
        font-size: 15px;
        min-width: auto;
    }
}

.btn.signin-loader {
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 8px 16px !important;
    overflow: visible !important;
}

.btn.signin-loader svg {
    fill: white !important;
    color: white !important;
    opacity: 1 !important;
    display: inline-block !important;
    margin-right: 6px !important;
    width: 16px !important;
    height: 16px !important;
}

/* placeholder.css */
.directory-panel-placeholder {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 14px;
    font-style: italic;
}
/* mobile.css - 移动端适配样式 - 紧凑型文件管理器 */

/* 移动端媒体查询断点 */
@media (max-width: 768px) {
    /* 主容器适配 */
    .zib-openlist-container-layout {
        height: auto;
        min-height: 100vh;
        font-size: 14px;
        border-radius: 0;
        background: #ffffff;
    }
    
    /* 目录布局调整 */
    .directory-layout {
        height: auto;
        position: relative;
        overflow: hidden;
        background: #f8f9fa;
        display: flex;
        flex-direction: row;
    }
    
    /* 移动端目录面板 */
    .directory-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 75%;
        max-width: 320px;
        height: 100%;
        background: #ffffff;
        border: none;
        border-radius: 0;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
        z-index: 100;
        transform: translateX(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }
    
    /* 目录面板折叠状态 */
    .directory-layout.collapsed .directory-panel {
        transform: translateX(-100%);
    }
    
    /* 预览面板在移动端的样式 */
    .preview-panel {
        position: relative;
        width: 100%;
        height: calc(100vh - 120px);
        background: #ffffff;
        z-index: 1;
        display: flex;
        flex-direction: column;
    }
    
    /* 目录面板折叠时，预览面板应该显示在前面 */
    .directory-layout.collapsed .preview-panel {
        z-index: 101;
    }
    
    /* 面板头部 */
    .panel-header {
        padding: 16px 20px;
        background: linear-gradient(135deg, #0078d4, #106ebe);
        color: white;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .panel-title {
        font-size: 18px;
        font-weight: 600;
        color: white;
        text-align: center;
        flex: 1;
        letter-spacing: 0.5px;
    }
    
    /* 面板切换按钮 */
    .panel-toggle-btn {
        background: rgba(255, 255, 255, 0.15);
        border: none;
        color: white;
        font-size: 18px;
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        transition: all 0.2s ease;
        min-width: 36px;
        height: 36px;
    }
    
    .panel-toggle-btn:hover,
    .panel-toggle-btn:active {
        background-color: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }
    
    /* 文件夹容器 - 移动端优化 */
    .folder-children-container {
        background: #ffffff;
        padding: 12px 8px;
        overflow-y: auto;
        height: calc(100% - 60px);
        -webkit-overflow-scrolling: touch;
    }
    
    /* 文件夹头部样式 - 移动端优化 */
    .folder-header {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        margin: 2px 0;
        cursor: pointer;
        user-select: none;
        border-radius: 8px;
        transition: background-color 0.2s ease;
        font-size: 15px;
        line-height: 1.4;
        min-height: 44px;
        position: relative;
    }
    
    .folder-header:hover,
    .folder-header:active {
        background-color: #f0f4f8;
    }
    
    .folder-header.selected {
        background-color: #0078d4;
        color: white;
    }
    
    /* 文件夹图标 - 移动端 */
    .folder-header .icon {
        width: 20px;
        height: 20px;
        margin-right: 12px;
        font-size: 16px;
        color: #fbbf24;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .folder-header.selected .icon {
        color: white;
    }
    
    /* 文件夹名称 - 移动端 */
    .folder-header .name {
        flex: 1;
        color: #374151;
        font-weight: 500;
        white-space: normal;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.4;
        overflow: visible;
        font-size: 15px;
    }
    
    .folder-header.selected .name {
        color: white;
        font-weight: 600;
    }
    
    /* 展开/折叠指示器 - 移动端 */
    .folder-header::before {
        content: '▶';
        width: 16px;
        height: 16px;
        margin-right: 8px;
        font-size: 12px;
        color: #9ca3af;
        transition: transform 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .zib-folder.expanded > .folder-header::before,
    .zib-folder-root.expanded > .folder-header::before {
        transform: rotate(90deg);
    }
    
    /* 文件样式 - 移动端优化 */
    .zib-file {
        display: flex;
        align-items: center;
        padding: 10px 16px;
        margin: 2px 0;
        cursor: pointer;
        user-select: none;
        border-radius: 8px;
        transition: background-color 0.2s ease;
        font-size: 14px;
        line-height: 1.4;
        min-height: 40px;
        position: relative;
    }
    
    .zib-file:hover,
    .zib-file:active {
        background-color: #f0f4f8;
    }
    
    .zib-file.selected {
        background-color: #2b96f3;
        color: white;
    }
    
    /* 文件图标 - 移动端 */
    .zib-file .icon {
        width: 18px;
        height: 18px;
        margin-right: 12px;
        font-size: 14px;
        color: #6b7280;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .zib-file.selected .icon {
        color: white;
    }

    /* SVG文件图标样式 - 移动端 */
    .file-icon-svg {
        width: 18px !important;
        height: 18px !important;
        display: block;
        flex-shrink: 0;
    }

    .zib-file .file-icon-svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* 文件名称 - 移动端 */
    .zib-file .name {
        flex: 1;
        color: #374151;
        font-weight: 500;
        white-space: normal;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.4;
        overflow: visible;
        font-size: 14px;
    }
    
    .zib-file.selected .name {
        color: white;
    }
    
    /* 文件夹子项容器 - 移动端 */
    .folder-children {
        display: none !important;
        margin-left: 20px;
        border-left: 1px solid #e5e7eb;
        padding-left: 12px;
        position: relative;
    }

    /* 只移除根目录级别的连接线，保留内部层级连接线 */
    .zib-folder-root > .folder-children {
        border-left: none;
        margin-left: 10px;  /* 减少根目录子项的左边距 */
        padding-left: 6px;  /* 减少根目录子项的左内边距 */
    }

    .zib-folder.expanded > .folder-children,
    .zib-folder-root.expanded > .folder-children {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* 文件类型图标颜色 - 移动端 - 保留用于非SVG图标的兼容性 */
    .zib-file[data-extension="pdf"] .icon:not(.file-icon-svg) {
        color: #ef4444;
    }
    
    .zib-file[data-extension="doc"] .icon:not(.file-icon-svg),
    .zib-file[data-extension="docx"] .icon:not(.file-icon-svg) {
        color: #2563eb;
    }
    
    .zib-file[data-extension="xls"] .icon:not(.file-icon-svg),
    .zib-file[data-extension="xlsx"] .icon:not(.file-icon-svg) {
        color: #059669;
    }
    
    .zib-file[data-extension="ppt"] .icon:not(.file-icon-svg),
    .zib-file[data-extension="pptx"] .icon:not(.file-icon-svg) {
        color: #dc2626;
    }
    
    .zib-file[data-extension="txt"] .icon:not(.file-icon-svg) {
        color: #6b7280;
    }
    
    .zib-file[data-extension="jpg"] .icon,
    .zib-file[data-extension="jpeg"] .icon,
    .zib-file[data-extension="png"] .icon,
    .zib-file[data-extension="gif"] .icon {
        color: #7c3aed;
    }
    
    /* 加载状态 - 移动端 */
    .loading-placeholder {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60px 20px;
        color: #6b7280;
        font-size: 16px;
        gap: 16px;
    }
    
    .loading-spinner {
        width: 32px;
        height: 32px;
        border: 3px solid #e5e7eb;
        border-top: 3px solid #0078d4;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    .loading-text {
        font-weight: 500;
        color: #374151;
        font-size: 16px;
    }
    
    /* 占位符样式 - 移动端 */
    .directory-panel-placeholder {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 80px 20px;
        color: #9ca3af;
        font-size: 16px;
        text-align: center;
    }
    
    .error-placeholder {
        padding: 24px;
        margin: 12px;
        background-color: #fef2f2;
        border: 1px solid #fecaca;
        border-radius: 8px;
        color: #dc2626;
        font-size: 14px;
        text-align: center;
    }
    
    /* 滚动条样式 - 移动端 */
    .folder-children-container::-webkit-scrollbar {
        width: 4px;
    }
    
    .folder-children-container::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .folder-children-container::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 2px;
    }
    
    .folder-children-container::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}
/* 移动端隐藏子比主题的container-footer元素 */
@media only screen and (max-width: 768px) {
    /* 隐藏子比主题的container-footer */
    .container-fluid.container-footer {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* 高优先级选择器确保覆盖主题样式 */
    body .container-fluid.container-footer,
    html .container-fluid.container-footer {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 确保容器底部间距调整 */
    .zib-openlist-container-layout {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}
/* 移动端目录面板紧凑布局优化 */
@media only screen and (max-width: 768px) {
    
    /* 优化文件夹容器整体间距 */
    .folder-children-container {
        padding: 8px 4px 8px 2px !important; /* 减少左右内边距 */
    }
    
    /* 文件夹头部样式优化 - 更紧凑 */
    .folder-header {
        padding: 8px 6px 8px 4px !important; /* 减少内边距，特别是左边距 */
        margin: 1px 0 !important;
        min-height: 36px !important; /* 减少最小高度 */
        font-size: 14px !important; /* 稍微减小字体 */
    }
    
    /* 文件头部样式优化 - 更紧凑 */
    .zib-file {
        padding: 6px 6px 6px 4px !important; /* 减少内边距，特别是左边距 */
        margin: 1px 0 !important;
        min-height: 32px !important; /* 减少最小高度 */
        font-size: 13px !important; /* 稍微减小字体 */
    }
    
    /* 文件夹图标优化 */
    .folder-header .icon {
        width: 16px !important;
        height: 16px !important;
        margin-right: 6px !important; /* 减少右边距 */
        font-size: 14px !important;
    }
    
    /* 文件图标优化 */
    .zib-file .icon {
        width: 14px !important;
        height: 14px !important;
        margin-right: 6px !important; /* 减少右边距 */
        font-size: 12px !important;
    }

    /* SVG文件图标样式 - 紧凑布局 */
    .file-icon-svg {
        width: 14px !important;
        height: 14px !important;
        display: block;
        flex-shrink: 0;
    }

    .zib-file .file-icon-svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* 展开/折叠指示器优化 */
    .folder-header::before {
        width: 12px !important;
        height: 12px !important;
        margin-right: 4px !important; /* 减少右边距 */
        font-size: 10px !important;
    }
    
    /* 优化根目录子项的间距 - 进一步减少左侧空白 */
    .zib-folder-root > .folder-children {
        margin-left: 4px !important; /* 进一步减少左边距 */
        padding-left: 2px !important; /* 进一步减少左内边距 */
    }
    
    /* 优化内部文件夹的间距 */
    .folder-children {
        margin-left: 12px !important; /* 减少内部文件夹的左边距 */
        padding-left: 6px !important; /* 减少内部文件夹的左内边距 */
    }
    
    /* 文件夹名称优化 */
    .folder-header .name {
        font-size: 14px !important;
        line-height: 1.3 !important;
    }
    
    /* 文件名称优化 */
    .zib-file .name {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }
    
    /* 面板头部优化 */
    .panel-header {
        padding: 1px 1px !important; /* 减少头部内边距 */
    }
    
    .panel-title {
        font-size: 16px !important; /* 减小标题字体 */
    }
    
    /* 面板切换按钮优化 */
    .panel-toggle-btn {
        min-width: 32px !important;
        height: 32px !important;
        padding: 6px !important;
        font-size: 16px !important;
    }
    
    /* 优化滚动条宽度 */
    .folder-children-container::-webkit-scrollbar {
        width: 3px !important;
    }
    
    /* 减少加载状态的内边距 */
    .loading-placeholder {
        padding: 40px 10px !important;
        font-size: 14px !important;
        gap: 12px !important;
    }
    
    /* 减少占位符的内边距 */
    .directory-panel-placeholder {
        padding: 40px 10px !important;
        font-size: 14px !important;
    }
    
    .error-placeholder {
        padding: 16px !important;
        margin: 6px !important;
        font-size: 12px !important;
    }
}
/**
 * 自定义修复样式
 * 用于解决特定问题和兼容性问题
 */

/* 修复PDF查看器滚动条问题 */
@media screen and (min-width: 768px) {
  #viewerContainer {
    max-height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
  }
  
  #viewerContainer::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }
  
  #viewerContainer::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
  }
  
  #viewerContainer::-webkit-scrollbar-track {
    background-color: transparent;
  }
  
  .pdfViewer {
    min-height: 101vh;
  }
}

/* 搜索关键词高亮优化 - 红色加粗无背景 */
.highlight {
    color: #dc2626 !important; /* 红色 */
    font-weight: bold !important;
    background: none !important; /* 无背景色 */
    padding: 0 !important; /* 移除内边距 */
}

/* 夜间模式下的搜索关键词高亮 */
body.dark-theme .highlight,
body[data-theme="dark"] .highlight,
html[data-theme="dark"] .highlight,
html.dark .highlight,
body.dark .highlight {
    color: #f87171 !important; /* 浅红色 */
    font-weight: bold !important;
    background: none !important; /* 无背景色 */
    padding: 0 !important; /* 移除内边距 */
}

/* 去除电脑端搜索结果的所有动画效果 */
.zib-search-button,
.zib-search-button::before,
.search-form-container {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* 去除hover时的transform效果 */
.zib-search-button:hover,
.zib-search-button:active {
    transform: none !important;
}

/* 去除float动画 */
@keyframes float {
    0%, 100% { transform: none !important; }
    50% { transform: none !important; }
}

/* 去除fadeInUp动画 */
@keyframes fadeInUp {
    from { opacity: 1 !important; transform: none !important; }
    to { opacity: 1 !important; transform: none !important; }
}

/* 修复模态框样式 */
.modal-dialog {
  max-width: 95%;
  margin: 1.75rem auto;
}

@media (min-width: 768px) {
  .modal-dialog {
    max-width: 700px;
  }
}

/* 修复字体显示问题 */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 修改文章页面内边距和添加内边框 */
.article.page-article {
  padding-top: 10px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  padding-bottom: 10px !important;
  border: 0px solid #337ab7 !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1) !important;
  background-color: #fff !important;
  margin-bottom: 20px !important;
}

.article {
  padding: 0 !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  padding-bottom: 15px !important;
  overflow: hidden;
  border: 3px solid #3ca5f6 !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1) !important;
  background-color: #fff !important;
  margin-bottom: 20px !important;
}

/* 夜间主题覆盖 */
body.dark-theme .article,
body[data-theme="dark"] .article,
html[data-theme="dark"] .article,
html.dark .article,
body.dark .article {
  background-color: #1a1a1a !important;
  color: #777 !important;
  border-color: #404040 !important;
}

/* 移动端文章页面底部修复 */
@media (max-width: 768px) {
  .article.page-article.main-bg.theme-box.box-body.radius8.main-shadow,
  .article.page-article {
    margin-bottom: 15px !important;
    padding-bottom: 15px !important;
    max-width: calc(100vw - 20px) !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
    /* 确保article从最顶部开始 */
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* 防止内容溢出 */
  .article.page-article * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* 确保页面有足够的底部间距 */
  .main-bg.theme-box.box-body.radius8.main-shadow {
    margin-bottom: 30px !important;
  }
  
  /* 移动端隐藏子比主题顶部菜单栏 */
  .header,
    .navbar,
    .zib-header,
    .header-wrapper,
    .navigation,
    .menu-wrapper,
    .site-nav,
    .menu-bar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* 确保主体内容从顶部开始 */
  .main,
    .content,
    .site-content,
    .zib-main,
    .container,
    .wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* 确保html和body从顶部开始 */
  html, body {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

.zib-file .name,
.search-results .name {
  font-size: 14px !important;
  font-weight: normal !important;
  line-height: 1.4 !important;
}

.zib-file .name mark,
.search-results .name mark,
.zib-file .name .search-highlight,
.search-results .name .search-highlight {
  color: #dc2626 !important;
  font-weight: bold !important;
  background: none !important;
  text-decoration: none !important;
}

/* 额外确保移动端文件名样式正确 */
@media (max-width: 768px) {
  .zib-file .name {
    font-size: 14px !important;
    font-weight: normal !important;
  }
}

/* Article Custom Styles for OpenList 预览与下载插件 */

/* Article container styling */
.zib-openlist-article {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Article header */
.zib-openlist-article-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.zib-openlist-article-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Article content */
.zib-openlist-article-content {
    line-height: 1.6;
    color: #555;
}

.zib-openlist-article-content p {
    margin-bottom: 12px;
}

/* File list styling */
.zib-openlist-file-list {
    margin-top: 20px;
}

.zib-openlist-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.zib-openlist-file-item:hover {
    background: #e9ecef;
}

.zib-openlist-file-icon {
    margin-right: 10px;
    font-size: 16px;
    color: #6c757d;
}

.zib-openlist-file-name {
    flex: 1;
    font-weight: 500;
    color: #495057;
}

.zib-openlist-file-size {
    font-size: 12px;
    color: #6c757d;
    margin-left: 10px;
}

/* Download button */
.zib-openlist-download-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.zib-openlist-download-btn:hover {
    background: #005a87;
}

/* Responsive design */
@media (max-width: 768px) {
    .zib-openlist-article {
        margin: 10px 0;
        padding: 12px;
    }
    
    .zib-openlist-article-title {
        font-size: 16px;
    }
    
    .zib-openlist-file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .zib-openlist-file-size {
        margin-left: 0;
        margin-top: 5px;
    }
}


input[type="text"].zib-search-input:hover {
    border-color: #2196F3 !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1) !important;
}

input[type="text"].zib-search-input:focus {
    border-color: #2196F3 !important;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1) !important;
}

/* 全新搜索输入框样式 */
input[type="text"].zib-search-input {
    flex: 1;
    padding: 12px 18px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    z-index: 1;
    height: 46px !important;
    font-size: 15px;
   
    color: #444;
    transition: all 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

input[type="text"].zib-search-input:focus {
    outline: none;
}

input[type="text"].zib-search-input::placeholder {
    color: #aaa;
    opacity: 0.7;
}

/* 全新搜索按钮样式 */
button.zib-search-button {
    position: relative;
    z-index: 2;
    padding: 0 18px;
    border-radius: 8px;
    min-width: 80px;
    margin-left: 10px;
    height: 46px;
    background: #2196F3;
    color: white;
    font-size: 15px;
    font-weight: 500;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

button.zib-search-button:hover {
    background: #1976D2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

button.zib-search-button:active {
    background: #0D47A1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* 搜索选项样式调整 - 移除外框 */
.search-options {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-left: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    
    input[type="text"].zib-search-input {
        padding: 10px 15px !important;
        height: 42px !important;
        font-size: 14px;
        border-radius: 6px !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
        flex: 1 !important;
    }
    
    button.zib-search-button {
        position: relative !important;
        min-width: 70px;
        padding: 0 12px;
        font-size: 14px;
        margin-left: 2px;
        height: 42px;
        border-radius: 6px;
    }
    
    .search-options {
        gap: 12px;
        margin-top: 8px;
        justify-content: center;
        padding-left: 0;
    }
}
/* mobile-layout-fix.css - 移动端整体布局修复 */

/* 超小屏设备适配 (320px-480px) */
@media only screen and (max-width: 480px) {
    .zib-openlist-container-layout {
        bottom: 130px !important; /* 增加底部间距，确保不被footer-tabbar遮挡 */
        height: calc(100vh - 130px) !important;
        padding-top: 0px !important;
    }
}

/* 小屏设备适配 (481px-768px) */
@media only screen and (min-width: 481px) and (max-width: 768px) {
    .zib-openlist-container-layout {
        bottom: 140px !important; /* 增加底部间距，确保不被footer-tabbar遮挡 */
        height: calc(100vh - 140px) !important;
        padding-top: 0px !important;
    }
}

/* 平板设备适配 (769px-1024px) */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .zib-openlist-container-layout {
        bottom: 80px !important;
        height: calc(100vh - 80px) !important;
        padding-top: 0px !important;
       
    }
}

/* 移动端整体页面布局修复 */
@media only screen and (max-width: 768px) {
    /* 确保html和body从顶部开始 */
    html, body {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* 主要容器重置顶部间距 */
    .main,
    .container,
    .content,
    .wrapper {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* 文章容器重置顶部间距 */
    .article,
        .post,
        .entry {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* OpenList 相关容器布局调整 */
    .zib-openlist-container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* 主容器布局 - 移动端适配footer-tabbar */
    .zib-openlist-container-layout {
        /* 顶部保持适当间距 */
        padding-top: 0px !important;
        margin-top: 0 !important;
        
        /* 底部为footer-tabbar预留空间 - 增加底部间距 */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 140px !important; /* 增加底部导航栏高度，确保目录树不被遮挡 */
        
        /* 确保容器占满可用空间 */
        width: 100% !important;
        height: calc(100vh - 140px) !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        z-index: 1 !important;
    }
    
    /* 确保内容区域完全适配 */
    .zib-openlist-container-layout .directory-layout {
        height: 100% !important;
        padding-bottom: 0px !important; /* 增加底部内边距，确保目录树底部不贴边 */
        overflow-y: auto !important;
        box-sizing: border-box !important;
    }
    
    /* 目录面板底部额外间距 */
    .directory-panel {
        padding-bottom: 0px !important; /* 为目录面板底部添加额外间距 */
    }
    
    /* 文章页面移动端布局优化 - 底部贴着导航栏 */
    .article.page-article.main-bg.theme-box.box-body.radius8.main-shadow,
    .article.page-article {
        margin-bottom: 60px !important; /* 与footer-tabbar高度匹配 */
        padding-bottom: 20px !important;
        max-width: calc(100vw - 20px) !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        position: relative !important;
        /* 确保article从顶部开始 */
        margin-top: 15px !important;
    }
    
    /* 主题相关容器重置 */
    .theme-box,
    .main-bg,
    .box-body {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* 移动端夜间主题支持 */
    /* 夜间模式下的容器背景适配 */
    body.dark-theme .zib-openlist-container-layout,
        body[data-theme="dark"] .zib-openlist-container-layout,
        html[data-theme="dark"] .zib-openlist-container-layout,
        html.dark .zib-openlist-container-layout,
        body.dark .zib-openlist-container-layout {
        background-color: #1a1a1a !important;
        color: #f0f0f0 !important;
    }
    
    /* 夜间模式下的文章容器适配 */
    body.dark-theme .article.page-article,
        body[data-theme="dark"] .article.page-article,
        html[data-theme="dark"] .article.page-article,
        html.dark .article.page-article,
        body.dark .article.page-article,
        body.dark-theme article.page-article,
        body[data-theme="dark"] article.page-article,
        html[data-theme="dark"] article.page-article,
        html.dark article.page-article,
        body.dark article.page-article {
        background-color: #1a1a1a !important;
        color: #f0f0f0 !important;
        border-color: #404040 !important;
    }
    
    /* 增强文章容器夜间模式样式优先级 */
    body.dark-theme .zib-openlist-container-layout .article.page-article,
        body[data-theme="dark"] .zib-openlist-container-layout .article.page-article,
        html[data-theme="dark"] .zib-openlist-container-layout .article.page-article,
        html.dark .zib-openlist-container-layout .article.page-article,
        body.dark .zib-openlist-container-layout .article.page-article {
        background-color: #1a1a1a !important;
        color: #f0f0f0 !important;
        border-color: #404040 !important;
    }
    
    /* 夜间模式下的目录布局适配 */
    body.dark-theme .directory-layout,
        body[data-theme="dark"] .directory-layout,
        html[data-theme="dark"] .directory-layout,
        html.dark .directory-layout,
        body.dark .directory-layout {
        background-color: #1a1a1a !important;
        color: #f0f0f0 !important;
    }
}
/* ========================================
   PC端预览面板样式
   ======================================== */

/* PC端基础预览面板容器 */
.preview-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

/* PDF查看器容器 */
.pdf-viewer-container {
    
    width: 100%;
    height: 100%;
    background: #f9f9f9;
}

/* PDF查看器基础样式 */
#pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* 禁用 JS 时的兜底图（shortcode.php 里 <noscript> 包着的那张「使用说明」图）。
   ★ 默认态本身已经改成「进页面就让 PDF.js 渲染 default.pdf」（照搬 /dlt），
     所以这几条规则平时**看不到效果** —— 但只要 <noscript> 里的图还在，
     它们就不是死样式。判死样式请按「元素还在不在」判，别按「平时看不看得见」判。
   ★ position:absolute + top/right/bottom/left:0 不是为了炫技：
     .preview-panel 是 column flex，而 .preview-welcome 与 .pdf-viewer-container
     都写了 height:100% —— 两个子项各分到一半，图会被压在上半格、下面留一块灰。
     让欢迎层脱离文档流铺满面板，图才是「整块面板居中」。
     查看器 iframe 本来就是 position:absolute 相对 .preview-panel 定位的，
     所以这里不动它，也不影响点开 PDF 之后的显示。
   ★ 这里的 height 由 top/bottom:0 决定，不再写 height:100%（写了两者会打架）。
   ★ .welcome-icon / h3 / p 三条规则已随「图标 + 两行文字」一起删掉 ——
     元素在 shortcode.php 里已经不存在了，留着就是死样式，下次会被当成漏写再加回来。 */
.preview-welcome {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #666;
    padding: 24px 20px;
}

/* 默认图：等比缩放，长边贴住可用空间；给白底 + 圆角 + 淡阴影，
   因为它本身是一张界面截图，直接贴在 #f9f9f9 上会显得糊在背景里。 */
.preview-welcome .welcome-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

/* PDF查看器基础样式 */
#pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* 确保PDF.js的样式不被覆盖 */
.preview-panel iframe {
    border: none !important;
    width: 100% !important;
    height: 100% !important;
}

/* PC端PDF.js内部布局优化 */
#pdf-viewer #outerContainer {
    height: 100% !important;
    position: relative !important;
}

#pdf-viewer #mainContainer {
    height: calc(100% - 32px) !important;
    position: absolute !important;
    top: 32px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

#pdf-viewer #viewerContainer {
    height: 100% !important;
    overflow: auto !important;
}

#pdf-viewer #toolbar {
    height: 32px !important;
    position: relative !important;
    z-index: 2 !important;
}

/* PC端PDF页面显示优化 */
#pdf-viewer .page {
    margin: 10px auto !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

#pdf-viewer .page canvas {
    display: block !important;
    margin: 0 auto !important;
}

/* ========================================
   移动端预览面板样式
   ======================================== */

@media (max-width: 768px) {
    /* 移动端基础预览面板容器 */
    .preview-panel {
        display: flex;
        flex-direction: column;
        height: 91%;
        background: #f9f9f9;
        border: none;
        border-radius: 0;
        overflow: hidden;
        position: relative;
    }
    
    /* 移动端欢迎页：留白收紧一点（图是唯一内容，padding 越大图越小），
       阴影也收一收。桌面规则见文件上方，这里只覆盖需要的两项。 */
    .preview-welcome {
        padding: 16px 12px;
    }

    .preview-welcome .welcome-image {
        border-radius: 4px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    }
    
    /* 移动端PDF查看器工具栏优化 */
    #pdf-viewer #toolbar {
        height: 40px !important;
        font-size: 14px !important;
    }
    
    /* 移动端PDF查看器主容器调整 */
    #pdf-viewer #mainContainer {
        height: calc(100% - 40px) !important;
        top: 40px !important;
    }
    
    /* 移动端PDF页面显示优化 */
    #pdf-viewer .page {
        margin: 5px auto !important;
        max-width: calc(100vw - 20px) !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
    }
    
    /* 移动端PDF查看器容器优化 */
    #pdf-viewer #viewerContainer {
        padding: 0 5px !important;
    }
    
    /* 移动端PDF外层容器调整 */
    #pdf-viewer #outerContainer {
        height: 100% !important;
    }
}
/* PDF.js工具栏按钮隐藏样式 */
/* 创建时间: 2025-01-XX */
/* 说明: 隐藏PDF.js查看器中不需要的工具栏按钮和侧栏面板，提升界面简洁性和安全性 */

/* 隐藏左侧侧栏面板（缩略图、大纲、附件等） */
#sidebarContainer,        /* 侧栏容器 */
#outerContainer #sidebarContainer,
.sidebarOpen #sidebarContainer {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
}

/* 隐藏侧栏切换按钮 */
#sidebarToggle,           /* 侧栏切换按钮 */
#viewThumbnail,           /* 缩略图按钮 */
#viewOutline,             /* 大纲按钮 */
#viewAttachments,         /* 附件按钮 */
#viewLayers {             /* 图层按钮 */
    display: none !important;
    visibility: hidden !important;
}

/* 调整主视图区域占满全部空间 */
#viewerContainer {
    left: 0 !important;
    width: 100% !important;
}

#outerContainer.sidebarOpen #viewerContainer {
    left: 0 !important;
}

/* 隐藏指定的工具栏按钮 */
#viewFind,                /* 在文档中查找 */
#editorFreeText,          /* 文本编辑 */
#editorInk,               /* 绘图 */
#editorStamp,             /* 添加或编辑图像 */
#openFile,                /* 打开文件 */
#secondaryOpenFile,       /* 二级工具栏打开文件 */
#viewBookmark,            /* 当前页面（书签） */
#documentProperties {     /* 文档属性 */
    display: none !important;
    visibility: hidden !important;
}

/* 隐藏相关的分隔符，避免出现多余的空白 */
#viewFind + .verticalToolbarSeparator,
#editorModeButtons + .verticalToolbarSeparator,
#openFile + .verticalToolbarSeparator,
#secondaryOpenFile + .verticalToolbarSeparator {
    display: none !important;
}

/* 隐藏编辑器模式按钮组和分隔符 */
#editorModeButtons,
#editorModeSeparator {
    display: none !important;
    visibility: hidden !important;
}

/* 隐藏编辑器参数工具栏 */
#editorFreeTextParamsToolbar,
#editorInkParamsToolbar,
#editorStampParamsToolbar {
    display: none !important;
    visibility: hidden !important;
}

/* 确保工具栏布局在隐藏按钮后仍然合理 */
#toolbarViewer {
    justify-content: space-between;
}

/* 二级工具栏中的相关按钮也要隐藏 */
#secondaryToolbar #secondaryOpenFile,
#secondaryToolbar #documentProperties {
    display: none !important;
}

/* 移动端适配 - 确保隐藏效果在小屏幕上也生效 */
@media (max-width: 768px) {
    #sidebarContainer,
    #sidebarToggle,
    #viewThumbnail,
    #viewOutline,
    #viewAttachments,
    #viewLayers,
    #viewFind,
    #editorFreeText,
    #editorInk,
    #editorStamp,
    #openFile,
    #secondaryOpenFile,
    #viewBookmark,
    #documentProperties,
    #editorModeButtons,
    #editorModeSeparator {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* 确保移动端视图区域占满全屏 */
    #viewerContainer {
        left: 0 !important;
        width: 100% !important;
    }
}

/* 确保PDF.js加载完成后样式仍然生效 */
body #sidebarContainer,
body #sidebarToggle,
body #viewThumbnail,
body #viewOutline,
body #viewAttachments,
body #viewLayers,
body #viewFind,
body #editorFreeText,
body #editorInk,
body #editorStamp,
body #openFile,
body #secondaryOpenFile,
body #viewBookmark,
body #documentProperties {
    display: none !important;
    visibility: hidden !important;
}

/* 最强力的隐藏规则 - 针对所有可能的PDF.js选择器组合 */
html body iframe html body #sidebarContainer,
html body iframe html body #sidebarToggle,
html body iframe html body #viewThumbnail,
html body iframe html body #viewOutline,
html body iframe html body #viewAttachments,
html body iframe html body #viewLayers,
.pdfViewer #sidebarContainer,
.sidebarOpen #sidebarContainer,
#outerContainer.sidebarOpen #sidebarContainer,
#outerContainer #sidebarContainer,
#mainContainer #sidebarContainer,
div[id="sidebarContainer"],
div[id="sidebarToggle"],
button[id="sidebarToggle"],
button[id="viewThumbnail"],
button[id="viewOutline"],
button[id="viewAttachments"],
button[id="viewLayers"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    overflow: hidden !important;
}

/* 强制调整iframe内部的PDF.js布局 */
iframe[id="pdf-viewer"] #viewerContainer,
iframe #viewerContainer {
    left: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
    transform: translateX(0) !important;
}

/* 防止侧栏在动态加载后出现 */
* [id*="sidebar"],
* [class*="sidebar"] {
    display: none !important;
}

/* 针对PDF.js的特定类名 */
.sidebarOpen {
    --sidebar-width: 0px !important;
}

/* 最终兼容性规则 */
[data-l10n-id="toggle_sidebar"],
[data-l10n-id="thumbs"],
[data-l10n-id="document_outline"],
[data-l10n-id="attachments"],
[data-l10n-id="layers"] {
    display: none !important;
    visibility: hidden !important;
}
/* SVG文件图标通用样式 */

/* 基础SVG图标样式 */
.file-icon-svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* PC端SVG图标尺寸 */
.zib-file .file-icon-svg,
.folder-header .file-icon-svg {
    width: 16px !important;
    height: 16px !important;
}

/* 移动端SVG图标尺寸 */
@media (max-width: 768px) {
    .zib-file .file-icon-svg,
    .folder-header .file-icon-svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* 选中状态下的SVG图标 */
.zib-file.selected .file-icon-svg,
.folder-header.selected .file-icon-svg {
    filter: brightness(0) invert(1);
}

/* 悬停效果 */
.zib-file:hover .file-icon-svg,
.folder-header:hover .file-icon-svg {
    transform: scale(1.05);
}

/* 确保SVG图标在容器中居中 */
.icon .file-icon-svg {
    margin: 0 auto;
}

/* 夜间模式下的SVG图标适配 */
body.dark-theme .file-icon-svg,
body[data-theme="dark"] .file-icon-svg,
html[data-theme="dark"] .file-icon-svg,
html.dark .file-icon-svg,
body.dark .file-icon-svg {
    filter: brightness(1.2) contrast(0.9);
    opacity: 0.9;
}

/* 夜间模式下悬停效果 */
body.dark-theme .zib-file:hover .file-icon-svg,
body[data-theme="dark"] .zib-file:hover .file-icon-svg,
html[data-theme="dark"] .zib-file:hover .file-icon-svg,
html.dark .zib-file:hover .file-icon-svg,
body.dark .zib-file:hover .file-icon-svg,
body.dark-theme .folder-header:hover .file-icon-svg,
body[data-theme="dark"] .folder-header:hover .file-icon-svg,
html[data-theme="dark"] .folder-header:hover .file-icon-svg,
html.dark .folder-header:hover .file-icon-svg,
body.dark .folder-header:hover .file-icon-svg {
    filter: brightness(1.4) contrast(1.1);
    opacity: 1;
    transform: scale(1.05);
}

/* 夜间模式下选中状态的SVG图标 */
body.dark-theme .zib-file.selected .file-icon-svg,
body[data-theme="dark"] .zib-file.selected .file-icon-svg,
html[data-theme="dark"] .zib-file.selected .file-icon-svg,
html.dark .zib-file.selected .file-icon-svg,
body.dark .zib-file.selected .file-icon-svg,
body.dark-theme .folder-header.selected .file-icon-svg,
body[data-theme="dark"] .folder-header.selected .file-icon-svg,
html[data-theme="dark"] .folder-header.selected .file-icon-svg,
html.dark .folder-header.selected .file-icon-svg,
body.dark .folder-header.selected .file-icon-svg {
    filter: brightness(0) invert(1);
}

/* 系统偏好暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .file-icon-svg {
        filter: brightness(1.2) contrast(0.9);
        opacity: 0.9;
    }
    
    .zib-file:hover .file-icon-svg,
    .folder-header:hover .file-icon-svg {
        filter: brightness(1.4) contrast(1.1);
        opacity: 1;
        transform: scale(1.05);
    }
}
