refined fit to screen functionality, adjusted canvas viewbox and added canvas margin