::highlight(search-highlight) {
    background-color: yellow !important;
    color: black;
    font-weight: bold;
    border-radius: 2px;
}

/* 搜索按钮 */
.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.search-btn:hover {
    border-color: #007bff;
    /* color: #007bff; */
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.15);
}

.search-btn.collapse-btn {
    background: #fff;
    border: 1px solid #ddd;
}

.search-icon {
    font-size: 1rem;
    line-height: 1;
}

.search-text {
    font-weight: 500;
}

.shortcut-key {
    margin-left: 6px;
    font-size: 12px;
    font-family: "Consolas", monospace;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 6px;
    color: #555;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    user-select: none;
}

.search-btn:hover .shortcut-key {
    border-color: #007bff;
    color: #007bff;
}

/* 模态背景层 */
.search-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    animation: fadeInBg 0.3s;
}

.search-modal.active {
    display: flex;
}

/* 搜索对话框主体 */
.search-dialog {
    background: #fff;
    width: 90%;
    max-width: 680px;
    margin: 80px auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 20px 24px;
    animation: slideDown 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

/* 头部输入与关闭按钮 */
.search-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
}

.search-input:focus {
    border-color: var(--accent-color, #007bff);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.search-close {
    margin-left: 8px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
    transition: 0.2s;
}

.search-close:hover {
    color: #555;
}

/* 搜索结果容器 */
.search-results {
    max-height: 65vh;
    overflow-y: auto;
    padding-left: 6px;
    padding-right: 6px;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* 单项结果 */
.search-result-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #eee;
    padding: 12px 4px;
    transition: 0.2s;
}

.search-result-item:hover {
    background: #f9f9f9;
}

.search-result-item a {
    flex: 1;
    width: 100%;
    font-weight: 600;
    color: var(--accent-color, #007bff);
    font-size: 16px;
    text-decoration: none;
}

.search-result-item a:hover {
    text-decoration: underline;
}

.search-result-snippet {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* 动画 */
@keyframes fadeInBg {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 禁止背景滚动 */
body.modal-open {
    /* overflow-x: hidden; */
}


::highlight(search-highlight) {
    background-color: yellow;
    color: black;
    font-weight: bold;
    border-radius: 2px;
}