'use client'
import { type FC } from 'react'
import { useRouter } from 'next/navigation'
import { CloseCircle } from 'iconsax-react'

const Game2048Page: FC = () => {
    const router = useRouter()

    return (
        <div className='fixed inset-0 w-full h-full p-0 m-0 bg-white'>
            <button
                onClick={() => router.back()}
                className='absolute top-4 left-4 z-50 bg-white rounded-full shadow-lg p-1 hover:bg-gray-100 transition-colors'
                aria-label='بستن'
            >
                <CloseCircle size='32' color='#000' variant='Bold' />
            </button>
            <iframe
                src='/game2048/index.html'
                className='w-full h-full border-0'
                title='2048 Game'
                sandbox='allow-scripts allow-same-origin'
                referrerPolicy='no-referrer'
            />
        </div>
    )
}

export default Game2048Page
