.searchModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
}

.searchModal.active {
    display: flex;
}

.searchModalContent {
    background: var(--bg);
    border: 1px solid var(--bgSoft);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.searchModalHeader {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--bgSoft);
    gap: 12px;
}

.searchInput {
    flex: 1;
    background: var(--bgSoft);
    border: none;
    color: var(--text);
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    outline: none;
    font-family: "Roboto", sans-serif;
}

.searchInput::placeholder {
    color: var(--textSoft);
}

.searchClose {
    background: none;
    border: none;
    color: var(--textSoft);
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.searchClose:hover {
    color: var(--text);
}

.searchResults {
    overflow-y: auto;
    padding: 16px;
}

.searchResultItem {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}

.searchResultItem:hover {
    background: var(--bgSoft);
}

.searchResultImage {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.searchResultTexts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.searchResultTitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.searchResultDesc {
    font-size: 13px;
    color: var(--textSoft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchResultMeta {
    font-size: 12px;
    color: var(--textSoft);
}

.searchSectionLabel {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--textSoft);
    padding: 8px 12px 4px;
    font-weight: 600;
}

.searchCategoryItem {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--link);
    font-size: 14px;
    transition: background 0.15s;
}

.searchCategoryItem:hover {
    background: var(--bgSoft);
}

.searchNoResults {
    text-align: center;
    padding: 24px 12px;
    color: var(--textSoft);
    font-size: 14px;
}

.searchSuggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.searchSuggestionPill {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bgSoft);
    color: var(--link);
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s;
}

.searchSuggestionPill:hover {
    background: var(--link);
    color: var(--bg);
}

@media (max-width: 640px) {
    .searchModal {
        padding-top: 5vh;
    }

    .searchModalContent {
        width: 95%;
        max-height: 80vh;
    }

    .searchResultImage {
        display: none;
    }
}
