/* merchant-auth-beautify v26 backend-route-clean-fixed
 * 外层布局 + 左侧多角色入场动画 + 稳定自定义小眼睛，不改系统登录/注册提交逻辑
 */

html,
body,
#app {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    background: #f7f8fb;
}

body.fcy-auth-enhanced {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #f7f8fb !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 让系统外层也铺满视口，避免底部露出原页面白底 */
body.fcy-auth-enhanced #app,
body.fcy-auth-enhanced .arco-layout,
body.fcy-auth-enhanced .arco-layout-content,
body.fcy-auth-enhanced .layout,
body.fcy-auth-enhanced .layout-content,
body.fcy-auth-enhanced .page-container,
body.fcy-auth-enhanced .container {
    width: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    background: #f7f8fb !important;
}

/* 防止旧版本残留 */
body.fcy-auth-enhanced .fcy-auth-nav,
body.fcy-auth-enhanced .fcy-auth-top-links,
body.fcy-auth-enhanced .fcy-auth-return,
body.fcy-auth-enhanced .fcy-auth-home-link {
    display: none !important;
}

/* 页面主体：左侧动画 + 右侧系统原表单 */
body.fcy-auth-enhanced .content-inner {
    box-sizing: border-box !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    display: grid !important;
    grid-template-columns: minmax(520px, 52vw) minmax(420px, 1fr) !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #f7f8fb !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 10 !important;
}

/* 隐藏系统自带右侧宣传/轮播区域，保留登录/注册表单 */
body.fcy-auth-enhanced .content-inner > *:not(.fcy-auth-left):not(.login-form-wrapper):not(.register-form-wrapper):not(.arco-modal-container):not(.arco-modal-wrapper):not(.arco-modal-mask) {
    display: none !important;
}

body.fcy-auth-enhanced .fcy-auth-left {
    box-sizing: border-box;
    position: relative;
    grid-column: 1;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    color: rgba(255, 255, 255, .92);
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.22) 0, rgba(255,255,255,.08) 22%, transparent 44%),
        radial-gradient(circle at 80% 74%, rgba(108,63,245,.28) 0, transparent 45%),
        linear-gradient(135deg, #7d7f8c 0%, #606371 45%, #4b4e5d 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 38px 44px 34px;
}

body.fcy-auth-enhanced .fcy-auth-left::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .26;
    background-image:
        linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.42));
    pointer-events: none;
}

body.fcy-auth-enhanced .fcy-auth-left::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    left: -120px;
    bottom: -120px;
    background: rgba(255,255,255,.14);
    border-radius: 999px;
    filter: blur(8px);
    pointer-events: none;
}

.fcy-auth-logo {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: #ffffff;
    text-decoration: none;
    user-select: none;
}

.fcy-auth-logo-img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
}

.fcy-auth-logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: #1744a2;
    font-weight: 900;
    letter-spacing: .5px;
    background: linear-gradient(135deg, #ffffff, #dceaff);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .13);
}

.fcy-auth-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.fcy-auth-logo-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .02em;
}

.fcy-auth-logo-subtitle {
    margin-top: 4px;
    font-size: 12px;
    opacity: .72;
}

.fcy-auth-stage {
    position: relative;
    z-index: 4;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 450px;
    margin: 18px 0 8px;
}

/* CareerCompass 动画移植版 */
.fcy-auth-characters {
    --fcy-character-scale: 1.08;
    position: relative;
    width: 610px;
    height: 430px;
    transform: translateY(0) scale(var(--fcy-character-scale));
    transform-origin: center bottom;
}

/* 页面刚打开时：每个卡通人物使用不同入场方式，节奏放慢，方便看清楚 */
body.fcy-auth-enhanced .fcy-char {
    opacity: 1;
    backface-visibility: hidden;
}

body.fcy-auth-enhanced .fcy-char-black {
    animation: fcyBlackDropSpin 1.82s cubic-bezier(.16, .86, .20, 1) .10s backwards;
}

body.fcy-auth-enhanced .fcy-char-orange {
    animation: fcyOrangeRollIn 1.72s cubic-bezier(.16, .86, .20, 1) .34s backwards;
}

body.fcy-auth-enhanced .fcy-char-purple {
    animation: fcyPurpleSlideBounce 1.62s cubic-bezier(.16, .86, .20, 1) .55s backwards;
}

body.fcy-auth-enhanced .fcy-char-yellow {
    animation: fcyYellowPopUp 1.55s cubic-bezier(.16, .86, .20, 1) .78s backwards;
}

@keyframes fcyBlackDropSpin {
    0% {
        opacity: 0;
        translate: 0 -560px;
        rotate: -420deg;
        scale: .72;
        filter: blur(5px);
    }
    48% {
        opacity: 1;
        translate: 0 34px;
        rotate: 26deg;
        scale: 1.06;
        filter: blur(0);
    }
    64% {
        translate: 0 -22px;
        rotate: -13deg;
        scale: .99;
    }
    80% {
        translate: 0 10px;
        rotate: 6deg;
        scale: 1.02;
    }
    100% {
        opacity: 1;
        translate: 0 0;
        rotate: 0deg;
        scale: 1;
        filter: blur(0);
    }
}

@keyframes fcyOrangeRollIn {
    0% {
        opacity: 0;
        translate: -420px 0;
        rotate: -540deg;
        scale: .88;
        filter: blur(4px);
    }
    52% {
        opacity: 1;
        translate: 34px 0;
        rotate: 28deg;
        scale: 1.04;
        filter: blur(0);
    }
    70% {
        translate: -16px 0;
        rotate: -9deg;
        scale: .99;
    }
    86% {
        translate: 7px 0;
        rotate: 4deg;
        scale: 1.01;
    }
    100% {
        opacity: 1;
        translate: 0 0;
        rotate: 0deg;
        scale: 1;
        filter: blur(0);
    }
}

@keyframes fcyPurpleSlideBounce {
    0% {
        opacity: 0;
        translate: -360px 80px;
        rotate: -22deg;
        scale: .90;
        filter: blur(4px);
    }
    50% {
        opacity: 1;
        translate: 28px -14px;
        rotate: 7deg;
        scale: 1.03;
        filter: blur(0);
    }
    68% {
        translate: -13px 7px;
        rotate: -4deg;
        scale: .995;
    }
    84% {
        translate: 6px -3px;
        rotate: 2deg;
        scale: 1.005;
    }
    100% {
        opacity: 1;
        translate: 0 0;
        rotate: 0deg;
        scale: 1;
        filter: blur(0);
    }
}

@keyframes fcyYellowPopUp {
    0% {
        opacity: 0;
        translate: 0 150px;
        scale: .68 .42;
        filter: blur(4px);
    }
    46% {
        opacity: 1;
        translate: 0 -34px;
        scale: 1.06 1.10;
        filter: blur(0);
    }
    64% {
        translate: 0 15px;
        scale: 1.03 .94;
    }
    82% {
        translate: 0 -7px;
        scale: .98 1.03;
    }
    100% {
        opacity: 1;
        translate: 0 0;
        scale: 1;
        filter: blur(0);
    }
}

.fcy-char {
    position: absolute;
    bottom: 0;
    transform-origin: bottom center;
    transition:
        height .62s cubic-bezier(.22, .85, .25, 1),
        transform .62s cubic-bezier(.22, .85, .25, 1),
        border-radius .3s ease;
    will-change: transform, height;
}

.fcy-char-purple {
    left: 78px;
    width: 190px;
    height: 402px;
    z-index: 1;
    background: #6C3FF5;
    border-radius: 12px 12px 0 0;
    transform: skewX(var(--purple-skew, 0deg)) translateX(var(--purple-move-x, 0px));
}

.fcy-char-black {
    left: 265px;
    width: 124px;
    height: 312px;
    z-index: 2;
    background: #2D2D2D;
    border-radius: 10px 10px 0 0;
    transform: skewX(var(--black-skew, 0deg)) translateX(var(--black-move-x, 0px));
}

.fcy-char-orange {
    left: 10px;
    width: 252px;
    height: 205px;
    z-index: 3;
    background: #FF9B6B;
    border-radius: 126px 126px 0 0;
    transform: skewX(var(--orange-skew, 0deg));
}

.fcy-char-yellow {
    left: 340px;
    width: 148px;
    height: 236px;
    z-index: 4;
    background: #E8D754;
    border-radius: 74px 74px 0 0;
    transform: skewX(var(--yellow-skew, 0deg));
}

.fcy-eyes {
    position: absolute;
    display: flex;
    gap: 28px;
    transition:
        left .55s cubic-bezier(.22,.85,.25,1),
        top .55s cubic-bezier(.22,.85,.25,1);
}

.fcy-char-purple .fcy-eyes {
    left: calc(48px + var(--purple-face-x, 0px));
    top: calc(42px + var(--purple-face-y, 0px));
    gap: 32px;
}

.fcy-char-black .fcy-eyes {
    left: calc(28px + var(--black-face-x, 0px));
    top: calc(32px + var(--black-face-y, 0px));
    gap: 26px;
}

.fcy-char-orange .fcy-eyes {
    left: calc(88px + var(--orange-face-x, 0px));
    top: calc(92px + var(--orange-face-y, 0px));
    gap: 34px;
}

.fcy-char-yellow .fcy-eyes {
    left: calc(56px + var(--yellow-face-x, 0px));
    top: calc(42px + var(--yellow-face-y, 0px));
    gap: 28px;
}

.fcy-eyeball {
    width: var(--eye-size, 18px);
    height: var(--eye-size, 18px);
    border-radius: 999px;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    transition: height .12s ease, transform .15s ease;
}

.fcy-char-black .fcy-eyeball {
    --eye-size: 16px;
}

.fcy-pupil {
    width: var(--pupil-size, 7px);
    height: var(--pupil-size, 7px);
    border-radius: 999px;
    background: #2D2D2D;
    transform: translate(var(--pupil-x, 0px), var(--pupil-y, 0px));
    transition: transform .08s linear;
}

.fcy-char-black .fcy-pupil {
    --pupil-size: 6px;
}

.fcy-char-orange .fcy-eyeball,
.fcy-char-yellow .fcy-eyeball {
    background: transparent;
    width: 13px;
    height: 13px;
    overflow: visible;
}

.fcy-char-orange .fcy-pupil,
.fcy-char-yellow .fcy-pupil {
    width: 13px;
    height: 13px;
}

.fcy-yellow-mouth {
    position: absolute;
    left: calc(43px + var(--yellow-face-x, 0px));
    top: calc(91px + var(--yellow-face-y, 0px));
    width: 82px;
    height: 4px;
    border-radius: 999px;
    background: #2D2D2D;
    transition: left .18s ease, top .18s ease, transform .18s ease;
}

/* 打字时互相看 */
body.fcy-auth-enhanced.fcy-is-typing .fcy-char-purple {
    height: 438px;
    --purple-move-x: 38px;
}

body.fcy-auth-enhanced.fcy-is-typing .fcy-char-purple .fcy-eyes {
    left: 58px;
    top: 66px;
}

body.fcy-auth-enhanced.fcy-is-typing .fcy-char-black {
    --black-move-x: 18px;
}

body.fcy-auth-enhanced.fcy-is-typing .fcy-char-black .fcy-eyes {
    left: 34px;
    top: 14px;
}

/* 密码隐藏时回避 */
body.fcy-auth-enhanced.fcy-password-hidden .fcy-char-purple {
    height: 438px;
    --purple-move-x: 40px;
    --purple-skew: -12deg !important;
}

body.fcy-auth-enhanced.fcy-password-hidden .fcy-char-black {
    --black-skew: 3deg !important;
}

body.fcy-auth-enhanced.fcy-password-hidden .fcy-char-orange .fcy-pupil,
body.fcy-auth-enhanced.fcy-password-hidden .fcy-char-yellow .fcy-pupil {
    transform: translate(-4px, -3px);
}

/* 显示密码时偷看 */
body.fcy-auth-enhanced.fcy-password-visible .fcy-char-purple,
body.fcy-auth-enhanced.fcy-password-visible .fcy-char-black,
body.fcy-auth-enhanced.fcy-password-visible .fcy-char-orange,
body.fcy-auth-enhanced.fcy-password-visible .fcy-char-yellow {
    transform: skewX(0deg);
}

body.fcy-auth-enhanced.fcy-password-visible .fcy-char-purple .fcy-eyes {
    left: 24px;
    top: 38px;
}

body.fcy-auth-enhanced.fcy-password-visible.fcy-peek .fcy-char-purple .fcy-pupil {
    transform: translate(4px, 5px);
}

body.fcy-auth-enhanced.fcy-password-visible .fcy-char-black .fcy-eyes {
    left: 12px;
    top: 30px;
}

body.fcy-auth-enhanced.fcy-password-visible .fcy-char-orange .fcy-eyes {
    left: 52px;
    top: 86px;
}

body.fcy-auth-enhanced.fcy-password-visible .fcy-char-yellow .fcy-eyes {
    left: 22px;
    top: 38px;
}

body.fcy-auth-enhanced.fcy-password-visible .fcy-yellow-mouth {
    left: 12px;
    top: 91px;
}

/* 眨眼 */
.fcy-auth-enhanced.fcy-blink-purple .fcy-char-purple .fcy-eyeball,
.fcy-auth-enhanced.fcy-blink-black .fcy-char-black .fcy-eyeball {
    height: 2px !important;
}

.fcy-auth-meta {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 18px;
    color: rgba(255, 255, 255, .70);
    font-size: 13px;
}

.fcy-auth-meta a {
    color: rgba(255, 255, 255, .70);
    text-decoration: none;
    transition: color .18s ease;
}

.fcy-auth-meta a:hover {
    color: #fff;
}

/* 右侧系统原生表单容器，只改外层位置和卡片，不碰内部字段逻辑 */
body.fcy-auth-enhanced .login-form-wrapper,
body.fcy-auth-enhanced .register-form-wrapper {
    grid-column: 2 !important;
    align-self: center !important;
    justify-self: center !important;
    width: min(430px, calc(100vw - 48px)) !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 5 !important;
    padding: 34px 32px !important;
    margin: 0 !important;
    border-radius: 26px !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow:
        0 30px 90px rgba(24, 46, 95, .14),
        0 0 0 1px rgba(45, 101, 210, .08) !important;
}

body.fcy-auth-enhanced .register-form-wrapper {
    width: min(470px, calc(100vw - 48px)) !important;
    padding: 28px 30px !important;
}

body.fcy-auth-enhanced .login-form-title b,
body.fcy-auth-enhanced .register-form-title b {
    font-size: 21px !important;
    color: #10204a !important;
    letter-spacing: -.02em;
}

body.fcy-auth-enhanced .arco-tag-checked {
    border-radius: 999px !important;
    color: #1f63d8 !important;
    background: #edf5ff !important;
    border-color: #d7e8ff !important;
}

body.fcy-auth-enhanced .arco-tabs-nav {
    margin-top: 8px;
}

body.fcy-auth-enhanced .arco-tabs-tab-title {
    font-weight: 700;
}

body.fcy-auth-enhanced .arco-tabs-nav-ink {
    height: 3px !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #2368ef, #65a4ff) !important;
}

body.fcy-auth-enhanced .arco-input-wrapper {
    min-height: 44px !important;
    border-radius: 14px !important;
    background: #f7faff !important;
    border: 1px solid #e0e9f7 !important;
    transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

body.fcy-auth-enhanced .arco-input-wrapper:hover,
body.fcy-auth-enhanced .arco-input-wrapper:focus-within {
    background: #fff !important;
    border-color: #89b8ff !important;
    box-shadow: 0 0 0 4px rgba(58, 129, 255, .10) !important;
}

body.fcy-auth-enhanced .arco-btn-primary {
    height: 42px !important;
    border-radius: 14px !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #1c67f2, #4f9bff) !important;
    box-shadow: 0 14px 30px rgba(37, 104, 231, .24) !important;
    border: none !important;
}

body.fcy-auth-enhanced .arco-btn-primary:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

/* 自定义密码小眼睛：默认隐藏，输入密码后再出现 */
body.fcy-auth-enhanced .fcy-password-eye {
    width: 0;
    height: 28px;
    padding: 0;
    border: 0;
    margin-left: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8190a8;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    overflow: hidden;
    transform: scale(.82);
    pointer-events: none;
    transition: width .18s ease, margin .18s ease, opacity .18s ease, transform .18s ease, color .18s ease, background .18s ease;
}

body.fcy-auth-enhanced .fcy-password-eye.has-value {
    width: 28px;
    margin-left: 6px;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

body.fcy-auth-enhanced .fcy-password-eye.has-value:hover,
body.fcy-auth-enhanced .fcy-password-eye.has-value.is-visible {
    color: #276ce8;
    background: rgba(39, 108, 232, .09);
}

body.fcy-auth-enhanced .fcy-password-eye svg {
    width: 17px;
    height: 17px;
    display: block;
    flex: 0 0 auto;
}

body.fcy-auth-enhanced .arco-input-wrapper:has(.fcy-password-eye) .arco-input {
    padding-right: 4px !important;
}

/* 隐藏系统原本的 Logo，只保留左侧自定义区域的 Logo */
body.fcy-auth-enhanced .fcy-native-logo-hidden {
    display: none !important;
}

/* 修复注册页/协议等 Arco 弹窗跑到顶部的问题 */
body.fcy-auth-enhanced .arco-modal-container {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000 !important;
    pointer-events: none;
}

body.fcy-auth-enhanced .arco-modal-mask {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto;
}

body.fcy-auth-enhanced .arco-modal-wrapper {
    position: absolute !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 24px !important;
    overflow: auto !important;
    visibility: visible !important;
    pointer-events: none;
}

body.fcy-auth-enhanced .arco-modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    max-width: calc(100vw - 48px) !important;
    max-height: calc(100vh - 48px) !important;
    max-height: calc(100dvh - 48px) !important;
    margin: 0 !important;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto;
}

body.fcy-auth-enhanced .arco-modal-footer {
    display: block;
    visibility: visible;
    text-align: center !important;
}

body.fcy-auth-enhanced .arco-modal-footer .arco-btn {
    border-radius: 10px !important;
}


@media (prefers-reduced-motion: reduce) {
    body.fcy-auth-enhanced .fcy-auth-characters,
    body.fcy-auth-enhanced .fcy-char {
        animation: none !important;
        opacity: 1 !important;
        filter: none !important;
    }

    body.fcy-auth-enhanced .fcy-char {
        bottom: 0 !important;
        translate: 0 0 !important;
        rotate: 0deg !important;
        scale: 1 !important;
    }
}

@media (max-width: 1024px) {
    body.fcy-auth-enhanced {
        overflow: auto !important;
        background: #f5f8ff !important;
    }

    body.fcy-auth-enhanced .content-inner {
        position: fixed !important;
        inset: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 24px 16px !important;
        overflow: auto !important;
        background:
            radial-gradient(circle at 20% 0, rgba(71, 137, 255, .18), transparent 42%),
            #f5f8ff !important;
    }

    body.fcy-auth-enhanced .fcy-auth-left {
        display: none !important;
    }

    body.fcy-auth-enhanced .login-form-wrapper,
    body.fcy-auth-enhanced .register-form-wrapper {
        width: min(100%, 440px) !important;
        padding: 28px 22px !important;
        border-radius: 22px !important;
    }
}

@media (min-width: 1500px) {
    .fcy-auth-characters {
        --fcy-character-scale: 1.14;
    }

    body.fcy-auth-enhanced .login-form-wrapper,
    body.fcy-auth-enhanced .register-form-wrapper {
        transform: translateX(-28px);
    }
}


/* 后台无刷新跳转安全兜底：body 状态已清理时，绝不显示登录页左侧动画残留 */
body:not(.fcy-auth-enhanced) .fcy-auth-left {
    display: none !important;
}
