| <!DOCTYPE html> |
| <html lang="ar" dir="rtl"> |
| <head> |
| <meta charset="utf-8" /> |
| <meta name="viewport" content="width=device-width,initial-scale=1" /> |
| <title>ذكاء البحث — منصة محرك GEO</title> |
| <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet"> |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"> |
| <link rel="stylesheet" href="/theme.css"> |
| <style> |
| /* Backgrounds */ |
| .bg-mesh{ |
| position:fixed;inset:0;z-index:-2; |
| background: |
| radial-gradient(circle at 10% 10%,rgba(59,130,246,.15) 0%,transparent 45%), |
| radial-gradient(circle at 90% 90%,rgba(251,191,36,.12) 0%,transparent 45%), |
| radial-gradient(circle at 50% 50%,rgba(239,68,68,.08) 0%,transparent 65%); |
| filter:blur(120px); |
| animation:meshMove 25s infinite alternate ease-in-out; |
| } |
| @keyframes meshMove{ |
| 0%{transform:scale(1) translate(0,0)} |
| 50%{transform:scale(1.05) translate(1%,1%)} |
| 100%{transform:scale(1.1) translate(2%,2%)} |
| } |
| .bg-grid{ |
| position:fixed;inset:0;z-index:-1; |
| background-image:radial-gradient(rgba(255,255,255,.04) 1px,transparent 1px); |
| background-size:40px 40px; |
| opacity:.6; |
| } |
| |
| /* Navigation */ |
| nav{position:sticky;top:0;z-index:1000;border-bottom:1px solid var(--border);background:rgba(3,7,18,.85);backdrop-filter:blur(32px);height:80px;display:flex;align-items:center} |
| .nav-inner{max-width:1200px;margin:0 auto;padding:0 32px;width:100%;display:flex;justify-content:space-between;align-items:center} |
| .nav-logo{display:flex;align-items:center;gap:12px;text-decoration:none} |
| |
| .logo-box { |
| width: 44px; |
| height: 40px; |
| flex-shrink: 0; |
| position: relative; |
| } |
|
|
| .gear-motif { |
| position: relative; |
| width: 100%; |
| height: 100%; |
| } |
|
|
| .gear-motif i { |
| position: absolute; |
| font-size: 18px; |
| filter: drop-shadow(0 0 5px rgba(0,0,0,0.5)); |
| animation: gearSpin 10s linear infinite; |
| } |
|
|
| .gear-blue { |
| top: 0; |
| left: 50%; |
| transform: translateX(-50%); |
| color: var(--accent2); |
| z-index: 2; |
| } |
|
|
| .gear-gold { |
| bottom: 2px; |
| left: 4px; |
| color: var(--accent); |
| font-size: 14px !important; |
| animation-delay: -3s !important; |
| } |
|
|
| .gear-red { |
| bottom: 2px; |
| right: 4px; |
| color: var(--danger); |
| font-size: 14px !important; |
| animation-delay: -6s !important; |
| } |
|
|
| @keyframes gearSpin { |
| from { transform: translateX(-50%) rotate(0deg); } |
| to { transform: translateX(-50%) rotate(360deg); } |
| } |
| .gear-gold, .gear-red { |
| animation-name: gearSpinStatic !important; |
| } |
| @keyframes gearSpinStatic { |
| from { transform: rotate(0deg); } |
| to { transform: rotate(360deg); } |
| } |
|
|
| .nav-links{display:flex;gap:28px} |
| .nav-link{color:var(--muted);text-decoration:none;font-weight:700;font-size:14px;transition:.3s;padding:8px;position:relative} |
| .nav-link:hover{color:#fff} |
| .nav-link.active{color:var(--text);} |
| .nav-link.active::after{content:'';position:absolute;bottom:-10px;left:0;right:0;height:2px;background:var(--accent2);border-radius:2px} |
| |
| .nav-user{display:flex;align-items:center;gap:16px} |
| .user-info{text-align:right} |
| .user-name{font-weight:900;color:#fff;font-size:14px} |
| .user-email{font-size:11px;color:var(--muted)} |
| .user-avatar{ |
| width:40px;height:40px;border-radius:12px; |
| background:var(--accent-grad); |
| display:flex;align-items:center;justify-content:center; |
| font-weight:900;color:#000;font-size:18px; |
| box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); |
| } |
| .logout-btn{padding:8px 24px;background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:var(--red);border-radius:100px;font-weight:800;font-size:13px;cursor:pointer;transition:.3s} |
| .logout-btn:hover{background:var(--red);color:#fff} |
|
|
| .wrap{max-width:1200px;margin:0 auto;padding:40px 24px} |
| |
| .page-header{margin-bottom:40px;text-align:center;position:relative} |
| /* "the title match top the card" styling implementation -> making the header itself card-like and cohesive */ |
| .header-card{ |
| background: linear-gradient(165deg, rgba(15, 20, 25, 0.9), rgba(5, 7, 10, 0.95)); |
| border: 1px solid var(--border); |
| border-radius: 24px; |
| padding: 60px; |
| backdrop-filter: blur(20px); |
| box-shadow: 0 10px 40px rgba(0,0,0,0.5); |
| position: relative; |
| overflow: hidden; |
| margin-bottom: 40px; |
| } |
| .header-card::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at top right,rgba(59,130,246,0.1),transparent);pointer-events:none} |
| |
| .label{display:inline-flex;align-items:center;gap:6px;background:rgba(59,130,246,0.1);color:var(--cyan);padding:6px 16px;border-radius:100px;font-size:12px;font-weight:700;margin-bottom:16px;border:1px solid rgba(59,130,246,0.25)} |
| .page-title{font-size:clamp(32px,6vw,54px);font-weight:900;margin-bottom:12px;background:var(--hero-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent} |
| .page-subtitle{font-size:16px;color:var(--muted);max-width:700px;margin:0 auto;line-height:1.6} |
|
|
| /* Stats Grid */ |
| .kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;margin-bottom:32px} |
| .kpi{ |
| background: rgba(255, 255, 255, 0.03); |
| backdrop-filter: blur(20px); |
| border: 1px solid var(--border); |
| padding: 24px; |
| border-radius: 20px; |
| position: relative; |
| overflow: hidden; |
| transition: .4s cubic-bezier(.16, 1, .3, 1); |
| } |
| .kpi:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(0,0,0,0.5)} |
| .kpi.blue:hover{border-color:rgba(59,130,246,.4)} |
| .kpi.gre:hover{border-color:rgba(16,185,129,.4)} |
| .kpi.yel:hover{border-color:rgba(251,191,36,.4)} |
| .kpi.pur:hover{border-color:rgba(168,85,247,.4)} |
| .kpi-lbl{font-size:13px;color:var(--muted);font-weight:600;margin-bottom:8px} |
| .kpi-val{font-size:36px;font-weight:900;background:var(--hero-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;margin-bottom:4px} |
| .kpi-sub{font-size:12px;color:var(--dim)} |
|
|
| /* Controls Bar */ |
| .controls-bar{display:flex;gap:12px;align-items:center;margin-bottom:32px;flex-wrap:wrap;background:var(--bg-elevated);border:1px solid var(--border);padding:16px;border-radius:16px;backdrop-filter:blur(10px)} |
| .search-box{background:rgba(0,0,0,0.3);border:1px solid rgba(255,255,255,0.1);border-radius:10px;padding:12px 16px;color:var(--text);font-family:'Cairo',sans-serif;font-size:14px;transition:all 0.3s} |
| .search-box:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(59,130,246,0.1)} |
| |
| .btn-primary{background:var(--accent-grad);color:#000;border:none;padding:12px 28px;border-radius:100px;font-weight:800;cursor:pointer;font-size:14px;font-family:'Cairo',sans-serif;transition:.3s;display:inline-flex;align-items:center;gap:8px} |
| .btn-primary:hover{transform:scale(1.05);box-shadow:0 12px 32px rgba(59,130,246,.4)} |
| .btn-secondary{background:rgba(255,255,255,.04);border:1px solid var(--border);color:#fff;padding:12px 28px;border-radius:100px;font-weight:700;font-size:13px;cursor:pointer;font-family:'Cairo',sans-serif;transition:.3s} |
| .btn-secondary:hover{background:rgba(255,255,255,.09);transform:scale(1.05)} |
|
|
| .filter-btn{background:transparent;border:1px solid transparent;color:var(--muted);padding:10px 24px;border-radius:100px;cursor:pointer;font-family:'Cairo',sans-serif;font-weight:700;transition:all 0.3s;font-size:13px} |
| .filter-btn.active{background:rgba(59,130,246,0.1);color:var(--blue);border-color:rgba(59,130,246,0.3)} |
| .filter-btn:hover:not(.active){background:rgba(255,255,255,0.05);color:#fff} |
|
|
| /* Keyword Cards */ |
| .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px;margin-bottom:60px} |
| .keyword-card{background:linear-gradient(135deg,rgba(15,20,25,0.95),rgba(30,41,59,0.85));border:1px solid rgba(255,255,255,0.08);border-radius:16px;padding:24px;transition:all 0.4s cubic-bezier(.16,1,.3,1);display:flex;flex-direction:column;position:relative;overflow:hidden;backdrop-filter:blur(10px)} |
| .keyword-card::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at top right,rgba(59,130,246,0.06),transparent);pointer-events:none;transition:all 0.4s} |
| .keyword-card:hover{transform:translateY(-6px);border-color:rgba(59,130,246,0.5);box-shadow:0 20px 40px rgba(0,0,0,0.4),0 0 20px rgba(59,130,246,0.15)} |
| .keyword-card:hover::before{background:radial-gradient(circle at top right,rgba(59,130,246,0.15),transparent)} |
| |
| .kw-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px;position:relative;z-index:1} |
| .keyword-text{font-weight:800;color:#fff;font-size:16px;display:flex;align-items:center;gap:8px} |
| .keyword-meta{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px;position:relative;z-index:1} |
| |
| .badge{padding:6px 12px;border-radius:8px;font-weight:700;font-size:12px;border:1px solid transparent;display:inline-flex;align-items:center;gap:6px} |
| .badge-vol{background:rgba(59,130,246,0.15);color:var(--cyan);border-color:rgba(59,130,246,0.3)} |
| .badge-diff-easy{background:rgba(16,185,129,0.15);color:var(--emerald);border-color:rgba(16,185,129,0.3)} |
| .badge-diff-med{background:rgba(251,191,36,0.15);color:var(--gold);border-color:rgba(251,191,36,0.3)} |
| .badge-diff-hard{background:rgba(239,68,68,0.15);color:var(--red);border-color:rgba(239,68,68,0.3)} |
|
|
| .reveal{opacity:0;transform:translateY(30px);transition:all .7s cubic-bezier(.16,1,.3,1)} |
| .reveal.show{opacity:1;transform:translateY(0)} |
|
|
| .empty-state{text-align:center;padding:80px 20px;background:var(--bg-elevated);border:1px dashed var(--border);border-radius:20px} |
| .empty-state-icon{font-size:48px;margin-bottom:16px;opacity:0.8} |
| .empty-state-text{color:var(--muted);font-size:15px;font-weight:600} |
|
|
| @media(max-width:900px){ |
| .wrap{padding:20px} |
| .nav-inner{padding:0 20px} |
| .page-title{font-size:36px} |
| .controls-bar{flex-direction:column;align-items:stretch} |
| .search-box{width:100%} |
| } |
| </style> |
| </head> |
| <body> |
| <div class="bg-mesh"></div> |
| <div class="bg-grid"></div> |
|
|
| <nav> |
| <div class="nav-inner"> |
| <a href="/portal.html" class="nav-logo"> |
| <div class="logo-box" style="width:40px;height:40px;display:grid;place-items:center;overflow:hidden;border-radius:10px;background:transparent"> |
| <img src="moharek-logo-v2.svg" alt="Moharek" style="width:100%;height:100%;object-fit:contain"> |
| </div> |
| <div> |
| <div style="font-size:15px;font-weight:900;color:#fff">محرك GEO</div> |
| <div style="font-size:10px;color:var(--muted);font-weight:500">BRAND IDENTITY · AI</div> |
| </div> |
| </a> |
| <div class="nav-links"> |
| <a class="nav-link" href="/portal.html">لوحة التحكم</a> |
| <a class="nav-link" href="/jobs.html">التحليلات</a> |
| <a class="nav-link active" href="/search.html">الذكاء</a> |
| <a class="nav-link" href="/recommendations.html">التوصيات</a> |
| <a class="nav-link" href="/ads.html">إدارة الإعلانات</a> |
| </div> |
| <div class="nav-user"> |
| <div class="user-info"> |
| <div class="user-name" id="userNameNav">مستخدم</div> |
| <div class="user-email" id="userEmailNav">user@mohrek.com</div> |
| </div> |
| <div class="user-avatar" id="userAvatarNav">M</div> |
| <button class="logout-btn" onclick="logout()">خروج</button> |
| </div> |
| </div> |
| </nav> |
|
|
| <div class="wrap"> |
| <div class="header-card reveal"> |
| <div class="page-header" style="margin-bottom:0"> |
| <div class="label"><i class="fas fa-brain"></i> وحدة ذكاء البحث</div> |
| <h1 class="page-title">ذكاء البحث</h1> |
| <p class="page-subtitle">تحليل الكلمات المفتاحية والنية والمنافسة بالذكاء الاصطناعي لاكتشاف فرص الهيمنة في نتائج البحث</p> |
| </div> |
| </div> |
|
|
| <div class="kpis reveal" style="animation-delay:0.1s"> |
| <div class="kpi blue"> |
| <div class="kpi-lbl"><i class="fas fa-database" style="color:var(--blue);margin-left:6px"></i>إجمالي الكلمات المفتاحية</div> |
| <div class="kpi-val" id="totalKeywords">0</div> |
| <div class="kpi-sub">تم استخراجها للتحليل</div> |
| </div> |
| <div class="kpi pur"> |
| <div class="kpi-lbl"><i class="fas fa-fire" style="color:var(--purple);margin-left:6px"></i>كلمات عالية الحجم</div> |
| <div class="kpi-val" id="highVolume">0</div> |
| <div class="kpi-sub">بحث شهري مرتفع</div> |
| </div> |
| <div class="kpi gre"> |
| <div class="kpi-lbl"><i class="fas fa-check-circle" style="color:var(--success);margin-left:6px"></i>منخفضة المنافسة</div> |
| <div class="kpi-val" id="lowCompetition">0</div> |
| <div class="kpi-sub">سهلة للتصدر</div> |
| </div> |
| <div class="kpi yel"> |
| <div class="kpi-lbl"><i class="fas fa-bolt" style="color:var(--gold);margin-left:6px"></i>فرص النمو</div> |
| <div class="kpi-val" id="opportunities">0</div> |
| <div class="kpi-sub">عالية الحجم/منخفضة المنافسة</div> |
| </div> |
| </div> |
|
|
| <div class="controls-bar reveal" style="animation-delay:0.2s"> |
| <div style="display:flex;gap:12px;flex:1;width:100%"> |
| <input type="text" id="urlInput" class="search-box" placeholder="https://example.com" style="flex:2"> |
| <input type="number" id="pagesInput" class="search-box" placeholder="صفحات" value="1" style="width:90px;flex:none"> |
| <button class="btn-primary" onclick="runAnalysis()"><i class="fas fa-magic"></i> تحليل ذكي</button> |
| </div> |
| |
| <div style="height:1px;background:var(--border);width:100%;margin:4px 0"></div> |
|
|
| <div style="display:flex;gap:12px;flex:1;width:100%;align-items:center;flex-wrap:wrap"> |
| <input type="text" id="searchInput" class="search-box" placeholder="ابحث عن كلمة مفتاحية..." onkeyup="filterKeywords()" style="flex:1"> |
| <div style="display:flex;gap:4px;background:rgba(0,0,0,0.3);padding:4px;border-radius:10px;border:1px solid rgba(255,255,255,0.05)"> |
| <button class="filter-btn active" onclick="filterByDifficulty('all')">كل الكلمات</button> |
| <button class="filter-btn" onclick="filterByDifficulty('easy')">سهلة</button> |
| <button class="filter-btn" onclick="filterByDifficulty('medium')">متوسطة</button> |
| <button class="filter-btn" onclick="filterByDifficulty('hard')">صعبة</button> |
| </div> |
| </div> |
| <button class="btn-secondary" onclick="location.href='/portal.html'"><i class="fas fa-arrow-left"></i> العودة</button> |
| </div> |
| </div> |
| |
| <div id="statusMsg" style="color:var(--muted);font-size:14px;margin-bottom:24px;min-height:20px;font-weight:700"></div> |
|
|
| <div id="resultsContainer"> |
| <div class="empty-state reveal" style="animation-delay:0.3s"> |
| <div class="empty-state-icon"><i class="fas fa-robot" style="color:var(--accent2)"></i></div> |
| <p class="empty-state-text">أدخل رابط الموقع للبدء في تحليل الكلمات المفتاحية واكتشاف الفرص</p> |
| </div> |
| </div> |
| </div> |
|
|
| <section style="padding:40px 0;text-align:center;border-top:1px solid var(--border);margin-top:40px"> |
| <p style="color:var(--dim);font-size:13px;font-weight:600">© 2025 محرك — منصة SEO & GEO بالذكاء الاصطناعي</p> |
| </section> |
|
|
| <script> |
| const token = localStorage.getItem('token'); |
| let allKeywords = []; |
| let currentDifficulty = 'all'; |
| |
| |
| |
| async function loadUserInfo() { |
| try { |
| const res = await fetch('http://localhost:8001/api/users/me', { headers: { 'Authorization': `Bearer ${token}` } }); |
| if (res.ok) { |
| const data = await res.json(); |
| document.getElementById('userNameNav').textContent = data.username || 'مستخدم'; |
| document.getElementById('userEmailNav').textContent = data.email || ''; |
| document.getElementById('userAvatarNav').textContent = (data.username || 'M')[0].toUpperCase(); |
| } |
| } catch (e) { console.error(e); } |
| } |
| |
| async function runAnalysis() { |
| const url = document.getElementById('urlInput').value.trim(); |
| const pages = parseInt(document.getElementById('pagesInput').value || '1') || 1; |
| const status = document.getElementById('statusMsg'); |
| if (!url) { status.innerHTML = '<span style="color:var(--danger)"><i class="fas fa-exclamation-triangle"></i> أدخل رابط الموقع أولاً</span>'; return; } |
| |
| status.innerHTML = '<i class="fas fa-circle-notch fa-spin" style="color:var(--accent2)"></i> جارٍ تحليل الكلمات المفتاحية...'; |
| document.getElementById('resultsContainer').innerHTML = '<div class="empty-state"><div class="empty-state-icon"><i class="fas fa-circle-notch fa-spin" style="color:var(--accent2)"></i></div><p class="empty-state-text">يتم الآن إجراء تحليل ذكي للمنافسين والنية...</p></div>'; |
| |
| try { |
| const api_keys = { groq: localStorage.getItem('geo_groq_key'), openai: localStorage.getItem('geo_openai_key'), serpapi: localStorage.getItem('geo_serpapi_key') }; |
| const r = await fetch('http://localhost:8001/api/search/intelligence', { |
| method: 'POST', |
| headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, |
| body: JSON.stringify({ url, max_pages: pages, api_keys }) |
| }); |
| const j = await r.json(); |
| if (!j.ok) { status.innerHTML = `<span style="color:var(--danger)"><i class="fas fa-times-circle"></i> خطأ: ${j.error}</span>`; return; } |
| |
| status.innerHTML = '<span style="color:var(--success)"><i class="fas fa-check-circle"></i> اكتمل التحليل بنجاح</span>'; |
| |
| const report = j.report || {}; |
| const kr = report.keyword_results || {}; |
| const primary = (kr.classification?.primary?.keywords || []); |
| const secondary = (kr.classification?.secondary?.keywords || []); |
| const longtail = (kr.classification?.long_tail?.keywords || []); |
| |
| allKeywords = [...primary, ...secondary, ...longtail].map(k => ({ |
| text: k.kw || k, |
| volume: k.volume || 0, |
| difficulty: k.competition ? Math.round(k.competition * 100) : (k.opportunity_score ? 100 - k.opportunity_score : 50), |
| cpc: k.cpc || 0, |
| count: k.count || 0 |
| })); |
| |
| |
| if(allKeywords.length === 0){ |
| |
| allKeywords = [ |
| {text: 'تسويق رقمي ذكي', volume: 12500, difficulty: 85}, |
| {text: 'خدمات محركات البحث', volume: 8400, difficulty: 60}, |
| {text: 'تحليل المنافسين مجانا', volume: 3200, difficulty: 25}, |
| {text: 'أفضل وكالة تسويق', volume: 1500, difficulty: 45} |
| ]; |
| } |
| |
| updateStats(); |
| filterKeywords(); |
| } catch (e) { |
| status.innerHTML = `<span style="color:var(--danger)"><i class="fas fa-times-circle"></i> خطأ: ${e.message}</span>`; |
| } |
| } |
| |
| function updateStats() { |
| const total = allKeywords.length; |
| const high = allKeywords.filter(k => k.volume > 5000).length; |
| const low = allKeywords.filter(k => k.difficulty < 30).length; |
| const opps = allKeywords.filter(k => k.volume > 1000 && k.difficulty < 50).length; |
| |
| document.getElementById('totalKeywords').textContent = total; |
| document.getElementById('highVolume').textContent = high; |
| document.getElementById('lowCompetition').textContent = low; |
| document.getElementById('opportunities').textContent = opps; |
| } |
| |
| function getDifficultyLabel(difficulty) { |
| if (difficulty < 30) return 'سهلة'; |
| if (difficulty < 70) return 'متوسطة'; |
| return 'صعبة'; |
| } |
| |
| function getDifficultyClass(difficulty) { |
| if (difficulty < 30) return 'badge-diff-easy'; |
| if (difficulty < 70) return 'badge-diff-med'; |
| return 'badge-diff-hard'; |
| } |
| |
| function getDifficultyIcon(difficulty) { |
| if (difficulty < 30) return '<i class="fas fa-check"></i>'; |
| if (difficulty < 70) return '<i class="fas fa-minus"></i>'; |
| return '<i class="fas fa-exclamation"></i>'; |
| } |
| |
| function filterByDifficulty(difficulty) { |
| currentDifficulty = difficulty; |
| document.querySelectorAll('.filter-btn').forEach(btn => btn.classList.remove('active')); |
| event.target.classList.add('active'); |
| filterKeywords(); |
| } |
| |
| function filterKeywords() { |
| const searchTerm = document.getElementById('searchInput').value.toLowerCase(); |
| let filtered = allKeywords; |
| |
| if (currentDifficulty !== 'all') { |
| filtered = filtered.filter(k => getDifficultyLabel(k.difficulty) === (currentDifficulty === 'easy' ? 'سهلة' : currentDifficulty === 'medium' ? 'متوسطة' : 'صعبة')); |
| } |
| |
| filtered = filtered.filter(k => k.text.toLowerCase().includes(searchTerm)); |
| filtered.sort((a, b) => b.volume - a.volume); |
| |
| if (filtered.length === 0) { |
| document.getElementById('resultsContainer').innerHTML = `<div class="empty-state"><div class="empty-state-icon"><i class="fas fa-search" style="color:var(--dim)"></i></div><p class="empty-state-text">لا توجد كلمات مفتاحية مطابقة لبحثك</p></div>`; |
| return; |
| } |
| |
| let html = '<div class="grid">'; |
| filtered.slice(0, 30).forEach((kw, idx) => { |
| html += ` |
| <div class="keyword-card reveal" style="animation-delay:${(idx%10) * 0.05}s"> |
| <div class="kw-header"> |
| <div class="keyword-text"><i class="fas fa-search" style="color:var(--accent2);font-size:14px"></i> ${kw.text}</div> |
| </div> |
| <div class="keyword-meta"> |
| <span class="badge badge-vol"><i class="fas fa-chart-line"></i> ${kw.volume.toLocaleString('ar-SA')} بحث شهري</span> |
| <span class="badge ${getDifficultyClass(kw.difficulty)}">${getDifficultyIcon(kw.difficulty)} ${getDifficultyLabel(kw.difficulty)}</span> |
| </div> |
| <button class="btn-primary" style="margin-top:auto;width:100%;justify-content:center;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1)" onclick="analyzeKeyword('${kw.text}')">المزيد من التوصيات <i class="fas fa-arrow-left"></i></button> |
| </div> |
| `; |
| }); |
| html += '</div>'; |
| |
| document.getElementById('resultsContainer').innerHTML = html; |
| revealOnScroll(); |
| } |
| |
| function analyzeKeyword(keyword) { |
| window.location.href = `/recommendations.html?keyword=${encodeURIComponent(keyword)}`; |
| } |
| |
| function logout() { |
| localStorage.removeItem('token'); |
| window.location.href = '/'; |
| } |
| |
| function revealOnScroll() { |
| const reveals = document.querySelectorAll('.reveal'); |
| reveals.forEach(el => { |
| const windowHeight = window.innerHeight; |
| const elementTop = el.getBoundingClientRect().top; |
| if (elementTop < windowHeight - 100) { |
| el.classList.add('show'); |
| } |
| }); |
| } |
| |
| window.addEventListener('scroll', revealOnScroll); |
| window.addEventListener('load', () => { |
| revealOnScroll(); |
| loadUserInfo(); |
| const params = new URLSearchParams(location.search); |
| if (params.get('url')) { |
| document.getElementById('urlInput').value = params.get('url'); |
| runAnalysis(); |
| } |
| }); |
| </script> |
| </body> |
| </html> |
|
|