/* mobile.css - 移动端适配样式 */

/* 移动端媒体查询断点 */
@media (max-width: 768px) {
    /* 文件夹子项样式 */
    .folder-children { 
        margin-left: 8px; 
        padding-left: 8px; 
        border-left: 1px dashed #ccc;
    }
    
    /* 文件点击反馈效果 - 线性渐变背景和白色文字（最短停留时间） */
    .zib-file.active-feedback {
        background: linear-gradient(135deg, #3498db, #2980b9) !important;
        color: white !important;
        transform: scale(0.95) !important;
        transition: all 0.1s ease !important;
        box-shadow: 0 0 8px rgba(41, 128, 185, 0.6) !important;
    }
    
    /* 确保文件图标和子元素也变为白色 */
    .zib-file.active-feedback * {
        color: white !important;
    }
    /* 主容器适配 */
    .zib-123pan-container-layout {
        height: auto;
        min-height: 100vh;
        font-size: 14px;
        border-radius: 0;
        background: #ffffff;
    }
    
    /* 目录布局调整 */
    .directory-layout {
        flex-direction: column;
        height: auto;
        position: relative;
        overflow: hidden;
        background: #f5f7fa;
    }
    
    /* 目录面板在移动端的样式 */
    .directory-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 80%;
        height: 100%;
        max-width: 90%;
        z-index: 100;
        transform: translateX(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15); /* 增强阴影效果 */
        background: linear-gradient(135deg, #ffffff, #f8f9fa); /* 渐变背景 */
        border-right: none;

    }
    
    /* 目录面板折叠状态 */
    .directory-layout.collapsed .directory-panel {
        transform: translateX(-100%);
    }
    
    .panel-header {
        padding: 16px 20px; /* 增加内边距 */
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: none; /* 移除底部边框 */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    }
    
    .panel-title {
        font-size: 18px; /* 稍微增大字体 */
        text-align: center;
        flex: 1;
        font-weight: 600;
        color: white;
        letter-spacing: 0.5px; /* 增加字符间距 */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* 添加文字阴影 */
    }
    
    /* 新增目录面板折叠按钮 */
    .panel-toggle-btn {
        background: rgba(255, 255, 255, 0.15);
        border: none;
        color: white;
        font-size: 18px;
        cursor: pointer;
        padding: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: all 0.2s ease;
        min-width: 32px;
        height: 32px;
    }
    
    .panel-toggle-btn:hover {
        background-color: rgba(255, 255, 255, 0.25);
    }
    
    /* 侧边栏切换按钮调整 */
    .sidebar-toggle {
        padding: 8px;
        font-size: 18px;
        color: white;
    }
    
    /* 文件夹头部样式调整 */
    .folder-header {
        display: flex;
        align-items: center;
        padding: 22px 15px; /* 大幅增加文件夹的内边距，显著扩大点击区域 */
        font-size: 16px; /* 增大字体 */
        border-radius: 8px; /* 添加圆角 */
        margin: 8px 8px; /* 增加上下外边距，减少误点击 */
        transition: all 0.3s ease; /* 增加过渡时间 */
        background: #e6f0fa; /* 使用更明显的蓝色背景，与文件区分更明显 */
        border: 2px solid #b8d4f0; /* 加粗边框并使用更明显的颜色 */
        border-bottom: 2px solid #b8d4f0; /* 添加底部边框 */
        position: relative;
        font-weight: 700 !important; /* 确保文件夹整体显示为粗体 */
        min-height: 64px; /* 显著增加文件夹最小高度，确保足够大的点击区域 */
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* 增强阴影效果 */
        cursor: pointer; /* 添加指针样式提示可点击 */
        z-index: 2; /* 确保文件夹在文件之上 */
    }
    
    .folder-header:hover {
        background-color: #f0f8ff; /* 更柔和的悬停背景色 */
        transform: translateX(4px); /* 增加移动效果 */
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* 增强阴影 */
        border-color: #cbd5e0; /* 边框颜色变化 */
    }
    
    .folder-header.selected {
        background: linear-gradient(135deg, #3498db, #2980b9); /* 渐变背景 */
        color: white;
        border-radius: 8px; /* 圆角 */
        margin: 4px 8px; /* 外边距 */
        box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3); /* 阴影效果 */
        border: 1px solid #2980b9; /* 边框 */
        transform: scale(1.02); /* 轻微放大效果 */
    }
    
    .folder-header.selected .name {
        color: white;
        font-weight: 500;
    }
    
    .folder-header.selected .icon {
        color: white;
    }
    
    /* 文件夹展开/折叠按钮 - 更加醒目 */
    .folder-header::before {
        content: "▶";
        margin-right: 8px;
        font-size: 14px;
        transition: transform 0.2s ease;
        color: #3498db;
        flex-shrink: 0;
        width: 16px;
        text-align: center;
        font-weight: bold;
    }
    
    .zib-folder.expanded > .folder-header::before,
    .zib-folder-root.expanded > .folder-header::before {
        transform: rotate(90deg);
        color: #2980b9;
    }
    
    .folder-header .icon {
        font-size: 16px;
        width: 22px;
        color: #3498db;
        margin-right: 8px;
    }
    
    .folder-header .name {
        font-size: 17px; /* 文件夹字体调大 */
        color: #2c3e50;
        font-weight: 700 !important; /* 文件夹字体加粗，使用!important确保生效 */
        flex: 1;
        padding-right: 10px;
        word-break: break-word;
        white-space: normal;
    }
    
    /* 文件项样式调整 */
    .zib-file {
        padding: 6px 15px 6px 35px; /* 减少上下内边距，缩小点击区域 */
        font-size: 12px; /* 文件字体调小 */
        border-radius: 6px; /* 添加圆角 */
        margin: 3px 8px; /* 添加外边距 */
        transition: all 0.3s ease; /* 增加过渡时间 */
        background: #f4f4f4; /* 白色背景 */
        display: flex;
        align-items: center;
        border: 1px solid #f1f5f9; /* 添加边框 */
        border-bottom: none; /* 删除文件底部横线 */
        min-height: 30px; /* 减小最小高度，缩小点击区域 */
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); /* 添加轻微阴影 */
    }
    
    /* 文件元素样式 */
    .folder-children .zib-file {
        border-left: none; /* 移除左侧虚线 */
        position: relative; /* 为伪元素定位做准备 */
        margin-left: 2px; /* 增加左边距 */
    }
    
    /* 添加文件前面的横虚线 */
    .folder-children .zib-file::before {
        content: "";
        position: absolute;
        left: -10px; /* 调整横线位置 */
        top: 50%; /* 垂直居中 */
        width: 10px; /* 调整横线长度 */
        height: 1px; /* 横线高度 */
        border-top: 1px dotted #ccc; /* 改为点线并使用更浅的颜色 */
    }
    
    .zib-file:hover {
        background-color: #f0f8ff; /* 统一悬停背景色 */
        transform: translateX(4px); /* 增加移动效果 */
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); /* 增强阴影 */
        border-color: #e2e8f0; /* 边框颜色变化 */
    }
    
    .zib-file.selected {
        background: linear-gradient(135deg, #3498db, #2980b9); /* 渐变背景 */
        color: white;
        border-radius: 6px; /* 圆角 */
        margin: 3px 8px; /* 外边距 */
        box-shadow: 0 3px 6px rgba(52, 152, 219, 0.25); /* 阴影效果 */
        border: 1px solid #2980b9; /* 边框 */
        transform: scale(1.01); /* 轻微放大效果 */
    }
    
    .zib-file.selected .name {
        color: white;
        font-weight: 500;
    }
    
    .zib-file.selected .icon {
        color: white;
    }
    
    .zib-file .icon {
        font-size: 15px;
        width: 22px;
        color: #7f8c8d;
        margin-right: 8px;
    }
    
    .zib-file .name {
        font-size: 12px; /* 文件名称字体调小 */
        color: #34495e;
        flex: 1;
        font-weight: 300 !important; /* 文件字体调细，与文件夹形成对比 */
        word-break: break-word;
        white-space: normal;
        line-height: 1.3; /* 减小行高，减少间隙 */
    }
    
    /* 禁用旧的移动端下拉式筛选菜单 - 改用PC端四列布局 */
    /*
    .dropdown-filter-section {
        background: #4a90e2;
        border-radius: 10px;
        margin: 10px;
        position: relative;
        z-index: 10;
        border: none;
        overflow: hidden;
    }
    
    .dropdown-filter-header {
        display: flex;
        padding: 0;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px 10px 0 0;
    }
    
    .dropdown-filter-item {
        flex: 1;
        text-align: center;
        padding: 12px 4px;
        color: #ffffff;
        font-size: 13px;
        position: relative;
        cursor: pointer;
        transition: all 0.2s ease;
        font-weight: 500;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dropdown-filter-item.active {
        color: #fff;
        font-weight: 600;
        background: rgba(255, 255, 255, 0.2);
    }
    
    .dropdown-filter-item:hover:not(.active) {
        background: rgba(255, 255, 255, 0.08);
    }
    
    .dropdown-filter-item::after {
        content: "▼";
        font-size: 10px;
        margin-left: 4px;
        transition: transform 0.2s ease;
        opacity: 0.8;
    }
    
    .dropdown-filter-item.active::after {
        transform: rotate(180deg);
        opacity: 1;
    }
    
    .dropdown-filter-content {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        z-index: 100;
        display: none;
        max-height: 260px;
        overflow-y: auto;
        border-radius: 0 0 10px 10px;
    }
    
    .dropdown-filter-content.active {
        display: block;
    }
    
    .dropdown-filter-options {
        padding: 0;
    }
    
    .dropdown-filter-option {
        padding: 12px 16px;
        font-size: 14px;
        color: #333333;
        cursor: pointer;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;
        position: relative;
    }
    
    .dropdown-filter-option:last-child {
        border-bottom: none;
    }
    
    .dropdown-filter-option:hover {
        background-color: #f0f8ff;
        color: #357abd;
    }
    
    .dropdown-filter-option.selected {
        background-color: #e6f3ff;
        color: #357abd;
        font-weight: 600;
    }
    
    .dropdown-filter-option.selected::after {
        content: "✓";
        position: absolute;
        right: 16px;
        color: #357abd;
        font-weight: bold;
        font-size: 14px;
    }
    
    .dropdown-filter-actions {
        display: flex;
        padding: 14px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        gap: 10px;
        background: #f8f9fa;
    }
    
    .dropdown-filter-btn {
        flex: 1;
        padding: 10px 14px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
        border: none;
        transition: all 0.2s ease;
    }
    
    .dropdown-filter-btn.cancel {
        background: #f5f5f5;
        color: #666666;
        border: 1px solid #e0e0e0;
    }
    
    .dropdown-filter-btn.cancel:hover {
        background: #eeeeee;
    }
    
    .dropdown-filter-btn.confirm {
        background: #4a90e2;
        color: white;
    }
    
    .dropdown-filter-btn.confirm:hover:not(:disabled) {
        background: #357abd;
    }
    
    .dropdown-filter-btn.confirm:disabled {
        background: #cccccc;
        cursor: not-allowed;
    }
    */
    
    /* 预览面板调整 */
    .preview-panel {
        width: 100%;
        height: 100%;
        position: relative;
        flex: 1;
        min-height: 100vh;
        background: #f0f4f8;
    }
    
    /* PDF预览区域调整 */
    #pdf-preview-area {
        width: 100% !important;
        height: 100% !important;
        min-height: 100vh;
        position: relative !important;
        background: #f0f4f8;
    }
    
    .pdf-preview-container {
        width: 100% !important;
        height: 100% !important;
        min-height: 100vh;
        position: relative;
        overflow: hidden;
        background: #f0f4f8;
    }
    
    /* PDF.js viewer适配 - 通过宿主页面注入样式 */
    .pdf-viewer-iframe {
        width: 100% !important;
        height: 100% !important;
        min-height: 100vh !important;
        border: none !important;
        position: relative !important;
    }
    
    /* 通过CSS穿透iframe来影响PDF.js内部样式 */
    .pdf-viewer-iframe #outerContainer,
    .pdf-viewer-iframe #mainContainer,
    .pdf-viewer-iframe #viewerContainer {
        height: 100% !important;
        min-height: 100vh !important;
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .pdf-viewer-iframe .page,
    .pdf-viewer-iframe .page canvas {
        height: auto !important;
        min-height: 95vh !important;
    }
    
    /* 模态框适配 */
    .preview-limit-modal {
        padding: 20px;
        border-radius: 16px;
    }
    
    .preview-limit-modal .modal-icon {
        font-size: 40px;
        margin-bottom: 15px;
        color: #4361ee;
    }
    
    .preview-limit-modal h3 {
        font-size: 20px;
        color: #1e293b;
        margin-bottom: 10px;
    }
    
    .preview-limit-modal p {
        font-size: 15px;
        color: #64748b;
        line-height: 1.6;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    
    .upgrade-btn, .login-btn, .close-btn, .close-btn.action-close {
        padding: 16px;
        font-size: 16px;
        max-width: none;
        min-width: auto;
        border-radius: 10px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .upgrade-btn {
        background: linear-gradient(135deg, #4361ee, #3a0ca3);
        box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    }
    
    .upgrade-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(67, 97, 238, 0.4);
    }
    
    .login-btn {
        background: white;
        color: #4361ee;
        border: 1px solid #c7d2fe;
    }
    
    .login-btn:hover {
        background: #f0f4f8;
    }
    
    .close-btn, .close-btn.action-close {
        background: #f1f5f9;
        color: #64748b;
    }
    
    .close-btn:hover, .close-btn.action-close:hover {
        background: #e2e8f0;
    }
    
    
    
    /* 滚动条优化 */
    .folder-children-container {
        padding: 12px 0; /* 增加垂直内边距，提供更好的视觉呼吸空间 */
        background: #eee;
        margin: 0; /* 移除外边距 */
        border-radius: 0; /* 移除圆角 */
        box-shadow: none; /* 移除外阴影 */
    }
    
    /* 文件夹子项层次结构 */
    .folder-children {
        margin-left: 8px; /* 增加缩进，形成清晰的层次结构 */
        padding-left: 8px; /* 增加内边距 */
        border-left: 1px dashed #ccc; /* 修改为更浅的虚线颜色 */
        margin-top: 8px; /* 增加上边距，减少误点击 */
        margin-bottom: 8px; /* 增加下边距，减少误点击 */
    }
    
    /* 预览占位符调整 */
    .preview-placeholder {
        font-size: 16px;
        padding: 30px;
        min-height: 100vh;
        background: #f0f4f8;
        color: #94a3b8;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .preview-placeholder p {
        text-align: center;
        max-width: 300px;
    }
    
    /* 移动端浮动按钮样式 */
    .mobile-panel-toggle {
        position: fixed !important;
        bottom: 25px !important;
        right: 25px !important;
        z-index: 1000 !important;
        background: linear-gradient(135deg, #4361ee, #3a0ca3) !important;
        color: white !important;
        border: none !important;
        border-radius: 50% !important;
        width: 56px !important;
        height: 56px !important;
        font-size: 22px !important;
        cursor: pointer !important;
        box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4) !important;
        display: block !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-panel-toggle:focus {
        outline: none !important;
        box-shadow: 0 4px 15px rgba(67, 97, 238, 0.6) !important;
    }
    
    .mobile-panel-toggle:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 6px 20px rgba(67, 97, 238, 0.5) !important;
    }
}

/* 小屏幕设备适配 (最大宽度 480px) */
/* 大屏手机适配 (481px-600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .zib-123pan-container-layout {
        font-size: 14px;
    }
    
    .folder-header {
        padding: 16px 15px;
        min-height: 48px;
        margin: 4px 8px;
    }
    
    .zib-file {
        padding: 4px 6px;
        min-height: 36px;
        margin: 2px 4px;
    }
    
    .preview-panel,
    #pdf-preview-area,
    .pdf-preview-container,
    .preview-placeholder {
        height: calc(100vh - 120px);
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe {
        height: calc(100vh - 120px) !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* 平板竖屏适配 (601px-768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .zib-123pan-container-layout {
        font-size: 15px;
    }
    
    .folder-header {
        padding: 18px 16px;
        min-height: 52px;
        margin: 5px 10px;
    }
    
    .zib-file {
        padding: 6px 8px;
        min-height: 40px;
        margin: 3px 6px;
    }
    
    .preview-panel,
    #pdf-preview-area,
    .pdf-preview-container,
    .preview-placeholder {
        height: calc(100vh - 120px);
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe {
        height: calc(100vh - 120px) !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    .zib-123pan-container-layout {
        font-size: 13px;
    }
    
    .panel-header {
        padding: 0px 16px;
    }
    
    .folder-header {
        padding: 14px 14px; /* 小屏幕下文件夹保持较大的点击区域 */
        min-height: 44px; /* 小屏幕下文件夹最小高度 */
        margin: 3px 6px; /* 小屏幕外边距 */
        border-radius: 6px; /* 小屏幕圆角 */
    }
    
    .zib-file {
        padding: 2px 2px 2px 2px; /* 小屏幕下进一步减少间隙 */
        min-height: 32px; /* 小屏幕最小高度 */
        margin: 1px 1px; /* 小屏幕外边距 */
        border-radius: 4px; /* 小屏幕圆角 */
    }
    
    .dropdown-filter-item {
        font-size: 13px;
        padding: 10px 2px;
    }
    
    .dropdown-filter-option {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .dropdown-filter-actions {
        padding: 12px;
    }
    
    .dropdown-filter-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .preview-limit-modal h3 {
        font-size: 18px;
    }
    
    .preview-limit-modal p {
        font-size: 14px;
    }
    
    .upgrade-btn, .login-btn, .close-btn, .close-btn.action-close {
        padding: 14px;
        font-size: 15px;
    }
    
    .mobile-panel-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    .preview-panel,
    #pdf-preview-area,
    .pdf-preview-container,
    .preview-placeholder {
        height: calc(100vh - 120px);
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe {
        height: calc(100vh - 120px) !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe #outerContainer,
    .pdf-viewer-iframe #mainContainer,
    .pdf-viewer-iframe #viewerContainer {
        height: calc(100vh - 100px) !important;
    }
    
    .pdf-viewer-iframe .page,
    .pdf-viewer-iframe .page canvas {
        height: auto !important;
    }
    
    /* 在移动端隐藏footer元素 */
    .footer {
        display: none !important;
    }
    
    /* 修复文章页面底部元素跑出屏幕的问题 */
    .article.page-article.main-bg.theme-box.box-body.radius8.main-shadow,
    .article.page-article,
    .main-bg.theme-box.box-body.radius8.main-shadow {
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 确保文章内容不会超出视口 */
    .article.page-article .content,
    .article.page-article .entry-content,
    .article.page-article .post-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    /* 修复可能导致横向滚动的元素 */
    .article.page-article * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 确保页面底部有足够的间距 */
    body {
        padding-bottom: 20px !important;
    }
    
    /* 修复被子比主题footer-tabbar遮挡的问题 */
    .footer-tabbar {
        z-index: 999 !important;
    }
    
    /* 为被footer-tabbar遮挡的内容添加底部间距 */
    .article.page-article.main-bg.theme-box.box-body.radius8.main-shadow,
    .article.page-article,
    .main-bg.theme-box.box-body.radius8.main-shadow,
    .main-bg,
    .theme-box,
    .box-body {
        margin-bottom: 120px !important;
        padding-bottom: 30px !important;
    }
    
    /* 特别处理带有自定义样式的.article.page-article元素 */
    .article.page-article {
        margin-bottom: 60px !important;
        padding-bottom: 0px !important;
        /* 确保article从顶部开始显示 */
        margin-top: 0 !important;
        padding-top: 0 !important;
        /* 移除高度限制，让内容自然流动 */
        min-height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
    }
    
    /* 确保页面内容不被底部导航栏遮挡 */
    body {
        padding-bottom: 1px !important;
    }
    
    /* 确保所有可能的内容容器都有足够的底部间距 */
    .container,
    .main-content,
    .content,
    .post-content,
    .entry-content,
    #main,
    .site-main {
        margin-bottom: 1px !important;
        padding-bottom: 1px !important;
    }
    
    /* 为content-wrap添加顶部间距 */
    .content-wrap {
        margin-top: 20px !important;
        padding-top: 15px !important;
    }
    
    /* 特别针对最后一个子元素 */
    .article:last-child,
    .main-bg:last-child,
    .theme-box:last-child {
        margin-bottom: 150px !important;
    }
}

/* 横屏手机适配 */
/* 平板横屏适配 (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .zib-123pan-container-layout {
        font-size: 16px;
        max-width: 100%;
    }
    
    .directory-panel {
        width: 35%;
        max-width: 400px;
    }
    
    .folder-header {
        padding: 20px 18px;
        min-height: 56px;
        margin: 6px 12px;
    }
    
    .zib-file {
        padding: 8px 10px;
        min-height: 44px;
        margin: 4px 8px;
    }
    
    .preview-panel,
    #pdf-preview-area,
    .pdf-preview-container,
    .preview-placeholder {
        height: calc(100vh - 80px);
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe {
        height: calc(100vh - 80px) !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* 大屏设备适配 (1025px+) */
@media (min-width: 1025px) {
    .zib-123pan-container-layout {
        font-size: 16px;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .directory-panel {
        width: 30%;
        max-width: 350px;
    }
    
    .preview-panel,
    #pdf-preview-area,
    .pdf-preview-container,
    .preview-placeholder {
        height: calc(100vh - 60px);
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe {
        height: calc(100vh - 60px) !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .directory-panel {
        max-height: 70vh;
        border-radius: 0 16px 16px 0;
    }
    
    .panel-header {
        border-radius: 0 16px 0 0;
    }
    
    .preview-panel,
    #pdf-preview-area,
    .pdf-preview-container,
    .preview-placeholder {
        height: calc(85vh - 150px);
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe {
        height: calc(85vh - 150px) !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .pdf-viewer-iframe #outerContainer,
    .pdf-viewer-iframe #mainContainer,
    .pdf-viewer-iframe #viewerContainer {
        height: calc(85vh - 130px) !important;
    }
    
    .pdf-viewer-iframe .page,
    .pdf-viewer-iframe .page canvas {
        height: auto !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .zib-folder .folder-header,
    .zib-file {
        /* 增加触摸目标大小 */
        min-height: 48px; /* 文件夹保持更大的触摸区域 */
        display: flex;
        align-items: center;
    }
    
    /* 文件的触摸区域较小 */
    .zib-file {
        min-height: 36px !important; /* 文件保持较小的触摸区域 */
    }
    
    /* 减少悬停效果，改用触摸优化 */
    .zib-folder:hover > .folder-header,
    .folder-header:hover,
    .zib-file:hover {
        background-color: transparent;
        transform: none;
        box-shadow: none;
    }
    
    .zib-folder:active > .folder-header,
    .folder-header:active,
    .zib-file:active {
        background-color: #e2e8f0;
        border-radius: 8px;
        transform: scale(0.98); /* 触摸时轻微缩小 */
        transition: all 0.1s ease;
    }
    
    .dropdown-filter-option {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}