It looks like this is a web page, not a feed. I looked for a feed associated with this page, but couldn't find one. Please enter the address of your feed to validate.

Source: https://niriv.com

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.    <!--
  5.    ================================================================================
  6.    REQUIRED META TAGS
  7.    ================================================================================
  8.    -->
  9.    <meta charset="UTF-8">
  10.    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11.  
  12.    <!--
  13.    ================================================================================
  14.    PAGE-SPECIFIC TAGS (EDIT THESE FOR EACH PAGE)
  15.    ================================================================================
  16.    -->
  17.    <title>Niriv — Search Quick, do more!</title>
  18.    <meta name="description" content="Quick search! Find web, images, videos, news, and products. Do and discover more with our online services every day at Niriv, Nepal's first search engine.">
  19.    <link rel="canonical" href="https://www.niriv.com/">
  20.  
  21.    <!--
  22.    ================================================================================
  23.    SITE-WIDE SEO TAGS (USUALLY UNCHANGED)
  24.    ================================================================================
  25.    -->
  26.    <meta name="keywords" content="search engine, Nepal, Niriv, search Nepal, web search, online services, Nepali search engine">
  27.    <meta name="author" content="Niriv">
  28.    <meta name="robots" content="index, follow">
  29.  
  30.    <!--
  31.    ================================================================================
  32.    FAVICON & THEME
  33.    ================================================================================
  34.    -->
  35.    <link rel="icon" href="https://www.yukesh.com.np/wp-content/uploads/2025/09/Favicon.png" type="image/png">
  36.    <link rel="apple-touch-icon" href="https://www.yukesh.com.np/wp-content/uploads/2025/09/Favicon.png">
  37.    <meta name="theme-color" content="#315EFB">
  38.  
  39.    <!--
  40.    ================================================================================
  41.    OPEN GRAPH (OG) TAGS (FOR SOCIAL SHARING ON FACEBOOK, LINKEDIN, ETC.)
  42.    ================================================================================
  43.    -->
  44.    <meta property="og:title" content="Niriv — Search Quick, do more!">
  45.    <meta property="og:description" content="Quick search! Find web, images, videos, news, and products. Do and discover more with our online services every day at Niriv, Nepal's first search engine.">
  46.    <meta property="og:type" content="website">
  47.    <meta property="og:url" content="https://www.niriv.com/">
  48.    <meta property="og:site_name" content="Niriv">
  49.    <meta property="og:image" content="/images/nirivog.png">
  50.    <meta property="og:image:width" content="1200">
  51.    <meta property="og:image:height" content="630">
  52.    <meta property="og:locale" content="en_US">
  53.  
  54.    <!--
  55.    ================================================================================
  56.    TWITTER CARD TAGS (FOR SHARING ON TWITTER)
  57.    ================================================================================
  58.    -->
  59.    <meta name="twitter:card" content="summary_large_image">
  60.    <meta name="twitter:site" content="@niriv">
  61.    <meta name="twitter:title" content="Niriv — Search Quick, do more!">
  62.    <meta name="twitter:description" content="Quick search! Find web, images, videos, news, and products. Do and discover more with our online services every day at Niriv, Nepal's first search engine.">
  63.    <meta name="twitter:image" content="/images/nirivog.png">
  64.  
  65.    <link rel="preconnect" href="https://fonts.googleapis.com">
  66.    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  67.    <link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700;800;900&family=Noto+Sans+Devanagari:wght@700&display=swap" rel="stylesheet">
  68.    <script src="https://cdn.tailwindcss.com"></script>
  69.    <!-- Modern Icons using Lucide -->
  70.    <script src="https://unpkg.com/lucide@latest"></script>
  71.      <!-- Google tag (gtag.js) -->
  72. <script async src="https://www.googletagmanager.com/gtag/js?id=G-JLMNQMWH32"></script>
  73. <script>
  74.  window.dataLayer = window.dataLayer || [];
  75.  function gtag(){dataLayer.push(arguments);}
  76.  gtag('js', new Date());
  77.  
  78.  gtag('config', 'G-JLMNQMWH32');
  79. </script>
  80.    <style>
  81.        body {
  82.            font-family: 'Fira Sans', sans-serif;
  83.            background-color: #f8fafc;
  84.        }
  85.        h1, h2, h3, h4, h5, h6 {
  86.            font-family: 'Fira Sans', sans-serif;
  87.        }
  88.        .custom-shadow {
  89.            box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .03);
  90.        }
  91.        .search-shadow {
  92.            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  93.        }
  94.        .service-icon-shadow {
  95.            box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  96.        }
  97.        .no-scrollbar::-webkit-scrollbar {
  98.            display: none;
  99.        }
  100.        .no-scrollbar {
  101.            -ms-overflow-style: none;
  102.            scrollbar-width: none;
  103.        }
  104.        .search-input {
  105.            border: 2px solid #315EFB;
  106.            transition: all 0.2s ease;
  107.        }
  108.        .search-input:focus {
  109.            border-color: #1d4ed8;
  110.            box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.1);
  111.        }
  112.        .n-logo {
  113.            background: linear-gradient(135deg, #315EFB 0%, #1d4ed8 100%);
  114.        }
  115.        .widget-shadow {
  116.             box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  117.        }
  118.        .card-bg-image {
  119.            background-size: cover;
  120.            background-position: center;
  121.        }
  122.        .search-category-btn {
  123.            transition: all 0.2s ease-in-out;
  124.        }
  125.        .search-category-btn.active {
  126.            background-color: #315EFB;
  127.            color: white;
  128.            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  129.        }
  130.        /* Styles for the new News Section */
  131.        .news-category-tab {
  132.            transition: all 0.2s ease-in-out;
  133.        }
  134.        .news-category-tab.active {
  135.            background-color: #315EFB;
  136.            color: white;
  137.        }
  138.        
  139.        .bg-purple-500 {
  140.    --tw-bg-opacity: 1;
  141.    background-color: #4f46e5 !important;
  142. }
  143.        .search-overlay {
  144.            transition: transform 0.3s ease-in-out;
  145.        }
  146.        .preview-notice {
  147.            background: linear-gradient(90deg, #4f46e5, #818cf8, #a78bfa, #4f46e5);
  148.            background-size: 200% 100%;
  149.            animation: gradient-animation 5s linear infinite;
  150.            color: white;
  151.            text-align: center;
  152.            padding: 0.5rem;
  153.            font-size: 0.875rem;
  154.            font-weight: 500;
  155.        }
  156.        .brand-gradient { background-image: linear-gradient(135deg, #315EFB 0%, #1d4ed8 100%); }
  157.  
  158.        @keyframes gradient-animation {
  159.            0% { background-position: 200% 0; }
  160.            100% { background-position: -200% 0; }
  161.        }
  162.  
  163.        /* UPDATED Styles for Radial Menu */
  164.        #radial-menu-container {
  165.            transition: opacity 0.3s ease-in-out;
  166.            transform: translateY(100%);
  167.            opacity: 0;
  168.            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
  169.        }
  170.        #radial-menu-container.active {
  171.            transform: translateY(0);
  172.            opacity: 1;
  173.        }
  174.  
  175.        #radial-menu-body {
  176.            width: 36rem; /* 576px */
  177.            height: 36rem; /* 576px */
  178.            position: absolute;
  179.            left: 50%;
  180.            bottom: 0;
  181.            transform: translate(-50%, 18rem); /* Move down by half height to create arc effect */
  182.        }
  183.        
  184.        #radial-menu {
  185.            position: absolute;
  186.            top: 0;
  187.            left: 0;
  188.            width: 100%;
  189.            height: 100%;
  190.            user-select: none;
  191.            transition: transform 0.2s ease-out;
  192.            border-radius: 50%;
  193.        }
  194.  
  195.        .radial-menu-item {
  196.            position: absolute;
  197.            left: 50%;
  198.            top: 50%;
  199.            width: 5rem; /* 80px */
  200.            height: 5rem; /* 80px */
  201.            margin-left: -2.5rem;
  202.            margin-top: -2.5rem;
  203.            transform-origin: center;
  204.            cursor: pointer;
  205.        }
  206.  
  207.        .radial-menu-item-content {
  208.            transition: transform 0.2s ease;
  209.        }
  210.        .radial-menu-item:hover .radial-menu-item-content {
  211.            transform: scale(1.1);
  212.        }
  213.  
  214.        /* Radial menu item focus and enter animations */
  215.        .radial-menu-item:focus-visible .radial-menu-item-content {
  216.            outline: 3px solid rgba(49, 94, 251, 0.35);
  217.            outline-offset: 3px;
  218.            border-radius: 9999px;
  219.        }
  220.        .radial-menu-item { opacity: 0; animation: radial-pop-in 300ms ease both; }
  221.        @keyframes radial-pop-in { from { transform: scale(0.9) translate(0,0); opacity: 0; } to { opacity: 1; } }
  222.  
  223.         /* Gemini AI Feature Styles */
  224.        .gemini-modal {
  225.            transition: opacity 0.3s ease-in-out;
  226.        }
  227.        .gemini-modal-content {
  228.            transform: scale(0.95);
  229.            opacity: 0;
  230.            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  231.        }
  232.        .gemini-modal.active .gemini-modal-content {
  233.            transform: scale(1);
  234.            opacity: 1;
  235.        }
  236.        .chat-bubble-user {
  237.            background-color: #315EFB;
  238.            color: white;
  239.        }
  240.        .chat-bubble-ai {
  241.            background-color: #e5e7eb;
  242.            color: #1f2937;
  243.        }
  244.        .gemini-loader div {
  245.            animation: gemini-bouncedelay 1.4s infinite ease-in-out both;
  246.        }
  247.        .gemini-loader .bounce1 { animation-delay: -0.32s; }
  248.        .gemini-loader .bounce2 { animation-delay: -0.16s; }
  249.        @keyframes gemini-bouncedelay {
  250.            0%, 80%, 100% { transform: scale(0); }
  251.            40% { transform: scale(1.0); }
  252.        }
  253.  
  254.        /* Style for highlighted autocomplete item */
  255.        .autocomplete-selected {
  256.            background-color: #eef2ff; /* A light indigo background */
  257.        }
  258.        
  259.        /* Dashain Celebration Styles */
  260.        .font-nepali { font-family: 'Noto Sans Devanagari', sans-serif; }
  261.        .dashain-gradient { background: linear-gradient(135deg, #D92E3D 0%, #880E4F 100%); }
  262.        .time-card-shadow { box-shadow: 0 25px 50px -12px rgba(160, 30, 37, 0.4); }
  263.        .confetti {
  264.            position: absolute;
  265.            opacity: 0.9;
  266.            pointer-events: none;
  267.            animation: fall linear infinite;
  268.        }
  269.        @keyframes fall {
  270.            from {
  271.                transform: translateY(-10vh) rotate(0deg);
  272.            }
  273.            to {
  274.                transform: translateY(110vh) rotate(720deg);
  275.                opacity: 0;
  276.             }
  277.        }
  278.  
  279.    </style>
  280. </head>
  281. <body class="text-gray-900 bg-slate-50">
  282.  
  283.    <div id="confetti-container" class="fixed top-0 left-0 w-full h-full pointer-events-none z-50 overflow-hidden"></div>
  284.  
  285.    <div class="preview-notice">
  286.        Niriv is currently in Preview Mode. Final launch is scheduled for mid-2026.
  287.    </div>
  288.  
  289.    <div id="sidebar-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden"></div>
  290.  
  291.    <aside id="sidebar" class="fixed inset-0 z-50 bg-slate-50 flex flex-col transition-transform duration-300 ease-in-out transform -translate-x-full">
  292.        <!-- Sidebar content remains the same -->
  293.        <div class="flex items-center justify-between h-16 px-4 sm:px-6 lg:px-16 xl:px-32 w-full flex-shrink-0 bg-white custom-shadow">
  294.            <div class="flex items-center">
  295.                <a href="/" title="Go to Homepage" class="mr-3">
  296.                    <img src="https://www.yukesh.com.np/wp-content/uploads/2025/09/icon.svg" alt="Niriv Icon" class="w-8 h-8">
  297.                </a>
  298.                <h2 class="text-lg font-semibold">Shortcuts</h2>
  299.            </div>
  300.            <button id="sidebar-close-btn" class="focus:outline-none p-2 hover:bg-gray-100 rounded-lg">
  301.                <i data-lucide="x" class="w-6 h-6 text-gray-700"></i>
  302.            </button>
  303.        </div>
  304.        <div class="flex-grow p-4 sm:p-6 lg:px-16 xl:px-32 overflow-y-auto no-scrollbar">
  305.             <div class="bg-white custom-shadow mb-6 rounded-lg">
  306.                 <h4 class="font-semibold text-base p-3 bg-[#eef2f9] rounded-t-lg text-gray-800 text-left">Core Services</h4>
  307.                 <div class="grid grid-cols-3 sm:grid-cols-4 gap-4 p-2">
  308.                     <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="search" class="w-6 h-6 text-blue-600"></i></div><span class="text-xs font-semibold text-gray-700">Search</span></a>
  309.                     <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="credit-card" class="w-6 h-6 text-green-600"></i></div><span class="text-xs font-semibold text-gray-700">Pay</span></a>
  310.                     <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="play-circle" class="w-6 h-6 text-purple-600"></i></div><span class="text-xs font-semibold text-gray-700">Play</span></a>
  311.                     <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="clipboard-list" class="w-6 h-6 text-orange-600"></i></div><span class="text-xs font-semibold text-gray-700">Listings</span></a>
  312.                     <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="calendar-days" class="w-6 h-6 text-blue-600"></i></div><span class="text-xs font-semibold text-gray-700">Tithi</span></a>
  313.                     <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="star" class="w-6 h-6 text-yellow-600"></i></div><span class="text-xs font-semibold text-gray-700">Rasifal</span></a>
  314.                      <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="shopping-bag" class="w-6 h-6 text-indigo-600"></i></div><span class="text-xs font-semibold text-gray-700">Shopping</span></a>
  315.                      <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="newspaper" class="w-6 h-6 text-red-600"></i></div><span class="text-xs font-semibold text-gray-700">News</span></a>
  316.                      <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="file-pen-line" class="w-6 h-6 text-pink-600"></i></div><span class="text-xs font-semibold text-gray-700">Blog</span></a>
  317.                      <a href="#" class="flex flex-col items-center space-y-2 group p-2 rounded-xl hover:bg-gray-50 transition-colors"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow"><i data-lucide="mail" class="w-6 h-6 text-teal-600"></i></div><span class="text-xs font-semibold text-gray-700">Mail</span></a>
  318.                 </div>
  319.             </div>
  320.            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  321.                <div class="space-y-4">
  322.                    <div class="bg-white rounded-lg custom-shadow"><h4 class="font-semibold text-sm text-gray-600 p-3 bg-[#eef2f9] rounded-t-lg">Content & Media</h4><div class="p-4"><div class="grid grid-cols-2 gap-4"><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="music-2" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Music</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="video" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Video</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="radio-tower" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Radio</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="film" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Movies</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="book-open" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Books</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="file-text" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Blogs</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="trending-up" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Trends</span></a></div></div></div>
  323.                     <div class="bg-white rounded-lg custom-shadow"><h4 class="font-semibold text-sm text-gray-600 p-3 bg-[#eef2f9] rounded-t-lg">Productivity & Tools</h4><div class="p-4"><div class="grid grid-cols-2 gap-4"><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="mail" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Mail</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="calendar" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Calendar</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="notebook" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Notes</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="wrench" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Tools</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="bell" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Alerts</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="contact" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Directory</span></a></div></div></div>
  324.                     <div class="bg-white rounded-lg custom-shadow"><h4 class="font-semibold text-sm text-gray-600 p-3 bg-[#eef2f9] rounded-t-lg">Finance & Data</h4><div class="p-4"><div class="grid grid-cols-2 gap-3"><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="wallet" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Wallet</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="area-chart" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Finance</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="bar-chart-3" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Stocks</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="truck" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Transport</span></a></div></div></div>
  325.                </div>
  326.                <div class="space-y-4">
  327.                    <div class="bg-white rounded-lg custom-shadow"><h4 class="font-semibold text-sm text-gray-600 p-3 bg-[#eef2f9] rounded-t-lg">Social & Community</h4><div class="p-4"><div class="grid grid-cols-2 gap-3"><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="message-square" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Chat</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="users" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Groups</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="messages-square" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Forums</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="bar-chart-2" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Polls</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="vote" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Vote</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="calendar-plus" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Events</span></a></div></div></div>
  328.                     <div class="bg-white rounded-lg custom-shadow"><h4 class="font-semibold text-sm text-gray-600 p-3 bg-[#eef2f9] rounded-t-lg">Lifestyle & Daily Use</h4><div class="p-4"><div class="grid grid-cols-2 gap-3"><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="send" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Travel</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="utensils" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Food</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="store" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Market</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="tag" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Deals</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="gift" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Offers</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="briefcase" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Jobs</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="heart-pulse" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Health</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="graduation-cap" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Learning</span></a></div></div></div>
  329.                     <div class="bg-white rounded-lg custom-shadow"><h4 class="font-semibold text-sm text-gray-600 p-3 bg-[#eef2f9] rounded-t-lg">Discovery & Engagement</h4><div class="p-4"><div class="grid grid-cols-2 gap-3"><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="map" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Maps</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="compass" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Explore</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="gamepad-2" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Games</span></a><a href="#" class="flex items-center space-x-3 text-gray-700 p-2 rounded-lg hover:bg-gray-50 transition-colors"><i data-lucide="image" class="w-5 h-5 text-blue-600"></i><span class="font-semibold text-xs">Photos</span></a></div></div></div>
  330.                </div>
  331.            </div>
  332.        </div>
  333.    </aside>
  334.  
  335.    <div id="main-content">
  336.        <header>
  337.            <div class="container mx-auto">
  338.                <div class="flex items-center justify-between h-16 px-4 sm:px-8 lg:px-24 xl:px-48">
  339.                    <div class="flex items-center space-x-2">
  340.                        <button id="menu-toggle-btn" class="p-2 rounded-lg text-gray-600 hover:bg-gray-100 transition-colors">
  341.                           <i data-lucide="grip-vertical" class="w-6 h-6"></i>
  342.                        </button>
  343.                        <a href="#" class="p-2 rounded-lg text-gray-600 hover:bg-gray-100 transition-colors">
  344.                           <i data-lucide="wallet" class="w-6 h-6"></i>
  345.                        </a>
  346.                        <a href="#" class="p-2 rounded-lg text-gray-600 hover:bg-gray-100 transition-colors">
  347.                           <i data-lucide="store" class="w-6 h-6"></i>
  348.                        </a>
  349.                    </div>
  350.  
  351.                    <div class="flex items-center space-x-2">
  352.                         <a href="#" class="p-2 rounded-lg text-gray-600 hover:bg-gray-100 transition-colors">
  353.                              <i data-lucide="messages-square" class="w-6 h-6"></i>
  354.                          </a>
  355.                          <a href="#" class="p-2 rounded-lg text-gray-600 hover:bg-gray-100 transition-colors relative">
  356.                              <i data-lucide="bell" class="w-6 h-6"></i>
  357.                              <span class="absolute top-1 right-1 flex h-3 w-3 items-center justify-center rounded-full bg-red-500 text-xs text-white"></span>
  358.                           </a>
  359.                        <a href="#" class="p-2 rounded-lg text-gray-600 hover:bg-gray-100 transition-colors">
  360.                            <i data-lucide="user-circle-2" class="w-6 h-6"></i>
  361.                        </a>
  362.                    </div>
  363.                </div>
  364.            </div>
  365.        </header>
  366.  
  367.        <main>
  368.            <div class="container mx-auto pt-8 sm:pt-12 px-4 sm:px-8 lg:px-24 xl:px-48">
  369.                
  370.                <section class="mb-12">
  371.                     <div class="dashain-gradient text-white py-12 px-4 sm:px-8 text-center relative overflow-hidden rounded-3xl">
  372.                        <h2 class="font-nepali text-4xl md:text-5xl font-bold mb-4" style="text-shadow: 2px 2px 8px rgba(0,0,0,0.6);">बडा दशैं को शुभकामना</h2>
  373.                        <h3 class="text-2xl md:text-3xl font-extrabold mb-3 tracking-tight" style="text-shadow: 2px 2px 6px rgba(0,0,0,0.5);">
  374.                            Dashain Tika Sahit 2082
  375.                        </h3>
  376.                        <p class="text-md md:text-lg font-medium mb-6 max-w-2xl mx-auto opacity-95">
  377.                            Official auspicious time for Nepal:
  378.                        </p>
  379.                        <div class="bg-white/20 backdrop-blur-sm text-white p-6 rounded-2xl inline-block border border-white/30 max-w-md w-full mx-auto">
  380.                            <div class="text-5xl md:text-6xl font-black mb-4 tracking-tighter leading-none">
  381.                                11:53 AM
  382.                            </div>
  383.                            <div class="flex flex-col sm:flex-row justify-center items-center space-y-2 sm:space-y-0 sm:space-x-6 text-sm font-medium">
  384.                                <div class="flex items-center"><i data-lucide="calendar" class="w-4 h-4 inline-block mr-2"></i><span>Ashwin 16, 2082</span></div>
  385.                                <div class="flex items-center"><i data-lucide="calendar-check" class="w-4 h-4 inline-block mr-2"></i><span>October 2, 2025</span></div>
  386.                            </div>
  387.                        </div>
  388.                        <br/>
  389.                        <a href="https://niriv.com/dashain-tika-2082-time" class="mt-6 inline-block bg-white text-red-700 font-bold py-2 px-6 rounded-full hover:bg-amber-300 transition-colors shadow-lg">View Worldwide Times</a>
  390.                    </div>
  391.                </section>
  392.  
  393.                <section class="flex flex-col items-center mt-2 mb-12">
  394.                    <img src="https://niriv.com.np/static/media/logo.svg" alt="Niriv Logo" class="w-56 mb-8">
  395.                    <form action="/search.html" method="GET" class="w-full max-w-xl relative px-2" id="main-search-form">
  396.  
  397.                        <div class="flex justify-center flex-wrap gap-2 mb-4">
  398.                            <label class="search-category-btn active cursor-pointer px-4 py-2 text-sm font-semibold text-gray-700 bg-gray-100 rounded-full transition-colors duration-200"><input type="radio" name="type" value="web" class="hidden" checked> All</label>
  399.                            <label class="search-category-btn cursor-pointer px-4 py-2 text-sm font-semibold text-gray-700 bg-gray-100 rounded-full transition-colors duration-200"><input type="radio" name="type" value="images" class="hidden"> Images</label>
  400.                            <label class="search-category-btn cursor-pointer px-4 py-2 text-sm font-semibold text-gray-700 bg-gray-100 rounded-full transition-colors duration-200"><input type="radio" name="type" value="videos" class="hidden"> Videos</label>
  401.                            <label class="search-category-btn cursor-pointer px-4 py-2 text-sm font-semibold text-gray-700 bg-gray-100 rounded-full transition-colors duration-200"><input type="radio" name="type" value="news" class="hidden"> News</label>
  402.                        </div>
  403.                        <div class="relative">
  404.                            <!-- MODIFIED: N icon is now the trigger button again -->
  405.                            <div class="absolute inset-y-0 left-0 flex items-center pl-4">
  406.                                <button type="button" id="radial-menu-trigger" class="p-2 rounded-full hover:bg-blue-50 transition-colors">
  407.                                    <img src="/images/Nirivicon.svg" alt="Niriv Services Menu" class="w-8 h-8">
  408.                                </button>
  409.                            </div>
  410.                            <input type="search" name="q" id="main-search-input" placeholder="Start typing..." class="w-full py-3 pl-20 pr-36 text-base bg-white border-2 border-blue-600 rounded-full focus:outline-none search-input search-shadow transition-all duration-200" required autocomplete="off">
  411.                            <input type="hidden" name="from" id="search-from" value="web">
  412.                            <div class="absolute inset-y-0 right-0 flex items-center pr-2.5">
  413.                                 <button type="button" id="gemini-quick-answer-btn" class="h-9 w-9 rounded-full text-white flex items-center justify-center bg-purple-500 hover:bg-purple-600 transition-colors mr-1" title="Get a ✨ Quick Answer with AI">
  414.                                     <i data-lucide="sparkles" class="w-5 h-5"></i>
  415.                                 </button>
  416.                                <button type="submit" class="h-9 w-9 rounded-full text-white flex items-center justify-center bg-blue-600 hover:bg-blue-700 transition-colors" title="Search">
  417.                                    <i data-lucide="arrow-right" class="w-5 h-5"></i>
  418.                                </button>
  419.                            </div>
  420.                        </div>
  421.                        <div id="autocomplete-results" class="absolute left-0 right-0 top-full mt-2 bg-white rounded-lg shadow-lg z-10 hidden"></div>
  422.                    </form>
  423.  
  424.                    <div class="mt-6 flex items-center justify-center space-x-2">
  425.                        <i data-lucide="trending-up" class="w-5 h-5 text-gray-700 flex-shrink-0"></i>
  426.                        <h3 class="text-lg font-bold text-gray-800 flex-shrink-0">Trending:</h3>
  427.                        <div id="trending-keywords-container" class="text-sm text-gray-600 font-semibold whitespace-nowrap overflow-x-auto no-scrollbar">
  428.                            <a href="/search.html?q=kp+oli" class="hover:underline hover:text-blue-600">china nepal russia</a>,
  429.                            <a href="/search.html?q=nepal+news" class="hover:underline hover:text-blue-600 ml-2">news</a>,
  430.                            <a href="/search.html?q=weather+today" class="hover:underline hover:text-blue-600 ml-2">Dashain Tika</a>
  431.                        </div>
  432.                    </div>
  433.                    <div class="grid grid-cols-4 sm:grid-cols-8 gap-4 text-center max-w-3xl mx-auto mt-8">
  434.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="search" class="w-6 h-6 text-blue-600"></i></div><span class="text-xs font-semibold text-gray-700">Search</span></a>
  435.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="mail" class="w-6 h-6 text-teal-600"></i></div><span class="text-xs font-semibold text-gray-700">Mail</span></a>
  436.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="newspaper" class="w-6 h-6 text-red-600"></i></div><span class="text-xs font-semibold text-gray-700">News</span></a>
  437.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="shopping-bag" class="w-6 h-6 text-indigo-600"></i></div><span class="text-xs font-semibold text-gray-700">Shopping</span></a>
  438.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="calendar-days" class="w-6 h-6 text-blue-600"></i></div><span class="text-xs font-semibold text-gray-700">Tithi</span></a>
  439.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="coffee" class="w-6 h-6 text-green-600"></i></div><span class="text-xs font-semibold text-gray-700">Cafe</span></a>
  440.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="trending-up" class="w-6 h-6 text-green-600"></i></div><span class="text-xs font-semibold text-gray-700">Economy</span></a>
  441.                        <a href="#" class="flex flex-col items-center space-y-2 group"><div class="w-12 h-12 rounded-2xl flex items-center justify-center bg-white service-icon-shadow hover-lift"><i data-lucide="more-horizontal" class="w-6 h-6 text-gray-500"></i></div><span class="text-xs font-semibold text-gray-700">More</span></a>
  442.                    </div>
  443.                </section>
  444.                <section class="mb-8"><div class="bg-gradient-to-r from-blue-600 to-blue-800 rounded-3xl p-6 flex items-center justify-between text-white relative overflow-hidden"><div class="flex items-center space-x-4"><div class="relative"><div class="w-20 h-12 bg-blue-500 rounded-lg transform -rotate-12 relative flex items-center justify-center"><i data-lucide="credit-card" class="w-8 h-8 text-white"></i></div></div><div><p class="font-semibold text-lg">Nabil Bank Offer</p><p class="font-bold text-xl">10% cashback on payments!</p></div></div><button class="bg-white text-blue-600 w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0 font-semibold hover:bg-gray-100 transition-colors"><i data-lucide="chevron-right" class="w-5 h-5"></i></button></div></section>
  445.                
  446.                <section class="my-8"><div class="bg-gradient-to-r from-indigo-600 via-purple-600 to-blue-600 rounded-2xl p-6 relative overflow-hidden"><div class="absolute top-0 right-0 w-32 h-32 bg-white bg-opacity-10 rounded-full transform translate-x-16 -translate-y-16"></div><div class="absolute bottom-0 left-0 w-24 h-24 bg-white bg-opacity-10 rounded-full transform -translate-x-12 translate-y-12"></div><div class="relative z-10 flex flex-col md:flex-row items-center justify-between text-white"><div class="mb-4 md:mb-0"><div class="flex items-center mb-2"><div class="bg-yellow-400 text-black px-2 py-1 rounded-lg text-xs font-bold mr-3">PREMIUM</div><span class="text-yellow-300 font-semibold">Special Offer</span></div><h2 class="text-2xl md:text-3xl font-bold mb-2">Subscribe to Premium</h2><p class="text-blue-100 max-w-md">Get exclusive features, ad-free experience, and special discounts on all Niriv services. Limited time offer!</p></div><div class="flex flex-col items-center md:items-end space-y-3"><div class="text-right"><div class="text-3xl font-bold">NPR 299</div><div class="text-sm text-blue-100 line-through">NPR 499/month</div></div><button class="bg-white text-indigo-600 font-bold py-3 px-8 rounded-xl hover:bg-gray-100 transition-colors shadow-lg">Subscribe Now</button></div></div></div></section>
  447.            </div>
  448.        </main>
  449.  
  450.        <footer class="bg-white border-t border-gray-100">
  451.             <!-- Footer content remains the same -->
  452.            <div class="container mx-auto py-12 px-4 sm:px-8 lg:px-24 xl:px-48"><div class="grid grid-cols-1 md:grid-cols-3 gap-8 items-center text-center md:text-left"><div class="flex items-center justify-center md:justify-start space-x-4"><div class="text-sm text-gray-600"><p class="mb-2">Learn more about how to be private online.</p><a href="#" class="text-blue-600 font-semibold hover:underline">Visit our privacy blog</a></div></div><div class="flex flex-col items-center"><img src="https://www.niriv.com.np/static/media/logo.svg" alt="Niriv Logo" class="w-32 mb-4"><div class="flex space-x-6 text-sm font-semibold text-gray-700"><a href="/privacy" class="hover:text-blue-600 transition-colors">Privacy</a><a href="/about" class="hover:text-blue-600 transition-colors">About</a><a href="/bot" class="hover:text-blue-600 transition-colors">Bot</a><a href="/press" class="hover:text-blue-600 transition-colors">Press</a></div></div><div class="flex justify-center md:justify-end space-x-3"><a href="https://facebook.com/nirivhq" target="_blank" rel="noopener noreferrer" class="w-10 h-10 bg-gray-100 rounded-xl flex items-center justify-center text-gray-500 hover:bg-blue-600 hover:text-white transition-colors"><i data-lucide="facebook" class="w-5 h-5"></i></a><a href="https://www.instagram.com/nirivhq" target="_blank" rel="noopener noreferrer" class="w-10 h-10 bg-gray-100 rounded-xl flex items-center justify-center text-gray-500 hover:bg-blue-600 hover:text-white transition-colors"><i data-lucide="instagram" class="w-5 h-5"></i></a><a href="https://twitter.com/nirivhq" target="_blank" rel="noopener noreferrer" class="w-10 h-10 bg-gray-100 rounded-xl flex items-center justify-center text-gray-500 hover:bg-blue-600 hover:text-white transition-colors"><i data-lucide="twitter" class="w-5 h-5"></i></a><a href="https://np.linkedin.com/company/niriv" target="_blank" rel="noopener noreferrer" class="w-10 h-10 bg-gray-100 rounded-xl flex items-center justify-center text-gray-500 hover:bg-blue-600 hover:text-white transition-colors"><i data-lucide="linkedin" class="w-5 h-5"></i></a><a href="https://www.youtube.com/@niriv" target="_blank" rel="noopener noreferrer" class="w-10 h-10 bg-gray-100 rounded-xl flex items-center justify-center text-gray-500 hover:bg-blue-600 hover:text-white transition-colors"><i data-lucide="youtube" class="w-5 h-5"></i></a></div></div></div>
  453.        </footer>
  454.    </div>
  455.    
  456.    <!-- Search Overlay (Mobile) -->
  457.    <div id="search-overlay" class="fixed inset-0 z-[100] bg-white flex-col search-overlay transform translate-y-full md:hidden flex">
  458.        <!-- Mobile search overlay remains the same -->
  459.        <div class="flex items-center h-16 px-4 border-b border-gray-200 flex-shrink-0"><button id="search-overlay-back-btn" class="p-2 mr-2 text-gray-600 rounded-full hover:bg-gray-100"><i data-lucide="arrow-left" class="w-6 h-6"></i></button><form action="https://niriv.com.np/search" method="GET" class="flex-grow relative" id="overlay-search-form"><input type="search" id="search-overlay-input" name="q" placeholder="Start typing..." class="w-full h-10 pr-10 bg-transparent focus:outline-none" autocomplete="off"><input type="hidden" name="from" value="web"><button type="submit" class="absolute inset-y-0 right-0 flex items-center pr-2"><i data-lucide="search" class="w-5 h-5 text-blue-600"></i></button></form></div><div id="search-overlay-content" class="flex-grow overflow-y-auto"></div>
  460.    </div>
  461.    <!-- UPDATED Radial Menu -->
  462.    <div id="radial-menu-container" class="fixed inset-0 z-[200] pointer-events-none hidden" aria-hidden="true" role="dialog" aria-modal="true">
  463.        <div id="radial-menu-overlay" class="absolute inset-0 bg-black/40 backdrop-blur-sm pointer-events-auto"></div>
  464.        
  465.        <div id="radial-menu-body" class="pointer-events-none">
  466.            <div id="radial-menu" class="pointer-events-auto" role="menu" aria-label="Niriv quick actions">
  467.                <!-- Menu items will be injected by JS -->
  468.            </div>
  469.        </div>
  470.        <button id="radial-menu-close" class="absolute bottom-6 left-1/2 -translate-x-1/2 z-10 w-16 h-16 brand-gradient rounded-full pointer-events-auto flex items-center justify-center shadow-lg hover:scale-105 transition-transform">
  471.            <i data-lucide="x" class="w-8 h-8 text-white"></i>
  472.        </button>
  473.    </div>
  474.  
  475.    <!-- Gemini "Ask Niriv" Chat Modal -->
  476.    <div id="ask-niriv-modal" class="gemini-modal fixed inset-0 z-[250] hidden pointer-events-none flex items-center justify-center p-0">
  477.        <div class="absolute inset-0 bg-black/50 backdrop-blur-sm" id="ask-niriv-overlay"></div>
  478.        <div class="gemini-modal-content w-full h-full bg-white flex flex-col">
  479.            <div class="flex-shrink-0 flex items-center justify-between p-4 border-b brand-gradient text-white">
  480.                <div class="flex items-center space-x-3">
  481.                    <i data-lucide="sparkles" class="w-6 h-6 text-white"></i>
  482.                    <h3 class="text-lg font-bold">Ask Niriv</h3>
  483.                </div>
  484.                <button id="ask-niriv-close" class="p-2 rounded-full hover:bg-white/20"><i data-lucide="x" class="w-5 h-5 text-white"></i></button>
  485.            </div>
  486.            <div id="ask-niriv-chat-window" class="flex-grow p-4 overflow-y-auto space-y-4">
  487.                <!-- Chat messages will be appended here -->
  488.            </div>
  489.            <div class="flex-shrink-0 p-4 border-t">
  490.                <form id="ask-niriv-form" class="flex items-center space-x-2">
  491.                    <input id="ask-niriv-input" type="text" placeholder="Ask anything..." class="w-full px-4 py-2 bg-gray-100 rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500">
  492.                    <button type="submit" class="w-10 h-10 flex-shrink-0 bg-blue-600 text-white rounded-full flex items-center justify-center hover:bg-blue-700 transition-colors"><i data-lucide="send" class="w-5 h-5"></i></button>
  493.                </form>
  494.            </div>
  495.        </div>
  496.    </div>
  497.  
  498.    <!-- Gemini "Quick Answer" Modal -->
  499.    <div id="quick-answer-modal" class="gemini-modal fixed inset-0 z-[250] hidden pointer-events-none flex items-center justify-center p-4">
  500.         <div class="absolute inset-0 bg-black/50 backdrop-blur-sm" id="quick-answer-overlay"></div>
  501.         <div class="gemini-modal-content w-full max-w-2xl bg-white rounded-2xl shadow-2xl flex flex-col max-h-[80vh]">
  502.            <div class="flex-shrink-0 flex items-center justify-between p-4 border-b">
  503.                <div class="flex items-center space-x-3">
  504.                    <i data-lucide="sparkles" class="w-6 h-6 text-purple-500"></i>
  505.                    <h3 class="text-lg font-bold">Quick Answer</h3>
  506.                </div>
  507.                <button id="quick-answer-close" class="p-2 rounded-full hover:bg-gray-100"><i data-lucide="x" class="w-5 h-5 text-gray-600"></i></button>
  508.            </div>
  509.             <div id="quick-answer-content" class="flex-grow p-6 overflow-y-auto">
  510.                 <!-- Quick answer will be rendered here -->
  511.             </div>
  512.         </div>
  513.    </div>
  514.  
  515.  
  516.    <script>
  517.        document.addEventListener('DOMContentLoaded', () => {
  518.            // All other scripts (sidebar, mobile search, news) remain the same
  519.            const sidebar = document.getElementById('sidebar');
  520.            const sidebarOverlay = document.getElementById('sidebar-overlay');
  521.            const menuToggleBtn = document.getElementById('menu-toggle-btn');
  522.            const sidebarCloseBtn = document.getElementById('sidebar-close-btn');
  523.            const toggleMenu = () => { sidebar.classList.toggle('-translate-x-full'); sidebarOverlay.classList.toggle('hidden'); };
  524.            menuToggleBtn.addEventListener('click', toggleMenu);
  525.            sidebarCloseBtn.addEventListener('click', toggleMenu);
  526.            sidebarOverlay.addEventListener('click', toggleMenu);
  527.            const mainSearchInput = document.querySelector('#main-search-form input[name="q"]');
  528.            const searchOverlay = document.getElementById('search-overlay');
  529.            const searchOverlayBackBtn = document.getElementById('search-overlay-back-btn');
  530.            const searchOverlayInput = document.getElementById('search-overlay-input');
  531.            const searchOverlayContent = document.getElementById('search-overlay-content');
  532.            const overlaySearchForm = document.getElementById('overlay-search-form');
  533.            const updateOverlayContent = () => { searchOverlayContent.innerHTML = ''; const recentSearches = JSON.parse(localStorage.getItem('nirivRecentSearches')) || []; const recentContainer = document.createElement('div'); recentContainer.className = 'p-4'; if (recentSearches.length > 0) { const recentTitle = document.createElement('h3'); recentTitle.className = 'text-sm font-semibold text-gray-600 mb-2'; recentTitle.textContent = 'Recent Searches'; recentContainer.appendChild(recentTitle); recentSearches.forEach(term => { const link = document.createElement('a'); link.href = `https://www.niriv.com/search?q=${encodeURIComponent(term)}&from=web`; link.className = 'flex items-center p-2 text-gray-800 hover:bg-gray-100 rounded-lg'; link.innerHTML = `<i data-lucide="history" class="w-4 h-4 mr-3 text-gray-400 flex-shrink-0"></i><span class="truncate">${term}</span>`; recentContainer.appendChild(link); }); } else { recentContainer.innerHTML = '<p class="text-gray-500 text-center">There is no recent search history.</p>'; } searchOverlayContent.appendChild(recentContainer); const trendingSearches = [{ term: 'Russia Nepal', icon: 'landmark' }, { term: 'News', icon: 'newspaper' }, { term: 'Dashain Tika', icon: 'cloud-sun' }]; const trendingContainer = document.createElement('div'); trendingContainer.className = 'p-4 border-t border-gray-100'; const trendingTitle = document.createElement('h3'); trendingTitle.className = 'text-sm font-semibold text-gray-600 mb-2'; trendingTitle.textContent = 'Trending Searches'; trendingContainer.appendChild(trendingTitle); trendingSearches.forEach(item => { const link = document.createElement('a'); link.href = `https://www.niriv.com/search?q=${encodeURIComponent(item.term)}&from=web`; link.className = 'flex items-center p-2 text-gray-800 hover:bg-gray-100 rounded-lg'; link.innerHTML = `<i data-lucide="${item.icon}" class="w-4 h-4 mr-3 text-blue-600 flex-shrink-0"></i><span class="truncate">${item.term}</span>`; trendingContainer.appendChild(link); }); searchOverlayContent.appendChild(trendingContainer); lucide.createIcons(); };
  534.            const showSearchOverlay = () => { searchOverlay.classList.remove('translate-y-full'); searchOverlay.scrollTop = 0; document.body.classList.add('overflow-hidden'); setTimeout(() => searchOverlayInput.focus(), 50); updateOverlayContent(); };
  535.            const hideSearchOverlay = () => { searchOverlay.classList.add('translate-y-full'); document.body.classList.remove('overflow-hidden'); };
  536.            mainSearchInput.addEventListener('focus', (e) => { if (window.innerWidth < 768) { e.preventDefault(); mainSearchInput.blur(); showSearchOverlay(); } });
  537.            searchOverlayBackBtn.addEventListener('click', hideSearchOverlay);
  538.            const saveSearchTerm = (term) => { if (!term || term.trim() === '') return; let recentSearches = JSON.parse(localStorage.getItem('nirivRecentSearches')) || []; recentSearches = recentSearches.filter(s => s.toLowerCase() !== term.toLowerCase()); recentSearches.unshift(term); if (recentSearches.length > 10) { recentSearches.pop(); } localStorage.setItem('nirivRecentSearches', JSON.stringify(recentSearches)); };
  539.            overlaySearchForm.addEventListener('submit', () => { saveSearchTerm(searchOverlayInput.value); });
  540.            
  541.            // --- MODIFIED AUTOCOMPLETE SCRIPT WITH KEYBOARD NAVIGATION ---
  542.            const handleAutocomplete = (data, resultsContainer) => {
  543.                resultsContainer.innerHTML = '';
  544.                const suggestions = data[1];
  545.                if (suggestions && suggestions.length > 0) {
  546.                    const container = document.createElement('div');
  547.                    if (resultsContainer.id === 'search-overlay-content') {
  548.                        container.className = 'p-4';
  549.                    }
  550.                    suggestions.slice(0, 8).forEach(suggestion => {
  551.                        const link = document.createElement('a');
  552.                        const currentCategory = document.querySelector('.search-category-btn.active input').value;
  553.                        link.href = `https://www.niriv.com/search?q=${encodeURIComponent(suggestion)}&from=${currentCategory}`;
  554.                        link.className = 'autocomplete-item flex items-center px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-lg cursor-pointer';
  555.                        link.innerHTML = `<i data-lucide="search" class="w-4 h-4 mr-3 text-gray-500"></i><span class="suggestion-text">${suggestion}</span>`;
  556.                        link.addEventListener('click', (e) => {
  557.                            e.preventDefault();
  558.                            saveSearchTerm(suggestion);
  559.                            window.location.href = link.href;
  560.                        });
  561.                        container.appendChild(link);
  562.                    });
  563.                    resultsContainer.appendChild(container);
  564.                    lucide.createIcons();
  565.                    if(resultsContainer.id === 'autocomplete-results') {
  566.                        resultsContainer.classList.remove('hidden');
  567.                    }
  568.                } else {
  569.                    if(resultsContainer.id === 'autocomplete-results') {
  570.                        resultsContainer.classList.add('hidden');
  571.                    }
  572.                }
  573.            };
  574.            
  575.            const setupAutocomplete = (inputElement, resultsContainer) => {
  576.                let selectedSuggestionIndex = -1;
  577.                let originalUserValue = '';
  578.  
  579.                inputElement.addEventListener('input', () => {
  580.                    originalUserValue = inputElement.value;
  581.                    selectedSuggestionIndex = -1;
  582.                    const query = inputElement.value;
  583.                    if (query.length < 1) {
  584.                        if(resultsContainer.id === 'autocomplete-results') {
  585.                            resultsContainer.innerHTML = '';
  586.                            resultsContainer.classList.add('hidden');
  587.                        }
  588.                        if(resultsContainer.id === 'search-overlay-content') {
  589.                            updateOverlayContent();
  590.                        }
  591.                        return;
  592.                    }
  593.                    window.jsonpCallback = (data) => handleAutocomplete(data, resultsContainer);
  594.                    const script = document.createElement('script');
  595.                    script.src = `https://suggestqueries.google.com/complete/search?client=chrome&q=${encodeURIComponent(query)}&callback=jsonpCallback`;
  596.                    document.head.appendChild(script);
  597.                    script.onload = () => script.remove();
  598.                });
  599.  
  600.                inputElement.addEventListener('keydown', (e) => {
  601.                    const items = resultsContainer.querySelectorAll('.autocomplete-item');
  602.                    if (items.length === 0) return;
  603.  
  604.                    if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
  605.                        e.preventDefault();
  606.                        
  607.                        if (selectedSuggestionIndex > -1) {
  608.                            items[selectedSuggestionIndex].classList.remove('autocomplete-selected');
  609.                        }
  610.  
  611.                        if (e.key === 'ArrowDown') {
  612.                            selectedSuggestionIndex = (selectedSuggestionIndex + 1) % items.length;
  613.                        } else { // ArrowUp
  614.                             if (selectedSuggestionIndex === 0) {
  615.                                 selectedSuggestionIndex = -1; // Go back to original input
  616.                                 inputElement.value = originalUserValue;
  617.                                 return;
  618.                             }
  619.                            selectedSuggestionIndex = (selectedSuggestionIndex - 1 + items.length) % items.length;
  620.                        }
  621.                        
  622.                        const selectedItem = items[selectedSuggestionIndex];
  623.                        selectedItem.classList.add('autocomplete-selected');
  624.                        inputElement.value = selectedItem.querySelector('.suggestion-text').textContent.trim();
  625.  
  626.                    } else if (e.key === 'Escape') {
  627.                        resultsContainer.classList.add('hidden');
  628.                        inputElement.value = originalUserValue;
  629.                    } else if (e.key === 'Enter') {
  630.                         if (selectedSuggestionIndex > -1) {
  631.                            // If a suggestion is selected, let the form submit with the updated value.
  632.                            items[selectedSuggestionIndex].click(); // this will navigate and save the term
  633.                         }
  634.                    }
  635.                });
  636.            };
  637.  
  638.            setupAutocomplete(mainSearchInput, document.getElementById('autocomplete-results'));
  639.            setupAutocomplete(searchOverlayInput, searchOverlayContent);
  640.  
  641.            document.addEventListener('click', (e) => { if (!document.getElementById('main-search-form').contains(e.target)) { document.getElementById('autocomplete-results').classList.add('hidden'); } });
  642.            document.getElementById('main-search-form').addEventListener('submit', (e) => { saveSearchTerm(mainSearchInput.value); document.getElementById('autocomplete-results').classList.add('hidden'); });
  643.            const searchCategoryBtns = document.querySelectorAll('.search-category-btn');
  644.            searchCategoryBtns.forEach(btn => { btn.addEventListener('click', () => { searchCategoryBtns.forEach(b => b.classList.remove('active')); btn.classList.add('active'); const categoryValue = btn.querySelector('input').value; document.getElementById('search-from').value = categoryValue; overlaySearchForm.querySelector('input[name="from"]').value = categoryValue; }); });
  645.            const populateStaticTrends = () => { const trendsContainer = document.getElementById('trending-keywords-container'); if (!trendsContainer) return; const staticTrends = ['Russia Nepal', 'News', 'Dashain Tika']; trendsContainer.innerHTML = ''; staticTrends.forEach((trend, index) => { const link = document.createElement('a'); link.href = `/search.html?q=${encodeURIComponent(trend)}`; link.className = 'hover:underline hover:text-blue-600'; if (index > 0) { link.classList.add('ml-2'); } link.textContent = trend; trendsContainer.appendChild(link); if (index < staticTrends.length - 1) { trendsContainer.appendChild(document.createTextNode(', ')); } }); };
  646.            
  647.            // --- RADIAL MENU LOGIC ---
  648.            const radialMenuTrigger = document.getElementById('radial-menu-trigger');
  649.            const radialMenuContainer = document.getElementById('radial-menu-container');
  650.            const radialMenuBody = document.getElementById('radial-menu-body');
  651.            const radialMenu = document.getElementById('radial-menu');
  652.            const radialMenuOverlay = document.getElementById('radial-menu-overlay');
  653.            const radialMenuClose = document.getElementById('radial-menu-close');
  654.            
  655.            const services = [
  656.                { name: 'Voice', icon: 'mic', href: '#' },
  657.                { name: 'Music', icon: 'music-2', href: '#' },
  658.                { name: 'Lens', icon: 'camera', href: '#' },
  659.                { name: 'QR Scan', icon: 'qr-code', href: '#' },
  660.                { name: 'Shopping', icon: 'shopping-bag', href: '#' },
  661.                { name: 'Translate', icon: 'languages', href: '#' },
  662.                { name: 'Search', icon: 'search', href: '#' },
  663.                { name: 'Around Me', icon: 'map-pin', href: '#' }
  664.            ];
  665.  
  666.            const populateRadialMenu = () => {
  667.                radialMenu.innerHTML = '';
  668.                const angleStep = 360 / services.length;
  669.                const radius = 130; // 130px radius for the items circle
  670.  
  671.                services.forEach((service, index) => {
  672.                    // Start from -90 degrees (top) and go around. Distribute evenly.
  673.                    const angle = -90 + (index * angleStep);
  674.                    const angleRad = angle * (Math.PI / 180);
  675.  
  676.                    // Calculate position on a perfect circle
  677.                    const x = radius * Math.cos(angleRad);
  678.                    const y = radius * Math.sin(angleRad);
  679.  
  680.                    const item = document.createElement('a');
  681.                    item.href = service.href;
  682.                    item.className = 'radial-menu-item flex flex-col items-center justify-center pointer-events-auto focus:outline-none';
  683.                    item.setAttribute('role', 'menuitem');
  684.                    item.setAttribute('aria-label', service.name);
  685.                    item.setAttribute('tabindex', '0');
  686.                    item.style.animationDelay = `${index * 30}ms`;
  687.                     // The transform is relative to the center of the #radial-menu div
  688.                    item.style.transform = `translate(${x}px, ${y}px)`;
  689.                    
  690.                    item.innerHTML = `<div class="radial-menu-item-content flex flex-col items-center"><div class="w-16 h-16 rounded-full flex items-center justify-center bg-white/90 backdrop-blur-sm service-icon-shadow ring-1 ring-[#315EFB]/20"><i data-lucide="${service.icon}" class="w-7 h-7 text-[#315EFB]"></i></div><span class="text-xs font-semibold text-gray-800 mt-2 text-center">${service.name}</span></div>`;
  691.                    radialMenu.appendChild(item);
  692.                });
  693.                lucide.createIcons();
  694.            };
  695.  
  696.            const toggleRadialMenu = (show) => { if(show) { radialMenuContainer.classList.remove('hidden', 'pointer-events-none'); radialMenuContainer.setAttribute('aria-hidden', 'false'); document.body.classList.add('overflow-hidden'); setTimeout(() => { radialMenuContainer.classList.add('active'); const firstItem = radialMenu.querySelector('.radial-menu-item'); if (firstItem) firstItem.focus(); }, 10); } else { radialMenuContainer.classList.remove('active'); document.body.classList.remove('overflow-hidden'); radialMenuContainer.setAttribute('aria-hidden', 'true'); setTimeout(() => { radialMenuContainer.classList.add('hidden', 'pointer-events-none'); currentRotation = 0; radialMenu.style.transform = `rotate(0deg)`; }, 400); } };
  697.            
  698.            radialMenuTrigger.addEventListener('click', () => toggleRadialMenu(true));
  699.            radialMenuOverlay.addEventListener('click', () => toggleRadialMenu(false));
  700.            radialMenuClose.addEventListener('click', () => toggleRadialMenu(false));
  701.            
  702.            let isDragging = false, startAngle = 0, currentRotation = 0;
  703.            const getDegrees = (e) => { const rect = radialMenuBody.getBoundingClientRect(); const centerX = rect.left + rect.width / 2; const centerY = rect.top + rect.height / 2; const x = e.clientX || e.touches[0].clientX; const y = e.clientY || e.touches[0].clientY; return Math.atan2(y - centerY, x - centerX) * (180 / Math.PI); };
  704.            
  705.            // FIXED DRAG LOGIC
  706.            const onDragStart = (e) => {
  707.                // PREVENT DRAG if the user clicks on a link OR the close button
  708.                if (e.target.closest('a') || e.target.closest('#radial-menu-close')) {
  709.                    isDragging = false;
  710.                    return;
  711.                }
  712.                e.preventDefault();
  713.                isDragging = true;
  714.                startAngle = getDegrees(e) - currentRotation;
  715.                radialMenu.style.transition = 'none';
  716.            };
  717.  
  718.            const onDragMove = (e) => { if (!isDragging) return; e.preventDefault(); const newAngle = getDegrees(e); currentRotation = newAngle - startAngle; radialMenu.style.transform = `rotate(${currentRotation}deg)`; };
  719.            const onDragEnd = () => { if (!isDragging) return; isDragging = false; // snap to nearest item angle for tidiness
  720.                const angleStep = 360 / services.length;
  721.                currentRotation = Math.round(currentRotation / angleStep) * angleStep;
  722.                radialMenu.style.transition = 'transform 0.2s ease-out';
  723.                radialMenu.style.transform = `rotate(${currentRotation}deg)`; };
  724.            
  725.            radialMenuBody.addEventListener('mousedown', onDragStart);
  726.            document.addEventListener('mousemove', onDragMove);
  727.            document.addEventListener('mouseup', onDragEnd);
  728.            radialMenuBody.addEventListener('touchstart', onDragStart, { passive: false });
  729.            document.addEventListener('touchmove', onDragMove, { passive: false });
  730.            document.addEventListener('touchend', onDragEnd);
  731.  
  732.            // Keyboard support for rotating and closing
  733.            document.addEventListener('keydown', (e) => {
  734.                if (radialMenuContainer.classList.contains('hidden')) return;
  735.                const angleStep = 360 / services.length;
  736.                if (e.key === 'ArrowLeft') { currentRotation -= angleStep; radialMenu.style.transform = `rotate(${currentRotation}deg)`; }
  737.                if (e.key === 'ArrowRight') { currentRotation += angleStep; radialMenu.style.transform = `rotate(${currentRotation}deg)`; }
  738.                if (e.key === 'Escape') { toggleRadialMenu(false); }
  739.            });
  740.  
  741.            // --- GEMINI API FEATURES ---
  742.  
  743.            const API_KEY = ""; // Kept empty as per instructions
  744.            const API_URL = `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-05-20:generateContent?key=${API_KEY}`;
  745.            let chatHistory = [];
  746.  
  747.            // Helper to toggle modal visibility
  748.            const toggleGeminiModal = (modal, show) => {
  749.                if (show) {
  750.                    modal.classList.remove('hidden', 'pointer-events-none');
  751.                    document.body.classList.add('overflow-hidden');
  752.                    setTimeout(() => modal.classList.add('active'), 10);
  753.                } else {
  754.                    modal.classList.remove('active');
  755.                    document.body.classList.remove('overflow-hidden');
  756.                     setTimeout(() => modal.classList.add('hidden', 'pointer-events-none'), 300);
  757.                }
  758.            };
  759.            
  760.            // --- "Ask Niriv" Chat Logic ---
  761.            const askNirivModal = document.getElementById('ask-niriv-modal');
  762.            const askNirivTrigger = document.getElementById('ask-niriv-trigger');
  763.            const askNirivClose = document.getElementById('ask-niriv-close');
  764.            const askNirivOverlay = document.getElementById('ask-niriv-overlay');
  765.            const askNirivForm = document.getElementById('ask-niriv-form');
  766.            const askNirivInput = document.getElementById('ask-niriv-input');
  767.            const askNirivChatWindow = document.getElementById('ask-niriv-chat-window');
  768.  
  769.            const addMessageToChat = (sender, message) => {
  770.                const bubble = document.createElement('div');
  771.                bubble.className = `w-full flex ${sender === 'user' ? 'justify-end' : 'justify-start'}`;
  772.                
  773.                // Sanitize message to prevent HTML injection
  774.                const messageText = document.createElement('div');
  775.                messageText.textContent = message;
  776.  
  777.                bubble.innerHTML = `<div class="max-w-md p-3 rounded-2xl ${sender === 'user' ? 'chat-bubble-user rounded-br-lg' : 'chat-bubble-ai rounded-bl-lg'}">${messageText.innerHTML.replace(/\n/g, '<br>')}</div>`;
  778.                askNirivChatWindow.appendChild(bubble);
  779.                askNirivChatWindow.scrollTop = askNirivChatWindow.scrollHeight;
  780.            };
  781.  
  782.            const showLoader = () => {
  783.                const loader = document.createElement('div');
  784.                loader.id = 'ai-loader';
  785.                loader.className = 'w-full flex justify-start';
  786.                loader.innerHTML = `<div class="max-w-md p-3 rounded-2xl chat-bubble-ai rounded-bl-lg flex items-center"><div class="gemini-loader flex space-x-1.5"> <div class="bounce1 w-2 h-2 bg-gray-500 rounded-full"></div> <div class="bounce2 w-2 h-2 bg-gray-500 rounded-full"></div> <div class="bounce3 w-2 h-2 bg-gray-500 rounded-full"></div> </div></div>`;
  787.                askNirivChatWindow.appendChild(loader);
  788.                askNirivChatWindow.scrollTop = askNirivChatWindow.scrollHeight;
  789.            }
  790.  
  791.            const hideLoader = () => {
  792.                const loader = document.getElementById('ai-loader');
  793.                if(loader) loader.remove();
  794.            }
  795.  
  796.            if (askNirivTrigger) {
  797.                askNirivTrigger.addEventListener('click', () => {
  798.                    toggleGeminiModal(askNirivModal, true);
  799.                    if (askNirivChatWindow.children.length === 0) {
  800.                        addMessageToChat('ai', 'Hello! I am Niriv Assist, your AI assistant. How can I help you today?');
  801.                    }
  802.                });
  803.            }
  804.            askNirivClose.addEventListener('click', () => toggleGeminiModal(askNirivModal, false));
  805.            askNirivOverlay.addEventListener('click', () => toggleGeminiModal(askNirivModal, false));
  806.  
  807.            askNirivForm.addEventListener('submit', async (e) => {
  808.                e.preventDefault();
  809.                const userPrompt = askNirivInput.value.trim();
  810.                if (!userPrompt) return;
  811.  
  812.                addMessageToChat('user', userPrompt);
  813.                askNirivInput.value = '';
  814.                showLoader();
  815.  
  816.                chatHistory.push({ role: 'user', parts: [{ text: userPrompt }] });
  817.  
  818.                const payload = {
  819.                    contents: chatHistory,
  820.                    systemInstruction: { parts: [{ text: "You are Niriv Assist, a friendly and helpful AI assistant from Nepal. Be concise and helpful in your responses." }] }
  821.                };
  822.  
  823.                try {
  824.                    const response = await fetch(API_URL, {
  825.                        method: 'POST',
  826.                        headers: { 'Content-Type': 'application/json' },
  827.                        body: JSON.stringify(payload)
  828.                    });
  829.                    const result = await response.json();
  830.                    hideLoader();
  831.                    const aiResponse = result.candidates[0].content.parts[0].text;
  832.                    addMessageToChat('ai', aiResponse);
  833.                    chatHistory.push({ role: 'model', parts: [{ text: aiResponse }] });
  834.                } catch (error) {
  835.                    hideLoader();
  836.                    addMessageToChat('ai', 'Sorry, I encountered an error. Please try again.');
  837.                    console.error("Gemini API Error:", error);
  838.                }
  839.            });
  840.  
  841.  
  842.            // --- "Quick Answer" Logic ---
  843.            const quickAnswerModal = document.getElementById('quick-answer-modal');
  844.            const quickAnswerBtn = document.getElementById('gemini-quick-answer-btn');
  845.            const quickAnswerClose = document.getElementById('quick-answer-close');
  846.            const quickAnswerOverlay = document.getElementById('quick-answer-overlay');
  847.            const quickAnswerContent = document.getElementById('quick-answer-content');
  848.            const mainSearchInputEl = document.getElementById('main-search-input');
  849.  
  850.            quickAnswerBtn.addEventListener('click', async () => {
  851.                const query = mainSearchInputEl.value.trim();
  852.                if (!query) return;
  853.  
  854.                toggleGeminiModal(quickAnswerModal, true);
  855.                quickAnswerContent.innerHTML = '<div class="gemini-loader flex space-x-1.5 justify-center p-8"> <div class="bounce1 w-3 h-3 bg-purple-500 rounded-full"></div> <div class="bounce2 w-3 h-3 bg-purple-500 rounded-full"></div> <div class="bounce3 w-3 h-3 bg-purple-500 rounded-full"></div> </div>';
  856.                
  857.                const payload = {
  858.                    contents: [{ parts: [{ text: query }] }],
  859.                    tools: [{ "google_search": {} }]
  860.                };
  861.  
  862.                try {
  863.                    const response = await fetch(API_URL, {
  864.                        method: 'POST',
  865.                        headers: { 'Content-Type': 'application/json' },
  866.                        body: JSON.stringify(payload)
  867.                    });
  868.                    const result = await response.json();
  869.                    
  870.                    const candidate = result.candidates?.[0];
  871.                    if (candidate && candidate.content?.parts?.[0]?.text) {
  872.                        const text = candidate.content.parts[0].text;
  873.                        
  874.                        let sourcesHtml = '';
  875.                        const groundingMetadata = candidate.groundingMetadata;
  876.                        if (groundingMetadata && groundingMetadata.groundingAttributions) {
  877.                            const sources = groundingMetadata.groundingAttributions
  878.                                .map(attr => ({ uri: attr.web?.uri, title: attr.web?.title }))
  879.                                .filter(source => source.uri && source.title);
  880.                            
  881.                            if (sources.length > 0) {
  882.                                sourcesHtml = '<h4 class="text-sm font-bold mt-6 mb-2 text-gray-600">Sources:</h4><div class="space-y-2">';
  883.                                sources.forEach((source, index) => {
  884.                                    sourcesHtml += `<a href="${source.uri}" target="_blank" class="flex items-start text-xs text-blue-600 hover:underline"><span class="mr-2">${index+1}.</span><p>${source.title}</p></a>`;
  885.                                });
  886.                                sourcesHtml += '</div>';
  887.                            }
  888.                        }
  889.  
  890.                        quickAnswerContent.innerHTML = `<div class="prose max-w-none">${text.replace(/\n/g, '<br>')}</div>${sourcesHtml}`;
  891.                    } else {
  892.                         throw new Error("Invalid response structure from API.");
  893.                    }
  894.                } catch (error) {
  895.                    quickAnswerContent.innerHTML = '<p class="text-red-600 text-center">Sorry, could not fetch an answer. Please try again.</p>';
  896.                    console.error("Gemini Quick Answer Error:", error);
  897.                }
  898.            });
  899.  
  900.            quickAnswerClose.addEventListener('click', () => toggleGeminiModal(quickAnswerModal, false));
  901.            quickAnswerOverlay.addEventListener('click', () => toggleGeminiModal(quickAnswerModal, false));
  902.  
  903.            // --- DASHAIN CONFETTI SCRIPT ---
  904.            const confettiContainer = document.getElementById('confetti-container');
  905.            const colors = ['#D92E3D', '#FFD600', '#880E4F', '#315EFB'];
  906.            if(confettiContainer) {
  907.                for (let i = 0; i < 100; i++) {
  908.                    const confetti = document.createElement('div');
  909.                    confetti.classList.add('confetti');
  910.                    confetti.style.left = `${Math.random() * 100}vw`;
  911.                    const size = `${Math.random() * 10 + 5}px`;
  912.                    confetti.style.width = size;
  913.                    confetti.style.height = size;
  914.                    confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
  915.                    confetti.style.borderRadius = Math.random() > 0.5 ? '50%' : '0';
  916.                    confetti.style.animationDuration = `${Math.random() * 5 + 8}s`;
  917.                    confetti.style.animationDelay = `${Math.random() * 5}s`;
  918.                    confettiContainer.appendChild(confetti);
  919.                }
  920.            }
  921.  
  922.  
  923.            // --- INITIALIZATION ---
  924.            populateStaticTrends();
  925.            populateRadialMenu();
  926.            lucide.createIcons();
  927.        });
  928.    </script>
  929. </body>
  930. </html>
  931.  
  932.  
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda