/* 搜索功能样式 */


.qm-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.qm-search-modal.active {
    display: flex;
}

.qm-search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.qm-search-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qm-search-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
    z-index: 100;
    pointer-events: auto;
}

.qm-search-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
    transform: scale(1.1);
}


.qm-search-form {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.qm-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 16px;
    transition: all 0.2s;
}

.qm-search-input-wrapper:focus-within {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.qm-search-icon {
    color: #9ca3af;
    margin-right: 12px;
    font-size: 18px;
}

.qm-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    padding: 14px 0;
    outline: none;
    color: #1f2937;
}

.qm-search-input::placeholder {
    color: #9ca3af;
}

.qm-search-submit {
    border: none;
    background: #3b82f6;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 12px;
}

.qm-search-submit:hover {
    background: #2563eb;
    transform: scale(1.05);
}


.qm-search-suggestions {
    max-height: 300px;
    overflow-y: auto;
    border-bottom: 1px solid #e5e7eb;
}

.qm-suggestions-list {
    padding: 10px 0;
}

.qm-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 30px;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s;
}

.qm-suggestion-item:hover {
    background: #f9fafb;
}

.qm-suggestion-item i {
    color: #9ca3af;
    width: 20px;
}


.qm-search-footer {
    padding: 20px 30px;
    max-height: 400px;
    overflow-y: auto;
}

.qm-search-history-section,
.qm-popular-searches-section {
    margin-bottom: 24px;
}

.qm-search-history-section:last-child,
.qm-popular-searches-section:last-child {
    margin-bottom: 0;
}

.qm-search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.qm-clear-history {
    border: none;
    background: none;
    color: #3b82f6;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.qm-clear-history:hover {
    background: #eff6ff;
}

.qm-search-history,
.qm-popular-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qm-search-history-item,
.qm-popular-search-item {
    padding: 6px 14px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.qm-search-history-item:hover,
.qm-popular-search-item:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.qm-empty-state {
    color: #9ca3af;
    font-size: 13px;
    padding: 20px;
    text-align: center;
}


.dark .qm-search-modal-content {
    background: #1f2937;
}

.dark .qm-search-input-wrapper {
    background: #374151;
    border-color: #4b5563;
}

.dark .qm-search-input-wrapper:focus-within {
    background: #374151;
    border-color: #60a5fa;
}

.dark .qm-search-input {
    color: #f3f4f6;
}

.dark .qm-search-suggestions {
    border-bottom-color: #374151;
}

.dark .qm-suggestion-item {
    color: #d1d5db;
}

.dark .qm-suggestion-item:hover {
    background: #374151;
}

.dark .qm-search-history-item,
.dark .qm-popular-search-item {
    background: #374151;
    color: #d1d5db;
}

.dark .qm-search-history-item:hover,
.dark .qm-popular-search-item:hover {
    background: #4b5563;
}

@media (max-width: 768px) {
    .qm-search-modal {
        padding-top: 20px;
    }

    .qm-search-modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
}

