{"id":26,"date":"2026-05-17T07:42:03","date_gmt":"2026-05-17T07:42:03","guid":{"rendered":"https:\/\/tinbamien.com\/?page_id=26"},"modified":"2026-05-17T07:56:36","modified_gmt":"2026-05-17T07:56:36","slug":"26-2","status":"publish","type":"page","link":"https:\/\/tinbamien.com\/?page_id=26","title":{"rendered":""},"content":{"rendered":"\n<!-- Top Navigation Bar -->\n<nav class=\"border-b border-zinc-900 bg-black\/90 backdrop-blur-md sticky top-0 z-50 px-4 py-3.5\">\n    <div class=\"max-w-7xl mx-auto flex items-center justify-between\">\n        <div class=\"flex items-center space-x-2.5\">\n            <div class=\"w-8 h-8 bg-white text-black rounded-full flex items-center justify-center font-black text-lg shadow-md\">\n                @\n            <\/div>\n            <div>\n                <h1 class=\"font-bold text-sm md:text-base tracking-tight text-white leading-none\">THREADS CHECKER<\/h1>\n                <span class=\"text-[9px] text-emerald-400 font-medium tracking-wide flex items-center gap-1 mt-0.5\">\n                    <span class=\"w-1.5 h-1.5 bg-emerald-500 rounded-full animate-pulse\"><\/span>\n                    Mobile &#038; Desktop Ready\n                <\/span>\n            <\/div>\n        <\/div>\n        \n        <button onclick=\"clearDatabase()\" class=\"text-xs text-rose-400 hover:text-rose-300 transition-all border border-rose-950\/30 px-2.5 py-1.5 rounded-lg bg-rose-950\/20 active:scale-95\">\n            <i class=\"fa-solid fa-trash-can mr-1\"><\/i> X\u00f3a DB\n        <\/button>\n    <\/div>\n<\/nav>\n\n<main class=\"max-w-7xl mx-auto px-4 mt-4\">\n    \n    <!-- Live Statistics Layout Grid (Adaptive Mobile 2x2+1 vs Desktop 5 columns) -->\n    <div class=\"grid grid-cols-2 md:grid-cols-5 gap-3 mb-5\">\n        <div class=\"bg-zinc-950 border border-zinc-900 rounded-xl p-3 flex flex-col justify-between\">\n            <span class=\"text-zinc-500 text-[10px] font-bold uppercase tracking-wider\">T\u1ed5ng \u0110\u00e3 Check<\/span>\n            <span id=\"stat-total\" class=\"text-2xl font-black mt-1 text-white\">0<\/span>\n        <\/div>\n        <div class=\"bg-zinc-950 border border-zinc-900 rounded-xl p-3 flex flex-col justify-between\">\n            <span class=\"text-emerald-400 text-[10px] font-bold uppercase tracking-wider flex items-center gap-1\">\n                <span class=\"w-1.5 h-1.5 bg-emerald-400 rounded-full\"><\/span> LIVE\n            <\/span>\n            <span id=\"stat-live\" class=\"text-2xl font-black mt-1 text-emerald-400\">0<\/span>\n        <\/div>\n        <div class=\"bg-zinc-950 border border-zinc-900 rounded-xl p-3 flex flex-col justify-between\">\n            <span class=\"text-rose-500 text-[10px] font-bold uppercase tracking-wider flex items-center gap-1\">\n                <span class=\"w-1.5 h-1.5 bg-rose-500 rounded-full\"><\/span> DEAD\n            <\/span>\n            <span id=\"stat-dead\" class=\"text-2xl font-black mt-1 text-rose-500\">0<\/span>\n        <\/div>\n        <div class=\"bg-zinc-950 border border-zinc-900 rounded-xl p-3 flex flex-col justify-between\">\n            <span class=\"text-amber-400 text-[10px] font-bold uppercase tracking-wider flex items-center gap-1\">\n                <i class=\"fa-solid fa-spinner animate-spin text-[8px]\"><\/i> \u0110ANG CH\u1ea0Y\n            <\/span>\n            <span id=\"stat-checking\" class=\"text-2xl font-black mt-1 text-amber-400\">0<\/span>\n        <\/div>\n        <div class=\"col-span-2 md:col-span-1 bg-zinc-950 border border-zinc-900 rounded-xl p-3 flex flex-col justify-between\">\n            <span class=\"text-zinc-400 text-[10px] font-bold uppercase tracking-wider\">Ti\u1ebfn \u0110\u1ed9 Check<\/span>\n            <div class=\"flex items-center justify-between gap-2 mt-1\">\n                <span id=\"stat-percent\" class=\"text-lg font-black text-white\">0%<\/span>\n                <div class=\"flex-grow bg-zinc-900 rounded-full h-2\">\n                    <div id=\"stat-progress-bar\" class=\"bg-white h-2 rounded-full transition-all duration-300\" style=\"width: 0%\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Mobile Navigation Tabs (Only visible on small viewports) -->\n    <div class=\"flex md:hidden border-b border-zinc-900 mb-5 bg-zinc-950\/40 p-1 rounded-xl\">\n        <button onclick=\"switchTab('tab-control')\" id=\"btn-tab-control\" class=\"flex-1 py-2 text-xs font-semibold rounded-lg text-center bg-zinc-900 text-white transition-all\">\n            <i class=\"fa-solid fa-sliders mr-1\"><\/i> B\u1ea3ng \u0110i\u1ec1u Khi\u1ec3n\n        <\/button>\n        <button onclick=\"switchTab('tab-console')\" id=\"btn-tab-console\" class=\"flex-1 py-2 text-xs font-semibold rounded-lg text-center text-zinc-400 hover:text-white transition-all\">\n            <i class=\"fa-solid fa-terminal mr-1\"><\/i> Log Ch\u1ea1y\n        <\/button>\n        <button onclick=\"switchTab('tab-database')\" id=\"btn-tab-database\" class=\"flex-1 py-2 text-xs font-semibold rounded-lg text-center text-zinc-400 hover:text-white transition-all\">\n            <i class=\"fa-solid fa-database mr-1\"><\/i> D\u1eef Li\u1ec7u\n        <\/button>\n    <\/div>\n\n    <!-- Main Body Grid Structure -->\n    <div class=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n        \n        <!-- COLUMN 1: CONTROLS & CONFIG (Tab 1 on Mobile) -->\n        <div id=\"section-tab-control\" class=\"mobile-tab-content block lg:block space-y-6\">\n            <!-- Textarea and Inputs -->\n            <div class=\"bg-zinc-950 border border-zinc-900 rounded-2xl p-4 md:p-5\">\n                <div class=\"flex items-center justify-between mb-3\">\n                    <label class=\"block text-xs font-bold uppercase tracking-wider text-zinc-300\">Nh\u1eadp T\u00e0i Kho\u1ea3n Threads<\/label>\n                    <span class=\"text-[10px] text-zinc-500\">M\u1ed7i t\u00e0i kho\u1ea3n m\u1ed9t h\u00e0ng<\/span>\n                <\/div>\n                \n                <textarea id=\"account-input\" rows=\"8\" \n                    class=\"w-full bg-black border border-zinc-900 rounded-xl p-3 text-xs md:text-sm text-zinc-300 focus:outline-none focus:border-zinc-700 focus:ring-1 focus:ring-zinc-800 font-mono transition-all placeholder-zinc-700\"\n                    placeholder=\"V\u00ed d\u1ee5:&#10;taylorswift&#10;zuck&#10;cristiano|password&#10;cuong_pro:my_password123\"><\/textarea>\n                \n                <!-- Advanced Configuration Area -->\n                <div class=\"mt-4 space-y-4\">\n                    <div>\n                        <span class=\"block text-[10px] font-bold uppercase tracking-wider text-zinc-500 mb-2\">Ch\u1ebf \u0110\u1ed9 Check Tr\u1ef1c Ti\u1ebfp<\/span>\n                        <div class=\"grid grid-cols-2 gap-2\">\n                            <button type=\"button\" id=\"btn-mode-real\" onclick=\"setMode('real')\" \n                                class=\"py-2.5 px-3 text-[11px] font-semibold rounded-xl border border-zinc-900 bg-black text-zinc-400 hover:text-white active:scale-95 transition-all flex items-center justify-center gap-1.5\">\n                                <i class=\"fa-solid fa-globe\"><\/i> Ch\u1ea1y Th\u1eadt (Proxy)\n                            <\/button>\n                            <button type=\"button\" id=\"btn-mode-mock\" onclick=\"setMode('mock')\" \n                                class=\"py-2.5 px-3 text-[11px] font-semibold rounded-xl border border-zinc-900 bg-black text-zinc-400 hover:text-white active:scale-95 transition-all flex items-center justify-center gap-1.5\">\n                                <i class=\"fa-solid fa-wand-magic-sparkles\"><\/i> Ch\u1ea1y Gi\u1ea3 L\u1eadp\n                            <\/button>\n                        <\/div>\n                    <\/div>\n\n                    <!-- Configs Details (Toggleable) -->\n                    <div id=\"real-settings-panel\" class=\"hidden p-3.5 bg-black border border-zinc-900 rounded-xl space-y-3\">\n                        <div>\n                            <label class=\"block text-[10px] font-semibold text-zinc-400 mb-1\">CORS Proxy Bypass Link<\/label>\n                            <input id=\"proxy-url\" type=\"text\" value=\"https:\/\/cors-anywhere.herokuapp.com\/\" \n                                class=\"w-full bg-zinc-950 border border-zinc-900 rounded-lg px-2.5 py-1.5 text-xs text-zinc-300 font-mono focus:outline-none focus:border-zinc-800\">\n                            <p class=\"text-[9px] text-zinc-500 mt-1\">S\u1eed d\u1ee5ng proxy m\u1edf \u0111\u1ec3 tr\u00e1nh l\u1ed7i tr\u00ecnh duy\u1ec7t ch\u1eb7n g\u1eedi request ch\u00e9o (CORS).<\/p>\n                        <\/div>\n                        <div class=\"grid grid-cols-2 gap-3\">\n                            <div>\n                                <label class=\"block text-[10px] text-zinc-400 mb-1\">S\u1ed1 lu\u1ed3ng song song<\/label>\n                                <input id=\"threads-limit\" type=\"number\" value=\"3\" min=\"1\" max=\"10\" \n                                    class=\"w-full bg-zinc-950 border border-zinc-900 rounded-lg px-2.5 py-1.5 text-xs text-zinc-300 focus:outline-none\">\n                            <\/div>\n                            <div>\n                                <label class=\"block text-[10px] text-zinc-400 mb-1\">\u0110\u1ed9 tr\u1ec5 lu\u1ed3ng (ms)<\/label>\n                                <input id=\"check-delay\" type=\"number\" value=\"1200\" min=\"0\" step=\"100\" \n                                    class=\"w-full bg-zinc-950 border border-zinc-900 rounded-lg px-2.5 py-1.5 text-xs text-zinc-300 focus:outline-none\">\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n\n                <!-- Operational Large Buttons -->\n                <div class=\"mt-5 grid grid-cols-2 gap-3\">\n                    <button id=\"btn-start\" onclick=\"startChecking()\" \n                        class=\"py-3 px-4 bg-white hover:bg-zinc-200 active:scale-95 text-black font-bold rounded-xl text-xs md:text-sm transition-all shadow-md flex items-center justify-center gap-2\">\n                        <i class=\"fa-solid fa-play\"><\/i> B\u1eaeT \u0110\u1ea6U CHECK\n                    <\/button>\n                    <button id=\"btn-stop\" onclick=\"stopChecking()\" disabled \n                        class=\"py-3 px-4 bg-zinc-900 text-zinc-500 font-bold rounded-xl text-xs md:text-sm transition-all cursor-not-allowed flex items-center justify-center gap-2\">\n                        <i class=\"fa-solid fa-stop\"><\/i> D\u1eeaNG L\u1ea0I\n                    <\/button>\n                <\/div>\n            <\/div>\n\n            <!-- Doughnut Status Chart (Adaptive display) -->\n            <div class=\"bg-zinc-950 border border-zinc-900 rounded-2xl p-4 md:p-5\">\n                <h3 class=\"text-xs font-bold uppercase tracking-wider text-zinc-300 mb-3\">T\u1ef7 L\u1ec7 Tr\u1ea1ng Th\u00e1i<\/h3>\n                <div class=\"relative h-40 w-full flex justify-center items-center\">\n                    <canvas id=\"ratioChart\" class=\"max-w-full h-full\"><\/canvas>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <!-- COLUMN 2 & 3: LIVE CONSOLE & SAVED DB (Tab 2 & 3 on Mobile) -->\n        <!-- Tab 2: Live Console -->\n        <div id=\"section-tab-console\" class=\"mobile-tab-content hidden lg:block space-y-6\">\n            <div class=\"bg-zinc-950 border border-zinc-900 rounded-2xl p-4 md:p-5\">\n                <div class=\"flex items-center justify-between mb-3 border-b border-zinc-900 pb-3\">\n                    <h3 class=\"text-xs font-bold uppercase tracking-wider text-zinc-200 flex items-center gap-1.5\">\n                        <span class=\"w-2 h-2 rounded-full bg-emerald-500 animate-pulse\"><\/span>\n                        LOG PH\u1ea2N H\u1ed2I TR\u1ef0C TI\u1ebeP\n                    <\/h3>\n                    <button onclick=\"clearConsole()\" class=\"text-[10px] text-zinc-500 hover:text-zinc-300 transition-all\">\n                        <i class=\"fa-solid fa-trash-can mr-1\"><\/i> X\u00f3a log\n                    <\/button>\n                <\/div>\n                <div id=\"live-console\" class=\"h-60 lg:h-96 bg-black border border-zinc-900 rounded-xl p-3.5 overflow-y-auto font-mono text-[11px] space-y-2 text-zinc-500\">\n                    <div class=\"italic text-zinc-600\">H\u1ec7 th\u1ed1ng s\u1eb5n s\u00e0ng. Vui l\u00f2ng b\u1ea5m &#8220;B\u1eaeT \u0110\u1ea6U CHECK&#8221; \u0111\u1ec3 ghi nh\u1eadn ph\u1ea3n h\u1ed3i.<\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <!-- Tab 3: Database & History Operations -->\n        <div id=\"section-tab-database\" class=\"mobile-tab-content hidden lg:block lg:col-span-2 space-y-6\">\n            <div class=\"bg-zinc-950 border border-zinc-900 rounded-2xl p-4 md:p-5\">\n                \n                <!-- Search and filters -->\n                <div class=\"flex flex-col gap-3.5 mb-4 border-b border-zinc-900 pb-4\">\n                    <div>\n                        <h3 class=\"text-sm font-bold text-white flex items-center gap-1.5\">\n                            <i class=\"fa-solid fa-database text-zinc-500 text-xs\"><\/i> C\u01a1 S\u1edf D\u1eef Li\u1ec7u\n                        <\/h3>\n                        <p class=\"text-[11px] text-zinc-500\">To\u00e0n b\u1ed9 t\u00e0i kho\u1ea3n check xong \u0111\u1ec1u t\u1ef1 \u0111\u1ed9ng l\u01b0u tr\u1eef t\u1ea1i \u0111\u00e2y (Local Storage).<\/p>\n                    <\/div>\n                    \n                    <div class=\"grid grid-cols-2 gap-2\">\n                        <div class=\"relative\">\n                            <input id=\"table-search\" oninput=\"renderTable()\" type=\"text\" placeholder=\"T\u00ecm ki\u1ebfm t\u00ean...\" \n                                class=\"w-full bg-black border border-zinc-900 text-xs text-zinc-300 rounded-xl pl-8 pr-3 py-2.5 focus:outline-none focus:border-zinc-700 transition-all\">\n                            <i class=\"fa-solid fa-search absolute left-3 top-3 text-zinc-600 text-[10px]\"><\/i>\n                        <\/div>\n                        <select id=\"table-filter\" onchange=\"renderTable()\" \n                            class=\"w-full bg-black border border-zinc-900 text-xs text-zinc-300 rounded-xl px-2.5 py-2.5 focus:outline-none focus:border-zinc-700\">\n                            <option value=\"all\">T\u1ea5t c\u1ea3 Tr\u1ea1ng th\u00e1i<\/option>\n                            <option value=\"live\">Ch\u1ec9 Live<\/option>\n                            <option value=\"dead\">Ch\u1ec9 Dead<\/option>\n                        <\/select>\n                    <\/div>\n                <\/div>\n\n                <!-- Actions & Exports -->\n                <div class=\"flex flex-wrap items-center justify-between gap-2 mb-4\">\n                    <div class=\"flex gap-2\">\n                        <button onclick=\"exportData('txt', 'live')\" class=\"px-3 py-2 bg-zinc-900 hover:bg-zinc-800 text-[11px] font-bold rounded-lg text-emerald-400 active:scale-95 transition-all flex items-center gap-1\">\n                            <i class=\"fa-solid fa-download\"><\/i> TXT Live\n                        <\/button>\n                        <button onclick=\"exportData('csv', 'all')\" class=\"px-3 py-2 bg-zinc-900 hover:bg-zinc-800 text-[11px] font-bold rounded-lg text-sky-400 active:scale-95 transition-all flex items-center gap-1\">\n                            <i class=\"fa-solid fa-file-csv\"><\/i> Export CSV\n                        <\/button>\n                    <\/div>\n                <\/div>\n\n                <!-- 1. MOBILE LIST VIEW (Responsive Card layout, visible only on mobiles) -->\n                <div class=\"block md:hidden\">\n                    <div id=\"mobile-cards-container\" class=\"space-y-2.5\">\n                        <!-- Dynamic Mobile Cards will be injected here -->\n                        <div class=\"text-center py-6 text-zinc-600 italic text-xs\">Ch\u01b0a c\u00f3 d\u1eef li\u1ec7u.<\/div>\n                    <\/div>\n                <\/div>\n\n                <!-- 2. DESKTOP TABLE VIEW (Visible only on tablets & PCs) -->\n                <div class=\"hidden md:block overflow-x-auto rounded-xl border border-zinc-900\">\n                    <table class=\"min-w-full divide-y divide-zinc-900 text-left text-xs text-zinc-300\">\n                        <thead class=\"bg-black text-zinc-400 font-bold uppercase tracking-wider text-[10px]\">\n                            <tr>\n                                <th class=\"px-4 py-3\">T\u00e0i kho\u1ea3n<\/th>\n                                <th class=\"px-4 py-3\">Chi ti\u1ebft ph\u1ee5<\/th>\n                                <th class=\"px-4 py-3\">Tr\u1ea1ng th\u00e1i<\/th>\n                                <th class=\"px-4 py-3\">Th\u1eddi gian<\/th>\n                                <th class=\"px-4 py-3 text-right\">H\u00e0nh \u0111\u1ed9ng<\/th>\n                            <\/tr>\n                        <\/thead>\n                        <tbody id=\"database-table-body\" class=\"divide-y divide-zinc-900 bg-zinc-950\/40\">\n                            <tr>\n                                <td colspan=\"5\" class=\"px-4 py-8 text-center text-zinc-600 italic\">Ch\u01b0a c\u00f3 d\u1eef li\u1ec7u.<\/td>\n                            <\/tr>\n                        <\/tbody>\n                    <\/table>\n                <\/div>\n\n                <!-- Bottom Pagination Controllers -->\n                <div class=\"flex items-center justify-between mt-4 pt-4 border-t border-zinc-900\">\n                    <span id=\"table-info\" class=\"text-[10px] md:text-xs text-zinc-500\">Hi\u1ec3n th\u1ecb 0\/0 t\u00e0i kho\u1ea3n<\/span>\n                    <div class=\"flex space-x-2\">\n                        <button id=\"btn-prev\" onclick=\"changePage(-1)\" class=\"px-3 py-2 bg-zinc-900 hover:bg-zinc-800 disabled:opacity-30 disabled:pointer-events-none text-zinc-300 text-xs rounded-lg transition-all\">\n                            Tr\u01b0\u1edbc\n                        <\/button>\n                        <button id=\"btn-next\" onclick=\"changePage(1)\" class=\"px-3 py-2 bg-zinc-900 hover:bg-zinc-800 disabled:opacity-30 disabled:pointer-events-none text-zinc-300 text-xs rounded-lg transition-all\">\n                            Ti\u1ebfp\n                        <\/button>\n                    <\/div>\n                <\/div>\n            <\/div>\n\n            <!-- Easy Integration Accordion guide -->\n            <div class=\"bg-zinc-950 border border-zinc-900 rounded-2xl p-4 md:p-5\">\n                <button onclick=\"toggleAccordion('guide-content')\" class=\"w-full flex items-center justify-between text-left focus:outline-none\">\n                    <span class=\"text-xs md:text-sm font-bold uppercase tracking-wider text-zinc-300 flex items-center gap-1.5\">\n                        <i class=\"fa-brands fa-wordpress text-sky-400 text-base\"><\/i>\n                        Nh\u00fang V\u00e0o WordPress Nh\u01b0 Th\u1ebf N\u00e0o?\n                    <\/span>\n                    <i id=\"guide-arrow\" class=\"fa-solid fa-chevron-down text-zinc-500 transition-transform duration-200\"><\/i>\n                <\/button>\n                <div id=\"guide-content\" class=\"hidden mt-4 pt-4 border-t border-zinc-900 text-[11px] md:text-xs text-zinc-400 space-y-3 leading-relaxed\">\n                    <p class=\"font-medium text-zinc-300\">M\u00e3 ngu\u1ed3n n\u00e0y \u0111\u01b0\u1ee3c vi\u1ebft d\u01b0\u1edbi d\u1ea1ng Single HTML \u0111\u1ed9c l\u1eadp n\u00ean b\u1ea1n nh\u00fang tr\u1ef1c ti\u1ebfp c\u1ef1c k\u1ef3 d\u1ec5 d\u00e0ng:<\/p>\n                    <ol class=\"list-decimal list-inside space-y-2\">\n                        <li>Sao ch\u00e9p to\u00e0n b\u1ed9 code trong file n\u00e0y.<\/li>\n                        <li>Truy c\u1eadp WordPress dashboard -> T\u1ea1o m\u1ed9t <strong class=\"text-zinc-200\">Page m\u1edbi<\/strong> (ho\u1eb7c Post).<\/li>\n                        <li>Th\u00eam kh\u1ed1i block t\u00ean l\u00e0 <strong class=\"text-zinc-200\">HTML T\u00f9y Ch\u1ec9nh (Custom HTML)<\/strong> ho\u1eb7c s\u1eed d\u1ee5ng ph\u1ea7n t\u1eed HTML c\u1ee7a c\u00e1c tr\u00ecnh d\u1ef1ng trang nh\u01b0 Elementor, Divi, Beaver.<\/li>\n                        <li>D\u00e1n to\u00e0n b\u1ed9 code v\u00e0o v\u00e0 b\u1ea5m Xu\u1ea5t b\u1ea3n. T\u1ea5t c\u1ea3 tr\u1ea1ng th\u00e1i \u0111\u1ec1u s\u1ebd ch\u1ea1y \u0111\u1ed9c l\u1eadp, t\u1ef1 \u0111\u1ed9ng l\u01b0u th\u00f4ng tin v\u00e0o LocalStorage tr\u00ean website c\u1ee7a b\u1ea1n r\u1ea5t nh\u1eb9 nh\u00e0ng v\u00e0 an to\u00e0n.<\/li>\n                    <\/ol>\n                <\/div>\n            <\/div>\n        <\/div>\n\n    <\/div>\n<\/main>\n\n<!-- Bottom Toast Notifications -->\n<div id=\"toast-container\" class=\"fixed bottom-4 right-4 left-4 md:left-auto z-50 flex flex-col gap-2 max-w-sm\"><\/div>\n\n<!-- Scripts Core Logic -->\n<script>\n    \/\/ Core states\n    let checkingActive = false;\n    let accountsToCheck = [];\n    let currentCheckingIndex = 0;\n    let selectedMode = 'mock'; \n    let dbRecords = []; \n    let ratioChart = null;\n\n    \/\/ Pagination setup\n    let currentPage = 1;\n    const recordsPerPage = 10;\n\n    window.onload = function() {\n        setMode('mock'); \n        loadFromLocalStorage();\n        initializeChart();\n        renderTable();\n        showToast(\"\u0110\u00e3 t\u1ea3i xong\", \"H\u1ec7 th\u1ed1ng check Threads t\u1ed1i \u01b0u mobile s\u1eb5n s\u00e0ng.\", \"success\");\n        \n        \/\/ Adjust mobile display on load\n        if (window.innerWidth < 768) {\n            switchTab('tab-control');\n        }\n    };\n\n    \/\/ Mobile Tabs Switcher\n    function switchTab(tabId) {\n        \/\/ Hide all tab screens\n        document.querySelectorAll('.mobile-tab-content').forEach(element => {\n            element.classList.add('hidden');\n            element.classList.remove('block');\n        });\n\n        \/\/ Show current active tab screen\n        document.getElementById(`section-${tabId}`).classList.remove('hidden');\n        document.getElementById(`section-${tabId}`).classList.add('block');\n\n        \/\/ Set active styles for tab buttons\n        const buttons = ['tab-control', 'tab-console', 'tab-database'];\n        buttons.forEach(bId => {\n            const btn = document.getElementById(`btn-${bId}`);\n            if (bId === tabId) {\n                btn.classList.add('bg-zinc-900', 'text-white');\n                btn.classList.remove('text-zinc-400');\n            } else {\n                btn.classList.remove('bg-zinc-900', 'text-white');\n                btn.classList.add('text-zinc-400');\n            }\n        });\n    }\n\n    \/\/ LocalStorage logic\n    function saveToLocalStorage() {\n        localStorage.setItem('threads_checker_db_mobile', JSON.stringify(dbRecords));\n    }\n\n    function loadFromLocalStorage() {\n        const stored = localStorage.getItem('threads_checker_db_mobile');\n        if (stored) {\n            try {\n                dbRecords = JSON.parse(stored);\n            } catch (e) {\n                dbRecords = [];\n            }\n        } else {\n            dbRecords = [];\n        }\n    }\n\n    \/\/ Stats Chart Configuration\n    function initializeChart() {\n        const ctx = document.getElementById('ratioChart').getContext('2d');\n        \n        const liveCount = dbRecords.filter(r => r.status === 'LIVE').length;\n        const deadCount = dbRecords.filter(r => r.status === 'DEAD').length;\n\n        ratioChart = new Chart(ctx, {\n            type: 'doughnut',\n            data: {\n                labels: ['LIVE', 'DEAD'],\n                datasets: [{\n                    data: [liveCount || 1, deadCount || 0],\n                    backgroundColor: ['#10B981', '#F43F5E'],\n                    borderWidth: 1,\n                    borderColor: '#000000'\n                }]\n            },\n            options: {\n                responsive: true,\n                maintainAspectRatio: false,\n                plugins: {\n                    legend: {\n                        position: 'bottom',\n                        labels: {\n                            color: '#A1A1AA',\n                            font: { size: 10, weight: 'bold' }\n                        }\n                    }\n                },\n                cutout: '75%'\n            }\n        });\n    }\n\n    function updateDashboardStats() {\n        const liveCount = dbRecords.filter(r => r.status === 'LIVE').length;\n        const deadCount = dbRecords.filter(r => r.status === 'DEAD').length;\n\n        document.getElementById('stat-total').innerText = dbRecords.length;\n        document.getElementById('stat-live').innerText = liveCount;\n        document.getElementById('stat-dead').innerText = deadCount;\n\n        if (ratioChart) {\n            ratioChart.data.datasets[0].data = [liveCount === 0 && deadCount === 0 ? 1 : liveCount, deadCount];\n            ratioChart.update();\n        }\n    }\n\n    \/\/ Mode switches (Real check vs simulation)\n    function setMode(mode) {\n        selectedMode = mode;\n        const realBtn = document.getElementById('btn-mode-real');\n        const mockBtn = document.getElementById('btn-mode-mock');\n        const realSettings = document.getElementById('real-settings-panel');\n\n        if (mode === 'real') {\n            realBtn.classList.remove('bg-black', 'text-zinc-400');\n            realBtn.classList.add('bg-white', 'text-black');\n            \n            mockBtn.classList.remove('bg-white', 'text-black');\n            mockBtn.classList.add('bg-black', 'text-zinc-400');\n\n            realSettings.classList.remove('hidden');\n        } else {\n            mockBtn.classList.remove('bg-black', 'text-zinc-400');\n            mockBtn.classList.add('bg-white', 'text-black');\n\n            realBtn.classList.remove('bg-white', 'text-black');\n            realBtn.classList.add('bg-black', 'text-zinc-400');\n\n            realSettings.classList.add('hidden');\n        }\n    }\n\n    \/\/ Interactive Accordion\n    function toggleAccordion(id) {\n        const content = document.getElementById(id);\n        const arrow = document.getElementById('guide-arrow');\n        if (content.classList.contains('hidden')) {\n            content.classList.remove('hidden');\n            arrow.classList.add('rotate-180');\n        } else {\n            content.classList.add('hidden');\n            arrow.classList.remove('rotate-180');\n        }\n    }\n\n    \/\/ Custom mobile-friendly toast messages\n    function showToast(title, message, type = 'success') {\n        const container = document.getElementById('toast-container');\n        const toast = document.createElement('div');\n        \n        let colorClasses = \"bg-zinc-950 border-zinc-800 text-zinc-100\";\n        let icon = '<i class=\"fa-solid fa-circle-info text-sky-400\"><\/i>';\n\n        if (type === 'success') {\n            colorClasses = \"bg-zinc-950 border-emerald-800 text-emerald-200\";\n            icon = '<i class=\"fa-solid fa-circle-check text-emerald-400\"><\/i>';\n        } else if (type === 'error') {\n            colorClasses = \"bg-zinc-950 border-rose-800 text-rose-200\";\n            icon = '<i class=\"fa-solid fa-circle-exclamation text-rose-400\"><\/i>';\n        }\n\n        toast.className = `flex items-start p-3.5 rounded-xl border ${colorClasses} shadow-2xl transition-all duration-300 transform translate-y-5 opacity-0 text-xs`;\n        toast.innerHTML = `\n            <div class=\"flex-shrink-0 mr-2.5 mt-0.5\">${icon}<\/div>\n            <div class=\"flex-grow\">\n                <h4 class=\"font-bold\">${title}<\/h4>\n                <p class=\"text-[10px] text-zinc-400 mt-0.5\">${message}<\/p>\n            <\/div>\n            <button onclick=\"this.parentElement.remove()\" class=\"text-zinc-500 hover:text-zinc-300 ml-2.5 active:scale-90\"><i class=\"fa-solid fa-times\"><\/i><\/button>\n        `;\n\n        container.appendChild(toast);\n        setTimeout(() => {\n            toast.classList.remove('translate-y-5', 'opacity-0');\n        }, 10);\n\n        setTimeout(() => {\n            toast.classList.add('translate-y-[-5px]', 'opacity-0');\n            setTimeout(() => toast.remove(), 300);\n        }, 4000);\n    }\n\n    \/\/ Log visual feedback\n    function appendConsole(message, type = 'info') {\n        const consoleBox = document.getElementById('live-console');\n        const div = document.createElement('div');\n        const timeStr = new Date().toLocaleTimeString();\n        \n        let color = 'text-zinc-500';\n        let icon = '\u2022';\n\n        if (type === 'success') { color = 'text-emerald-400'; icon = '<i class=\"fa-solid fa-check text-[9px]\"><\/i>'; }\n        else if (type === 'error') { color = 'text-rose-400'; icon = '<i class=\"fa-solid fa-xmark text-[9px]\"><\/i>'; }\n        else if (type === 'warn') { color = 'text-amber-400'; icon = '<i class=\"fa-solid fa-circle-notch animate-spin text-[8px]\"><\/i>'; }\n\n        div.className = `flex items-start gap-2 ${color} border-b border-zinc-900\/20 pb-1`;\n        div.innerHTML = `\n            <span class=\"text-zinc-700 text-[10px] shrink-0\">[${timeStr}]<\/span> \n            <span class=\"shrink-0 mt-0.5\">${icon}<\/span> \n            <span class=\"break-all leading-tight\">${message}<\/span>\n        `;\n        \n        consoleBox.appendChild(div);\n        consoleBox.scrollTop = consoleBox.scrollHeight;\n    }\n\n    function clearConsole() {\n        document.getElementById('live-console').innerHTML = '<div class=\"text-zinc-600 italic\">Log \u0111\u00e3 \u0111\u01b0\u1ee3c d\u1ecdn d\u1eb9p tr\u1ed1ng.<\/div>';\n    }\n\n    \/\/ Active thread engine functions\n    function startChecking() {\n        if (checkingActive) return;\n\n        const inputVal = document.getElementById('account-input').value.trim();\n        if (!inputVal) {\n            showToast(\"D\u1eef li\u1ec7u r\u1ed7ng\", \"Vui l\u00f2ng nh\u1eadp t\u00ean t\u00e0i kho\u1ea3n tr\u01b0\u1edbc khi b\u1eaft \u0111\u1ea7u.\", \"error\");\n            return;\n        }\n\n        accountsToCheck = inputVal.split('\\n').map(line => line.trim()).filter(line => line.length > 0);\n        if (accountsToCheck.length === 0) {\n            showToast(\"Kh\u00f4ng h\u1ee3p l\u1ec7\", \"Kh\u00f4ng t\u00ecm th\u1ea5y t\u00e0i kho\u1ea3n n\u00e0o ph\u00f9 h\u1ee3p.\", \"error\");\n            return;\n        }\n\n        checkingActive = true;\n        currentCheckingIndex = 0;\n        \n        \/\/ Adjust buttons UI\n        document.getElementById('btn-start').disabled = true;\n        document.getElementById('btn-start').classList.add('opacity-40', 'cursor-not-allowed');\n        document.getElementById('btn-stop').disabled = false;\n        document.getElementById('btn-stop').classList.remove('bg-zinc-900', 'text-zinc-500', 'cursor-not-allowed');\n        document.getElementById('btn-stop').classList.add('bg-rose-600', 'hover:bg-rose-700', 'text-white', 'active:scale-95');\n\n        clearConsole();\n        appendConsole(`B\u1eaft \u0111\u1ea7u ch\u1ea1y ti\u1ebfn tr\u00ecnh ki\u1ec3m tra ${accountsToCheck.length} t\u00e0i kho\u1ea3n...`, 'warn');\n        \n        \/\/ Automatically switch view on Mobile so user sees real-time progress log\n        if (window.innerWidth < 768) {\n            switchTab('tab-console');\n        }\n\n        const maxConcurrency = parseInt(document.getElementById('threads-limit').value) || 2;\n        for (let i = 0; i < Math.min(maxConcurrency, accountsToCheck.length); i++) {\n            processNextAccount();\n        }\n    }\n\n    function stopChecking() {\n        if (!checkingActive) return;\n        checkingActive = false;\n        appendConsole(\"Ti\u1ebfn tr\u00ecnh b\u1ecb h\u1ee7y b\u1edfi ng\u01b0\u1eddi d\u00f9ng.\", \"error\");\n        resetActionButtons();\n    }\n\n    function resetActionButtons() {\n        document.getElementById('btn-start').disabled = false;\n        document.getElementById('btn-start').classList.remove('opacity-40', 'cursor-not-allowed');\n        document.getElementById('btn-stop').disabled = true;\n        document.getElementById('btn-stop').classList.add('bg-zinc-900', 'text-zinc-500', 'cursor-not-allowed');\n        document.getElementById('btn-stop').classList.remove('bg-rose-600', 'hover:bg-rose-700', 'text-white', 'active:scale-95');\n        \n        document.getElementById('stat-checking').innerText = \"0\";\n        updateProgressPercentage(100);\n    }\n\n    function updateProgressPercentage(forceValue = null) {\n        const bar = document.getElementById('stat-progress-bar');\n        const percentLabel = document.getElementById('stat-percent');\n        \n        let val = 0;\n        if (forceValue !== null) {\n            val = forceValue;\n        } else if (accountsToCheck.length > 0) {\n            val = Math.round((currentCheckingIndex \/ accountsToCheck.length) * 100);\n        }\n        \n        bar.style.width = `${val}%`;\n        percentLabel.innerText = `${val}%`;\n    }\n\n    async function processNextAccount() {\n        if (!checkingActive) return;\n        \n        if (currentCheckingIndex >= accountsToCheck.length) {\n            const checkingCount = parseInt(document.getElementById('stat-checking').innerText) || 0;\n            if (checkingCount <= 1) {\n                appendConsole(\"\u0110\u00e3 ho\u00e0n t\u1ea5t t\u1ea5t c\u1ea3 t\u00e0i kho\u1ea3n trong danh s\u00e1ch!\", \"success\");\n                showToast(\"Ho\u00e0n th\u00e0nh\", \"Ki\u1ec3m tra danh s\u00e1ch ho\u00e0n t\u1ea5t. To\u00e0n b\u1ed9 th\u00f4ng tin \u0111\u00e3 l\u01b0u.\", \"success\");\n                resetActionButtons();\n                \/\/ On Mobile switch to database tab automatically so they see output results\n                if (window.innerWidth < 768) {\n                    switchTab('tab-database');\n                }\n            } else {\n                document.getElementById('stat-checking').innerText = checkingCount - 1;\n            }\n            return;\n        }\n\n        const rawAccount = accountsToCheck[currentCheckingIndex];\n        currentCheckingIndex++;\n\n        const currentCheckingNum = parseInt(document.getElementById('stat-checking').innerText) || 0;\n        document.getElementById('stat-checking').innerText = currentCheckingNum + 1;\n\n        updateProgressPercentage();\n\n        const result = await checkAccountProcess(rawAccount);\n\n        const updatedNum = parseInt(document.getElementById('stat-checking').innerText) || 1;\n        document.getElementById('stat-checking').innerText = updatedNum - 1;\n\n        saveAccountResultToDb(result);\n\n        const delayTime = parseInt(document.getElementById('check-delay').value) || 1000;\n        setTimeout(() => {\n            processNextAccount();\n        }, delayTime);\n    }\n\n    async function checkAccountProcess(rawLine) {\n        let username = rawLine.trim();\n        let details = \"\";\n        \n        if (rawLine.includes('|')) {\n            const parts = rawLine.split('|');\n            username = parts[0].trim();\n            details = parts.slice(1).join('|');\n        } else if (rawLine.includes(':')) {\n            const parts = rawLine.split(':');\n            username = parts[0].trim();\n            details = parts.slice(1).join(':');\n        }\n\n        if (username.startsWith('@')) {\n            username = username.slice(1);\n        }\n\n        appendConsole(`\u0110ang check: @${username}...`, 'warn');\n\n        if (selectedMode === 'mock') {\n            await new Promise(r => setTimeout(r, 700 + Math.random() * 600));\n            const isLive = Math.random() > 0.3;\n            if (isLive) {\n                appendConsole(`Live: @${username} (Gi\u1ea3 l\u1eadp ho\u1ea1t \u0111\u1ed9ng)`, 'success');\n                return { username, details, status: 'LIVE', message: 'T\u00e0i kho\u1ea3n t\u1ed3n t\u1ea1i' };\n            } else {\n                appendConsole(`Dead: @${username} (Kh\u00f4ng t\u00ecm th\u1ea5y tr\u00ean h\u1ec7 th\u1ed1ng)`, 'error');\n                return { username, details, status: 'DEAD', message: 'Profile kh\u00f4ng t\u1ed3n t\u1ea1i \/ kh\u00f3a' };\n            }\n        } else {\n            try {\n                const proxyBase = document.getElementById('proxy-url').value.trim();\n                const targetUrl = `https:\/\/www.threads.net\/@${username}`;\n                \n                const response = await fetch(proxyBase + encodeURIComponent(targetUrl), {\n                    headers: {\n                        'User-Agent': 'Mozilla\/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/16.5 Mobile\/15E148 Safari\/604.1',\n                        'X-Requested-With': 'XMLHttpRequest'\n                    }\n                });\n\n                if (response.status === 200) {\n                    const htmlText = await response.text();\n                    if (htmlText.includes('\"user_id\"') || htmlText.includes('username') || !htmlText.includes('Page Not Found')) {\n                        appendConsole(`Live: @${username} ho\u1ea1t \u0111\u1ed9ng \u1ed5n \u0111\u1ecbnh.`, 'success');\n                        return { username, details, status: 'LIVE', message: 'H\u1ed3 s\u01a1 m\u1edf c\u00f4ng khai' };\n                    } else {\n                        appendConsole(`Dead: @${username} ph\u1ea3n h\u1ed3i kh\u00f4ng x\u00e1c \u0111\u1ecbnh.`, 'error');\n                        return { username, details, status: 'DEAD', message: 'Trang l\u1ed7i ho\u1eb7c b\u1ecb ch\u1eb7n' };\n                    }\n                } else if (response.status === 404) {\n                    appendConsole(`Dead: @${username} tr\u1ea3 v\u1ec1 404.`, 'error');\n                    return { username, details, status: 'DEAD', message: 'Kh\u00f4ng t\u1ed3n t\u1ea1i (404)' };\n                } else {\n                    appendConsole(`Nghi v\u1ea5n @${username} (M\u00e3 l\u1ed7i HTTP: ${response.status})`, 'warn');\n                    return { username, details, status: 'LIVE', message: `M\u00e3 ph\u1ea3n h\u1ed3i: ${response.status}` };\n                }\n            } catch (err) {\n                appendConsole(`L\u1ed7i k\u1ebft n\u1ed1i @${username} (Y\u00eau c\u1ea7u b\u1eadt proxy bypass CORS)`, 'error');\n                return { username, details, status: 'DEAD', message: 'K\u1ebft n\u1ed1i m\u1ea1ng th\u1ea5t b\u1ea1i' };\n            }\n        }\n    }\n\n    function saveAccountResultToDb(result) {\n        const now = new Date();\n        const timeString = now.toLocaleTimeString() + ' ' + now.toLocaleDateString();\n\n        const record = {\n            id: crypto.randomUUID(),\n            username: result.username,\n            details: result.details || \"N\/A\",\n            status: result.status,\n            message: result.message,\n            checkedAt: timeString,\n            timestamp: now.getTime()\n        };\n\n        const duplicateIndex = dbRecords.findIndex(r => r.username.toLowerCase() === result.username.toLowerCase());\n        if (duplicateIndex !== -1) {\n            dbRecords[duplicateIndex] = record;\n        } else {\n            dbRecords.unshift(record);\n        }\n\n        saveToLocalStorage();\n        updateDashboardStats();\n        renderTable();\n    }\n\n    function deleteRecord(id) {\n        dbRecords = dbRecords.filter(r => r.id !== id);\n        saveToLocalStorage();\n        updateDashboardStats();\n        renderTable();\n        showToast(\"\u0110\u00e3 x\u00f3a\", \"\u0110\u00e3 d\u1ecdn s\u1ea1ch t\u00e0i kho\u1ea3n kh\u1ecfi c\u01a1 s\u1edf d\u1eef li\u1ec7u.\", \"success\");\n    }\n\n    function clearDatabase() {\n        if (confirm(\"B\u1ea1n c\u00f3 ch\u1eafc ch\u1eafn mu\u1ed1n x\u00f3a to\u00e0n b\u1ed9 l\u1ecbch s\u1eed l\u01b0u tr\u00ean m\u00e1y kh\u00f4ng?\")) {\n            dbRecords = [];\n            saveToLocalStorage();\n            updateDashboardStats();\n            renderTable();\n            showToast(\"D\u1ecdn s\u1ea1ch\", \"To\u00e0n b\u1ed9 c\u01a1 s\u1edf d\u1eef li\u1ec7u \u0111\u00e3 tr\u1ed1ng.\", \"success\");\n        }\n    }\n\n    \/\/ Adaptive Render Engine: Mobile Card vs Desktop Tables\n    function renderTable() {\n        const searchVal = document.getElementById('table-search').value.toLowerCase().trim();\n        const filterVal = document.getElementById('table-filter').value;\n\n        let filtered = dbRecords;\n\n        if (searchVal) {\n            filtered = filtered.filter(r => r.username.toLowerCase().includes(searchVal) || r.details.toLowerCase().includes(searchVal));\n        }\n\n        if (filterVal !== 'all') {\n            filtered = filtered.filter(r => r.status.toLowerCase() === filterVal.toLowerCase());\n        }\n\n        filtered.sort((a, b) => b.timestamp - a.timestamp);\n\n        const totalRecords = filtered.length;\n        const totalPages = Math.ceil(totalRecords \/ recordsPerPage);\n        \n        if (currentPage > totalPages) currentPage = Math.max(1, totalPages);\n\n        const startIndex = (currentPage - 1) * recordsPerPage;\n        const endIndex = Math.min(startIndex + recordsPerPage, totalRecords);\n\n        const paginatedRecords = filtered.slice(startIndex, endIndex);\n\n        \/\/ Update bottom info label\n        document.getElementById('table-info').innerText = `Hi\u1ec3n th\u1ecb ${totalRecords === 0 ? 0 : startIndex + 1}-${endIndex} trong t\u1ed5ng s\u1ed1 ${totalRecords}`;\n        document.getElementById('btn-prev').disabled = currentPage === 1;\n        document.getElementById('btn-next').disabled = currentPage === totalPages || totalPages === 0;\n\n        \/\/ 1. POPULATE PC DESKTOP TABLE\n        const tbody = document.getElementById('database-table-body');\n        tbody.innerHTML = '';\n\n        \/\/ 2. POPULATE MOBILE CARDS CONTAINER\n        const mobileContainer = document.getElementById('mobile-cards-container');\n        mobileContainer.innerHTML = '';\n\n        if (paginatedRecords.length === 0) {\n            tbody.innerHTML = `<tr><td colspan=\"5\" class=\"px-4 py-8 text-center text-zinc-600 italic\">Kh\u00f4ng c\u00f3 d\u1eef li\u1ec7u ph\u00f9 h\u1ee3p.<\/td><\/tr>`;\n            mobileContainer.innerHTML = `<div class=\"text-center py-8 text-zinc-600 italic text-xs\">Kh\u00f4ng c\u00f3 d\u1eef li\u1ec7u ph\u00f9 h\u1ee3p.<\/div>`;\n            return;\n        }\n\n        paginatedRecords.forEach(record => {\n            const isLive = record.status === 'LIVE';\n            const badgeColor = isLive ? 'text-emerald-400 bg-emerald-950\/20 border-emerald-900\/50' : 'text-rose-400 bg-rose-950\/20 border-rose-900\/50';\n            const statusBadge = `<span class=\"px-2 py-0.5 text-[9px] font-bold border rounded-md uppercase ${badgeColor}\">${record.status}<\/span>`;\n\n            \/\/ Render Tablet\/PC Row HTML\n            const tr = document.createElement('tr');\n            tr.className = \"hover:bg-zinc-900\/40 transition-colors\";\n            tr.innerHTML = `\n                <td class=\"px-4 py-3 font-semibold text-zinc-200\">\n                    <a href=\"https:\/\/www.threads.net\/@${record.username}\" target=\"_blank\" class=\"hover:underline flex items-center space-x-1.5 text-zinc-200\">\n                        <span>@${record.username}<\/span>\n                        <i class=\"fa-solid fa-arrow-up-right-from-square text-[8px] text-zinc-600\"><\/i>\n                    <\/a>\n                <\/td>\n                <td class=\"px-4 py-3 font-mono text-zinc-500 max-w-[120px] truncate\" title=\"${record.details}\">${record.details}<\/td>\n                <td class=\"px-4 py-3\">${statusBadge} <span class=\"text-[10px] text-zinc-500 block mt-0.5\">${record.message || ''}<\/span><\/td>\n                <td class=\"px-4 py-3 text-zinc-500 text-[10px]\">${record.checkedAt}<\/td>\n                <td class=\"px-4 py-3 text-right\">\n                    <button onclick=\"deleteRecord('${record.id}')\" class=\"text-zinc-500 hover:text-rose-400 p-1\">\n                        <i class=\"fa-solid fa-trash-can text-xs\"><\/i>\n                    <\/button>\n                <\/td>\n            `;\n            tbody.appendChild(tr);\n\n            \/\/ Render Mobile Touch-friendly Card HTML\n            const card = document.createElement('div');\n            card.className = \"bg-black border border-zinc-900 rounded-xl p-3.5 flex flex-col justify-between gap-2.5 active:bg-zinc-950 transition-colors\";\n            card.innerHTML = `\n                <div class=\"flex items-start justify-between\">\n                    <div class=\"flex flex-col\">\n                        <a href=\"https:\/\/www.threads.net\/@${record.username}\" target=\"_blank\" class=\"font-bold text-sm text-zinc-200 hover:underline flex items-center gap-1\">\n                            @${record.username}\n                            <i class=\"fa-solid fa-arrow-up-right-from-square text-[9px] text-zinc-600\"><\/i>\n                        <\/a>\n                        <span class=\"text-[10px] font-mono text-zinc-500 mt-0.5 truncate max-w-[200px]\" title=\"${record.details}\">Ph\u1ee5: ${record.details}<\/span>\n                    <\/div>\n                    <div class=\"flex flex-col items-end gap-1.5\">\n                        ${statusBadge}\n                        <span class=\"text-[9px] text-zinc-600\">${record.checkedAt.split(' ')[0]}<\/span>\n                    <\/div>\n                <\/div>\n                <div class=\"flex items-center justify-between border-t border-zinc-900\/80 pt-2.5 text-[10px]\">\n                    <span class=\"text-zinc-500\">${record.message || 'Kh\u00f4ng c\u00f3 ph\u1ea3n h\u1ed3i'}<\/span>\n                    <button onclick=\"deleteRecord('${record.id}')\" class=\"text-rose-400 hover:text-rose-300 px-2 py-1 bg-rose-950\/10 rounded-lg active:scale-90 transition-all\">\n                        <i class=\"fa-solid fa-trash-can mr-1\"><\/i> X\u00f3a\n                    <\/button>\n                <\/div>\n            `;\n            mobileContainer.appendChild(card);\n        });\n    }\n\n    function changePage(direction) {\n        currentPage += direction;\n        renderTable();\n    }\n\n    \/\/ Universal CSV & Text File Downloader\n    function exportData(type, filter) {\n        let dataToExport = dbRecords;\n\n        if (filter === 'live') {\n            dataToExport = dbRecords.filter(r => r.status === 'LIVE');\n        } else if (filter === 'dead') {\n            dataToExport = dbRecords.filter(r => r.status === 'DEAD');\n        }\n\n        if (dataToExport.length === 0) {\n            showToast(\"D\u1eef li\u1ec7u r\u1ed7ng\", \"Kh\u00f4ng t\u00ecm th\u1ea5y d\u1eef li\u1ec7u ph\u00f9 h\u1ee3p \u0111\u1ec3 tr\u00edch xu\u1ea5t.\", \"error\");\n            return;\n        }\n\n        let fileContent = \"\";\n        let fileName = `threads_${filter}_${new Date().toLocaleDateString().replace(\/\\\/\/g, '-')}`;\n        let mimeType = \"text\/plain\";\n\n        if (type === 'txt') {\n            fileContent = dataToExport.map(r => r.details !== \"N\/A\" ? `${r.username}|${r.details}` : r.username).join('\\n');\n            fileName += \".txt\";\n            mimeType = \"text\/plain\";\n        } else if (type === 'csv') {\n            const headers = [\"Username\", \"Status\", \"Details\", \"CheckedAt\", \"Status Message\"];\n            const rows = dataToExport.map(r => [\n                `\"${r.username}\"`,\n                `\"${r.status}\"`,\n                `\"${r.details.replace(\/\"\/g, '\"\"')}\"`,\n                `\"${r.checkedAt}\"`,\n                `\"${r.message.replace(\/\"\/g, '\"\"')}\"`\n            ]);\n            fileContent = [headers.join(','), ...rows.map(row => row.join(','))].join('\\n');\n            fileName += \".csv\";\n            mimeType = \"text\/csv\";\n        }\n\n        const blob = new Blob([fileContent], { type: mimeType + \";charset=utf-8;\" });\n        const url = URL.createObjectURL(blob);\n        const a = document.createElement('a');\n        a.href = url;\n        a.download = fileName;\n        document.body.appendChild(a);\n        a.click();\n        document.body.removeChild(a);\n        URL.revokeObjectURL(url);\n        \n        showToast(\"Xu\u1ea5t file th\u00e0nh c\u00f4ng\", `T\u1ea3i xu\u1ed1ng th\u00e0nh c\u00f4ng \u0111\u1ecbnh d\u1ea1ng ${type.toUpperCase()}`, \"success\");\n    }\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>@ THREADS CHECKER Mobile &#038; Desktop Ready X\u00f3a DB T\u1ed5ng \u0110\u00e3 Check 0 LIVE 0 DEAD 0 \u0110ANG CH\u1ea0Y 0 Ti\u1ebfn \u0110\u1ed9 Check 0% B\u1ea3ng <a class=\"mh-excerpt-more\" href=\"https:\/\/tinbamien.com\/?page_id=26\" title=\"\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-26","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tinbamien.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":1,"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages\/26\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages\/26\/revisions\/27"}],"wp:attachment":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}