:root {
    --color-background: #0f172a;
    --color-surface: #1e293b;
    --color-primary: #3b82f6;
    --color-accent: #0ea5e9;
    --color-text-main: #f8fafc;
    --color-blob1: rgba(37, 99, 235, 0.1);
    --color-blob2: rgba(8, 145, 178, 0.1);
}

[data-theme="dracula"] {
    --color-background: #282a36;
    --color-surface: #44475a;
    --color-primary: #ff79c6;
    --color-accent: #bd93f9;
    --color-text-main: #f8f8f2;
    --color-blob1: rgba(255, 121, 198, 0.1);
    --color-blob2: rgba(189, 147, 249, 0.1);
}

[data-theme="monokai"] {
    --color-background: #272822;
    --color-surface: #3e3d32;
    --color-primary: #f92672;
    --color-accent: #a6e22e;
    --color-text-main: #f8f8f2;
    --color-blob1: rgba(249, 38, 114, 0.1);
    --color-blob2: rgba(166, 226, 46, 0.1);
}

body { background-color: var(--color-background); color: var(--color-text-main); font-family: 'Inter', sans-serif; transition: background-color 0.3s, color 0.3s; }
        
        /* Subtle Grid Background Pattern */
        .grid-pattern {
            background-image: linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
                              linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
            background-size: 40px 40px;
            background-position: center top;
        }

        /* Glassmorphism Search Bar */
        .search-glass {
            background: rgba(30, 41, 59, 0.5);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        }
        
        .search-glass:focus-within {
            border-color: rgba(59, 130, 246, 0.5);
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        }

        /* Custom Scrollbar */
        .custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
        .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #475569; }

        /* Loader */
        .loader-spinner {
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            border-top: 2px solid var(--color-primary);
            width: 20px;
            height: 20px;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { 100% { transform: rotate(360deg); } }

        /* Version Tag hover effect */
        .version-tag { z-index: 10; position: relative; }
        .version-tag:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        /* Modal Animation */
        .modal-enter { animation: modalIn 0.2s ease-out forwards; }
        @keyframes modalIn {
            from { opacity: 0; transform: scale(0.95) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        /* Card Stagger Animation */
        .card-enter {
            opacity: 0;
            transform: translateY(20px);
            animation: cardFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        @keyframes cardFadeIn {
            to { opacity: 1; transform: translateY(0); }
        }

        /* Floating spot-illustration states (empty / error) */
        .illustration-state {
            animation: illoIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
        }
        @keyframes illoIn {
            from { opacity: 0; transform: translateY(14px); }
            to { opacity: 1; transform: translateY(0); }
        }
        /* Soft radial glow that grounds the floating illustration on the page */
        .illustration-glow::before {
            content: "";
            position: absolute;
            left: 50%;
            top: 46%;
            width: 70%;
            height: 60%;
            transform: translate(-50%, -50%);
            background: radial-gradient(ellipse at center, rgba(129, 140, 248, 0.22), transparent 70%);
            filter: blur(8px);
            pointer-events: none;
            z-index: 0;
        }
        /* Gentle vertical bob for the illustration */
        .illustration-bob {
            animation: illoBob 6s ease-in-out infinite;
        }
        @keyframes illoBob {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-6px); }
        }
        @media (prefers-reduced-motion: reduce) {
            .illustration-state,
            .illustration-bob { animation: none; }
        }

        .blob-float { animation: floatBlob 15s ease-in-out infinite alternate; background-color: var(--color-blob1); }
        .blob-float-delayed { animation: floatBlob 18s ease-in-out infinite alternate-reverse; background-color: var(--color-blob2); }
        @keyframes floatBlob {
            0% { transform: translate(0px, 0px) scale(1); }
            33% { transform: translate(30px, -50px) scale(1.1); }
            66% { transform: translate(-20px, 20px) scale(0.9); }
            100% { transform: translate(0px, 0px) scale(1); }
        }

        /* Loading Skeletons */
        .skeleton {
            position: relative;
            overflow: hidden;
            background-color: rgba(255, 255, 255, 0.06);
            border-radius: 0.5rem;
        }
        .skeleton::after {
            content: "";
            position: absolute;
            inset: 0;
            transform: translateX(-100%);
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
            animation: skeletonShimmer 1.4s ease-in-out infinite;
        }
        @keyframes skeletonShimmer {
            100% { transform: translateX(100%); }
        }
        @media (prefers-reduced-motion: reduce) {
            .skeleton::after { animation: none; display: none; }
        }

        /* Autocomplete suggestions dropdown */
        .suggestions-panel {
            background: rgba(30, 41, 59, 0.85);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
        }
        .suggestion-item.is-active,
        .suggestion-item:hover {
            background-color: rgba(255, 255, 255, 0.07);
        }

        /* Recent search chips */
        .recent-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.3rem 0.4rem 0.3rem 0.75rem;
            border-radius: 9999px;
            background-color: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #cbd5e1;
            font-size: 0.75rem;
            transition: background-color 0.15s, border-color 0.15s, color 0.15s;
        }
        .recent-chip:hover {
            background-color: rgba(255, 255, 255, 0.1);
            border-color: rgba(59, 130, 246, 0.45);
            color: #fff;
        }
        .recent-chip__remove {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.25rem;
            height: 1.25rem;
            border-radius: 9999px;
            color: #64748b;
        }
        .recent-chip__remove:hover { color: #f87171; background-color: rgba(248, 113, 113, 0.12); }

        /* Recommended-for-your-system version row */
        .recommended-version {
            background: linear-gradient(180deg, rgba(59, 130, 246, 0.16), rgba(59, 130, 246, 0.06));
            border: 1px solid var(--color-primary);
            box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15), 0 8px 24px -12px rgba(59, 130, 246, 0.55);
            position: relative;
        }
