.search-box {
    margin-left: 20px;
    padding-top: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    height: 40px;
}

.search-input {
    width: 300px;
    height: 30px;
    padding: 0 15px 0 38px;
    font-size: 14px;
    line-height: 25px;
    border: 1.5px solid #104492;
    border-radius: 25px;
    background-color: #ffffff;
    background-image: url("/search/images/search.svg");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 16px 16px;
    color: #104492;
}

.search-input::placeholder {
    color: #cccccc;
}

.search-input:focus {
    outline: none;
    border-color: #016cb4;
    box-shadow: 0 0 0 2px rgba(16,68,146,0.2);
}

.search-button {
    height: 30px;
    padding: 0 15px;
    font-size: 14px;
    /*line-height: 30px;*/
    border: 1.5px solid #104492;
    background-color: #104492;
    border-radius: 25px;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    
    /* 新增的微交互样式（保持原有样式不变） */
    position: relative;       /* 为伪元素定位做准备 */
    overflow: hidden;         /* 隐藏溢出的伪元素 */
    transition: all 0.2s ease; /* 添加过渡效果 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 添加轻微阴影 */
}

/* 按下效果 */
.search-button:active {
    transform: translateY(1px); /* 轻微下移模拟按压 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* 减少阴影 */
}

/* 新增的涟漪效果（可选） */
.search-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: translateY(-100%);
    transition: transform 0.2s ease;
}

.search-button:active::after {
    transform: translateY(0);
}



.clear-button {
    height: 30px;
    padding: 0 15px;
    font-size: 14px;
    line-height: 30px;
    border: 1.5px solid #104492;
    background-color: #104492;
    border-radius: 25px;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;

        /* 新增的微交互样式（保持原有样式不变） */
        position: relative;       /* 为伪元素定位做准备 */
        overflow: hidden;         /* 隐藏溢出的伪元素 */
        transition: all 0.2s ease; /* 添加过渡效果 */
        box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 添加轻微阴影 */
    }
    
    /* 按下效果 */
    .clear-button:active {
        transform: translateY(1px); /* 轻微下移模拟按压 */
        box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* 减少阴影 */
    }
    
    /* 新增的涟漪效果（可选） */
    .clear-button::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255,255,255,0.1);
        transform: translateY(-100%);
        transition: transform 0.2s ease;
}
.clear-button:active::after {
    transform: translateY(0);
}


.search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 340px);
}

.search-container {
    display: block;
    height: auto;
    min-height: 40px;
    margin-bottom: 20px;
}

.search-info {
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 1.2em;
}

.search-hint {
    text-align: center;
    margin: -8px 0 18px;
    color: #6b7280;
    font-size: 14px;
}

.search-highlight {
    color: #016CB4;
    font-weight: bold;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1.1em;
}

.results-card {
    margin: 20px 0;
    background: #ffffff;
    border: 1px solid #e8eef8;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(16, 68, 146, 0.08);
    overflow: hidden;
}

.results-card .results-table {
    margin: 0;
}

.results-card .pagination-info {
    margin: 14px 0 0;
}

.results-card .pagination {
    margin: 10px 0 16px;
}

.results-table th,
.results-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    font-size: 1.2em;
}

.results-table tr:hover {
    background-color: #f9f9f9;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.results-title {
    white-space: nowrap;
    color: #104492;
}

.file-name {
    word-break: break-all;
    white-space: normal;
}

.file-name a {
    color: #333;
    text-decoration: none;
    font-size: 1.1em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pdf-link.is-visited .file-model {
    color: #7aaeff;
}

.pdf-link.is-visited:hover .file-model {
    color: #4f8fff;
}

.pdf-link.is-visited .search-highlight {
    color: #4f8fff;
}

.file-model {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(16, 68, 146, 0.08);
    border: 1px solid rgba(16, 68, 146, 0.25);
    color: #104492;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.file-name a:hover {
    color: #016CB4;
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 5px;
}

.pagination a {
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.1em;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .active {
    background-color: #016CB4;
    color: white;
    border-color: #016CB4;
}

.pagination-info {
    text-align: center;
    margin: 10px 0;
    color: #666;
    font-size: 1.1em;
}

.no-results {
    max-width: 820px;
    margin: 26px auto 40px;
    padding: 34px 22px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e8eef8;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(16, 68, 146, 0.08);
    color: #111827;
}

.no-results-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f2f66;
}

.no-results-desc {
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

.no-results-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.no-results-form {
    justify-content: center;
}

@media screen and (max-width: 768px) {
    .search-results {
        padding: 12px;
    }

    .search-info {
        font-size: 1em;
        margin: 12px 0;
    }

    .results-title {
        width: 100%;
    }

    .search-form {
        width: 100%;
        height: auto;
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-input {
        width: 100%;
        height: 36px;
        line-height: 36px;
        box-sizing: border-box;
    }

    .search-button,
    .clear-button {
        height: 36px;
        line-height: 36px;
    }

    .results-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 1em;
        margin: 12px 0;
    }

    .results-table th,
    .results-table td {
        padding: 10px;
        font-size: 14px;
    }

    .file-name a {
        font-size: 14px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination a {
        font-size: 14px;
        padding: 8px 10px;
    }
}

.pdf-preview {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: none;
}

.pdf-preview.is-open {
    display: block;
}

.pdf-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.pdf-preview-modal {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(1280px, calc(100vw - 24px));
    height: calc(100vh - 24px);
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    background: #fbfcff;
}

.pdf-preview-title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdf-preview-title {
    font-size: 14px;
    font-weight: 700;
    color: #104492;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-preview-meta {
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-preview-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.u-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pdf-preview-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(16, 68, 146, 0.45);
    border-radius: 10px;
    background: #ffffff;
    color: #104492;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}

.pdf-preview-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.pdf-preview-icon-btn:hover {
    background: rgba(16, 68, 146, 0.08);
}

.pdf-preview-icon-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 68, 146, 0.25);
}

.pdf-preview-icon-btn-primary {
    background: #104492;
    border-color: #104492;
    color: #ffffff;
}

.pdf-preview-icon-btn-primary:hover {
    background: #0d3a7d;
}

.pdf-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #104492;
    border-radius: 999px;
    background: #ffffff;
    color: #104492;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    line-height: 32px;
}

.pdf-preview-btn:hover {
    background: rgba(16, 68, 146, 0.08);
}

.pdf-preview-btn-primary {
    background: #104492;
    color: #ffffff;
}

.pdf-preview-btn-primary:hover {
    background: #0d3a7d;
}

.pdf-preview-body {
    flex: 1;
    background: #f5f7fb;
}

.pdf-preview-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

body.pdf-preview-open {
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    .pdf-preview-modal {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
    }

    .pdf-preview-actions {
        gap: 8px;
    }
}
