add dynamic freeze distance based on screen size