+ {/* Header */}
+
+ Search Results
+
+
+ {query ? `Results for "${query}"` : 'Enter a search term'}
+
+
+ {/* Tabs */}
+ {query && (
+
+ {[
+ { key: 'all', label: 'All', count: results.length },
+ { key: 'tracks', label: 'Tracks', count: trackCount },
+ { key: 'artists', label: 'Artists', count: artistCount },
+ ].map((tab) => (
+
+ ))}
+
+ )}
+
+ {/* Loading */}
+ {isLoading && (
+
+ )}
+
+ {/* Error */}
+ {error && (
+
+ {error}
+
+ )}
+
+ {/* Results */}
+ {!isLoading && !error && filteredResults.length === 0 && query && (
+
+
🔍
+
+ No results found
+
+
+ Try searching for a different track title, artist name, or genre
+
+
+ )}
+
+ {/* Results grid */}
+ {!isLoading && filteredResults.length > 0 && (
+
+ {filteredResults.map((result) => (
+
{
+ e.currentTarget.style.background = 'var(--bg-card-hover)'
+ e.currentTarget.style.transform = 'translateY(-2px)'
+ }}
+ onMouseLeave={(e) => {
+ e.currentTarget.style.background = 'var(--bg-card)'
+ e.currentTarget.style.transform = 'translateY(0)'
+ }}
+ >
+ {/* Image */}
+ {result.type === 'track' ? (
+ result.coverUrl ? (
+

+ ) : (
+
+ 🎵
+
+ )
+ ) : result.avatarUrl ? (
+

+ ) : (
+
+ 👤
+
+ )}
+
+ {/* Info */}
+
+
+ {result.type === 'track' ? result.title : result.displayName || result.username}
+
+
+ {result.type === 'track' ? (
+ <>
+ 🎵 Track
+ •
+ {result.genre}
+ {result.plays !== undefined && (
+ <>
+ •
+ {result.plays.toLocaleString()} plays
+ >
+ )}
+ >
+ ) : (
+ <>
+ 👤 Artist
+ •
+ @{result.username}
+ {result.followerCount !== undefined && (
+ <>
+ •
+ {result.followerCount.toLocaleString()} followers
+ >
+ )}
+ >
+ )}
+
+
+
+ {/* Arrow */}
+
+
+ ))}
+
+ )}
+
+ )
+}