<%- include('../shared/header'); %>

<div class="auth-section d-flex justify-content-center align-items-center" id="section_signup" style="min-height: 100vh;">
  <div class="container">
    <div class="row justify-content-center">
      <div class="col-lg-6 col-md-8 col-12">
        <div class="auth-form bg-white shadow-lg p-4">
          <h2 class="text-center mb-4">Sign Up</h2>
          <% if (alert) { %>
            <div class="alert alert-danger"><%= alert %></div> <!-- Added line -->
          <% } %>
          <form action="/auth/signup" method="POST" enctype="multipart/form-data">
            <div class="form-group mb-3">
              <label for="first_name">First Name:</label>
              <input type="text" name="first_name" class="form-control" required>
            </div>
            <div class="form-group mb-3">
              <label for="last_name">Last Name:</label>
              <input type="text" name="last_name" class="form-control" required>
            </div>
            <div class="form-group mb-3">
              <label for="user_name">Username:</label>
              <input type="text" name="user_name" class="form-control" required>
            </div>
            <div class="form-group mb-3">
              <label for="email">Email:</label>
              <input type="email" name="email" class="form-control" required>
            </div>
            <div class="form-group mb-3">
              <label for="password">Password:</label>
              <input type="password" name="password" class="form-control" required>
            </div>
            <div class="form-group mb-3">
              <label for="avatar">Avatar:</label>
              <input type="file" name="avatar" class="form-control">
            </div>
            <div class="d-grid">
              <button type="submit" class="btn btn-primary">Sign Up</button>
            </div>
          </form>
          <div class="text-center mt-3">
            <p>Already have an account? <a href="/auth/login">Login</a></p>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<%- include('../shared/footer'); %>
