fn setup_terminal() -> Result<Terminal<CrosstermBackend<Stdout>>>
Initialize the terminal for TUI mode