<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <link rel="icon" type="image/png" href="/APOLO.png" />
  <link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" />

  <!-- Enhanced Mobile Viewport Configuration with Safe Area Support -->
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover" />

  <!-- Mobile Web App Capabilities -->
  <meta name="mobile-web-app-capable" content="yes" />
  <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="Apollo AI" />

  <!-- Theme Color for Mobile Browsers -->
  <meta name="theme-color" content="#000000" />
  <meta name="msapplication-TileColor" content="#000000" />
  <meta name="msapplication-navbutton-color" content="#000000" />

  <!-- Mobile Detection and Format Detection -->
  <meta name="format-detection" content="telephone=no" />
  <meta name="HandheldFriendly" content="true" />
  <meta name="MobileOptimized" content="320" />

  <!-- PWA Manifest -->
  <link rel="manifest" href="/manifest.json" />

  <!-- Apple Touch Icons -->
  <link rel="apple-touch-icon" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="180x180" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="152x152" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="144x144" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="120x120" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="114x114" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="76x76" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="72x72" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="60x60" href="/APOLO.png" />
  <link rel="apple-touch-icon" sizes="57x57" href="/APOLO.png" />
  <!-- Permissions Policy: Suppress compute-pressure warning -->
  <meta http-equiv="Permissions-Policy" content="compute-pressure=()" />

  <!-- SEO Meta Tags - Comprehensive -->
  <title>Apollo AI – #1 AI Academic Researcher for Students</title>
  <meta name="description"
    content="Apollo AI: the smartest AI academic researcher. Analyze PDFs, summarize videos, generate charts & conduct deep research with verified sources." />
  <meta name="keywords"
    content="apollo ai, apollo ai academic researcher, ai academic researcher, ai research assistant, ai for researchers, ai pdf analyzer, academic ai tool, ai for students, research paper analyzer, pdf summarizer ai, youtube video summarizer, ai literature review, deep research ai, chart generator ai, ai for thesis writing, best ai for academics, ai study assistant, ai homework helper, academic research tool, ai document analysis, research intelligence platform, ai for university students, apollo research ai, ai academic writing, ai research paper helper, ai for phd students, scholarly research ai, apollo ai review, apollo ai features" />
  <meta name="author" content="Apollo AI" />
  <link rel="canonical" href="https://useapollo.app/" />
  <!-- Hreflang tags for international SEO -->
  <link rel="alternate" hreflang="en" href="https://useapollo.app/" />
  <link rel="alternate" hreflang="x-default" href="https://useapollo.app/" />
  <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
  <meta name="googlebot" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
  <meta name="bingbot" content="index, follow" />
  <meta name="revisit-after" content="3 days" />
  <meta name="rating" content="General" />
  <meta name="language" content="English" />
  <meta name="geo.region" content="US" />
  <meta name="geo.placename" content="United States" />
  <meta name="classification" content="Education, Research, Artificial Intelligence, Academic Tools" />
  <meta name="category" content="Education Technology" />
  <meta name="coverage" content="Worldwide" />
  <meta name="distribution" content="Global" />
  <meta name="target" content="all" />

  <!-- Open Graph / Facebook - Enhanced for Social Sharing -->
  <meta property="og:type" content="website" />
  <meta property="og:url" content="https://useapollo.app/" />
  <meta property="og:title" content="Apollo AI – #1 AI Academic Researcher for Students" />
  <meta property="og:description"
    content="The smartest AI academic researcher. Analyze PDFs, summarize videos, generate charts & deep research with verified sources. Try free." />
  <meta property="og:image" content="https://useapollo.app/og-image.jpeg" />
  <meta property="og:image:secure_url" content="https://useapollo.app/og-image.jpeg" />
  <meta property="og:image:type" content="image/jpeg" />
  <meta property="og:image:width" content="1200" />
  <meta property="og:image:height" content="630" />
  <meta property="og:image:alt" content="Apollo AI - The #1 AI Research Assistant for Academics and Students" />
  <meta property="og:site_name" content="Apollo AI" />
  <meta property="og:locale" content="en_US" />
  <meta property="og:locale:alternate" content="en_GB" />

  <!-- Twitter Card - Enhanced -->
  <meta name="twitter:card" content="summary_large_image" />
  <meta name="twitter:url" content="https://useapollo.app/" />
  <meta name="twitter:title" content="Apollo AI – #1 AI Academic Researcher for Students" />
  <meta name="twitter:description"
    content="The smartest AI academic researcher. Analyze PDFs, summarize videos, generate charts & deep research with verified sources." />
  <meta name="twitter:image" content="https://useapollo.app/og-image.jpeg" />
  <meta name="twitter:image:alt" content="Apollo AI - AI Research Assistant for Academics" />
  <meta name="twitter:creator" content="@ApolloAI" />
  <meta name="twitter:site" content="@ApolloAI" />

  <!-- Additional Social Media Meta Tags -->
  <meta property="article:author" content="Apollo AI" />
  <meta property="article:publisher" content="Apollo AI" />

  <!-- Schema.org Structured Data - Organization (Brand Entity) -->
  <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Organization",
      "name": "Apollo AI",
      "alternateName": ["Apollo Research AI", "Apollo Academic AI", "UseApollo", "Apollo AI Academic Researcher"],
      "url": "https://useapollo.app",
      "logo": "https://useapollo.app/APOLO.png",
      "description": "Apollo AI is the #1 AI academic researcher platform for students and academics. Analyze PDFs, summarize videos, generate charts, and conduct deep research with verified sources. The smartest AI for academic research.",
      "foundingDate": "2025",
      "sameAs": [
        "https://www.youtube.com/@ApolloAI",
        "https://x.com/ApolloAI_app",
        "https://www.linkedin.com/company/apolloai",
        "https://www.instagram.com/apollo.ai.lab",
        "https://www.facebook.com/ApolloAIapp"
      ],
      "contactPoint": {
        "@type": "ContactPoint",
        "contactType": "customer support",
        "email": "contact@useapollo.app",
        "availableLanguage": ["English", "Arabic", "French", "Chinese"]
      }
    }
    </script>

  <!-- Schema.org Structured Data - WebSite (Enables Sitelinks Search Box) -->
  <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "WebSite",
      "name": "Apollo AI",
      "alternateName": "Apollo AI Academic Researcher",
      "url": "https://useapollo.app",
      "description": "The #1 AI academic researcher for students and academics. Analyze PDFs, summarize YouTube videos, generate charts, and conduct deep research.",
      "potentialAction": {
        "@type": "SearchAction",
        "target": {
          "@type": "EntryPoint",
          "urlTemplate": "https://useapollo.app/chat?q={search_term_string}"
        },
        "query-input": "required name=search_term_string"
      },
      "inLanguage": "en"
    }
    </script>

  <!-- Schema.org Structured Data - SoftwareApplication -->
  <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "SoftwareApplication",
      "name": "Apollo AI",
      "applicationCategory": ["EducationalApplication", "ProductivityApplication", "BusinessApplication"],
      "operatingSystem": "Web Browser",
      "offers": [
        {
          "@type": "Offer",
          "price": "0",
          "priceCurrency": "USD",
          "description": "Free plan with core AI research features",
          "availability": "https://schema.org/InStock"
        },
        {
          "@type": "Offer",
          "price": "9.99",
          "priceCurrency": "USD",
          "description": "Pro plan with unlimited research capabilities",
          "availability": "https://schema.org/InStock"
        }
      ],
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.8",
        "ratingCount": "127",
        "bestRating": "5",
        "worstRating": "1"
      },
      "description": "Apollo AI is the #1 AI academic researcher for students and academics. Instantly analyze PDFs, summarize YouTube videos, generate publication-ready charts, conduct deep web research with verified sources, and use real-time voice AI for hands-free research.",
      "featureList": [
        "AI PDF Analysis - Analyze hundreds of pages in seconds",
        "YouTube Video Summarizer - Extract insights from hours of content instantly",
        "Deep Web Research - Academic source verification and citation",
        "Chart & Visualization Generator - Publication-ready data visualizations",
        "Real-time Voice AI - Hands-free research assistant",
        "Multi-language Support - English, Arabic, Chinese, French, and more",
        "Literature Review Assistant - Synthesize multiple research papers",
        "Citation Generator - Automatic academic citation formatting"
      ],
      "screenshot": "https://useapollo.app/og-image.jpeg",
      "author": {
        "@type": "Organization",
        "name": "Apollo AI"
      },
      "url": "https://useapollo.app",
      "softwareVersion": "2.0",
      "applicationSubCategory": "AI Research Tool",
      "releaseNotes": "Apollo AI 2.0: Deep Research with verified sources, real-time voice AI, and enhanced PDF analysis."
    }
    </script>

  <!-- Schema.org Structured Data - BreadcrumbList (Rich Breadcrumbs in Google) -->
  <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://useapollo.app/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Pricing",
          "item": "https://useapollo.app/pricing"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "Blog",
          "item": "https://useapollo.app/blog"
        },
        {
          "@type": "ListItem",
          "position": 4,
          "name": "Contact",
          "item": "https://useapollo.app/contact"
        }
      ]
    }
    </script>

  <!-- Schema.org Structured Data - FAQPage (Rich Snippets) -->
  <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "What is Apollo AI?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Apollo AI is the #1 AI research assistant built specifically for academics and students. It lets you instantly analyze PDFs, summarize YouTube videos, generate publication-ready charts and visualizations, conduct deep web research with verified academic sources, and use real-time voice AI for hands-free research. Apollo supports multiple languages including English, Arabic, Chinese, and French."
          }
        },
        {
          "@type": "Question",
          "name": "How does Apollo AI analyze PDFs?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Apollo AI uses advanced AI to process and understand PDF documents of any length — even hundreds of pages — in seconds. Simply upload your PDF and Apollo will extract key findings, generate summaries, answer your questions about the content, and help you identify important data, charts, and insights. It understands complex academic papers, technical documents, and research reports."
          }
        },
        {
          "@type": "Question",
          "name": "Can Apollo AI summarize YouTube videos?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Yes, Apollo AI can instantly summarize YouTube videos of any length. Just paste a YouTube URL and Apollo will extract key insights, create comprehensive summaries, and let you ask questions about the video content. This is perfect for researchers reviewing conference presentations, students catching up on lectures, or anyone who needs to quickly understand long video content."
          }
        },
        {
          "@type": "Question",
          "name": "Is Apollo AI free for students and researchers?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Yes, Apollo AI offers a generous free tier that includes core AI research features like PDF analysis, YouTube video summarization, chart generation, and basic deep research. Premium plans are available for researchers who need unlimited usage, advanced features, and priority support. No credit card is required to get started."
          }
        },
        {
          "@type": "Question",
          "name": "What is Deep Research in Apollo AI?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Deep Research is Apollo AI's advanced feature that conducts comprehensive web research on any topic. It automatically generates targeted search queries, finds and verifies academic sources, reads and analyzes full articles, identifies research gaps, and synthesizes findings into a comprehensive report with proper citations and references. It's like having a research assistant that works at superhuman speed."
          }
        },
        {
          "@type": "Question",
          "name": "What makes Apollo AI different from ChatGPT for research?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Unlike general-purpose AI chatbots, Apollo AI is built specifically for academic research. It offers specialized features like PDF document analysis, YouTube video summarization, deep web research with source verification, publication-ready chart generation, real-time voice AI, and multi-language support. Apollo focuses on academic accuracy, proper citations, and research-grade outputs."
          }
        },
        {
          "@type": "Question",
          "name": "Can Apollo AI generate charts and visualizations?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Yes, Apollo AI includes a powerful chart and visualization generator. You can create publication-ready charts including bar charts, line graphs, pie charts, scatter plots, and more from your research data. Charts can be customized and exported for use in academic papers, presentations, and reports."
          }
        },
        {
          "@type": "Question",
          "name": "Does Apollo AI support multiple languages?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Yes, Apollo AI supports multiple languages including English, Arabic, Chinese, French, Spanish, German, and more. It can analyze documents in any language and provide responses in your preferred language. This makes it ideal for international researchers and multilingual academic work."
          }
        }
      ]
    }
    </script>

  <!-- Performance optimizations - Core Web Vitals -->

  <!-- DNS prefetch for external origins (lightweight, no connection waste) -->
  <link rel="dns-prefetch" href="//www.googleapis.com" />
  <link rel="dns-prefetch" href="//apollo-37628.firebaseapp.com" />
  <link rel="dns-prefetch" href="//apis.google.com" />
  <link rel="dns-prefetch" href="//fonts.googleapis.com" />
  <link rel="dns-prefetch" href="//fonts.gstatic.com" />
  <link rel="dns-prefetch" href="//img.youtube.com" />
  <link rel="dns-prefetch" href="//randomuser.me" />
  <link rel="dns-prefetch" href="//identitytoolkit.googleapis.com" />
  <link rel="dns-prefetch" href="//firestore.googleapis.com" />
  <link rel="dns-prefetch" href="//firebasestorage.googleapis.com" />
  <link rel="dns-prefetch" href="//storage.googleapis.com" />
  <link rel="dns-prefetch" href="//us-central1-apollo-37628.cloudfunctions.net" />

  <!-- LIGHTHOUSE OPTIMIZATION: Cache control meta tags -->
  <meta http-equiv="Cache-Control" content="public, max-age=31536000, immutable" />

  <!-- LIGHTHOUSE OPTIMIZATION: Preload critical resources -->
  <!-- Vite will automatically add modulepreload links during build -->

  <!-- Performance hint: Reduce layout shift (viewport already set in line 9) -->

  <!-- Mobile Device Detection Script -->
  <script>
    // Detect mobile device and add class to html element
    (function () {
      const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||
        (window.matchMedia && window.matchMedia('(max-width: 768px)').matches) ||
        ('ontouchstart' in window || navigator.maxTouchPoints > 0);

      // CRITICAL: Detect iOS Safari explicitly
      const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) ||
        (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
      const isIOSSafari = isIOS && /Safari/.test(navigator.userAgent) && !/CriOS|FxiOS|OPiOS/.test(navigator.userAgent);

      if (isMobile) {
        document.documentElement.classList.add('is-mobile');
        document.documentElement.classList.add('touch-device');
      }

      if (isIOS) {
        document.documentElement.classList.add('is-ios');
      }

      if (isIOSSafari) {
        document.documentElement.classList.add('is-ios-safari');
      }

      // Add viewport height fix for mobile browsers (CRITICAL for real iPhone)
      function setViewportHeight() {
        // Use actual innerHeight, not screen height (accounts for address bar)
        const vh = window.innerHeight * 0.01;
        document.documentElement.style.setProperty('--vh', `${vh}px`);

        // Also set a data attribute for CSS targeting
        document.documentElement.setAttribute('data-viewport-height', window.innerHeight.toString());
      }

      // Set immediately
      setViewportHeight();

      // Update on resize (handles address bar show/hide on iOS)
      let resizeTimeout;
      window.addEventListener('resize', () => {
        clearTimeout(resizeTimeout);
        resizeTimeout = setTimeout(setViewportHeight, 100);
      });

      // Update on orientation change
      window.addEventListener('orientationchange', () => {
        setTimeout(setViewportHeight, 500); // Delay for iOS orientation animation
      });

      // Update when visual viewport changes (iOS Safari address bar)
      if (window.visualViewport) {
        window.visualViewport.addEventListener('resize', setViewportHeight);
        window.visualViewport.addEventListener('scroll', setViewportHeight);
      }
    })();
  </script>

  <!-- Add some global styles for animations -->

  <!-- Dark Mode: Apply immediately before React hydration to prevent flash -->
  <script>
    (function () {
      var stored = localStorage.getItem('apollo:theme');
      if (stored === 'dark') {
        document.documentElement.classList.add('dark');
      }
    })();
  </script>
  <style>
    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .animate-fade-in {
      animation: fadeIn 0.7s ease-in-out forwards;
    }

    @keyframes pulse-opacity {

      0%,
      100% {
        opacity: 0.85;
      }

      50% {
        opacity: 0.5;
      }
    }

    .animate-pulse-opacity {
      animation: pulse-opacity 1.5s ease-in-out infinite;
    }

    @keyframes blur-in {
      from {
        filter: blur(5px);
        opacity: 0;
      }

      to {
        filter: blur(0);
        opacity: 1;
      }
    }

    .animate-blur-in {
      animation: blur-in 0.4s ease-out forwards;
    }

    /* Mobile-specific styles */
    html.is-mobile {
      -webkit-text-size-adjust: 100%;
      -moz-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    /* Use CSS custom property for viewport height on mobile */
    html.is-mobile body {
      min-height: calc(var(--vh, 1vh) * 100);
    }
  </style>
  <script type="module" crossorigin src="/assets/js/index-DYOwF9vX.js"></script>
  <link rel="stylesheet" media="print" onload="this.media='all'" crossorigin href="/assets/css/page-chat-CTFX3A-w.css">
    <noscript>  <link rel="stylesheet" crossorigin href="/assets/css/page-chat-CTFX3A-w.css"></noscript>
  <link rel="stylesheet" crossorigin href="/assets/css/index-Drd5loRX.css">
</head>

<body>
  <div id="root">
    <!-- Static SEO content — visible to search engine crawlers before JS loads.
         React will replace this entire div's content on hydration.
         This ensures Googlebot indexes real content even without JS execution. -->
    <!-- Loading state visible to crawlers and mobile audit tools -->
    <div
      style="display:flex;align-items:center;justify-content:center;min-height:100vh;min-height:100dvh;background:#fff">
      <div
        style="width:32px;height:32px;border:3px solid #e5e7eb;border-top-color:#6366f1;border-radius:50%;animation:_spin .7s linear infinite">
      </div>
      <style>
        @keyframes _spin {
          to {
            transform: rotate(360deg)
          }
        }
      </style>
    </div>

    <!-- SEO Content: This content is immediately visible to crawlers and provides indexable text.
         It's inside #root so React will replace it, but crawlers see it on first pass. -->
    <noscript>
      <div
        style="max-width:800px;margin:0 auto;padding:40px 20px;font-family:system-ui,-apple-system,sans-serif;color:#111">
        <header style="text-align:center;margin-bottom:40px">
          <h1 style="font-size:2em;margin-bottom:16px">Apollo AI – #1 AI Academic Researcher for Students</h1>
          <p style="font-size:1.2em;color:#444;max-width:600px;margin:0 auto">The smartest AI academic researcher.
            Analyze PDFs, summarize videos, generate charts & conduct deep research with verified sources. Try free.</p>
        </header>

        <main>
          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">What is Apollo AI? – Your AI Academic Researcher</h2>
            <p>Apollo AI is the smartest AI academic researcher and research assistant built specifically for academics,
              researchers, and
              students. Whether you're writing a thesis, conducting a literature review, or preparing for exams, Apollo
              AI
              helps you work faster and smarter with cutting-edge AI technology. As the best AI for academic research,
              Apollo combines PDF analysis, deep web research, and chart generation into one powerful platform.</p>
          </section>

          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">AI-Powered PDF Analysis</h2>
            <p>Upload any PDF document and Apollo AI will analyze it in seconds — even documents hundreds of pages long.
              Ask questions, get summaries, extract key findings, and identify important data points. Perfect for
              analyzing research papers, technical reports, and academic publications.</p>
          </section>

          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">YouTube Video Summarizer</h2>
            <p>Paste any YouTube URL and Apollo AI will instantly summarize the video content. Extract key insights from
              hours of lectures, conference presentations, and educational videos. Save time by getting comprehensive
              summaries instead of watching entire videos.</p>
          </section>

          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">Deep Web Research with Verified Sources</h2>
            <p>Apollo AI's Deep Research feature conducts comprehensive web research on any academic topic. It
              automatically generates search queries, finds credible sources, verifies information, and synthesizes
              findings into a detailed report with proper citations and references.</p>
          </section>

          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">Chart & Visualization Generator</h2>
            <p>Create publication-ready charts and data visualizations from your research data. Generate bar charts,
              line graphs, pie charts, scatter plots, and more. Export visualizations for use in academic papers,
              presentations, and reports.</p>
          </section>

          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">Real-Time Voice AI</h2>
            <p>Speak naturally and get instant AI responses. Apollo's real-time voice AI lets you conduct hands-free
              research while working on your projects. Perfect for multitasking researchers and students.</p>
          </section>

          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">Why Researchers Choose Apollo AI</h2>
            <ul style="line-height:2">
              <li>Analyze hundreds of PDF pages in seconds</li>
              <li>Summarize YouTube videos instantly</li>
              <li>Deep web research with academic source verification</li>
              <li>Publication-ready chart and visualization generation</li>
              <li>Real-time voice AI for hands-free research</li>
              <li>Multi-language support: English, Arabic, Chinese, French, and more</li>
              <li>Literature review assistant with citation generation</li>
              <li>Free tier available — no credit card required</li>
            </ul>
          </section>

          <section style="margin-bottom:32px">
            <h2 style="font-size:1.5em;margin-bottom:12px">Perfect for Academic Research</h2>
            <p>Whether you're a PhD student writing your dissertation, an undergraduate working on a research project, a
              professor reviewing papers, or a professional researcher, Apollo AI is designed to accelerate your
              workflow and enhance your research quality.</p>
          </section>

          <nav style="margin-top:40px;text-align:center">
            <p><a href="https://useapollo.app/" style="color:#4f46e5">Home</a> |
              <a href="https://useapollo.app/pricing" style="color:#4f46e5">Pricing</a> |
              <a href="https://useapollo.app/blog" style="color:#4f46e5">Blog</a> |
              <a href="https://useapollo.app/contact" style="color:#4f46e5">Contact</a> |
              <a href="https://useapollo.app/terms" style="color:#4f46e5">Terms</a> |
              <a href="https://useapollo.app/privacy" style="color:#4f46e5">Privacy</a>
            </p>
          </nav>
        </main>

        <footer style="margin-top:40px;text-align:center;color:#666;font-size:0.9em">
          <p>© 2026 Apollo AI. All rights reserved. The #1 AI research assistant for academics and students worldwide.
          </p>
        </footer>
      </div>
    </noscript>
  </div>
  <!-- Main app script - Vite will transform this during build -->

  <!-- Service Worker Registration for PWA (Production Only) - Deferred for performance -->
  <script defer>
    // Only register service worker in production builds
    // In development, Vite's dev server handles all requests and service workers cause issues
    (function () {
      // Check if we're in development
      const isDevelopment = window.location.hostname === 'localhost' ||
        window.location.hostname === '127.0.0.1' ||
        window.location.port !== '';

      // Unregister any existing service workers in development
      if (isDevelopment && 'serviceWorker' in navigator) {
        navigator.serviceWorker.getRegistrations().then(function (registrations) {
          for (let registration of registrations) {
            registration.unregister().then(function (success) {
              if (success) {
                console.log('Service Worker unregistered for development');
              }
            });
          }
        });
      }

      // Only register in production
      if (!isDevelopment && 'serviceWorker' in navigator) {
        let refreshing = false;

        // Listen for service worker updates
        navigator.serviceWorker.addEventListener('controllerchange', () => {
          if (refreshing) return;
          refreshing = true;
          window.location.reload();
        });

        window.addEventListener('load', () => {
          navigator.serviceWorker.register('/sw.js')
            .then((registration) => {
              console.log('Service Worker registered:', registration.scope);

              // Check for updates every 60 seconds
              setInterval(() => {
                registration.update();
              }, 60000);

              // Listen for update found
              registration.addEventListener('updatefound', () => {
                const newWorker = registration.installing;
                if (!newWorker) return;

                newWorker.addEventListener('statechange', () => {
                  if (newWorker.state === 'installed' && navigator.serviceWorker.controller) {
                    // New service worker available, show update prompt
                    if (confirm('New version of Apollo available! Click OK to update.')) {
                      newWorker.postMessage({ type: 'SKIP_WAITING' });
                    }
                  }
                });
              });
            })
            .catch((error) => {
              console.warn('Service Worker registration failed:', error);
            });
        });

        // Add global function to clear cache (for debugging)
        window.clearApolloCache = function () {
          if ('serviceWorker' in navigator && navigator.serviceWorker.controller) {
            navigator.serviceWorker.controller.postMessage({ type: 'CLEAR_CACHE' });

            // Also clear browser cache storage
            if ('caches' in window) {
              caches.keys().then((names) => {
                names.forEach((name) => {
                  caches.delete(name);
                });
              });
            }

            // Clear localStorage and sessionStorage
            localStorage.clear();
            sessionStorage.clear();

            setTimeout(() => {
              alert('Cache cleared! Reloading...');
              window.location.reload(true);
            }, 500);
          } else {
            // Fallback for when service worker isn't available
            if ('caches' in window) {
              caches.keys().then((names) => {
                names.forEach((name) => {
                  caches.delete(name);
                });
              });
            }
            localStorage.clear();
            sessionStorage.clear();
            alert('Cache cleared! Reloading...');
            window.location.reload(true);
          }
        };

        console.log('To manually clear cache, run: clearApolloCache()');
      }
    })();
  </script>
</body>

</html>