import { ThemeProvider } from "@/contexts/ThemeContext"
import { ParticleBackground } from "@/components/ui/magicui"
import { Navigate, Route, Routes } from "react-router-dom"
import { HomePage } from "@/pages/HomePage"
import { DocumentationPage } from "@/pages/DocumentationPage"

function App() {
  return (
    <ThemeProvider defaultTheme="dark" storageKey="devour-ui-theme">
      <div className="relative min-h-screen bg-background text-foreground overflow-x-hidden">
        <ParticleBackground />
        <Routes>
          <Route path="/" element={<HomePage />} />
          <Route path="/documentation" element={<DocumentationPage />} />
          <Route path="*" element={<Navigate to="/" replace />} />
        </Routes>
      </div>
    </ThemeProvider>
  )
}

export default App
