*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #fff;
    color: #111;
}

.page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
}

.left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    background: linear-gradient(135deg, #9ca3af, #6b7280, #4b5563);
    color: #fff;
    overflow: hidden;
}

.blob1,
.blob2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.blob1 {
    top: 25%;
    right: 25%;
    width: 256px;
    height: 256px;
    background: rgba(156, 163, 175, 0.2);
}

.blob2 {
    bottom: 25%;
    left: 25%;
    width: 384px;
    height: 384px;
    background: rgba(209, 213, 219, 0.2);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.05) 0 1px,
            transparent 1px 20px
    ),
    repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.05) 0 1px,
            transparent 1px 20px
    );
    pointer-events: none;
}

.characters-wrap {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 500px;
}

.characters {
    position: relative;
    width: 550px;
    height: 400px;
}

.char {
    position: absolute;
    bottom: 0;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom center;
}

.char-purple {
    left: 70px;
    width: 180px;
    height: 400px;
    background: #6c3ff5;
    border-radius: 10px 10px 0 0;
    z-index: 1;
}

.char-purple .eyes-wrap {
    position: absolute;
    display: flex;
    gap: 32px;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-black {
    left: 240px;
    width: 120px;
    height: 310px;
    background: #2d2d2d;
    border-radius: 8px 8px 0 0;
    z-index: 2;
}

.char-black .eyes-wrap {
    position: absolute;
    display: flex;
    gap: 24px;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-orange {
    left: 0;
    width: 240px;
    height: 200px;
    background: #ff9b6b;
    border-radius: 120px 120px 0 0;
    z-index: 3;
}

.char-orange .eyes-wrap {
    position: absolute;
    display: flex;
    gap: 32px;
    transition: all 0.2s ease-out;
}

.char-yellow {
    left: 310px;
    width: 140px;
    height: 230px;
    background: #e8d754;
    border-radius: 70px 70px 0 0;
    z-index: 4;
}

.char-yellow .eyes-wrap {
    position: absolute;
    display: flex;
    gap: 24px;
    transition: all 0.2s ease-out;
}

.char-yellow .mouth {
    position: absolute;
    width: 80px;
    height: 4px;
    background: #2d2d2d;
    border-radius: 4px;
    transition: all 0.2s ease-out;
}

.eyeball {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: height 0.15s;
    background: #fff;
}

.eyeball .pupil {
    border-radius: 50%;
    background: #2d2d2d;
    transition: transform 0.1s ease-out;
}

.pupil-only {
    border-radius: 50%;
    background: #2d2d2d;
    transition: transform 0.1s ease-out;
}

.right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.form-box {
    width: 100%;
    max-width: 420px;
}

.form-box .header {
    text-align: center;
    margin-bottom: 22px;
}

.form-box .header h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.form-box .header p {
    color: #6b7280;
    font-size: 14px;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.field input:focus {
    border-color: #111;
}

.field .input-wrap {
    position: relative;
}

.field .input-wrap input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
    padding: 4px;
}

.toggle-pw:hover {
    color: #111;
}

.toggle-pw svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.row .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.row .remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #111;
    cursor: pointer;
}

.row a {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
}

.row a:hover {
    text-decoration: underline;
}

.hover-btn {
    position: relative;
    width: 100%;
    height: 44px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.hover-btn .label {
    display: inline-block;
    transition: all 0.3s;
}

.hover-btn .overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #111;
    color: #fff;
    border-radius: 9999px;
    opacity: 0;
    transition: opacity 0.3s;
}

.hover-btn:hover .label {
    transform: translateX(48px);
    opacity: 0;
}

.hover-btn:hover .overlay {
    opacity: 1;
}

.divider {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: #6b7280;
}

.divider a {
    color: #111;
    font-weight: 500;
    text-decoration: none;
}

.divider a:hover {
    text-decoration: underline;
}

.arrow-icon {
    width: 16px;
    height: 16px;
}

@media (max-width: 1024px) {
    body {
        height: auto;
        overflow: auto;
    }

    .page {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .left {
        padding: 12px 16px 0;
    }

    .characters-wrap {
        height: 130px;
    }

    .characters {
        transform: scale(0.3);
        transform-origin: bottom center;
    }

    .right {
        padding: 12px 18px 24px;
    }

    .form-box .header {
        margin-bottom: 12px;
    }

    .form-box .header h1 {
        font-size: 22px;
    }

    .form-box .header p {
        font-size: 13px;
    }

    .field {
        margin-bottom: 10px;
    }

    .field input {
        height: 40px;
    }

    .form-box .captcha-img,
    .form-box .send-code {
        height: 40px;
    }

    .hover-btn {
        height: 42px;
    }

    .oauth-login {
        margin-top: 12px;
    }

    .divider {
        margin-top: 14px;
    }
}



/* ── 注册页适配：表单更长，允许页面滚动；验证码行与发送按钮 ─────────────── */
body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

.page {
    height: auto;
    min-height: 100vh;
}

.form-box .header h1 {
    font-size: 28px;
}

/* 选择器不绑 .field：注册页与登录页同款，表单项走 layui 结构 */
.form-box .code-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-box .code-row input,
.form-box .code-row .layui-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.form-box .send-code {
    flex: none;
    /* 与 .form-box .layui-input 等高，同一行的输入框与按钮才齐平 */
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.form-box .send-code:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.form-box .auth-notice {
    margin-bottom: 18px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.8;
}

/* ── 右侧表单：layui 官方结构紧凑化，保证一屏 ─────────────────────────── */
.form-box .layui-form-item {
    margin-bottom: 10px;
}

.form-box .layui-input {
    height: 40px;
    line-height: 40px;
}

.form-box .layui-input-wrap .layui-input {
    padding-left: 36px;
}

.form-box .layui-btn-fluid {
    height: 40px;
    line-height: 40px;
}

.form-box .auth-captcha-img {
    height: 40px;
}

/* 底部第三方登录：登录 / 注册 / 找回三页统一走 .oauth-login 结构
   （居中标题 + 圆形图标，样式见下方 .oauth-title / .oauth-btns / .oauth-btn） */
.oauth-login {
    margin-top: 18px;
}

/* 登录页「忘记密码」：与「记住账号」同一行、右对齐 */
.form-box .auth-forget {
    color: #5D87FF;
    font-size: 13px;
    text-decoration: none;
}

.form-box .auth-forget:hover {
    text-decoration: underline;
}

.oauth-title {
    position: relative;
    margin-bottom: 12px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.oauth-title::before,
.oauth-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #e5e7eb;
}

.oauth-title::before { left: 0; }
.oauth-title::after { right: 0; }

.oauth-btns {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: #4b5563;
    font-size: 18px;
    text-decoration: none;
    transition: all .2s;
}

.oauth-btn:hover {
    border-color: #111;
    color: #111;
}

/* 渠道品牌色：微信绿 / QQ 蓝 / 支付宝蓝。
   登录 / 注册 / 找回三页现在是同一套圆形图标，颜色只按渠道走这一处，不再另配行内小图标形态。 */
.oauth-btn.oauth-wechat i { color: #4daf29; }
.oauth-btn.oauth-qq i     { color: #3492ed; }
.oauth-btn.oauth-alipay i { color: #1677ff; }

.oauth-btn img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}
