/* Ultra-Modern Polished Search System */
/* Sleek design with smooth animations and premium feel */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    position: relative;
    width: min(90vw, 680px);
    max-height: min(85vh, 720px);
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(76, 175, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(0.92);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 2rem auto;
}

.search-container.active {
    transform: scale(1);
    opacity: 1;
}

/* Responsive sizing */
@media (min-width: 768px) {
    .search-container {
        width: min(80vw, 650px);
        max-height: min(80vh, 550px);
    }
}

@media (min-width: 1024px) {
    .search-container {
        width: min(70vw, 700px);
        max-height: min(75vh, 600px);
    }
}

@media (min-width: 1440px) {
    .search-container {
        width: min(60vw, 750px);
        max-height: min(70vh, 650px);
    }
}

/* Ultra-Polished Search Header */
.search-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    flex-shrink: 0;
    z-index: 10;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 68px;
    backdrop-filter: blur(12px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-input-wrapper:focus-within {
    border-color: rgba(76, 175, 80, 0.6);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 0 0 4px rgba(76, 175, 80, 0.12),
        0 8px 24px rgba(76, 175, 80, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Premium Filter Chips */
.search-filter {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
    padding: 0.25rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.filter-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.filter-chip i {
    font-size: 0.9rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.filter-chip span {
    position: relative;
    z-index: 1;
}

.filter-chip:hover {
    background: rgba(76, 175, 80, 0.08);
    color: #c7f3cd;
    border-color: rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.filter-chip:hover::before {
    opacity: 1;
}

.filter-chip.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.12));
    color: #e9ffee;
    border-color: rgba(76, 175, 80, 0.7);
    box-shadow: 
        0 6px 20px rgba(76, 175, 80, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.filter-chip.active::before {
    opacity: 1;
}

.filter-chip.active i {
    color: #9ef5ab;
    opacity: 1;
}

/* Remove any pseudo-elements that might create dots */
.filter-chip::after {
    display: none !important;
}

.search-filter::after,
.search-filter::before {
    display: none !important;
}

@media (max-width: 480px) {
    .search-filter {
        gap: 0.375rem;
        padding: 0.125rem;
    }
    .filter-chip {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Responsive header padding */
@media (max-width: 768px) {
    .search-header {
        padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    }
    
    .search-input-wrapper {
        min-height: 56px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .search-header {
        padding: 1rem 1rem 1rem 1rem;
    }
    
    .search-input-wrapper {
        min-height: 52px;
        border-radius: 14px;
    }
}

.search-input-icon {
    position: absolute;
    left: 1.75rem;
    color: var(--text-secondary);
    font-size: 1.3rem;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.search-input-wrapper:focus-within .search-input-icon {
    color: #4CAF50;
    opacity: 1;
    transform: scale(1.1);
}

.search-input {
    width: 100%;
    padding: 1.35rem 4rem 1.35rem 4.25rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.125rem;
    outline: none;
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.5;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: 400;
}

.search-close-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    z-index: 2;
}

.search-close-btn:hover {
    background: rgba(255, 71, 87, 0.18);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
    transform: translateY(-50%) scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.25);
}

/* Responsive input sizing */
@media (max-width: 768px) {
    .search-input-icon {
        left: 1.25rem;
        font-size: 1.2rem;
    }
    
    .search-input {
        padding: 1rem 1.5rem 1rem 3.5rem;
        font-size: 1.1rem;
    }
    
    .search-close-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .search-input-icon {
        left: 1rem;
        font-size: 1.1rem;
    }
    
    .search-input {
        padding: 0.875rem 1.25rem 0.875rem 3rem;
        font-size: 1rem;
    }
    
    .search-close-btn {
        display: none;
    }
}

/* Premium Search Content */
.search-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 1rem 2rem;
    background: transparent;
    min-height: 300px;
    max-height: calc(85vh - 200px);
    scroll-behavior: smooth;
}

.search-content::-webkit-scrollbar {
    width: 8px;
}

.search-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin: 8px 0;
}

.search-content::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.3);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.3s ease;
}

.search-content::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.5);
    background-clip: padding-box;
}

/* Responsive content height */
@media (min-width: 768px) {
    .search-content {
        max-height: calc(80vh - 150px);
        min-height: 250px;
    }
}

@media (min-width: 1024px) {
    .search-content {
        max-height: calc(75vh - 160px);
        min-height: 300px;
    }
}

@media (min-width: 1440px) {
    .search-content {
        max-height: calc(70vh - 170px);
        min-height: 350px;
    }
}

.search-results {
    padding: 0;
}

/* Premium Search Suggestions */
.search-suggestions {
    padding: 1.25rem 0;
}

.suggestions-section {
    margin-bottom: 2rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.suggestions-section:last-child {
    margin-bottom: 0;
}

.suggestions-section h4 {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0;
    padding: 1.25rem 1.75rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Responsive suggestions padding */
@media (max-width: 768px) {
    .search-suggestions {
        padding: 1rem 0;
    }
    
    .suggestions-section {
        margin-bottom: 1.5rem;
    }
    
    .suggestions-section h4 {
        font-size: 0.9rem;
        padding: 0 1.5rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .suggestions-section h4 {
        padding: 0 1rem;
    }
}

/* Premium Recent Searches */
.recent-searches {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.recent-search-item {
    display: flex;
    align-items: center;
    padding: 1.15rem 1.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    gap: 1.15rem;
    min-height: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.recent-search-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.recent-search-item:last-child {
    border-bottom: none;
}

.recent-search-item:hover {
    background: rgba(76, 175, 80, 0.06);
    transform: translateX(4px);
}

.recent-search-item:hover::before {
    background: linear-gradient(180deg, #4CAF50, rgba(76, 175, 80, 0.5));
}

/* Responsive recent search items */
@media (max-width: 768px) {
    .recent-search-item {
        padding: 0.875rem 1.5rem;
        gap: 0.75rem;
        min-height: 52px;
    }
}

@media (max-width: 480px) {
    .recent-search-item {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        min-height: 48px;
    }
}

.recent-search-item i.fa-clock {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.6;
    width: 20px;
    text-align: center;
}

.recent-search-item span {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 400;
}

.remove-search {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-search-item:hover .remove-search {
    opacity: 1;
}

.remove-search:hover {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    transform: scale(1.05);
}

/* Premium Trending Searches */
.trending-searches {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.trending-item {
    display: flex;
    align-items: center;
    padding: 1.15rem 1.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1.15rem;
    min-height: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.trending-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item:hover {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.04));
    transform: translateX(4px);
}

.trending-item:hover::before {
    background: linear-gradient(180deg, #4CAF50, rgba(76, 175, 80, 0.6));
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.5);
}

/* Responsive trending items */
@media (max-width: 768px) {
    .trending-item {
        padding: 0.875rem 1.5rem;
        gap: 0.75rem;
        min-height: 52px;
    }
}

@media (max-width: 480px) {
    .trending-item {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        min-height: 48px;
    }
}

.trending-item i {
    color: #4CAF50;
    font-size: 1rem;
    width: 24px;
    text-align: center;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.trending-item:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.trending-item span {
    color: var(--text-primary);
    font-size: 0.975rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.trending-item .trending-badge {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.12));
    color: #4CAF50;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: auto;
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
}

.trending-item:hover .trending-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

/* Search Results */
.search-results-list {
    padding: 1rem 0;
}

.results-section {
    margin-bottom: 1.5rem;
}

.results-section:last-child {
    margin-bottom: 0;
}

.results-section h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding: 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 1.25rem;
    border-left: 3px solid transparent;
    min-height: 72px;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #4CAF50;
    transform: translateX(4px);
}

/* Responsive result items */
@media (max-width: 768px) {
    .result-item {
        padding: 1rem 1.5rem;
        gap: 1rem;
        min-height: 64px;
    }
}

@media (max-width: 480px) {
    .result-item {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
        min-height: 60px;
    }
}

/* User Results */
.user-result .result-avatar {
    position: relative;
    flex-shrink: 0;
}

.user-result .result-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.user-result:hover .result-avatar img {
    border-color: #4CAF50;
}

.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    color: #4CAF50;
    background: var(--secondary-bg);
    border-radius: 50%;
    font-size: 0.8rem;
    padding: 2px;
}

.user-result .result-content {
    flex: 1;
    min-width: 0;
}

.user-result .result-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.user-result .result-username {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Hashtag Results */
.hashtag-result .result-icon {
    width: 40px;
    height: 40px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hashtag-result .result-icon i {
    color: #4CAF50;
    font-size: 1.1rem;
}

.hashtag-result .result-content {
    flex: 1;
    min-width: 0;
}

.hashtag-result .result-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.hashtag-result .result-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Post Results */
.post-result .result-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.post-result:hover .result-avatar img {
    border-color: #4CAF50;
}

.post-result .result-content {
    flex: 1;
    min-width: 0;
}

.post-result .result-name {
    color: #4CAF50;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.post-result .result-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-result .result-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Loading State */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Premium No Results */
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2.5rem;
    text-align: center;
    color: var(--text-secondary);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: 20px;
    margin: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.search-no-results i {
    font-size: 4rem;
    margin-bottom: 1.75rem;
    opacity: 0.35;
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(76, 175, 80, 0.1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.search-no-results p {
    font-size: 1rem;
    opacity: 0.7;
    line-height: 1.6;
    max-width: 320px;
    letter-spacing: -0.01em;
}

/* Enhanced Empty State */
.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2.5rem 3rem;
    text-align: center;
    color: var(--text-secondary);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: 20px;
    margin: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.search-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    border: 2px solid rgba(76, 175, 80, 0.2);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.15);
}

.search-empty-icon i {
    font-size: 2.5rem;
    color: #4CAF50;
    opacity: 0.9;
}

.search-empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.search-empty-state p {
    font-size: 1rem;
    opacity: 0.7;
    line-height: 1.6;
    max-width: 360px;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
}

/* Search Suggestions Grid */
.search-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
    max-width: 400px;
}

.suggestion-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.suggestion-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-chip i {
    font-size: 1.1rem;
    color: #4CAF50;
    opacity: 0.85;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.suggestion-chip span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.suggestion-chip:hover {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
}

.suggestion-chip:hover::before {
    opacity: 1;
}

.suggestion-chip:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.suggestion-chip:active {
    transform: translateY(0) scale(0.98);
}

@media (max-width: 480px) {
    .search-empty-state {
        padding: 3rem 1.5rem 2.5rem;
        margin: 1rem;
    }
    
    .search-empty-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.5rem;
    }
    
    .search-empty-icon i {
        font-size: 2rem;
    }
    
    .search-empty-state h3 {
        font-size: 1.3rem;
    }
    
    .search-empty-state p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .search-suggestions-grid {
        gap: 0.5rem;
        max-width: 100%;
    }
    
    .suggestion-chip {
        padding: 0.85rem 1rem;
        gap: 0.65rem;
    }
    
    .suggestion-chip i {
        font-size: 1rem;
    }
    
    .suggestion-chip span {
        font-size: 0.9rem;
    }
}

/* Modern Mobile Responsiveness */
@media (max-width: 768px) {
    .search-container {
        width: 85vw;
        max-height: 70vh;
        border-radius: 12px;
        margin: 1.5rem auto;
    }

    .search-header {
        padding: 0.75rem 1rem 0.5rem;
    }

    .search-input-wrapper {
        min-height: 48px;
        border-radius: 12px;
    }

    .search-input {
        font-size: 0.95rem;
        padding: 0.75rem 3.5rem 0.75rem 3rem;
    }

    .search-input-icon {
        left: 1.25rem;
        font-size: 1.1rem;
    }

    .search-close-btn {
        right: 0.5rem;
        width: 36px;
        height: 36px;
    }
    
    .search-close-btn:hover {
        transform: translateY(-50%) scale(1.08);
    }

    .search-content {
        padding: 0 0.25rem 0.75rem;
    }

    .suggestions-section h4 {
        padding: 0.75rem 1rem 0.5rem;
        font-size: 0.8rem;
    }

    .recent-search-item,
    .trending-item {
        padding: 0.6rem 1rem;
        min-height: 48px;
        gap: 0.5rem;
    }

    .search-no-results {
        padding: 3rem 1.5rem;
        margin: 0.75rem;
    }

    .search-no-results i {
        font-size: 3rem;
    }

    .search-no-results h3 {
        font-size: 1.15rem;
    }

    .search-no-results p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 90vw;
        max-height: 75vh;
        border-radius: 10px;
        margin: 1rem auto;
    }

    .search-header {
        padding: 0.5rem 0.75rem 0.25rem;
    }

    .search-input-wrapper {
        min-height: 44px;
        border-radius: 10px;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.6rem 3rem 0.6rem 2.5rem;
    }

    .search-input-icon {
        left: 1rem;
        font-size: 1rem;
    }

    .search-close-btn {
        right: 0.4rem;
        width: 32px;
        height: 32px;
    }
    
    .search-close-btn:hover {
        transform: translateY(-50%) scale(1.08);
    }

    .suggestions-section h4 {
        padding: 0.5rem 0.75rem 0.25rem;
        font-size: 0.75rem;
    }

    .recent-search-item,
    .trending-item {
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        gap: 0.4rem;
    }

    .recent-search-item span,
    .trending-item span {
        font-size: 0.9rem;
    }

    .remove-search {
        width: 28px;
        height: 28px;
    }
}

/* Ultra-wide screen optimization */
@media (min-width: 1920px) {
    .search-container {
        width: min(50vw, 800px);
        max-height: min(65vh, 700px);
    }
}

/* Modern Animations */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.suggestions-section {
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.recent-search-item,
.trending-item {
    animation: fadeIn 0.3s ease;
}

.recent-search-item:nth-child(1) { animation-delay: 0.05s; }
.recent-search-item:nth-child(2) { animation-delay: 0.1s; }
.recent-search-item:nth-child(3) { animation-delay: 0.15s; }
.recent-search-item:nth-child(4) { animation-delay: 0.2s; }

.trending-item:nth-child(1) { animation-delay: 0.05s; }
.trending-item:nth-child(2) { animation-delay: 0.1s; }
.trending-item:nth-child(3) { animation-delay: 0.15s; }
.trending-item:nth-child(4) { animation-delay: 0.2s; }

/* Enhanced Keyboard Navigation */
.result-item:focus,
.recent-search-item:focus,
.trending-item:focus {
    outline: 2px solid #4CAF50;
    outline-offset: -2px;
    background: rgba(76, 175, 80, 0.1);
    transform: translateX(2px);
}

/* Loading Animation */
.search-loading {
    animation: fadeIn 0.3s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Trending Badge Animation */
.trending-badge {
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

/* Enhanced Hover Effects */
.trending-item:hover .trending-badge {
    transform: scale(1.05);
    background: rgba(76, 175, 80, 0.2);
}

.recent-search-item:hover i.fa-clock {
    color: #4CAF50;
    opacity: 1;
}

/* Focus States for Accessibility */
.search-input:focus {
    outline: none;
}

.search-close-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}