/* Light Theme Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --light-gradient: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);

    --glass-bg: rgba(0, 0, 0, 0.04);
    --glass-border: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(0, 0, 0, 0.03);

    --text-light: #222222; /* main dark text */
    --text-muted: rgba(0, 0, 0, 0.65);
    --text-subtle: rgba(0, 0, 0, 0.45);

    --shadow-light: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 16px 36px rgba(0, 0, 0, 0.12);

    --border-radius: 16px;
    --border-radius-lg: 24px;
}

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

         

        .search-container {
            width: 100%;
            max-width: 600px;
            position: relative;
            margin: 0 auto;
            padding: 0 16px;
        }

        .search-wrapper {
            position: relative;
        }

        .search-box {
            width: 100%;
            padding: 18px 24px 18px 60px;
            font-size: 17px;
            border: none;
            border-radius: var(--border-radius-lg);
            background: var(--glass-bg);
            backdrop-filter: blur(24px);
             
            border: 1px solid var(--glass-border);
            box-shadow: var(--shadow-heavy);
            outline: none;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            color: var(--text-light);
            font-weight: 400;
            letter-spacing: 0.3px;
        }

        .search-icon {
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-subtle);
            font-size: 18px;
            transition: all 0.3s ease;
            z-index: 2;
        }

        .search-box:focus {
            background: rgba(255, 255, 255, 0.12);
            box-shadow: 0 20px 60px rgba(79, 172, 254, 0.25);
            border-color: rgba(79, 172, 254, 0.4);
            transform: translateY(-2px);
        }

        .search-box:focus + .search-icon {
            color: #4facfe;
            transform: translateY(-50%) scale(1.1);
        }

        .search-box::placeholder {
            color: var(--text-subtle);
            font-weight: 400;
        }

        .search-results {
            position: absolute;
            top: calc(100% + 12px);
            left: 0;
            right: 0;
            background: var(--card-bg);
            backdrop-filter: blur(32px);
            
            border: 1px solid var(--glass-border);
            border-radius: var(--border-radius-lg);
            box-shadow: var(--shadow-heavy);
            max-height: 70vh;
            overflow: auto;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px) scale(0.98);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1000;
        }

        .search-results.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        .results-header {
            padding: 16px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.02);
            font-size: 13px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .results-list {
            max-height: calc(70vh - 60px);
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        .result-item {
            padding: 16px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: 16px;
            position: relative;
            background: transparent;
        }

        .result-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 0;
            background: var(--accent-gradient);
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 0 8px 8px 0;
        }

        .result-item:hover::before,
        .result-item.active::before {
            width: 4px;
        }

        .result-item:hover,
        .result-item.active {
            background: rgba(79, 172, 254, 0.08);
            transform: translateX(4px);
        }

        .result-item:last-child {
            border-bottom: none;
        }

        .result-avatar {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--primary-gradient);
            color: white;
            font-size: 20px;
            font-weight: 600;
            flex-shrink: 0;
            box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .result-avatar::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .result-item:hover .result-avatar::before {
            opacity: 1;
        }

        .result-item:hover .result-avatar {
            transform: scale(1.05);
            box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35);
        }

        .result-content {
            flex: 1;
            min-width: 0;
        }

        .result-title {
            font-weight: 600;
            color: var(--text-light);
            margin-bottom: 2px;
            font-size: 16px;
            line-height: 1.4;
            transition: color 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .result-item:hover .result-title {
            color: #4facfe;
        }

        .result-subtitle {
            color: var(--text-muted);
            font-size: 14px;
            line-height: 1.4;
            margin-bottom: 4px;
            font-weight: 400;
        }

        .result-description {
            color: var(--text-subtle);
            font-size: 13px;
            line-height: 1.5;
             
            overflow: hidden;
        }

        .result-badge {
            background: var(--accent-gradient);
            color: white;
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .result-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 8px;
        }

        .result-tag {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-muted);
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 500;
        }

        .result-arrow {
            color: var(--text-subtle);
            font-size: 14px;
            transition: all 0.3s ease;
            opacity: 0;
            transform: translateX(-8px);
        }

        .result-item:hover .result-arrow {
            opacity: 1;
            transform: translateX(0);
            color: #4facfe;
        }

        .no-results {
            padding: 60px 20px;
            text-align: center;
            color: var(--text-subtle);
            font-weight: 400;
        }

        .no-results-icon {
            font-size: 48px;
            margin-bottom: 16px;
            opacity: 0.3;
            display: block;
        }

        .no-results-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 8px;
        }

        .loading {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-muted);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
        }

        .loading-spinner {
            width: 32px;
            height: 32px;
            border: 3px solid rgba(79, 172, 254, 0.2);
            border-top: 3px solid #4facfe;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            .search-container {
                padding: 0 12px;
            }

            .search-box {
                font-size: 16px;
                padding: 16px 20px 16px 52px;
                border-radius: 20px;
            }

            .search-icon {
                left: 18px;
                font-size: 16px;
            }

            .search-results {
                border-radius: 20px;
                max-height: 60vh;
            }

            .result-item {
                padding: 14px 16px;
                gap: 12px;
            }

            .result-avatar {
                width: 44px;
                height: 44px;
                font-size: 18px;
                border-radius: 12px;
            }

            .result-title {
                font-size: 15px;
            }

            .result-subtitle {
                font-size: 13px;
            }

            .result-description {
                font-size: 12px;
                
            }

            .results-header {
                padding: 12px 16px;
                font-size: 12px;
            }

            .results-list {
                max-height: calc(60vh - 50px);
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 12px 0;
            }

            .search-container {
                padding: 0 8px;
            }

            .search-box {
                font-size: 16px;
                padding: 14px 16px 14px 48px;
                border-radius: 18px;
            }

            .search-icon {
                left: 16px;
                font-size: 15px;
            }

            .search-results {
                border-radius: 18px;
                max-height: 55vh;
                top: calc(100% + 8px);
            }

            .result-item {
                padding: 12px 14px;
                gap: 10px;
            }

            .result-avatar {
                width: 40px;
                height: 40px;
                font-size: 16px;
                border-radius: 10px;
            }

            .result-title {
                font-size: 14px;
            }

            .result-subtitle {
                font-size: 12px;
            }

            .result-description {
                font-size: 11px;
            }

            .results-header {
                padding: 10px 14px;
                font-size: 11px;
            }

            .results-list {
                max-height: calc(55vh - 42px);
            }

            .no-results {
                padding: 40px 16px;
            }

            .no-results-icon {
                font-size: 36px;
            }
        }

        /* Custom scrollbar */
        

        /* Highlight matching text */
        .highlight {
            background: var(--accent-gradient);
            color: white;
            padding: 1px 4px;
            border-radius: 4px;
            font-weight: 600;
        }

        /* Focus states */
        .search-box:focus-visible {
            outline: 2px solid #4facfe;
            outline-offset: 2px;
        }

        .result-item:focus-visible {
            outline: 2px solid #4facfe;
            outline-offset: -2px;
            background: rgba(79, 172, 254, 0.12);
        }

        /* Reduced motion */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        /* Touch improvements */
        @media (pointer: coarse) {
            .result-item {
                min-height: 56px;
                padding: 16px;
            }
            
            .search-box {
                min-height: 52px;
            }
        }
        
        /* Custom scrollbar styles for webkit browsers */
.search-results::-webkit-scrollbar,
.results-list::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track,
.results-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin: 8px 0;
}

.search-results::-webkit-scrollbar-thumb,
.results-list::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-results::-webkit-scrollbar-thumb:hover,
.results-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5fb4fe 0%, #20f4fe 100%);
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(79, 172, 254, 0.4);
    transform: scaleX(1.2);
}

.search-results::-webkit-scrollbar-thumb:active,
.results-list::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #3a9efe 0%, #00d8fe 100%);
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(79, 172, 254, 0.6);
}

.search-results::-webkit-scrollbar-corner,
.results-list::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar styles */
.search-results,
.results-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 172, 254, 0.8) rgba(255, 255, 255, 0.03);
}

/* Mobile scrollbar adjustments */
@media (max-width: 768px) {
    .search-results::-webkit-scrollbar,
    .results-list::-webkit-scrollbar {
        width: 6px;
    }
    
    .search-results::-webkit-scrollbar-thumb,
    .results-list::-webkit-scrollbar-thumb {
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .search-results::-webkit-scrollbar,
    .results-list::-webkit-scrollbar {
        width: 4px;
    }
    
    .search-results::-webkit-scrollbar-thumb,
    .results-list::-webkit-scrollbar-thumb {
        border-radius: 4px;
    }
    
    .search-results::-webkit-scrollbar-track,
    .results-list::-webkit-scrollbar-track {
        margin: 4px 0;
    }
}
        
        
        