/* ==================================================================================
   登录页 —— 浅色高级感 / 分子动画 / 液态玻璃卡片 / 登录过场特效
   ================================================================================== */

.lg-page {
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 70% at 18% 8%, #e3f4fd 0%, transparent 58%),
        radial-gradient(ellipse 80% 70% at 88% 92%, #ddf3ef 0%, transparent 58%),
        linear-gradient(160deg, #f3f8f9 0%, #e8eff1 50%, #edf2f3 100%);
}

/* ------------------------------------------------------------------ 背景层 */
.lg-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lg-mesh i {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}

.lg-mesh i:nth-child(1) {
    width: 42vw; height: 42vw; left: -8vw; top: -12vw;
    background: radial-gradient(circle, rgba(56, 189, 248, .42), transparent 68%);
    animation: drift1 30s var(--e-in-out) infinite;
}
.lg-mesh i:nth-child(2) {
    width: 38vw; height: 38vw; right: -6vw; top: 12vh;
    background: radial-gradient(circle, rgba(32, 205, 185, .36), transparent 68%);
    animation: drift2 38s var(--e-in-out) infinite;
}
.lg-mesh i:nth-child(3) {
    width: 32vw; height: 32vw; left: 30vw; bottom: -14vw;
    background: radial-gradient(circle, rgba(45, 212, 191, .34), transparent 68%);
    animation: drift3 34s var(--e-in-out) infinite;
}
.lg-mesh i:nth-child(4) {
    width: 24vw; height: 24vw; right: 26vw; top: -6vw;
    background: radial-gradient(circle, rgba(255, 186, 102, .26), transparent 70%);
    animation: drift1 44s var(--e-in-out) infinite reverse;
}

#molecules {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .85;
}

.lg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(13, 146, 207, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 146, 207, .05) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000, transparent 76%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000, transparent 76%);
    animation: gridPan 40s linear infinite;
}

@keyframes gridPan {
    to { background-position: 54px 54px; }
}

/* ------------------------------------------------------------------ 主体布局 */
.lg-wrap {
    position: relative;
    z-index: 3;
    height: 100%;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 3vw;
    padding: 0 6vw;
    max-width: 1680px;
    margin: 0 auto;
}

@media (max-width: 1180px) {
    .lg-wrap { grid-template-columns: 1fr; padding: 0 8vw; }
    .lg-left { display: none; }
}

/* ------------------------------------------------------------------ 左侧品牌区 */
.lg-left {
    animation: fadeUp .9s var(--e-out) both;
}

.lg-logo {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 30px;
}

.lg-logo .mark {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: var(--g-brand);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 12px 34px rgba(13, 146, 207, .38);
    overflow: hidden;
}

.lg-logo .mark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--g-sheen);
    animation: sheen 3.4s var(--e-out) infinite;
}

.lg-logo .txt h1 {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.2;
}

.lg-logo .txt p {
    font-size: .75rem;
    color: var(--ink-3);
    letter-spacing: .12em;
    font-weight: 600;
    margin-top: 2px;
}

.lg-title {
    font-size: clamp(2rem, 3.4vw, 3.15rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.01em;
    color: var(--ink);
    margin-bottom: 14px;
}

.lg-title span {
    background: linear-gradient(120deg, #0d92cf 0%, #12a594 48%, #0e7490 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 220% auto;
    animation: hueSlide 7s linear infinite;
}

@keyframes hueSlide {
    to { background-position: 220% center; }
}

.lg-sub {
    font-size: .9375rem;
    color: var(--ink-3);
    line-height: 1.85;
    max-width: 620px;
    margin-bottom: 30px;
}

.lg-feats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    max-width: 620px;
    margin-bottom: 28px;
}

.lg-feat {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: var(--sh-sm);
    backdrop-filter: blur(10px);
    transition: all var(--t) var(--e-out);
    animation: fadeUp .7s var(--e-out) both;
}

.lg-feat:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
    background: rgba(255, 255, 255, .86);
}

.lg-feat .ic {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: none;
    color: #fff;
}

.lg-feat:nth-child(1) .ic { background: var(--g-brand); }
.lg-feat:nth-child(2) .ic { background: var(--g-teal); }
.lg-feat:nth-child(3) .ic { background: var(--g-sky); }
.lg-feat:nth-child(4) .ic { background: var(--g-warm); }

.lg-feat b { font-size: .8125rem; font-weight: 700; display: block; }
.lg-feat span { font-size: .6875rem; color: var(--ink-4); }

.lg-metrics {
    display: flex;
    gap: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(13, 146, 207, .13);
    max-width: 620px;
}

.lg-metric b {
    display: block;
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.1;
    background: var(--g-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lg-metric span {
    font-size: .6875rem;
    color: var(--ink-4);
    font-weight: 600;
    letter-spacing: .04em;
}

/* ------------------------------------------------------------------ 右侧登录卡 */
.lg-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    padding: 34px 34px 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(26px) saturate(1.7);
    -webkit-backdrop-filter: blur(26px) saturate(1.7);
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 30px 80px rgba(23, 46, 96, .16), inset 0 1px 0 rgba(255, 255, 255, 1);
    animation: cardIn 1s var(--e-spring) .1s both;
    overflow: hidden;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(34px) scale(.95) rotateX(8deg); }
    to { opacity: 1; transform: none; }
}

/* 卡片边框流光 */
.lg-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--ang, 0deg),
        transparent 0%, rgba(13, 146, 207, .75) 12%, transparent 26%,
        transparent 50%, rgba(18, 165, 148, .65) 62%, transparent 76%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: angSpin 6s linear infinite;
    pointer-events: none;
    opacity: .85;
}

@property --ang {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes angSpin {
    to { --ang: 360deg; }
}

.lg-card-hd { text-align: center; margin-bottom: 24px; }

.lg-card-hd .av {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: var(--g-brand);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 14px 34px rgba(13, 146, 207, .36);
    position: relative;
    animation: floatY 4s ease-in-out infinite;
}

.lg-card-hd .av::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    border: 1.5px dashed rgba(13, 146, 207, .32);
    animation: spin 14s linear infinite;
}

.lg-card-hd h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .01em;
}

.lg-card-hd p {
    font-size: .75rem;
    color: var(--ink-4);
    margin-top: 5px;
    letter-spacing: .04em;
}

/* 输入组 */
.lg-field {
    position: relative;
    margin-bottom: 15px;
    animation: fadeUp .6s var(--e-out) both;
}

.lg-field:nth-of-type(1) { animation-delay: .22s; }
.lg-field:nth-of-type(2) { animation-delay: .3s; }

.lg-field label {
    display: block;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--ink-3);
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.lg-inp-box {
    position: relative;
    display: flex;
    align-items: center;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
    border: 1.5px solid var(--line);
    transition: all var(--t) var(--e-out);
    overflow: hidden;
}

.lg-inp-box:hover { border-color: var(--brand-300); }

.lg-inp-box.focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(13, 146, 207, .14), 0 6px 20px rgba(13, 146, 207, .12);
    background: #fff;
}

.lg-inp-box.err {
    border-color: var(--crit);
    box-shadow: 0 0 0 4px rgba(226, 63, 78, .12);
    animation: shake .5s;
}

.lg-inp-box .lic {
    width: 44px;
    display: grid;
    place-items: center;
    color: var(--ink-4);
    flex: none;
    transition: color var(--t);
}

.lg-inp-box.focus .lic { color: var(--brand); }

.lg-inp-box input {
    flex: 1;
    height: 100%;
    border: 0;
    background: none;
    outline: none;
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .02em;
    padding-right: 14px;
    min-width: 0;
}

.lg-inp-box input::placeholder { color: var(--ink-5); font-weight: 400; }

.lg-inp-box .eye {
    width: 40px;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--ink-4);
    flex: none;
    transition: color var(--t-fast);
}

.lg-inp-box .eye:hover { color: var(--brand); }

/* 输入框底部扫描线 */
.lg-inp-box .scan {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--brand), var(--teal), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--e-out);
}

.lg-inp-box.focus .scan { transform: scaleX(1); }

/* 选项行 */
.lg-opts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 18px;
    font-size: .6875rem;
    animation: fadeUp .6s var(--e-out) .36s both;
}

.lg-check {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--ink-3);
    font-weight: 500;
    user-select: none;
}

.lg-check .box {
    width: 15px;
    height: 15px;
    border-radius: 5px;
    border: 1.5px solid var(--ink-5);
    display: grid;
    place-items: center;
    transition: all var(--t) var(--e-spring);
    flex: none;
}

.lg-check .box svg { opacity: 0; transform: scale(.4); transition: all var(--t) var(--e-spring); }

.lg-check.on .box { background: var(--brand); border-color: var(--brand); }
.lg-check.on .box svg { opacity: 1; transform: none; color: #fff; }

.lg-link { color: var(--brand); font-weight: 600; cursor: pointer; }
.lg-link:hover { text-decoration: underline; }

/* 登录按钮 */
.lg-btn {
    position: relative;
    width: 100%;
    height: 48px;
    border-radius: 14px;
    background: var(--g-brand);
    color: #fff;
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: .1em;
    box-shadow: 0 14px 34px rgba(13, 146, 207, .35);
    overflow: hidden;
    transition: all var(--t) var(--e-out);
    animation: fadeUp .6s var(--e-out) .42s both;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.lg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(13, 146, 207, .44);
    filter: brightness(1.06);
}

.lg-btn:active { transform: translateY(0) scale(.99); }

.lg-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    background: var(--g-sheen);
    transform: translateX(-140%) skewX(-20deg);
    animation: sheen 3.6s var(--e-out) infinite;
    animation-delay: 1.4s;
}

.lg-btn.loading { pointer-events: none; letter-spacing: .06em; }

.lg-btn .bprog {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 0;
    background: rgba(255, 255, 255, .9);
    transition: width .3s linear;
    box-shadow: 0 0 10px rgba(255, 255, 255, .8);
}

/* 提示条 */
.lg-hint {
    margin-top: 16px;
    padding: 10px 13px;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(13, 146, 207, .07), rgba(18, 165, 148, .06));
    border: 1px dashed rgba(13, 146, 207, .26);
    font-size: .6875rem;
    color: var(--ink-3);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeUp .6s var(--e-out) .5s both;
}

.lg-hint b { color: var(--brand-700); font-weight: 700; }

.lg-hint .k {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid var(--brand-100);
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: .625rem;
    color: var(--brand-700);
    font-weight: 700;
}

.lg-err {
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 11px;
    background: var(--crit-100);
    border: 1px solid rgba(226, 63, 78, .25);
    color: #b31f2c;
    font-size: .6875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    animation: fadeUp .3s var(--e-out) both;
}

.lg-foot {
    margin-top: 20px;
    text-align: center;
    font-size: .625rem;
    color: var(--ink-5);
    letter-spacing: .04em;
    animation: fadeIn .8s .6s both;
}

.lg-roles {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 12px;
    animation: fadeUp .6s var(--e-out) .56s both;
}

.lg-role {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: .625rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--line);
    color: var(--ink-3);
    cursor: pointer;
    transition: all var(--t-fast) var(--e-out);
}

.lg-role:hover {
    border-color: var(--brand-300);
    color: var(--brand);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: var(--sh-sm);
}

/* ------------------------------------------------------------------ 登录过场特效 */
.lg-transition {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    place-items: center;
    background: radial-gradient(ellipse at center, rgba(244, 247, 253, .97), rgba(226, 235, 248, .99));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.lg-transition.show { display: grid; animation: fadeIn .35s var(--e-out); }

.lg-trans-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: scaleIn .55s var(--e-spring) both;
}

/* 分子/反应环动画 */
.reactor {
    position: relative;
    width: 170px;
    height: 170px;
}

.reactor .orb {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(13, 146, 207, .2);
}

.reactor .orb:nth-child(1) { animation: spin 9s linear infinite; }
.reactor .orb:nth-child(2) { inset: 18px; border-color: rgba(18, 165, 148, .24); animation: spin 6.5s linear infinite reverse; }
.reactor .orb:nth-child(3) { inset: 36px; border-color: rgba(14, 116, 144, .22); animation: spin 4.4s linear infinite; }

.reactor .orb::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 16px rgba(13, 146, 207, .85);
}

.reactor .orb:nth-child(2)::before { background: var(--teal); box-shadow: 0 0 16px rgba(18, 165, 148, .85); }
.reactor .orb:nth-child(3)::before { background: var(--sky); box-shadow: 0 0 16px rgba(14, 116, 144, .85); }

.reactor .core {
    position: absolute;
    inset: 56px;
    border-radius: 50%;
    background: var(--g-brand);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: 0 0 44px rgba(13, 146, 207, .5);
    animation: corePulse 1.7s var(--e-in-out) infinite;
}

@keyframes corePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 44px rgba(13, 146, 207, .5); }
    50% { transform: scale(1.09); box-shadow: 0 0 66px rgba(13, 146, 207, .75); }
}

.lg-trans-title {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--ink);
}

.lg-steps {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 330px;
}

.lg-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .75rem;
    color: var(--ink-4);
    opacity: .4;
    transform: translateX(-8px);
    transition: all .4s var(--e-out);
}

.lg-step.on { opacity: 1; transform: none; color: var(--ink-2); font-weight: 600; }
.lg-step.done { opacity: .78; color: var(--ok); }

.lg-step .sic {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--surface-3);
    color: var(--ink-4);
    transition: all .3s var(--e-spring);
}

.lg-step.on .sic { background: var(--brand-100); color: var(--brand); }
.lg-step.done .sic { background: var(--ok-100); color: var(--ok); }

.lg-step .sbar {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: var(--surface-3);
    overflow: hidden;
}

.lg-step .sbar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: var(--g-brand);
    transition: width .45s var(--e-out);
}

.lg-step.done .sbar i { background: linear-gradient(90deg, #35c98a, var(--ok)); }

/* 粒子爆发 */
.burst {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

@keyframes burstOut {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--bx), var(--by)) scale(0); opacity: 0; }
}

/* 页面淡出 */
.lg-page.leaving {
    animation: pageLeave .6s var(--e-in-out) forwards;
}

@keyframes pageLeave {
    to { opacity: 0; filter: blur(9px); transform: scale(1.03); }
}
