@model YatzyGame.Models.LoginViewModel
@{
    ViewData["Title"] = "Log in";
}

<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                <h2 class="text-center">🎲 Login to Yatzy</h2>
            </div>
            <div class="card-body">
                <form asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post">
                    <div asp-validation-summary="All" class="text-danger"></div>
                    
                    <div class="form-group mb-3">
                        <label asp-for="Username" class="form-label"></label>
                        <input asp-for="Username" class="form-control" placeholder="Enter your username" />
                        <span asp-validation-for="Username" class="text-danger"></span>
                    </div>
                    
                    <div class="form-group mb-3">
                        <label asp-for="Password" class="form-label"></label>
                        <input asp-for="Password" class="form-control" placeholder="Enter your password" />
                        <span asp-validation-for="Password" class="text-danger"></span>
                    </div>
                    
                    <div class="form-check mb-3">
                        <input asp-for="RememberMe" class="form-check-input" />
                        <label asp-for="RememberMe" class="form-check-label"></label>
                    </div>
                    
                    <div class="d-grid">
                        <button type="submit" class="btn btn-primary">Log in</button>
                    </div>
                </form>
                
                <hr />
                
                <div class="text-center">
                    <p>Don't have an account? <a asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]">Register here</a></p>
                </div>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
