:root {
    --primary-color: rgb(78, 146, 159);
    --secondary-color: #e0f0f3;
    --accent-color: #d4a656;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: "Microsoft YaHei", "宋体", sans-serif;
    background: url("../../images/login/login-background-2-2.png") no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: hidden;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 检索区 */
.search-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 40px;
    border: none;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 85%;
}

.search-card {
    background: url("../../images/search/bg1.jpg");
}

.search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(78, 146, 159, 0.2);
}

.search-header {
    /*border-left: 5px solid var(--primary-color);*/
    padding-left: 20px;
    margin-bottom: 32px;
}

.search-header h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

/* 输入框样式 */
.search-input {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    font-size: 18px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

#searchForm {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.search-input {
    flex: 1;
    max-width: 800px;
}

/* 确保结果表格初始隐藏 */
.result-container {
    display: none;
}

/* 按钮样式 */
.btn {
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    margin-left: 16px;
    box-shadow: var(--shadow-sm);
}

/* 结果表格 */
.result-container {
    background: rgba(255, 255, 255, 0.95);
    /*border-radius: 16px;*/
    /*box-shadow: var(--shadow-lg);*/
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
    backdrop-filter: blur(5px);
    max-height: calc(100vh - 300px); /* 动态计算高度 */
    overflow-y: auto; /* 仅结果区域滚动 */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    scrollbar-width: thin;
}
/* 滚动条美化 */
.result-container::-webkit-scrollbar {
    width: 6px;
}
.result-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    opacity: 0.3;
}
.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th {
    background: var(--primary-color);
    color: white;
    padding: 16px;
    font-weight: 500;
    border-bottom: 3px solid var(--secondary-color);
}

.result-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f6f7;
    color: #4a6166;
}

.view-btn {
    background: rgb(78, 146, 159);
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.view-btn:hover {
    background: rgb(78, 146, 159);
    box-shadow: 0 2px 6px rgba(78, 146, 159);
}

/* 空状态提示 */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #8da9b0;
    font-size: 16px;
}

/* 添加计数器样式 */
.visit-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    /*background: rgba(78, 146, 159, 0.9);*/
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
    z-index: 9999; /* 确保在最顶层 */
    /* 强制显示属性 */
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
/*=============原文查看部分样式=======================*/
/* 档案预览容器 */
.archive-preview-container {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 元信息栏 */
.archive-meta {
    padding: 10px 15px;
    background: #f8f8f8;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.meta-item .layui-icon {
    margin-right: 5px;
}

/* 标签页内容区 */
.layui-tab-content {
    flex: 1;
    padding: 15px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.layui-tab-item {
    flex: 1;
    display: none;
    overflow: auto;
}

.layui-tab-item.layui-show {
    display: block;
}

/* 文件类型标签 */
.file-badge {
    display: inline-block;
    padding: 0 5px;
    margin-left: 8px;
    font-size: 12px;
    background: #e8f4ff;
    color: #1e9fff;
    border-radius: 3px;
}

/* 预览内容容器 */
.preview-iframe-container,
.preview-image-container {
    height: 100%;
    display: flex;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #eee;
}

.preview-iframe {
    width: 100%;
    min-height: 600px;
    background: white;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

/* 不支持预览的样式 */
.preview-unsupported {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

.unsupported-icon {
    font-size: 50px;
    color: #ddd;
    margin-bottom: 15px;
}
/* 分页容器样式 */
#layui-pagination{
    text-align: center!important;
}
/* 确保表格容器有固定高度 */
.table-wrapper {
    calc(100vh - 300px);
    overflow: hidden;
    position: relative;
    border-radius: 0 0 8px 8px;
}

/* 固定表头 */
.result-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 可滚动的tbody */
.result-table tbody {
    display: block;
    height: calc(100% - 40px); /* 减去表头高度 */
    overflow-y: auto;
}

/* 保持列对齐 */
.result-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}
/* 替换原有分页样式 */
#layui-pagination {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 15px 0;
    z-index: 10;
    border-top: 1px solid #f0f0f0;
    margin-top: -1px;
    /* 新增修复属性 */
    transform: translateZ(0); /* 创建独立层叠上下文 */
    box-shadow: 0 -5px 10px rgba(0,0,0,0.05); /* 防止内容透出 */
    transition: opacity 0.3s ease;
}

/* 调整表格容器 */
.table-wrapper {
    overflow-y: auto;
    max-height: calc(100vh - 400px);
    /* 新增隔离属性 */
    isolation: isolate; /* 防止滚动内容溢出 */
    position: relative; /* 建立新的层叠上下文 */
}

/* 确保表头固定 */
.result-table thead {
    position: sticky;
    top: 0;
    z-index: 5; /* 低于分页的z-index */
}

/* 确保分页按钮可见 */
.layui-laypage {
    margin: 0 auto;
    text-align: center;
}
#layui-pagination::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, transparent, white);
}

/*!* 添加到样式表底部 *!*/
/*#resultBody {*/
/*    opacity: 1 !important; !* 强制覆盖可能的样式 *!*/
/*    transition: opacity 0.2s ease;*/
/*}*/

/*.result-container {*/
/*    overflow: hidden; !* 防止滚动条跳动 *!*/
/*}*/

/*.layui-laypage * {*/
/*    transition: none !important; !* 禁用分页组件动画 *!*/
/*}*/
.result-table tbody {
    transform: translateX(46px); /* 向右偏移3像素 */
    display: block; /* 确保偏移生效 */
}


/* 文件操作按钮区域 */
.file-actions {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

/* 预览容器调整 */
.preview-iframe-container,
.preview-image-container {
    position: relative;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
}
.hidden-column {
    display: none;
}
