<%- include('../partials/header') %>
<%- include('../partials/main_nav') %>

<!-- Main Content -->
<main class="container">
    <div class="login-container">
        <h1 class="login-title"><%= title %></h1>
        <form id="login-form" class="form" action="/login" method="post">
            <div class="form-group">
                <label for="username">Username:</label>
                <input type="text" name="username" id="username" class="form-input" placeholder="Enter your username" required />
            </div>
            <div class="form-group">
                <label for="password">Password:</label>
                <input type="password" name="password" id="password" class="form-input" placeholder="Enter your password" required />
            </div>
            <div class="form-group">
                <input type="submit" name="submit" class="btn btn-primary" value="Login" />
            </div>
            <div class="register-link">
                <span>New to FoodSpot? </span><a href="/register">Register here</a>
            </div>
        </form>
    </div>
</main>

<%- include('../partials/bottom_nav') %> 
<%- include('../partials/footer') %>

<!-- Custom Styles -->
<style>
    body {
        font-family: 'Arial', sans-serif;
        background-color: #f7f7f7;
    }

    .container {
        max-width: 600px;
    }

    .login-container {
        background-color: #fff;
        padding: 40px 60px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .login-title {
        font-size: 28px;
        margin-bottom: 25px;
        color: #333;
        text-align: center;
    }

    .form-group {
        margin-bottom: 20px;
    }

    label {
        display: block;
        margin-bottom: 8px;
        color: #555;
    }

    .form-input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 16px;
        color: #333;
    }

    .btn-primary {
        width: 100%;
        padding: 10px;
        background-color: #007BFF;
        border: none;
        border-radius: 4px;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .btn-primary:hover {
        background-color: #0056b3;
    }

    .register-link {
        text-align: center;
        font-size: 16px;
    }

    .register-link a {
        color: #007BFF;
        text-decoration: none;
    }

    .register-link a:hover {
        text-decoration: underline;
    }
</style>
