
import React from 'react';
import { Routes, Route, BrowserRouter } from 'react-router-dom';
import Index from './pages/Index';
import MainLayout from './pages/MainLayout';
import HomePage from './pages/HomePage';
import MoviesPage from './pages/MoviesPage';
import TvShowsPage from './pages/TvShowsPage';
import SearchPage from './pages/SearchPage';
import MovieDetailPage from './pages/MovieDetailPage';
import TvShowDetailPage from './pages/TvShowDetailPage';
import MoviePlayerPage from './pages/MoviePlayerPage';
import TvShowPlayerPage from './pages/TvShowPlayerPage';
import ProfilePage from './pages/ProfilePage';
import MyListPage from './pages/MyListPage';
import NotFound from './pages/NotFound';

function App() {
  return (
    <BrowserRouter>
    <Routes>
      <Route path="/" element={<Index />} />
      
      <Route path="/" element={<MainLayout />}>
        <Route path="/home" element={<HomePage />} />
        <Route path="/movies" element={<MoviesPage />} />
        <Route path="/tv-shows" element={<TvShowsPage />} />
        <Route path="/search" element={<SearchPage />} />
        <Route path="/movie/:title" element={<MovieDetailPage />} />
        <Route path="/tv-show/:title" element={<TvShowDetailPage />} />
        <Route path="/profile" element={<ProfilePage />} />
        <Route path="/my-list" element={<MyListPage />} />
        <Route path="*" element={<NotFound />} />
      </Route>
      
      {/* Full-Screen Pages */}
      <Route path="/movie/:title/watch" element={<MoviePlayerPage />} />
      <Route path="/tv-show/:title/watch" element={<TvShowPlayerPage />} />
    </Routes>
    </BrowserRouter>
  );
}

export default App;
