<!doctype html>
<html lang="ar" dir="rtl">
  <head>
    <script>
      // إخفاء الرسائل غير المرغوبة فقط (تصفية انتقائية)
      const _log = console.log;
      const _warn = console.warn;
      const _error = console.error;
      
      const blocked = [
        'SES', 'Removing', 'Cookie', 'Content-Security', 'tiktok', 'lockdown', 'i18next', 'AxiosError', 'ERR_NETWORK', 'SES_UNHANDLED',
        'Service Worker', 'استلام رسالة', 'طلب تحديث Badge', 'تم مسح Badge', 'تم تحديث Badge',
        'Badge', 'beforeinstallpromptevent', 'Banner not shown',
        'violates the following Content Security Policy', 'Connecting to',
        'Fetch API cannot load', 'Refused to connect', 'capig.madgicx.ai',
        'google-analytics.com'
      ];
      
      console.log = function(...a) { if (!a.some(x => blocked.some(b => String(x).includes(b)))) _log.apply(console, a); };
      console.warn = function(...a) { if (!a.some(x => blocked.some(b => String(x).includes(b)))) _warn.apply(console, a); };
      console.error = function(...a) { if (!a.some(x => blocked.some(b => String(x).includes(b)))) _error.apply(console, a); };
    </script>
    <meta charset="UTF-8" />
    <meta http-equiv="Cache-Control" content="no-store, max-age=0, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <meta name="google-site-verification" content="QaYl5pmSjpgHkzCV3ZOM82n8iIS_RI6shijhWo_b2kU" />
    <meta name="msvalidate.01" content="67DDB6625F76220579E016A897EC1670" />
    
    <!-- Content Security Policy - السماح بـ Pixels والموارد الخارجية -->
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:; script-src 'self' 'unsafe-inline' https://connect.facebook.net https://www.googletagmanager.com https://analytics.tiktok.com https://www.google-analytics.com https://embed.tawk.to https://www.paypal.com; connect-src 'self' wss: https: wss://djlirquyvpccuvjdaueb.supabase.co wss://djlirquyvpccuvjdaueb.supabase.co https://djlirquyvpccuvjdaueb.supabase.co https://connect.facebook.net https://www.googletagmanager.com https://analytics.tiktok.com https://www.google-analytics.com https://www.facebook.com https://capig.madgicx.ai https://embed.tawk.to https://va.tawk.to wss://ws.binaryws.com https://ws.binaryws.com https://www.paypal.com; img-src 'self' https: data:; style-src 'self' 'unsafe-inline' https:; font-src 'self' https: data:; frame-src 'self' https://www.facebook.com https://embed.tawk.to https://www.paypal.com; frame-ancestors 'self';" />
    
    <!-- Critical CSS موسع للرسم الفوري -->
    <style>
      body{margin:0;padding:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#0f172a;color:#fff;min-height:100vh}
      #root{min-height:100vh;display:flex;flex-direction:column}
      #initial-loader{position:fixed;inset:0;z-index:9999;background:#0f172a;display:flex;align-items:center;justify-content:center;transition:opacity .3s}
      #initial-loader.hidden{opacity:0;pointer-events:none;visibility:hidden}
      .text-gray-300{color:#d1d5db}
      .text-sm{font-size:.875rem}
      .text-base{font-size:1rem}
      .text-lg{font-size:1.125rem}
      .mb-5{margin-bottom:1.25rem}
      .mb-6{margin-bottom:1.5rem}
      .max-w-2xl{max-width:42rem}
      .mx-auto{margin-left:auto;margin-right:auto}
      .text-center{text-align:center}
      .flex{display:flex}
      .items-center{align-items:center}
      .justify-center{justify-content:center}
      .min-h-screen{min-height:100vh}
      .p-5{padding:1.25rem}
      .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
      *{box-sizing:border-box}
    </style>
    
    <!-- CSS سيتم تحميله تلقائياً بواسطة Vite -->
    <!-- تحميل CSS بدون حجب الـ rendering -->
    <link rel="preload" href="/assets/index.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="/assets/index.css"></noscript>
    
    <!-- Preconnect للموارد الخارجية المهمة -->
    <link rel="preconnect" href="https://djlirquyvpccuvjdaueb.supabase.co" crossorigin>
    <link rel="preconnect" href="https://connect.facebook.net" crossorigin>
    <link rel="preconnect" href="https://analytics.tiktok.com" crossorigin>
    <link rel="preconnect" href="https://www.googletagmanager.com" crossorigin>
    <link rel="dns-prefetch" href="https://fonts.googleapis.com">
    <link rel="dns-prefetch" href="https://fonts.gstatic.com">
    
    
    <!-- Favicon - محسّن لـ Google Search -->
    <link rel="icon" type="image/x-icon" href="/favicon.ico" />
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
    <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    <link rel="manifest" href="/manifest.json" />
    <meta name="theme-color" content="#0f172a" />
    <meta name="msapplication-TileColor" content="#0f172a" />
    <meta name="msapplication-TileImage" content="/apple-touch-icon.png" />
    
    <!-- SEO Meta Tags - سيتم تحديثها ديناميكياً -->
    <meta name="description" content="BooTrading - Smart automated trading platform for cryptocurrencies and forex. Get accurate recommendations, advanced analysis, and instant trading signals." id="meta-description" />
    <meta name="keywords" content="automated trading, trading bot, trading recommendations, technical analysis, cryptocurrency, forex, trading signals, BooTrading" id="meta-keywords" />
    <meta name="author" content="BooTrading" />
    <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
    <link rel="canonical" href="https://www.bootrading.com/" />
    
    <!-- Alternate Language URLs -->
    <link rel="alternate" hreflang="ar" href="https://www.bootrading.com/?lang=ar" />
    <link rel="alternate" hreflang="en" href="https://www.bootrading.com/?lang=en" />
    <link rel="alternate" hreflang="fr" href="https://www.bootrading.com/?lang=fr" />
    <link rel="alternate" hreflang="x-default" href="https://www.bootrading.com/" />
    
    <!-- Open Graph / Facebook (محسّن للمشاركة والظهور في البحث) -->
    <meta property="og:type" content="website" />
    <meta property="og:url" content="https://www.bootrading.com/" />
    <meta property="og:title" content="BooTrading - Smart Automated Trading Platform" id="og-title" />
    <meta property="og:description" content="Get accurate trading recommendations and instant signals for cryptocurrencies and forex. Advanced analysis and professional tools." id="og-description" />
    <meta property="og:image" content="https://www.bootrading.com/images/og-image.png" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta property="og:image:type" content="image/png" />
    <meta property="og:locale" content="en_US" id="og-locale" />
    <meta property="og:locale:alternate" content="ar_SA" />
    <meta property="og:locale:alternate" content="fr_FR" />
    <meta property="og:site_name" content="BooTrading" />
    
    <!-- Twitter (محسّن للظهور في نتائج البحث) -->
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:url" content="https://www.bootrading.com/" />
    <meta name="twitter:title" content="BooTrading - Smart Automated Trading Platform" id="twitter-title" />
    <meta name="twitter:description" content="Get accurate trading recommendations and instant signals for cryptocurrencies and forex." id="twitter-description" />
    <meta name="twitter:image" content="https://www.bootrading.com/images/twitter-image.png" />
    <meta name="twitter:creator" content="@bootrading" />
    
    <!-- Additional SEO -->
    <meta name="language" content="English" id="meta-language" />
    <meta name="revisit-after" content="7 days" />
    <meta name="rating" content="general" />
    <meta name="distribution" content="global" />
    
    <!-- Schema.org Structured Data - Organization (شامل بدون تكرار) -->
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Organization",
      "name": "BooTrading",
      "alternateName": "BooTrading",
      "url": "https://www.bootrading.com",
      "logo": {
        "@type": "ImageObject",
        "url": "https://www.bootrading.com/images/icon.png",
        "width": 512,
        "height": 512
      },
      "image": [
        "https://www.bootrading.com/images/og-image.png",
        "https://www.bootrading.com/images/twitter-image.png",
        "https://www.bootrading.com/images/icon.png"
      ],
      "sameAs": [
        "https://www.facebook.com/Bootradin",
        "https://twitter.com/bootrading"
      ],
      "contactPoint": {
        "@type": "ContactPoint",
        "contactType": "Customer Support",
        "url": "https://www.bootrading.com"
      },
      "description": "منصة التداول الآلي الذكية للعملات الرقمية والفوركس. احصل على توصيات دقيقة وإشارات فورية.",
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.8",
        "reviewCount": "1250",
        "bestRating": "5",
        "worstRating": "1"
      },
      "offers": {
        "@type": "AggregateOffer",
        "priceCurrency": "USD",
        "lowPrice": "29.99",
        "highPrice": "647.99",
        "offerCount": "3"
      }
    }
    </script>
    
    <!-- Pixels تحميل مؤجل للأداء + GDPR Consent -->
    <script>
      // تحميل Pixels بعد DOMContentLoaded (أسرع من load)
      document.addEventListener('DOMContentLoaded', function() {
        setTimeout(function() {
          // التحقق من GDPR Consent قبل تحميل Pixels
          var hasConsent = localStorage.getItem('gdpr_consent') === 'true' || 
                          localStorage.getItem('cookie_consent') === 'accepted';
          
          if (hasConsent) {
            // Facebook Pixel (مع GDPR)
            !function(f,b,e,v,n,t,s)
            {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
            n.callMethod.apply(n,arguments):n.queue.push(arguments)};n.push=n;n.loaded=!0;n.version='2.0';
            n.queue=[];t=b.createElement(e);t.async=!0;
            t.src=v;s=b.getElementsByTagName(e)[0];
            s.parentNode.insertBefore(t,s)}(window, document,'script',
            'https://connect.facebook.net/en_US/fbevents.js');
            fbq('init', '1327972468598136');
            fbq('track', 'PageView');
            
            // TikTok Pixel (مع GDPR)
            !function (w, d, t) {
              w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(
              var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var r="https://analytics.tiktok.com/i18n/pixel/events.js",o=n&&n.partner;ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=r,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script")
              ;n.type="text/javascript",n.async=!0,n.src=r+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)};
              ttq.load('D4EE5C3C77UCD4LE2CS0');
              ttq.page();
            }(window, document, 'ttq');
          }
          
          // Google Analytics (بدون GDPR - يمكن تفعيله دائماً أو مع Consent)
          var gaScript = document.createElement('script');
          gaScript.async = true;
          gaScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-54MKQ2L1YZ';
          gaScript.setAttribute('integrity', 'sha384-Pl8vnD4QMxD1HfrMHYw13PVxYlo3iASUQOK3amfzADhrhOLPbNwqOQZ');
          gaScript.setAttribute('crossorigin', 'anonymous');
          document.head.appendChild(gaScript);
          
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());
          gtag('config', 'G-54MKQ2L1YZ', {
            page_path: window.location.pathname,
            send_page_view: true,
            allow_google_signals: hasConsent,
            allow_ad_personalization_signals: hasConsent
          });
        }, 800); // تأجيل 800ms بدلاً من 2000ms
      });
    </script>
    
    <script>
      // تحديث Meta Tags حسب اللغة
      function updateMetaTags(lang) {
        const metaContent = {
          ar: {
            description: 'BooTrading - منصة التداول الآلي الذكية للعملات الرقمية والفوركس. احصل على توصيات دقيقة، تحليلات متقدمة، وإشارات تداول فورية لتحقيق أرباح مستدامة.',
            keywords: 'تداول آلي, بوت تداول, توصيات تداول, تحليل فني, عملات رقمية, فوركس, إشارات تداول, BooTrading',
            ogTitle: 'BooTrading - منصة التداول الآلي الذكية',
            ogDescription: 'احصل على توصيات تداول دقيقة وإشارات فورية للعملات الرقمية والفوركس. تحليلات متقدمة وأدوات احترافية لتحقيق أرباح مستدامة.',
            twitterTitle: 'BooTrading - منصة التداول الآلي الذكية',
            twitterDescription: 'احصل على توصيات تداول دقيقة وإشارات فورية للعملات الرقمية والفوركس.',
            language: 'Arabic',
            locale: 'ar_SA'
          },
          en: {
            description: 'BooTrading - Smart automated trading platform for cryptocurrencies and forex. Get accurate recommendations, advanced analysis, and instant trading signals.',
            keywords: 'automated trading, trading bot, trading recommendations, technical analysis, cryptocurrency, forex, trading signals, BooTrading',
            ogTitle: 'BooTrading - Smart Automated Trading Platform',
            ogDescription: 'Get accurate trading recommendations and instant signals for cryptocurrencies and forex. Advanced analysis and professional tools.',
            twitterTitle: 'BooTrading - Smart Automated Trading Platform',
            twitterDescription: 'Get accurate trading recommendations and instant signals for cryptocurrencies and forex.',
            language: 'English',
            locale: 'en_US'
          },
          fr: {
            description: 'BooTrading - Plateforme de trading automatisé intelligente pour les crypto-monnaies et le forex. Obtenez des recommandations précises, des analyses avancées et des signaux de trading instantanés.',
            keywords: 'trading automatisé, bot de trading, recommandations de trading, analyse technique, crypto-monnaie, forex, signaux de trading, BooTrading',
            ogTitle: 'BooTrading - Plateforme de Trading Automatisé Intelligente',
            ogDescription: 'Obtenez des recommandations de trading précises et des signaux instantanés pour les crypto-monnaies et le forex. Analyses avancées et outils professionnels.',
            twitterTitle: 'BooTrading - Plateforme de Trading Automatisé',
            twitterDescription: 'Obtenez des recommandations de trading précises et des signaux instantanés pour les crypto-monnaies et le forex.',
            language: 'French',
            locale: 'fr_FR'
          }
        };
        
        const content = metaContent[lang] || metaContent.en;
        
        // تحديث Meta Tags
        const metaDescription = document.getElementById('meta-description');
        const metaKeywords = document.getElementById('meta-keywords');
        const metaLanguage = document.getElementById('meta-language');
        const ogTitle = document.getElementById('og-title');
        const ogDescription = document.getElementById('og-description');
        const ogLocale = document.getElementById('og-locale');
        const twitterTitle = document.getElementById('twitter-title');
        const twitterDescription = document.getElementById('twitter-description');
        
        if (metaDescription) metaDescription.setAttribute('content', content.description);
        if (metaKeywords) metaKeywords.setAttribute('content', content.keywords);
        if (metaLanguage) metaLanguage.setAttribute('content', content.language);
        if (ogTitle) ogTitle.setAttribute('content', content.ogTitle);
        if (ogDescription) ogDescription.setAttribute('content', content.ogDescription);
        if (ogLocale) ogLocale.setAttribute('content', content.locale);
        if (twitterTitle) twitterTitle.setAttribute('content', content.twitterTitle);
        if (twitterDescription) twitterDescription.setAttribute('content', content.twitterDescription);
      }
      
      // اختيار manifest حسب لغة التطبيق المحفوظة
      function updateManifest() {
        const currentLang = localStorage.getItem('selectedLanguage') || 'ar';
        const manifestPath = currentLang === 'ar' ? '/manifest.json' : 
                            currentLang === 'en' ? '/manifest-en.json' : '/manifest-fr.json';
        
        // إزالة manifest القديم
        const oldLink = document.querySelector('link[rel="manifest"]');
        if (oldLink) {
          oldLink.remove();
        }
        
        // إضافة manifest الجديد
        const manifestLink = document.createElement('link');
        manifestLink.rel = 'manifest';
        manifestLink.href = manifestPath;
        document.head.appendChild(manifestLink);
        
        // تحديث Meta Tags
        updateMetaTags(currentLang);
        
        // تحديث اتجاه النص في HTML
        updateTextDirection(currentLang);
      }
      
      // إضافة manifest افتراضي في الـ head للزوار الأوائل
      (function() {
        const existingManifest = document.querySelector('link[rel="manifest"]');
        if (!existingManifest) {
          const defaultManifest = document.createElement('link');
          defaultManifest.rel = 'manifest';
          defaultManifest.href = '/manifest.json';
          document.head.appendChild(defaultManifest);
        }
      })();
      
      // تحديث اتجاه النص
      function updateTextDirection(lang) {
        const htmlElement = document.documentElement;
        const bodyElement = document.body;
        
        if (lang === 'ar') {
          // العربية - من اليمين لليسار
          htmlElement.setAttribute('dir', 'rtl');
          htmlElement.setAttribute('lang', 'ar');
          if (bodyElement) {
            bodyElement.style.direction = 'rtl';
            bodyElement.style.textAlign = 'right';
          }
        } else {
          // الإنجليزية والفرنسية - من اليسار لليمين
          htmlElement.setAttribute('dir', 'ltr');
          htmlElement.setAttribute('lang', lang);
          if (bodyElement) {
            bodyElement.style.direction = 'ltr';
            bodyElement.style.textAlign = 'left';
          }
        }
        
        // تحديث CSS variables للاتجاه
        document.documentElement.style.setProperty('--text-direction', lang === 'ar' ? 'rtl' : 'ltr');
        document.documentElement.style.setProperty('--text-align-start', lang === 'ar' ? 'right' : 'left');
        document.documentElement.style.setProperty('--text-align-end', lang === 'ar' ? 'left' : 'right');
      }
      
      // تحديث manifest عند تحميل الصفحة
      updateManifest();
      
      window.addEventListener('storage', function(e) {
        if (e.key === 'selectedLanguage') {
          updateManifest();
        }
      });
      
      // تحديث manifest وMeta Tags عند تغيير اللغة داخل التطبيق
      window.updateAppManifest = updateManifest;
      window.updateAppMetaTags = function(lang) {
        updateMetaTags(lang);
      };
      
      // تسجيل نجاح التثبيت
      window.addEventListener('appinstalled', (evt) => {
        // تم تثبيت التطبيق بنجاح
      });
    </script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes, viewport-fit=cover" />
    <!-- PWA Meta Tags محسنة للهاتف -->
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="apple-mobile-web-app-title" content="BooTrading" />
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="application-name" content="BooTrading" />
    
    <!-- منع التكبير التلقائي في iOS -->
    <meta name="format-detection" content="telephone=no, date=no, email=no, address=no" />
    
    <!-- Windows Tiles -->
    <meta name="msapplication-TileColor" content="#1c357c" />
    <meta name="msapplication-TileImage" content="/images/icon.png" />
    <meta name="msapplication-config" content="/browserconfig.xml" />
    
    <!-- Additional PWA Meta Tags -->
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta name="apple-mobile-web-app-orientations" content="portrait" />
    
    <!-- iOS Splash Screens -->
    <link rel="apple-touch-startup-image" href="/images/logo.png" />
    
    <title>BooTrading - منصة التداول الآلي المتطورة</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'">
    <!-- تحميل مسبوق للوغو -->
    <link rel="preload" href="/images/logo.png" as="image" type="image/png">
    
    
    <style>
      * {
        font-family: 'Cairo', sans-serif;
      }
      
      /* شاشة التحميل الأولية */
      #initial-loader {
        position: fixed;
        inset: 0;
        background: linear-gradient(to bottom right, #0f172a, #1e3a8a, #0f172a);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        transition: opacity 0.2s ease-out;
      }
      
      #initial-loader::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
        animation: pulse 3s ease-in-out infinite;
      }
      
      #initial-loader.hidden {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
      }
      
      .loader-content {
        text-align: center;
        position: relative;
        z-index: 1;
      }
      
      .loader-logo {
        width: 120px;
        height: 120px;
        margin: 0 auto 20px;
        opacity: 1 !important;
        display: block;
        filter: drop-shadow(0 10px 30px rgba(59, 130, 246, 0.5));
        -o-object-fit: contain;
           object-fit: contain;
        animation: none !important;
      }
      
      .loader-spinner {
        width: 80px;
        height: 80px;
        margin: 20px auto;
        position: relative;
      }
      
      /* خلفية متوهجة - مخففة */
      .loader-glow {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: linear-gradient(to right, #3b82f6, #a855f7);
        opacity: 0.1;
        animation: pulse 3s ease-in-out infinite;
      }
      
      /* دوائر دوارة - مجموعة 1 - مخففة */
      .loader-dots-1 {
        position: absolute;
        inset: 0;
        animation: spin-slow 4s linear infinite;
      }
      
      .loader-dots-1::before,
      .loader-dots-1::after {
        content: '';
        position: absolute;
        width: 6px;
        height: 6px;
        border-radius: 50%;
      }
      
      .loader-dots-1::before {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        background: #3b82f6;
      }
      
      .loader-dots-1::after {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        background: #a855f7;
      }
      
      /* دوائر دوارة - مجموعة 2 - مخففة */
      .loader-dots-2 {
        position: absolute;
        inset: 0;
        animation: spin-reverse 5s linear infinite;
      }
      
      .loader-dots-2::before,
      .loader-dots-2::after {
        content: '';
        position: absolute;
        width: 6px;
        height: 6px;
        border-radius: 50%;
      }
      
      .loader-dots-2::before {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        background: #06b6d4;
      }
      
      .loader-dots-2::after {
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        background: #ec4899;
      }
      
      /* أيقونة البوت SVG */
      .loader-bot-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        animation: bounce-slow 2s ease-in-out infinite;
      }
      
      /* أيقونات إضافية */
      .loader-trend-icon,
      .loader-zap-icon {
        position: absolute;
        width: 12px;
        height: 12px;
      }
      
      .loader-trend-icon {
        top: -10%;
        right: -10%;
        animation: float-1 4s ease-in-out infinite;
        opacity: 0.7;
      }
      
      .loader-zap-icon {
        bottom: -10%;
        left: -10%;
        animation: float-2 4s ease-in-out infinite;
        animation-delay: 0.5s;
        opacity: 0.7;
      }
      
      @keyframes bounce-slow {
        0%, 100% { transform: translate(-50%, -50%) translateY(0); }
        50% { transform: translate(-50%, -50%) translateY(-10px); }
      }
      
      @keyframes spin-slow {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
      }
      
      @keyframes spin-reverse {
        from { transform: rotate(360deg); }
        to { transform: rotate(0deg); }
      }
      
      @keyframes float-1 {
        0%, 100% { 
          transform: translate(0, 0) scale(1);
          opacity: 0.5;
        }
        50% { 
          transform: translate(5px, -5px) scale(1.1);
          opacity: 0.8;
        }
      }
      
      @keyframes float-2 {
        0%, 100% { 
          transform: translate(0, 0) scale(1);
          opacity: 0.5;
        }
        50% { 
          transform: translate(-5px, 5px) scale(1.1);
          opacity: 0.8;
        }
      }
      
      .loader-text {
        color: #e2e8f0;
        font-size: 18px;
        margin-top: 15px;
        font-weight: 600;
        letter-spacing: 1px;
        text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
        animation: fadeInOut 2s ease-in-out infinite;
      }
      
      @keyframes fadeInOut {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
      }
      
      @keyframes spin {
        to { transform: rotate(360deg); }
      }
      
      @keyframes pulse {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.8; transform: scale(0.95); }
      }
      
      @keyframes float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-20px); }
      }
      
      /* إصلاحات CSS للهاتف المحمول */
      .keyboard-open {
        height: 50vh;
        overflow-y: auto;
      }
      
      .mobile-device input, .mobile-device select, .mobile-device textarea {
        font-size: 16px !important;
        -webkit-appearance: none;
        -moz-appearance: none;
             appearance: none;
        border-radius: 0;
      }
      
      /* تحسينات إضافية للهاتف المحمول */
      @media (max-width: 768px) {
        body {
          -webkit-text-size-adjust: 100%;
          -webkit-tap-highlight-color: transparent;
        }
        
        input, select, textarea, button {
          -webkit-appearance: none;
          -moz-appearance: none;
               appearance: none;
          border-radius: 8px;
          -webkit-user-select: text;
          -moz-user-select: text;
               user-select: text;
        }
        
        /* منع التكبير عند focus */
        input[type="text"], input[type="email"], input[type="password"], 
        input[type="number"], input[type="tel"], textarea, select {
          font-size: 16px !important;
          transform: translateZ(0);
          -webkit-user-select: text;
          -moz-user-select: text;
               user-select: text;
        }
        
        /* منع الكتابة بأحرف كبيرة تلقائياً للبريد واسم المستخدم */
        input[type="email"], input[placeholder*="البريد"], 
        input[placeholder*="اسم المستخدم"], input[placeholder*="Username"],
        input[type="search"] {
          text-transform: none !important;
          -webkit-appearance: none;
          -moz-appearance: none;
               appearance: none;
        }
      }
      
      /* إخفاء أيقونة Tawk.to */
      .tawk-min-container,
      #tawk-bubble-container,
      div[id*="tawk-bubble"],
      .tawk-chat-widget,
      iframe[src*="tawk.to"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
      }
    </style>
    
    <script type="module" crossorigin src="/assets/index.DJsXC7j2.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/vendor.CzFDRTuY.js">
    <link rel="modulepreload" crossorigin href="/assets/react-vendor.CSCPn0WU.js">
    <link rel="modulepreload" crossorigin href="/assets/supabase.CHil4N0l.js">
    <link rel="stylesheet" crossorigin href="/assets/index.1w8PnIkg.css">
  </head>
  <body>
    <!-- SEO H1 Tag - مخفي بصرياً لكن مرئي لمحركات البحث -->
    <h1 class="sr-only">
      BooTrading - Smart Automated Trading Platform for Cryptocurrency and Forex with AI
    </h1>
    
    <!-- Meta Pixel Noscript -->
    <noscript>
      <img height="1" width="1" style="display:none"
      src="https://www.facebook.com/tr?id=1327972468598136&ev=PageView&noscript=1"/>
    </noscript>
    
    <!-- شاشة التحميل الأولية -->
    <div id="initial-loader">
      <!-- خلفية متحركة -->
      <div style="position: absolute; inset: 0; opacity: 0.15; overflow: hidden;">
        <div style="position: absolute; top: 20%; left: 10%; width: 300px; height: 300px; background: #a855f7; border-radius: 50%; filter: blur(80px); animation: float 6s ease-in-out infinite;"></div>
        <div style="position: absolute; top: 60%; right: 15%; width: 250px; height: 250px; background: #06b6d4; border-radius: 50%; filter: blur(80px); animation: float 8s ease-in-out infinite; animation-delay: 2s;"></div>
        <div style="position: absolute; bottom: 20%; left: 40%; width: 200px; height: 200px; background: #ec4899; border-radius: 50%; filter: blur(80px); animation: float 7s ease-in-out infinite; animation-delay: 4s;"></div>
      </div>
      
      <div class="loader-content">
        <!-- Container رئيسي للأنيميشن -->
        <div style="position: relative; display: flex; align-items: center; justify-content: center; margin: 20px auto;">
          <!-- الدائرة الخارجية -->
          <div class="loader-spinner">
            <!-- خلفية متوهجة -->
            <div class="loader-glow"></div>
            
            <!-- دوائر دوارة - مجموعة 1 -->
            <div class="loader-dots-1"></div>
            
            <!-- دوائر دوارة - مجموعة 2 -->
            <div class="loader-dots-2"></div>
            
            <!-- أيقونة البوت (Lucide Bot Icon) -->
            <svg class="loader-bot-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#60a5fa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M12 8V4H8"/>
              <rect width="16" height="12" x="4" y="8" rx="2"/>
              <path d="M2 14h2"/>
              <path d="M20 14h2"/>
              <path d="M15 13v2"/>
              <path d="M9 13v2"/>
            </svg>
          </div>
          
          <!-- أيقونات التوصيات المتحركة -->
          <div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;">
            <!-- أيقونة الترند (TrendingUp) -->
            <svg class="loader-trend-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#4ade80" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/>
              <polyline points="16 7 22 7 22 13"/>
            </svg>
            
            <!-- أيقونة البرق (Zap) -->
            <svg class="loader-zap-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#facc15" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>
            </svg>
          </div>
        </div>
        
        <p class="loader-text" id="loading-text">Loading...</p>
      </div>
      
      <script>
        // تطبيق الترجمة على نص التحميل
        (function() {
          const lang = localStorage.getItem('selectedLanguage') || 'ar';
          const loadingText = document.getElementById('loading-text');
          const loaderContent = document.querySelector('.loader-content');
          
          if (loadingText) {
            if (lang === 'ar') {
              loadingText.textContent = 'جاري التحميل...';
              if (loaderContent) loaderContent.style.direction = 'rtl';
            } else if (lang === 'en') {
              loadingText.textContent = 'Loading...';
              if (loaderContent) loaderContent.style.direction = 'ltr';
            } else if (lang === 'fr') {
              loadingText.textContent = 'Chargement...';
              if (loaderContent) loaderContent.style.direction = 'ltr';
            }
          }
        })();
      </script>
    </div>
    
    <div id="root"></div>
    
    <script>
      // دالة عامة لإخفاء شاشة التحميل
      function hideInitialLoader() {
        const loader = document.getElementById('initial-loader');
        if (loader && !loader.classList.contains('hidden')) {
          loader.classList.add('hidden');
        }
      }

      // إخفاء شاشة التحميل عند جاهزية React أو بعد مهلة قصوى
      window.addEventListener('DOMContentLoaded', function () {
        const root = document.getElementById('root');

        if (!root) {
          // احتياط: إخفاء بعد 8 ثواني إذا لم نجد root
          setTimeout(hideInitialLoader, 8000);
          return;
        }

        let checks = 0;
        const maxChecks = 40; // 40 * 250ms ≈ 10 ثواني كحد أقصى

        const interval = setInterval(function () {
          checks++;

          // إذا رسم React أي محتوى داخل #root
          if (root.children.length > 0) {
            clearInterval(interval);
            hideInitialLoader();
            return;
          }

          // إخفاء إجباري بعد المهلة القصوى
          if (checks >= maxChecks) {
            clearInterval(interval);
            hideInitialLoader();
          }
        }, 250);
      });

      // إتاحة الدالة لـ React (App.tsx يستدعي window.hideInitialLoader)
      window.hideInitialLoader = hideInitialLoader;
    </script>
    
    <!-- إصلاحات الهاتف المحمول - defer للأداء - مع SRI -->
    <script src="/mobile-fix.js" defer integrity="sha384-G9QY3bhuXlRsR47P4uK9Zj/4JHY6YMd39wGWmHCqSsIXhmLCEk+0y1dhyJkKuiNH" crossorigin="anonymous"></script>
    
    <!-- Pixels - تحميل بعد React -->
    <!-- Facebook Pixel Base Code -->
    <script>
      !function(f,b,e,v,n,t,s)
      {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
      n.callMethod.apply(n,arguments):n.queue.push(arguments)};
      if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
      n.queue=[];t=b.createElement(e);t.async=!0;
      t.src=v;s=b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t,s)}(window, document,'script',
      'https://connect.facebook.net/en_US/fbevents.js');
      fbq('init', '1883750845683836');
      fbq('track', 'PageView');
    </script>
    
    <!-- TikTok Pixel Base Code -->
    <script>
      !function (w, d, t) {
        w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var r="https://analytics.tiktok.com/i18n/pixel/events.js",o=n&&n.partner;ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=r,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=r+"?sdkid="+e+"&lib="+t;var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(a,s)};
        ttq.load('D4EE5C3C77UCD4LE2CS0');
        ttq.page();
      }(window, document, 'ttq');
    </script>
    
    <!-- Google Analytics Base Code - مع SRI للأمان -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-54MKQ2L1YZ" integrity="sha384-Pl8vnD4QMxD1HfrMHYw13PVxYlo3iASUQOK3amfzADhrhOLPbNwqOQZ" crossorigin="anonymous"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'G-54MKQ2L1YZ', {
        page_path: window.location.pathname
      });
    </script>
  </body>
</html>