/* Global Search Styles */
.nav-search-li {
    list-style: none;
    display: flex;
    align-items: center;
}
.nav-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-search-btn:hover {
    color: var(--text-primary);
}
.nav-search-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.search-overlay.open {
    display: flex;
}
.search-modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: searchFadeUp 0.2s ease-out;
}
@keyframes searchFadeUp {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}
.search-input-wrap svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--yellow, #ffe500);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    font-weight: 500;
}
.search-input::placeholder {
    color: var(--text-secondary);
}
.search-kbd {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.search-results {
    max-height: 360px;
    overflow-y: auto;
}
.search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}
.search-result:hover {
    background: var(--border-color);
}
.search-result-icon {
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    color: var(--text-secondary);
}
.search-result-icon i {
    font-size: 1.1rem;
    color: inherit;
}
.search-result-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--border-color);
}
.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.search-result-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    padding: 4px;
}
[data-theme="light"] .search-result-logo {
    background: rgba(0,0,0,0.04);
}
.search-result-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.search-result-text {
    min-width: 0;
}
.search-result-title {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-cat {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 1px;
}
.search-see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--border-color);
    color: #FFE500;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.search-see-all:hover {
    background: var(--border-color);
}
[data-theme="light"] .search-see-all {
    color: #a16207;
}
.search-see-all i {
    font-size: 1rem;
}
.search-no-results {
    padding: 24px 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}
/* Mobile: search icon + hamburger grouped */
.nav-actions-mobile {
    display: none;
}
.nav-search-mobile {
    display: none;
}
@media (max-width: 768px) {
    .nav-actions-mobile {
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }
    .nav-search-mobile,
    .nav-actions-mobile .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 8px;
    }
    .nav-actions-mobile .nav-toggle i {
        font-size: 22px !important;
    }
    [data-theme="light"] .nav-search-mobile,
    [data-theme="light"] .nav-actions-mobile .nav-toggle {
        background: rgba(0, 0, 0, 0.06);
    }
    .nav-search-mobile svg {
        width: 20px;
        height: 20px;
    }
}
@media (max-width: 600px) {
    .search-overlay {
        padding: 16px;
        padding-top: 70px;
    }
}
