<?php 
    $lang = session('locale', 'en'); 
    $extensions = \Illuminate\Support\Facades\DB::table('subdomain_settings')->where('status', 'active')->orderBy('domain_name')->get();
?>
<!DOCTYPE html>
<html lang="<?php echo e($lang); ?>" class="dark">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title><?php echo e(\App\Models\Setting::val('site_name', 'AN DOMAIN')); ?> - <?php echo e($lang == 'bn' ? 'প্রিমিয়াম ডোমেইন সার্ভিস' : 'Premium Identity For Your Projects'); ?></title>
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            darkMode: 'class',
            theme: { extend: {} }
        }
        if (localStorage.getItem('theme') === 'light') {
            document.documentElement.classList.remove('dark');
        }
    </script>
    <style>
        body { font-family: 'Plus Jakarta Sans', sans-serif; overflow-x: hidden; transition: background-color 0.3s, color 0.3s; }
        .glass { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); }
        .dark .glass { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); }
        .hero-gradient { background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, transparent 70%); }
    </style>
</head>
<body class="bg-slate-50 text-slate-900 dark:bg-[#020617] dark:text-f8fafc antialiased selection:bg-emerald-500 selection:text-white relative">

    <div class="fixed inset-0 hero-gradient pointer-events-none z-0"></div>

    <nav class="relative z-50 flex items-center justify-between px-6 lg:px-20 py-4 border-b border-slate-200 dark:border-white/5 bg-white/80 dark:bg-[#020617]/80 backdrop-blur-md sticky top-0">
        <div class="flex items-center gap-3">
            <?php if(\App\Models\Setting::val('site_logo')): ?>
                <img src="<?php echo e(asset(\App\Models\Setting::val('site_logo'))); ?>" alt="Logo" class="h-9 object-contain">
            <?php else: ?>
                <div class="w-10 h-10 bg-gradient-to-br from-blue-600 to-emerald-500 rounded-xl flex items-center justify-center text-white font-bold text-xl shadow-lg shadow-emerald-500/20"><i class="fas fa-rocket"></i></div>
                <span class="text-2xl font-extrabold tracking-tighter text-slate-900 dark:text-white"><?php echo e(\App\Models\Setting::val('site_name', 'AN DOMAIN')); ?></span>
            <?php endif; ?>
        </div>

        <div class="hidden md:flex items-center gap-6 text-sm font-semibold text-slate-600 dark:text-slate-400">
            <a href="#domains" class="hover:text-emerald-500 transition-colors"><?php echo e($lang == 'bn' ? 'প্রাইসিং' : 'Pricing'); ?></a>
            <a href="#contact" class="hover:text-emerald-500 transition-colors"><?php echo e($lang == 'bn' ? 'যোগাযোগ' : 'Contact'); ?></a>
            
            <div class="h-6 w-px bg-slate-300 dark:bg-slate-700"></div> 

            <button onclick="toggleTheme()" class="text-lg hover:text-emerald-500 transition-colors focus:outline-none" title="Toggle Theme">
                <i class="fas fa-moon dark:hidden"></i>
                <i class="fas fa-sun hidden dark:inline text-yellow-400"></i>
            </button>

            <a href="<?php echo e(route('lang.switch', $lang == 'en' ? 'bn' : 'en')); ?>" class="hover:text-emerald-500 transition-colors font-bold border border-slate-300 dark:border-slate-700 px-2 py-1 rounded-md">
                <?php echo e($lang == 'en' ? 'BN' : 'EN'); ?>

            </a>

            <?php if(auth()->guard()->check()): ?>
                <a href="<?php echo e(route('dashboard')); ?>" class="bg-slate-900 dark:bg-slate-800 text-white px-5 py-2.5 rounded-xl transition-all"><?php echo e($lang == 'bn' ? 'ড্যাশবোর্ড' : 'Dashboard'); ?></a>
            <?php else: ?>
                <a href="<?php echo e(route('login')); ?>" class="hover:text-emerald-500 transition-colors"><?php echo e($lang == 'bn' ? 'লগইন' : 'Sign In'); ?></a>
                <a href="<?php echo e(route('register')); ?>" class="bg-emerald-500 hover:bg-emerald-600 text-white px-5 py-2.5 rounded-xl transition-all shadow-lg shadow-emerald-500/25"><?php echo e($lang == 'bn' ? 'একাউন্ট খুলুন' : 'Get Started'); ?></a>
            <?php endif; ?>
        </div>

        <button onclick="toggleMobileMenu()" class="md:hidden text-2xl text-slate-700 dark:text-white focus:outline-none">
            <i class="fas fa-bars" id="menuIcon"></i>
        </button>
    </nav>

    <div id="mobileMenu" class="hidden md:hidden fixed inset-x-0 top-[72px] bg-white dark:bg-[#0f172a] border-b border-slate-200 dark:border-white/5 shadow-2xl z-40 p-6 flex flex-col gap-4">
        <div class="flex justify-between items-center border-b border-slate-200 dark:border-slate-800 pb-4">
            <span class="font-bold text-slate-600 dark:text-slate-300"><?php echo e($lang == 'bn' ? 'থিম পরিবর্তন' : 'Switch Theme'); ?></span>
            <button onclick="toggleTheme()" class="text-2xl text-slate-700 dark:text-yellow-400"><i class="fas fa-moon dark:hidden"></i><i class="fas fa-sun hidden dark:inline"></i></button>
        </div>
        <div class="flex justify-between items-center border-b border-slate-200 dark:border-slate-800 pb-4">
            <span class="font-bold text-slate-600 dark:text-slate-300"><?php echo e($lang == 'bn' ? 'ভাষা পরিবর্তন' : 'Change Language'); ?></span>
            <a href="<?php echo e(route('lang.switch', $lang == 'en' ? 'bn' : 'en')); ?>" class="font-bold bg-slate-200 dark:bg-slate-800 px-3 py-1 rounded-lg text-slate-800 dark:text-white"><?php echo e($lang == 'en' ? 'বাংলা' : 'English'); ?></a>
        </div>
        <?php if(auth()->guard()->check()): ?>
            <a href="<?php echo e(route('dashboard')); ?>" class="bg-blue-600 text-white text-center font-bold py-3 rounded-xl"><?php echo e($lang == 'bn' ? 'ড্যাশবোর্ডে যান' : 'Go to Dashboard'); ?></a>
        <?php else: ?>
            <a href="<?php echo e(route('login')); ?>" class="bg-slate-200 dark:bg-slate-800 text-slate-800 dark:text-white text-center font-bold py-3 rounded-xl"><?php echo e($lang == 'bn' ? 'লগইন করুন' : 'Sign In'); ?></a>
            <a href="<?php echo e(route('register')); ?>" class="bg-emerald-500 text-white text-center font-bold py-3 rounded-xl"><?php echo e($lang == 'bn' ? 'নতুন একাউন্ট খুলুন' : 'Create Account'); ?></a>
        <?php endif; ?>
    </div>

    <section class="relative z-10 px-6 lg:px-16 py-20 flex flex-col items-center text-center min-h-[70vh] justify-center">
        <div class="inline-flex items-center gap-2 bg-emerald-100 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/20 text-emerald-600 dark:text-emerald-400 font-bold px-4 py-2 rounded-full text-[11px] uppercase tracking-[0.2em] mb-6">
            <span class="relative flex h-2 w-2"><span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span><span class="relative inline-flex rounded-full h-2 w-2 bg-emerald-500"></span></span>
            <?php echo e($lang == 'bn' ? 'লাইভ ডোমেইন চেক' : 'Live Domain Search'); ?>

        </div>
        <h1 class="text-4xl md:text-6xl lg:text-7xl font-black tracking-tight mb-4 text-slate-900 dark:text-white">
            <?php echo $lang == 'bn' ? 'আপনার প্রজেক্টের <br><span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-500 to-emerald-500">পারফেক্ট ডোমেইন</span>' : 'Find Your Perfect <br><span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-500 to-emerald-500">Identity.</span>'; ?>

        </h1>
        <p class="text-slate-600 dark:text-slate-400 max-w-2xl mb-10">
            <?php echo e($lang == 'bn' ? 'সার্চ করে দেখুন আপনার পছন্দের নামটি এভেইলেবল আছে কিনা। সাথে সাথেই কিনে নিতে পারবেন।' : 'Search availability instantly. Get full DNS control and Cloudflare support.'); ?>

        </p>

        <div class="w-full max-w-3xl bg-white dark:bg-[#0f172a] p-3 rounded-2xl shadow-xl border border-slate-200 dark:border-white/10 flex flex-col sm:flex-row gap-3 z-20">
            <div class="flex-1 flex items-center bg-slate-50 dark:bg-slate-900/50 rounded-xl px-5 py-4 border border-slate-200 dark:border-slate-800 focus-within:border-emerald-500 transition-colors">
                <i class="fas fa-globe text-slate-400 mr-3 text-xl"></i>
                <input type="text" id="liveSearchInput" placeholder="<?php echo e($lang == 'bn' ? 'যেকোনো নাম লিখুন (e.g. myshop)' : 'Type a name (e.g. myshop)'); ?>" class="bg-transparent w-full outline-none text-slate-900 dark:text-white font-bold text-lg" onkeypress="if(event.key === 'Enter') checkLiveDomain()">
            </div>
            <button onclick="checkLiveDomain()" id="searchBtn" class="bg-emerald-500 hover:bg-emerald-600 text-white font-bold px-8 py-4 sm:py-0 rounded-xl transition-all shadow-lg flex items-center justify-center gap-2 text-lg">
                <span id="btnText"><?php echo e($lang == 'bn' ? 'সার্চ করুন' : 'Search'); ?></span>
                <i class="fas fa-search" id="btnIcon"></i>
            </button>
        </div>

        <div id="searchResultsArea" class="w-full max-w-3xl mt-6 hidden text-left z-20">
            <div class="bg-white dark:bg-[#0f172a] rounded-2xl shadow-2xl border border-slate-200 dark:border-white/10 overflow-hidden">
                <div class="p-4 bg-slate-100 dark:bg-slate-800/50 border-b border-slate-200 dark:border-white/5 font-bold text-slate-700 dark:text-white flex justify-between items-center">
                    <span><i class="fas fa-list-ul mr-2 text-emerald-500"></i> <?php echo e($lang == 'bn' ? 'সার্চ রেজাল্ট' : 'Search Results'); ?></span>
                    <button onclick="document.getElementById('searchResultsArea').classList.add('hidden')" class="text-slate-400 hover:text-red-500"><i class="fas fa-times"></i></button>
                </div>
                <div id="resultsList" class="divide-y divide-slate-100 dark:divide-slate-800/50 max-h-[400px] overflow-y-auto">
                    </div>
            </div>
        </div>
    </section>

    <section id="domains" class="relative z-10 px-6 lg:px-20 py-20 bg-slate-50 dark:bg-[#0f172a]/50 border-y border-slate-200 dark:border-white/5">
        <div class="text-center mb-16">
            <h2 class="text-3xl md:text-4xl font-bold mb-4 text-slate-900 dark:text-white"><?php echo e($lang == 'bn' ? 'প্রাইসিং প্ল্যান' : 'Extensions & Pricing'); ?></h2>
            <p class="text-slate-600 dark:text-slate-400"><?php echo e($lang == 'bn' ? 'সরাসরি এখান থেকেও ডোমেইন কিনতে পারেন।' : 'You can also browse and buy directly from the list.'); ?></p>
        </div>

        <div class="max-w-5xl mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
            <?php $__empty_1 = true; $__currentLoopData = $extensions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ext): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="bg-white dark:bg-transparent dark:glass p-6 rounded-2xl border border-slate-200 dark:border-white/5 hover:border-emerald-500 transition-all group shadow-sm flex flex-col justify-between">
                    <div class="flex justify-between items-start mb-4">
                        <div>
                            <span class="text-slate-900 dark:text-white font-black text-2xl block">.<?php echo e($ext->domain_name); ?></span>
                            <span class="text-emerald-500 text-xs font-bold mt-2 inline-block bg-emerald-100 dark:bg-emerald-500/10 px-2 py-1 rounded">
                                <i class="fas fa-check-circle mr-1"></i> <?php echo e($lang == 'bn' ? 'এভেইলেবল' : 'Available'); ?>

                            </span>
                        </div>
                        <div class="w-10 h-10 bg-slate-100 dark:bg-slate-800 rounded-full flex items-center justify-center text-slate-400 group-hover:text-emerald-500 transition-colors">
                            <i class="fas fa-globe"></i>
                        </div>
                    </div>
                    <div class="flex justify-between items-end mt-4 pt-4 border-t border-slate-100 dark:border-white/5">
                        <div>
                            <span class="text-xl font-bold text-slate-900 dark:text-white"><?php echo e($ext->price_per_month == 0 ? 'Free' : '৳' . number_format($ext->price_per_month, 2)); ?><span class="text-sm text-slate-500 font-normal">/mo</span></span>
                        </div>
                        <a href="<?php echo e(route('user.domain.buy')); ?>?ext=<?php echo e($ext->domain_name); ?>" class="bg-slate-900 dark:bg-blue-600 text-white text-sm font-bold px-5 py-2 rounded-lg hover:bg-slate-800 dark:hover:bg-blue-500 transition-colors">
                            <?php echo e($lang == 'bn' ? 'কিনুন' : 'Buy'); ?>

                        </a>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="col-span-full text-center text-slate-500 py-10">No extensions available.</div>
            <?php endif; ?>
        </div>
    </section>

    <section id="contact" class="relative z-10 px-6 lg:px-20 py-24 bg-white dark:bg-[#020617] border-t border-slate-200 dark:border-white/5">
        <div class="max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-2 gap-16 items-start">
            <div>
                <h2 class="text-5xl font-black mb-8 leading-tight text-slate-900 dark:text-white">
                    <?php echo $lang == 'bn' ? 'যোগাযোগ করুন <br><span class="text-emerald-500 underline decoration-emerald-500/30 underline-offset-8">Nerob Islam</span> এর সাথে।' : 'Get in Touch <br>With <span class="text-emerald-500 underline decoration-emerald-500/30 underline-offset-8">Nerob Islam.</span>'; ?>

                </h2>
                <p class="text-slate-600 dark:text-slate-400 text-lg mb-10 leading-relaxed">
                    <?php echo e($lang == 'bn' ? 'যেকোনো প্রশ্ন, API বা কাস্টম সল্যুশনের জন্য সরাসরি ডেভেলপারের সাথে যোগাযোগ করতে পারেন।' : 'Have questions or need custom solutions? Connect with the developer directly for any support, API access, or enterprise inquiries.'); ?>

                </p>
                
                <div class="grid grid-cols-1 sm:grid-cols-2 gap-6">
                    <a href="mailto:Contact@andevbd.com" class="flex items-center gap-4 bg-slate-50 dark:bg-transparent dark:glass p-4 rounded-2xl border border-slate-200 dark:border-white/5 hover:bg-slate-100 dark:hover:bg-white/5 transition-colors group">
                        <div class="w-12 h-12 bg-blue-100 dark:bg-blue-500/20 text-blue-600 dark:text-blue-400 rounded-xl flex items-center justify-center text-xl group-hover:scale-110 transition-transform"><i class="fas fa-envelope"></i></div>
                        <div><span class="block text-xs text-slate-500 uppercase font-bold tracking-widest">Email Support</span><span class="text-sm font-bold text-slate-800 dark:text-white">Contact@andevbd.com</span></div>
                    </a>
                    <a href="https://t.me/Nerob_SIR" target="_blank" class="flex items-center gap-4 bg-slate-50 dark:bg-transparent dark:glass p-4 rounded-2xl border border-slate-200 dark:border-white/5 hover:bg-slate-100 dark:hover:bg-white/5 transition-colors group">
                        <div class="w-12 h-12 bg-blue-100 dark:bg-blue-400/20 text-blue-600 dark:text-blue-400 rounded-xl flex items-center justify-center text-xl group-hover:scale-110 transition-transform"><i class="fab fa-telegram-plane"></i></div>
                        <div><span class="block text-xs text-slate-500 uppercase font-bold tracking-widest">Telegram ID</span><span class="text-sm font-bold text-slate-800 dark:text-white">@Nerob_SIR</span></div>
                    </a>
                    <a href="tel:+8809658135288" class="flex items-center gap-4 bg-slate-50 dark:bg-transparent dark:glass p-4 rounded-2xl border border-slate-200 dark:border-white/5 hover:bg-slate-100 dark:hover:bg-white/5 transition-colors group">
                        <div class="w-12 h-12 bg-emerald-100 dark:bg-emerald-500/20 text-emerald-600 dark:text-emerald-400 rounded-xl flex items-center justify-center text-xl group-hover:scale-110 transition-transform"><i class="fas fa-phone-alt"></i></div>
                        <div><span class="block text-xs text-slate-500 uppercase font-bold tracking-widest">Call Center</span><span class="text-sm font-bold text-slate-800 dark:text-white">09658-135288</span></div>
                    </a>
                    <a href="https://andevbd.com" target="_blank" class="flex items-center gap-4 bg-slate-50 dark:bg-transparent dark:glass p-4 rounded-2xl border border-slate-200 dark:border-white/5 hover:bg-slate-100 dark:hover:bg-white/5 transition-colors group">
                        <div class="w-12 h-12 bg-purple-100 dark:bg-purple-500/20 text-purple-600 dark:text-purple-400 rounded-xl flex items-center justify-center text-xl group-hover:scale-110 transition-transform"><i class="fas fa-code"></i></div>
                        <div><span class="block text-xs text-slate-500 uppercase font-bold tracking-widest">Dev Site</span><span class="text-sm font-bold text-slate-800 dark:text-white">AN DEV BD</span></div>
                    </a>
                </div>
            </div>

            <div class="bg-slate-50 dark:bg-transparent dark:glass p-8 md:p-10 rounded-[2rem] border border-slate-200 dark:border-white/5">
                <h3 class="text-2xl font-bold mb-8 flex items-center gap-3 text-slate-900 dark:text-white"><i class="fas fa-link text-emerald-500"></i> <?php echo e($lang == 'bn' ? 'সোশ্যাল নেটওয়ার্ক' : 'Follow Our Network'); ?></h3>
                <div class="space-y-4">
                    <a href="https://fb.com/anwebhost" target="_blank" class="flex items-center justify-between p-4 rounded-xl bg-white dark:bg-slate-900/50 hover:bg-blue-50 dark:hover:bg-blue-600/10 border border-slate-200 dark:border-white/5 transition-all group">
                        <span class="flex items-center gap-3 font-medium text-slate-700 dark:text-slate-300"><i class="fab fa-facebook text-blue-500 group-hover:scale-125 transition-transform text-lg"></i> Facebook Page</span>
                        <i class="fas fa-arrow-right text-slate-400 dark:text-slate-600 text-xs"></i>
                    </a>
                    <a href="https://fb.com/nerobislam0" target="_blank" class="flex items-center justify-between p-4 rounded-xl bg-white dark:bg-slate-900/50 hover:bg-blue-50 dark:hover:bg-blue-600/10 border border-slate-200 dark:border-white/5 transition-all group">
                        <span class="flex items-center gap-3 font-medium text-slate-700 dark:text-slate-300"><i class="fab fa-facebook-messenger text-blue-400 group-hover:scale-125 transition-transform text-lg"></i> Developer Profile</span>
                        <i class="fas fa-arrow-right text-slate-400 dark:text-slate-600 text-xs"></i>
                    </a>
                    <a href="https://nerob.dev" target="_blank" class="flex items-center justify-between p-4 rounded-xl bg-white dark:bg-slate-900/50 hover:bg-purple-50 dark:hover:bg-purple-600/10 border border-slate-200 dark:border-white/5 transition-all group">
                        <span class="flex items-center gap-3 font-medium text-slate-700 dark:text-slate-300"><i class="fas fa-user-circle text-purple-500 group-hover:scale-125 transition-transform text-lg"></i> Dev Portfolio</span>
                        <i class="fas fa-arrow-right text-slate-400 dark:text-slate-600 text-xs"></i>
                    </a>
                    <a href="https://t.me/andevbd" target="_blank" class="flex items-center justify-between p-4 rounded-xl bg-white dark:bg-slate-900/50 hover:bg-emerald-50 dark:hover:bg-emerald-500/10 border border-slate-200 dark:border-white/5 transition-all group">
                        <span class="flex items-center gap-3 font-medium text-slate-700 dark:text-slate-300"><i class="fas fa-bullhorn text-emerald-500 group-hover:scale-125 transition-transform text-lg"></i> TG Official Channel</span>
                        <i class="fas fa-arrow-right text-slate-400 dark:text-slate-600 text-xs"></i>
                    </a>
                </div>
            </div>
        </div>
    </section>

    <footer class="py-6 border-t border-slate-200 dark:border-white/5 text-center bg-slate-50 dark:bg-[#020617]">
        <div class="text-slate-500 text-xs font-bold uppercase tracking-widest">&copy; <?php echo e(date('Y')); ?> <?php echo e(\App\Models\Setting::val('site_name', 'AN DOMAIN')); ?>. All rights reserved.</div>
    </footer>

    <script>
        const lang = "<?php echo e($lang); ?>";
        const buyUrl = "<?php echo e(route('user.domain.buy')); ?>";

        // Theme Toggle
        function toggleTheme() {
            const html = document.documentElement;
            if (html.classList.contains('dark')) {
                html.classList.remove('dark');
                localStorage.setItem('theme', 'light');
            } else {
                html.classList.add('dark');
                localStorage.setItem('theme', 'dark');
            }
        }

        // Mobile Menu Toggle
        function toggleMobileMenu() {
            const menu = document.getElementById('mobileMenu');
            const icon = document.getElementById('menuIcon');
            if (menu.classList.contains('hidden')) {
                menu.classList.remove('hidden');
                icon.classList.replace('fa-bars', 'fa-times');
            } else {
                menu.classList.add('hidden');
                icon.classList.replace('fa-times', 'fa-bars');
            }
        }

        // AJAX Live Domain Check
        async function checkLiveDomain() {
            const input = document.getElementById('liveSearchInput').value.trim();
            if (!input) return;

            const btnIcon = document.getElementById('btnIcon');
            const btnText = document.getElementById('btnText');
            const resultsArea = document.getElementById('searchResultsArea');
            const resultsList = document.getElementById('resultsList');

            // Loading state
            btnIcon.className = "fas fa-spinner fa-spin";
            btnText.innerText = lang === 'bn' ? 'খুঁজছি...' : 'Checking...';
            resultsList.innerHTML = `<div class="p-8 text-center text-slate-500"><i class="fas fa-circle-notch fa-spin text-3xl mb-3 text-emerald-500"></i><br>Searching database...</div>`;
            resultsArea.classList.remove('hidden');

            try {
                const response = await fetch(`<?php echo e(route('domain.check.live')); ?>?domain=${input}`);
                const data = await response.json();
                
                resultsList.innerHTML = ''; 

                if (data.length === 0) {
                    resultsList.innerHTML = `<div class="p-6 text-center text-red-500 font-bold">No extensions found in database.</div>`;
                } else {
                    data.forEach(item => {
                        const statusBadge = item.available 
                            ? `<span class="bg-emerald-100 dark:bg-emerald-500/20 text-emerald-600 dark:text-emerald-400 text-xs font-bold px-2.5 py-1 rounded uppercase tracking-wider"><i class="fas fa-check-circle mr-1"></i> ${lang === 'bn' ? 'ফাঁকা আছে' : 'Available'}</span>`
                            : `<span class="bg-red-100 dark:bg-red-500/20 text-red-600 dark:text-red-400 text-xs font-bold px-2.5 py-1 rounded uppercase tracking-wider"><i class="fas fa-times-circle mr-1"></i> ${lang === 'bn' ? 'বিক্রি হয়ে গেছে' : 'Taken'}</span>`;
                        
                        const actionBtn = item.available
                            ? `<a href="${buyUrl}?domain=${input}&ext=${item.extension}" class="bg-blue-600 hover:bg-blue-700 text-white text-sm font-bold px-4 py-2 rounded-lg shadow-md transition-all whitespace-nowrap">${lang === 'bn' ? 'কিনুন ৳'+item.price : 'Buy ৳'+item.price}</a>`
                            : `<button disabled class="bg-slate-200 dark:bg-slate-800 text-slate-400 text-sm font-bold px-4 py-2 rounded-lg cursor-not-allowed whitespace-nowrap">${lang === 'bn' ? 'কেনা যাবে না' : 'Unavailable'}</button>`;

                        resultsList.innerHTML += `
                            <div class="p-4 sm:p-5 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 hover:bg-slate-50 dark:hover:bg-slate-800/30 transition-colors border-b border-slate-100 dark:border-white/5 last:border-0">
                                <div>
                                    <div class="text-lg font-black text-slate-800 dark:text-white mb-1">${item.full_domain}</div>
                                    ${statusBadge}
                                </div>
                                <div>${actionBtn}</div>
                            </div>
                        `;
                    });
                }
            } catch (error) {
                resultsList.innerHTML = `<div class="p-6 text-center text-red-500 font-bold">Error connecting to server.</div>`;
            }

            // Restore button state
            btnIcon.className = "fas fa-search";
            btnText.innerText = lang === 'bn' ? 'সার্চ করুন' : 'Search';
        }
    </script>
</body>
</html>
<?php /**PATH /home/hhhnbari/public_html/resources/views/welcome.blade.php ENDPATH**/ ?>