Adding screen size check for mobile rendering