/* 登录 / 注册：沿用玉京子模板的紫蓝渐变，保留小屏及键盘展开时的正常滚动。 */
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #273044;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: radial-gradient(ellipse at 12% 10%, rgba(124, 58, 237, .10), transparent 48%),
        radial-gradient(ellipse at 95% 90%, rgba(59, 130, 246, .11), transparent 48%), #f5f7fc;
}
.register-container, .login-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    flex: none;
    border: 1px solid rgba(121, 105, 182, .12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(56, 38, 111, .09);
}
.register-container::before, .login-container::before {
    content: '';
    position: absolute;
    top: -1px;
    right: 18px;
    left: 18px;
    height: 3px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(115deg, #7c3aed, #4f46e5 52%, #3b82f6);
}
.register-banner, .login-banner { display: none; }
.register-form, .login-form { min-width: 0; padding: 26px 28px; }
.auth-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    color: #8a8fa3;
    font-size: 12px;
    line-height: 18px;
}
.auth-home:hover { color: #7c3aed; }
.form-title { margin: 0; color: #252e42; font-size: 25px; font-weight: 650; line-height: 1.3; }
.auth-subtitle { margin: 6px 0 20px; color: #9095a7; font-size: 12px; line-height: 18px; }
.register-toggle, .login-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 10px;
    background: #f3f2fa;
}
.toggle-item { flex: 1; padding: 7px 0; text-align: center; font-size: 12px; color: #8a8fa3; border-radius: 7px; cursor: pointer; }
.toggle-item.active { background: #fff; color: #6d48d8; box-shadow: 0 2px 8px rgba(69, 42, 136, .06); }
.form-group { position: relative; margin-bottom: 12px; }
.layui-form-label {
    position: absolute;
    left: 12px;
    top: 0;
    z-index: 1;
    width: 20px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a6a2bb;
    pointer-events: none;
}
.layui-input-block { margin-left: 0; min-height: 0; }
.layui-input {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #eae8f1;
    border-radius: 10px;
    background: #fafaff;
    color: #31394e;
    font-size: 16px;
    box-shadow: none;
}
.form-group:not(.captcha-group) .layui-input { padding-left: 40px; }
.layui-input::placeholder { color: #aaa7b9; font-size: 13px; }
.layui-input:hover { border-color: #d4c9f0; }
.layui-input:focus { border-color: #a78bfa !important; background: #fff; box-shadow: 0 0 0 3px rgba(124, 58, 237, .07); }
.captcha-group { display: flex; gap: 8px; }
.captcha-group .layui-input-block { flex: 1; min-width: 0; }
.email-code-field { margin-bottom: 0; }
.captcha-img {
    flex: 0 0 108px;
    height: 44px;
    border: 1px solid #e4dcfa;
    border-radius: 10px;
    padding: 0 8px;
    background: #f3eefe;
    color: #7651d5;
    font: inherit;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}
.captcha-img:disabled { opacity: .65; cursor: default; }
.email-code-help { margin: 5px 0 12px; color: #a09aad; font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
#checkcode { flex: 0 0 108px; width: 108px; height: 44px; border-radius: 10px; cursor: pointer; }
.agreement {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 14px 0;
    color: #9691a5;
    font-size: 11px;
    line-height: 17px;
}
.agreement .layui-form-checkbox { flex: none; margin: 1px 0 0; }
.agreement .layui-form-checkbox[lay-skin=primary]>i { border-radius: 4px; }
.agreement a, .login-link a, .register-link a, .form-options>a { color: #7c5bd5; }
.agreement .layui-form-checked[lay-skin=primary]>i { border-color: #8b5cf6; background-color: #8b5cf6; }
.layui-btn {
    width: 100%;
    height: 44px;
    line-height: 44px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(115deg, #7c3aed, #4f46e5 52%, #3b82f6);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 6px 15px rgba(104, 73, 214, .18);
}
.layui-btn:hover { opacity: .92; color: #fff; }
.layui-btn:disabled { opacity: .65; cursor: wait; }
.login-link, .register-link { margin-top: 16px; text-align: center; color: #aaa5b6; font-size: 12px; line-height: 18px; }
.login-link a, .register-link a { margin-left: 4px; }
.form-options { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 18px; font-size: 12px; }
.form-options .layui-form-item { margin: 0; }
.form-options .layui-form-checkbox[lay-skin=primary]>div { font-size: 12px; color: #9691a5; }
.auth-feedback { margin: 0 0 10px; color: #ad4670; font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.auth-feedback:empty { display: none; }
.auth-feedback.is-success { color: #4b8a74; }
.display-hide { display: none; }
@media (max-width: 600px) {
    body { padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
    .register-form, .login-form { padding: 22px; }
    .register-container, .login-container { border-radius: 18px; }
}
@media (max-width: 600px) and (max-height: 700px) {
    .register-form, .login-form { padding: 16px 20px; }
    .auth-home { margin-bottom: 8px; }
    .form-title { font-size: 22px; }
    .auth-subtitle { margin: 4px 0 12px; }
    .form-group { margin-bottom: 8px; }
    .email-code-field { margin-bottom: 0; }
    .email-code-help { margin-bottom: 8px; }
    .agreement { margin: 10px 0; }
    .login-link, .register-link { margin-top: 12px; }
}
@media (max-width: 600px) and (max-height: 600px) {
    body { padding: 8px; }
    .register-form, .login-form { padding: 14px 16px; }
    .auth-subtitle { display: none; }
    .form-title { margin-bottom: 14px; }
    .layui-input, .layui-form-label, .captcha-img, #checkcode { height: 40px; }
    .captcha-img { flex-basis: 100px; }
    #checkcode { flex-basis: 100px; width: 100px; }
    .register-toggle, .login-toggle { margin-bottom: 10px; }
}
