\usepackage[framemethod=TikZ]{mdframed}
\mdfsetup{skipabove=1em,skipbelow=0em, innertopmargin=5pt, innerbottommargin=6pt}

\usepackage{amsthm}  % math commands for theorems
\usepackage{thmtools} % improved theorems
\usepackage{environ} % for hiding of the solution env