<!-- 注册弹窗 -->
<div class="modal-overlay" id="registerModal">
    <div class="modal-container" style="max-height: 90vh;">
        <div class="modal-header">
            <h3 class="modal-title">注册</h3>
            <button class="modal-close" onclick="closeModal('registerModal')">×</button>
        </div>
        <div class="modal-body" style="padding: 20px;">
            <form id="modalRegisterForm" onsubmit="handleModalRegister(event)">
                <div class="form-group" style="margin-bottom: 14px;">
                    <div class="input-icon-wrap">
                        <span class="input-icon"><span class="iconify" data-icon="mdi:account-outline"></span></span>
                        <input type="text" class="form-input with-icon" name="username" placeholder="设置用户名" required>
                    </div>
                </div>
                <div class="form-group" id="emailGroup" style="margin-bottom: 14px;">
                    <div class="input-icon-wrap">
                        <span class="input-icon"><span class="iconify" data-icon="mdi:email-outline"></span></span>
                        <input type="email" class="form-input with-icon" name="email" placeholder="邮箱" required>
                    </div>
                </div>
                <?php if ($registrationEmailVerify): ?>
                <div class="form-group" id="emailCodeGroup" style="margin-bottom: 14px;">
                    <div class="input-icon-wrap">
                        <span class="input-icon"><span class="iconify" data-icon="mdi:shield-check-outline"></span></span>
                        <input type="text" class="form-input with-icon" name="email_code" placeholder="邮箱验证码" required maxlength="6" style="flex:1;">
                        <button type="button" class="send-code-btn" onclick="sendModalEmailCode(this)">获取验证码</button>
                    </div>
                </div>
                <?php endif; ?>
                <div class="form-group" style="margin-bottom: 20px;">
                    <div class="input-icon-wrap">
                        <span class="input-icon"><span class="iconify" data-icon="mdi:key-outline"></span></span>
                        <input type="password" class="form-input with-icon" id="modalRegisterPassword" name="password" placeholder="设置密码（6位以上）" required style="padding-right: 44px;">
                        <button type="button" class="password-toggle-btn" onclick="toggleModalPassword('modalRegisterPassword', this)">
                            <span class="iconify" data-icon="mdi:eye"></span>
                        </button>
                    </div>
                </div>
                <button type="submit" class="auth-btn register-btn" id="registerSubmitBtn">
                    <span class="btn-text">注册</span>
                    <span class="btn-loading" style="display:none;">注册中...</span>
                </button>
                <div class="auth-footer">
                    <a href="javascript:void(0)" onclick="switchToLogin()" class="auth-link">已有账号？立即登录</a>
                </div>
            </form>
        </div>
    </div>
</div>
