.search-bar {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
}

#searchInput {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#searchInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

#searchInput::placeholder {
    color: #6c757d;
    font-style: italic;
}

#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1050;
    max-height: 600px;
    overflow-y: auto;
    margin-top: 4px;
    animation: slideDown 0.3s ease-out;
}

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

.search-results-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.search-stats h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.search-stats p {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #6c757d;
}

.search-stats small {
    font-size: 12px;
    color: #868e96;
}

.clear-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clear-search-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Search sections */
.search-section {
    padding: 12px 0;
}

.search-section:not(:last-child) {
    border-bottom: 1px solid #f1f3f4;
}

.search-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 12px 0;
    padding: 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-section-title i {
    margin-right: 8px;
    width: 16px;
}


.search-result {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-result:hover {
    background: #f8f9fa;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.search-result-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.search-result-icon {
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.search-result-icon i {
    font-size: 16px;
}

.search-result-details {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.search-result-path {
    background: rgba(0,123,255,0.1);
    color: #007bff;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
}

.search-result-count,
.search-result-type {
    color: #868e96;
    font-weight: 500;
}

/* Search result actions */
.search-result-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.search-action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.search-action-btn.primary {
    background: #007bff;
    color: white;
}

.search-action-btn.primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.search-action-btn.secondary {
    background: #6c757d;
    color: white;
}

.search-action-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.search-loading,
.search-error,
.search-no-results {
    padding: 32px 24px;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-loading p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.no-results-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.search-no-results h5 {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 8px 0;
}

.search-no-results p {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 16px 0;
}

.no-results-suggestions {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    text-align: left;
}

.no-results-suggestions p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #495057;
}

.no-results-suggestions ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #6c757d;
}

.error-icon {
    font-size: 48px;
    color: #ffc107;
    margin-bottom: 16px;
}

.search-error h5 {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 8px 0;
}

.search-error p {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 16px 0;
}

.error-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .search-bar {
        max-width: 100%;
        margin: 0 0 16px;
    }

    #searchInput {
        font-size: 16px; 
        padding: 10px 14px;
    }

    .search-result-actions {
        align-self: stretch;
    }

    .search-result-actions .search-action-btn {
        flex: 1;
        justify-content: center;
    }

    .search-section-title {
        font-size: 13px;
        padding: 0 12px;
    }

    .no-results-suggestions {
        padding: 12px;
        margin: 12px 0;
    }

    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .error-actions .search-action-btn {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    #searchResults {
        left: 0;
        right: 0;
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        max-height: 70vh;
    }

    .search-result-name {
        font-size: 14px;
    }

    .search-result-meta {
        flex-wrap: wrap;
    }

    .search-action-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
}

#searchResults::-webkit-scrollbar {
    width: 6px;
}

#searchResults::-webkit-scrollbar-track {
    background: #f8f9fa;
}

#searchResults::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

#searchResults::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.search-action-btn:focus,
.clear-search-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.search-result {
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.search-result:nth-child(1) { animation-delay: 0.05s; }
.search-result:nth-child(2) { animation-delay: 0.1s; }
.search-result:nth-child(3) { animation-delay: 0.15s; }
.search-result:nth-child(4) { animation-delay: 0.2s; }
.search-result:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-action-btn,
.clear-search-btn {
    user-select: none;
    -webkit-user-select: none;
}

.search-bar {
    z-index: 1040;
}

#searchResults {
    z-index: 1050;
}s-header {
        padding: 12px;
    }

    .search-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .search-stats h4 {
        font-size: 16px;
    }

    .search-result {
        padding: 12px;
    }

    .search-result-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .search-result-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }