/* Navbar Center - Search Bar */
.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: 100%;
    padding: 0 20px;
}

.navbar-search {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0 14px;
    transition: all 0.3s ease;
}

.navbar-search:focus-within {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}

.navbar-search .search-icon {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.navbar-search:focus-within .search-icon {
    color: rgba(255, 255, 255, 0.6);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.search-clear {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-clear svg {
    width: 14px;
    height: 14px;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1e2024;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.search-empty {
    padding: 32px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.search-section-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

/* Hashtag styling in posts */
.hashtag {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hashtag:hover {
    color: #fcd34d;
    text-decoration: underline;
}

/* Mobile Search Button - Hidden on desktop */
.search-mobile-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.search-mobile-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.navbar-btn.search-mobile-btn svg,
.search-mobile-btn svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
    max-width: 20px;
    max-height: 20px;
}

/* Mobile Search Modal */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1d21;
    z-index: 9999;
    display: none;
    flex-direction: column;
}

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

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1e2024;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-search-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-search-back svg {
    width: 20px;
    height: 20px;
}

.mobile-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0 14px;
}

.mobile-search-input-wrap .search-icon {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.4);
}

.mobile-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 0;
    color: #fff;
    font-size: 15px;
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .navbar-center {
        max-width: 400px;
    }
}

@media (max-width: 900px) {
    .navbar-center {
        display: none;
    }
    
    .search-mobile-btn {
        display: flex;
    }
}

@media (max-width: 480px) {
    .navbar-name {
        display: none;
    }
}
