<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - 后台管理</title>
    <link rel="stylesheet" href="/css/admin.css">
    <link rel="icon" href="/img/favicon.png" type="image/png">
</head>
<body>
    <div class="auth-container">
        <div class="auth-box">
            <div class="auth-header">
                <div class="auth-logo">
                    <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                        <rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
                        <circle cx="8.5" cy="8.5" r="1.5"/>
                        <polyline points="21 15 16 10 5 21"/>
                    </svg>
                </div>
                <h1>创建管理员账户</h1>
                <p>第一个注册的用户将自动成为管理员</p>
            </div>

            <form id="register-form" class="auth-form">
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" id="username" name="username" required minlength="3" maxlength="50" placeholder="请输入用户名">
                    <small>3-50个字符</small>
                </div>

                <div class="form-group">
                    <label for="email">邮箱</label>
                    <input type="email" id="email" name="email" required placeholder="your@email.com">
                </div>

                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" id="password" name="password" required minlength="8" placeholder="至少8个字符">
                    <small>至少8个字符，包含大小写字母、数字和特殊字符</small>
                    <div class="password-strength" id="password-strength"></div>
                </div>

                <div class="form-group">
                    <label for="confirm-password">确认密码</label>
                    <input type="password" id="confirm-password" name="confirm-password" required placeholder="再次输入密码">
                </div>

                <button type="submit" class="btn btn-primary">
                    <span>创建账户</span>
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                        <path d="M5 12h14"/>
                        <polyline points="12 5 19 12 12 19"/>
                    </svg>
                </button>

                <div class="auth-footer">
                    <a href="/admin/login" class="auth-link">已有账户？立即登录</a>
                </div>
            </form>

            <div id="auth-error" class="error-message"></div>
        </div>
    </div>

    <script src="/js/auth.js"></script>
</body>
</html>
