I'm trying to create a smooth scroll in CSS from one page to the next. Everything seems to work well until I used overflow-y: scroll; then the scrollbar appears in the middle of the page width instead of the standard (sticking to the left).

body {
height: 100vh;
line-height: 1.6;
overflow: hidden;
}
.container {
width: 100%;
height: 100%;
overflow-y: scroll;
scroll-behavior: smooth;
}
section {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
width: 100%;
height: 100vh;
}
<body>
<div class="container">
<section id="sec1">Section 1</section>
<section id="sec2">Section 2</section>
</div>
</body>