<!DOCTYPE html>
<html lang="vi">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Đăng ký - SocialNet</title>
  <link rel="stylesheet" href="/css/style.css">
</head>
<body class="auth-page">
  <div class="auth-container">
    <div class="auth-box">
      <h1>SocialNet</h1>
      <h2>Đăng ký</h2>
      <% if (error) { %>
        <div class="alert alert-danger"><%= error %></div>
      <% } %>
      <form action="/register" method="POST">
        <div class="form-group">
          <input type="text" name="username" placeholder="Tên đăng nhập (3-20 ký tự)" required>
        </div>
        <div class="form-group">
          <input type="password" name="password" placeholder="Mật khẩu" required>
        </div>
        <div class="form-group">
          <input type="text" name="fullname" placeholder="Họ và tên" required>
        </div>
        <button type="submit" class="btn-primary">Đăng ký</button>
      </form>
      <p>Đã có tài khoản? <a href="/login">Đăng nhập</a></p>
    </div>
  </div>
</body>
</html>