<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>EDUVISE.AI | Educational Advice & AI Learning Consultation</title>
  <meta name="description" content="Eduvise.ai offers personalized educational advice and AI-powered career guidance. Book your consultation today to plan your academic or professional path with expert mentors.">
  <meta name="keywords" content="educational advice, education consultation, AI learning, career guidance, eduvise, eduvise.ai, study planning, online learning, study abroad, education counselor">
  <meta name="robots" content="index, follow">
  <link rel="canonical" href="https://eduvise.ai/">
  <link rel="icon" href="favicon.png">
  <link rel="manifest" href="manifest.json">

  <!-- Schema.org Structured Data for Educational Organization -->
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "EducationalOrganization",
    "name": "Eduvise.ai",
    "url": "https://eduvise.ai",
    "logo": "https://eduvise.ai/assets/logo.png",
    "description": "Eduvise.ai offers educational advice, AI learning consultation, and career guidance for students and professionals.",
    "sameAs": [
      "https://www.linkedin.com/company/eduviseai",
      "https://twitter.com/eduviseai"
    ]
  }
  </script>

  <!-- Razorpay Script -->
  <script src="https://checkout.razorpay.com/v1/checkout.js"></script>

  <!-- Flutter Web Script -->
  <script src="flutter.js" defer></script>
</head>
<body>

  <!-- SEO Fallback Content -->
  <noscript>
    <div style="padding: 20px; text-align: center;">
      <h1>Eduvise.ai - AI Powered Educational & Career Guidance</h1>
      <p>Get expert education consultation and personalized career guidance powered by AI. Eduvise.ai helps students and professionals make smarter academic and career choices.</p>
      <p>Please enable JavaScript to use our application, or visit our main website.</p>
    </div>
  </noscript>

  <!-- Hidden SEO Content -->
  <div id="seo-content" style="display:none;">
    <h1>Eduvise.ai - AI Powered Educational & Career Guidance</h1>
    <p>Get expert education consultation and personalized career guidance powered by AI. Eduvise.ai helps students and professionals make smarter academic and career choices.</p>
    <ul>
      <li>AI powered counseling</li>
      <li>Online learning recommendations</li>
      <li>Career change guidance</li>
      <li>University and course selection</li>
    </ul>
  </div>

  <script>
    // Simple Flutter initialization - FIXED VERSION
    window.addEventListener('load', function(ev) {
      console.log('Page loaded, initializing Flutter...');
      
      // Download main.dart.js
      _flutter.loader.loadEntrypoint({
        // Remove serviceWorker configuration to fix the error
        onEntrypointLoaded: async function(engineInitializer) {
          try {
            console.log('Flutter entrypoint loaded, initializing engine...');
            
            // Initialize the Flutter engine
            const appRunner = await engineInitializer.initializeEngine();
            
            console.log('Flutter engine initialized, running app...');
            
            // Run the app
            await appRunner.runApp();
            
            console.log('Flutter app started successfully');
            
          } catch (error) {
            console.error('Flutter initialization failed:', error);
            document.getElementById('loading').innerHTML = 
              '<p>Application failed to load. Please refresh the page.</p>' +
              '<button onclick="window.location.reload()" style="padding: 10px 20px; margin-top: 20px;">Retry</button>';
          }
        }
      });
    });

    // Check if Razorpay loaded successfully
    window.addEventListener('load', function() {
      setTimeout(function() {
        if (typeof Razorpay === 'undefined') {
          console.warn('Razorpay script not loaded. Payment features may not work.');
        } else {
          console.log('Razorpay loaded successfully');
        }
      }, 1000);
    });
  </script>
</body>
</html>