The classic team site environment will coexist with the modern team and communication site. It will not be deprecated. Its not going anywhere.
You can still do that masterpage, page layouts etc stuff in classic sites with publishing features.
However, all the sexy and new features along with first party Microsoft webparts will be available on these modern sites and site pages only.
Microsoft has introduced new modern team and communication sites for SharePoint Online. You can check the links below. They are very good indicator of what is coming up/developing in the near future.
Besides that, there is another model of developing webparts/extensions to customize these modern sites called SharePoint framework.
Customize Modern sites
Modernize classic site
New capabilities in SharePoint Online team sites including integration with Office 365 Groups
SPO Modern team sites
SPO Communication sites
Getting started with SPFx