:root {
    --lg-blue: #3B82F6;
    --lg-indigo: #5B5FEF;
    --lg-purple: #8B5CF6;
    --lg-sky: #5266EA;
    --lg-sky-deep: #7047D9;
    --lg-sky-soft: #EEF0FF;
    --lg-berry: #8B5CF6;
    --lg-gradient: linear-gradient(135deg, var(--lg-blue) 0%, var(--lg-indigo) 52%, var(--lg-purple) 100%);
    --lg-gradient-hover: linear-gradient(135deg, #3275E8 0%, #4F55DF 52%, #7C47E8 100%);
    --lg-ink: #241F3D;
    --lg-text: #514C72;
    --lg-muted: #8C88A6;
    --lg-line: #E7E3F4;
    --lg-paper: #FBFAFF;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.lg-body {
    margin: 0;
    min-height: 100%;
    color: var(--lg-ink);
    background: #F8F6FE;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.lg-body a {
    color: inherit;
    text-decoration: none;
}

body.lg-body button,
body.lg-body input {
    font-family: inherit;
}

body.lg-body button {
    cursor: pointer;
}

body.lg-body img {
    max-width: 100%;
}

body.lg-body [hidden] {
    display: none !important;
}

.login-v2 {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(940px 600px at 6% 4%, rgba(59, 130, 246, .17), transparent 62%),
        radial-gradient(760px 540px at 96% 82%, rgba(139, 92, 246, .12), transparent 66%),
        radial-gradient(620px 420px at 62% 8%, rgba(91, 95, 239, .09), transparent 70%),
        linear-gradient(145deg, #F8FBFF 0%, #F3F3FF 46%, #FAF5FF 100%);
}

.login-v2::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(82, 102, 234, .2) .65px, transparent .65px);
    background-size: 28px 28px;
    opacity: .42;
    -webkit-mask-image: radial-gradient(circle at 28% 30%, #000 0, transparent 62%);
    mask-image: radial-gradient(circle at 28% 30%, #000 0, transparent 62%);
    pointer-events: none;
}

.login-v2::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 640px;
    height: 640px;
    right: -260px;
    top: 18%;
    border: 1px solid rgba(82, 102, 234, .08);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(82, 102, 234, .022),
        0 0 0 150px rgba(82, 102, 234, .014);
    pointer-events: none;
}

.lg-header {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 48px 0;
}

.lg-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.lg-brand img {
    display: block;
    width: auto;
    height: 56px;
}

.lg-main {
    position: relative;
    z-index: 2;
    flex: 1;
    width: calc(100% - 96px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 0 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 432px;
    align-items: center;
    gap: 64px;
}

.lg-intro {
    min-width: 0;
    max-width: 680px;
}

.lg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 13px;
    color: var(--lg-sky-deep);
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(82, 102, 234, .24);
    border-radius: 999px;
    font-size: 12.5px;
    letter-spacing: .2px;
    animation: lg-rise .6s cubic-bezier(.22, 1, .36, 1) both;
}

.lg-kicker span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lg-sky);
    box-shadow: 0 0 0 4px rgba(82, 102, 234, .14);
}

.lg-title {
    margin: 18px 0 0;
    color: var(--lg-ink);
    font-size: 32px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.035em;
    animation: lg-rise .65s cubic-bezier(.22, 1, .36, 1) .08s both;
}

.lg-title span {
    position: relative;
    display: inline-block;
    z-index: 0;
    color: var(--lg-sky-deep);
}

.lg-title span::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 1px;
    right: -2px;
    bottom: 5px;
    height: 11px;
    border-radius: 999px;
    background: rgba(82, 102, 234, .14);
}

.lg-sub {
    margin: 14px 0 0;
    color: #3B3560;
    font-size: 19px;
    line-height: 1.55;
    font-weight: 500;
    letter-spacing: .01em;
    animation: lg-rise .65s cubic-bezier(.22, 1, .36, 1) .14s both;
}

.lg-desc {
    max-width: 520px;
    margin: 8px 0 0;
    color: var(--lg-muted);
    font-size: 13.5px;
    line-height: 1.8;
    animation: lg-rise .65s cubic-bezier(.22, 1, .36, 1) .2s both;
}

.lg-stage {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 200px;
    margin: 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    animation: lg-fade .9s ease .28s both;
}

.lg-stage-card {
    position: relative;
    width: 248px;
    height: 160px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .95);
    background: rgba(255, 255, 255, .86);
    box-shadow:
        0 24px 55px -30px rgba(57, 46, 130, .32),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.lg-video-screen {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(82, 102, 234, .16), rgba(163, 79, 214, .12)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 18px),
        #EFECFF;
}

.lg-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    margin: -10px 0 0 -3px;
    border-left: 18px solid var(--lg-sky-deep);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    filter: drop-shadow(0 4px 8px rgba(82, 102, 234, .3));
    animation: lg-play-pulse 2.4s ease-in-out infinite;
}

.lg-progress {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    height: 4px;
    border-radius: 999px;
    background: rgba(82, 102, 234, .14);
    overflow: hidden;
}

.lg-progress i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lg-sky), var(--lg-sky-deep));
    animation: lg-progress 4s ease-in-out infinite;
}

.lg-code-viewport {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 16px;
    height: 104px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}

.lg-code-scroll {
    animation: lg-code-scroll 14s linear infinite;
}

.lg-code-lines {
    display: grid;
    gap: 5px;
    padding-bottom: 5px;
}

.lg-code-line {
    display: block;
    color: rgba(59, 53, 96, .78);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 16px;
    white-space: pre;
    border-radius: 5px;
    animation: lg-code-flash 2.4s ease-in-out infinite;
}

.lg-code-line:nth-child(1) { animation-delay: 0s; }
.lg-code-line:nth-child(2) { animation-delay: .3s; }
.lg-code-line:nth-child(3) { animation-delay: .6s; }
.lg-code-line:nth-child(4) { animation-delay: .9s; }

.lg-code-key {
    color: #7B5CE0;
    font-weight: 600;
    font-style: normal;
}

.lg-code-fn {
    color: var(--lg-sky-deep);
    font-style: normal;
}

.lg-code-str {
    color: #0E9F8A;
    font-style: normal;
}

.lg-code-sweep {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 14px;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(90deg, transparent, rgba(82, 102, 234, .2), transparent);
    animation: lg-code-sweep 2.4s ease-in-out infinite;
}

.lg-code-status {
    position: absolute;
    left: 16px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--lg-sky-deep);
    font-size: 12px;
    font-weight: 600;
}

.lg-code-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lg-sky);
    box-shadow: 0 0 0 4px rgba(82, 102, 234, .12);
    animation: lg-play-pulse 1.8s ease-in-out infinite;
}

.lg-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: 680px;
    margin-top: 16px;
}

.lg-feature {
    min-width: 0;
    padding: 12px 11px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    border: 1px solid rgba(214, 208, 242, .68);
    border-radius: 15px;
    background: rgba(255, 255, 255, .64);
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
    animation: lg-rise .6s cubic-bezier(.22, 1, .36, 1) both;
}

.lg-feature:nth-child(1) { animation-delay: .34s; }
.lg-feature:nth-child(2) { animation-delay: .4s; }
.lg-feature:nth-child(3) { animation-delay: .46s; }
.lg-feature:nth-child(4) { animation-delay: .52s; }

.lg-feature:hover {
    transform: translateY(-3px);
    border-color: rgba(82, 102, 234, .3);
    background: rgba(255, 255, 255, .88);
}

.lg-feature-icon {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.lg-feature-icon svg {
    width: 18px;
    height: 18px;
}

.lg-feature-icon.icon-sky {
    color: var(--lg-sky-deep);
    background: var(--lg-sky-soft);
}

.lg-feature-icon.icon-teal {
    color: var(--lg-sky-deep);
    background: var(--lg-sky-soft);
}

.lg-feature-icon.icon-berry {
    color: var(--lg-purple);
    background: #F5ECFC;
}

.lg-feature-icon.icon-sand {
    color: var(--lg-indigo);
    background: var(--lg-sky-soft);
}

.lg-feature strong {
    overflow: hidden;
    color: #2B2649;
    font-size: 12.5px;
    line-height: 18px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lg-feature > span:last-child {
    overflow: hidden;
    color: var(--lg-muted);
    font-size: 11px;
    line-height: 17px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lg-panel {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.lg-card {
    width: 100%;
    max-width: 432px;
    padding: 34px 34px 28px;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    box-shadow:
        0 30px 70px -34px rgba(52, 42, 120, .34),
        0 2px 8px rgba(52, 42, 120, .03);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    animation: lg-card-in .7s cubic-bezier(.22, 1, .36, 1) .12s both;
}

.lg-card-head h2 {
    margin: 0;
    color: var(--lg-ink);
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.02em;
}

.lg-card-head p {
    margin: 7px 0 0;
    color: var(--lg-muted);
    font-size: 13px;
    line-height: 1.7;
}

.lg-tabs {
    display: flex;
    gap: 26px;
    margin-top: 20px;
    border-bottom: 1px solid #ECE9F7;
}

.lg-tab {
    position: relative;
    padding: 0 2px 12px;
    border: none;
    background: none;
    color: var(--lg-muted);
    font-size: 13.5px;
    line-height: 20px;
    transition: color .2s;
}

.lg-tab:hover {
    color: var(--lg-text);
}

.lg-tab.is-active {
    color: var(--lg-ink);
    font-weight: 600;
}

.lg-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--lg-sky);
}

.lg-tab:focus-visible,
.lg-submit:focus-visible,
.lg-send:focus-visible {
    outline: 2px solid rgba(82, 102, 234, .65);
    outline-offset: 2px;
}

.lg-panes {
    display: grid;
    margin-top: 20px;
}

.lg-pane {
    grid-area: 1 / 1;
    margin: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.lg-pane.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    animation: lg-pane-in .28s ease both;
}

.lg-pane-qr {
    padding-top: 2px;
}

.lg-qr-frame {
    display: flex;
    justify-content: center;
}

.lg-qr-box {
    width: 186px;
    height: 186px;
    padding: 15px;
    border: 1px solid #E8E4F4;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 12px 30px -24px rgba(58, 48, 120, .3);
}

.lg-qr-box #qrcode {
    width: 156px;
    height: 156px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lg-qr-box #qrcode canvas,
.lg-qr-box #qrcode img {
    display: block;
    border-radius: 3px;
}

.lg-qr-tip {
    margin: 14px 0 0;
    color: #443F63;
    font-size: 13.5px;
    line-height: 1.6;
    text-align: center;
}

.lg-wechat-btn {
    display: none;
    width: 100%;
    max-width: 260px;
    height: 46px;
    margin: 6px auto 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    background: var(--lg-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 24px -12px rgba(82, 102, 234, .55);
    transition: background .2s ease;
}

.lg-wechat-btn:hover { background: var(--lg-gradient-hover); color: #fff; }
.lg-wechat-btn svg { width: 20px; height: 20px; }
body.lg-body a.lg-wechat-btn,
body.lg-body a.lg-wechat-btn:hover { color: #fff; }

.lg-mb-label { display: none; }

.lg-field {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 46px;
    padding: 0 11px;
    margin-bottom: 10px;
    border: 1px solid #E6E2F4;
    border-radius: 10px;
    background: #FAF9FE;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.lg-field:focus-within {
    border-color: rgba(82, 102, 234, .55);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(82, 102, 234, .08);
}

.lg-field-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9C97B8;
    transition: color .2s;
}

.lg-field:focus-within .lg-field-icon {
    color: var(--lg-sky);
}

.lg-field-icon svg {
    width: 17px;
    height: 17px;
}

.lg-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--lg-ink);
    font-size: 13px;
}

.lg-field input::placeholder {
    color: #ABA6C4;
}

.lg-captcha {
    width: 88px;
    height: 34px;
    flex: 0 0 88px;
    display: block;
    border: 1px solid #E6E2F2;
    border-radius: 6px;
    background: #FFFFFF;
    object-fit: cover;
}

.lg-field-code {
    padding-right: 7px;
}

.lg-send {
    flex-shrink: 0;
    height: 24px;
    margin-left: 1px;
    padding: 0 0 0 11px;
    border: none;
    border-left: 1px solid #E6E2F4;
    border-radius: 0;
    background: transparent;
    color: var(--lg-sky-deep);
    font-size: 12px;
    line-height: 24px;
    white-space: nowrap;
    transition: color .2s, opacity .2s;
}

.lg-send:hover {
    color: var(--lg-sky);
}

.lg-send:disabled {
    color: #ABA6C4;
    background: transparent;
    cursor: not-allowed;
}

.lg-alert {
    margin: 2px 0 12px;
    padding: 8px 10px;
    border: 1px solid #F5D2D2;
    border-radius: 8px;
    background: #FFF5F5;
    color: #C64848;
    font-size: 12.5px;
    line-height: 1.6;
}

.lg-alert.is-ok {
    border-color: #CBEBDD;
    background: #F2FBF7;
    color: #27855F;
}

.lg-submit {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    border: none;
    border-radius: 10px;
    background: var(--lg-gradient);
    color: #FFFFFF;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .16em;
    text-indent: .16em;
    box-shadow: 0 10px 22px -12px rgba(82, 102, 234, .5);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.lg-submit:hover {
    background: var(--lg-gradient-hover);
    box-shadow: 0 14px 28px -12px rgba(72, 62, 190, .5);
}

.lg-submit:active {
    transform: translateY(1px) scale(.995);
}

.lg-form-note {
    margin: 13px 0 0;
    color: #9E99BA;
    font-size: 11.5px;
    line-height: 1.6;
    text-align: center;
}

.lg-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px 22px;
    color: #9A95B6;
    font-size: 11.5px;
}

.lg-footer a {
    transition: color .2s;
}

.lg-footer a:hover {
    color: var(--lg-sky-deep);
}

.lg-sep {
    color: #DCD6EE;
}

@keyframes lg-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lg-card-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes lg-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lg-pane-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lg-play-pulse {
    0%, 100% { transform: scale(1); opacity: .85; }
    50% { transform: scale(1.12); opacity: 1; }
}

@keyframes lg-progress {
    0% { width: 0; }
    70%, 100% { width: 100%; }
}

@keyframes lg-code-flash {
    0%, 100% { background: rgba(82, 102, 234, .06); }
    50% { background: rgba(82, 102, 234, .24); }
}

@keyframes lg-code-sweep {
    0%, 100% { transform: translateY(0); opacity: 0; }
    10%, 90% { opacity: 1; }
    50% { transform: translateY(72px); }
}

@keyframes lg-code-scroll {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}

@media (max-width: 1180px) {
    .lg-main {
        width: calc(100% - 80px);
        grid-template-columns: minmax(0, 1fr) 410px;
        gap: 48px;
    }

    .lg-title {
        font-size: 32px;
    }

    .lg-sub {
        font-size: 18px;
    }

    .lg-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 470px;
    }

    .lg-stage {
        height: 180px;
        gap: 12px;
    }

    .lg-stage-card {
        width: 220px;
        height: 144px;
    }

    .lg-video-screen {
        bottom: 26px;
    }

    .lg-progress {
        bottom: 10px;
    }

    .lg-code-viewport {
        top: 12px;
        height: 88px;
    }

    .lg-code-lines {
        gap: 4px;
    }

    .lg-code-sweep {
        top: 10px;
    }
}

@media (max-width: 1100px) {
    .login-v2 {
        background:
            radial-gradient(740px 460px at 16% 4%, rgba(59, 130, 246, .14), transparent 64%),
            radial-gradient(620px 440px at 92% 88%, rgba(139, 92, 246, .10), transparent 70%),
            linear-gradient(145deg, #F8FBFF 0%, #F3F3FF 52%, #FAF5FF 100%);
    }

    .lg-main {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: none;
        padding: 38px 24px 46px;
    }

    .lg-intro {
        display: none;
    }

    .lg-panel {
        width: 100%;
        max-width: 440px;
        justify-content: center;
    }

    .lg-card {
        max-width: 432px;
    }

    .lg-header {
        padding: 24px 28px 0;
    }
}

@media (max-width: 560px) {
    .lg-header {
        padding: 20px 20px 0;
    }

    .lg-brand img {
        height: 46px;
    }

    .lg-main {
        padding: 24px 16px 30px;
    }

    .lg-card {
        padding: 30px 22px 24px;
        border-radius: 22px;
    }

    .lg-card-head h2 {
        font-size: 23px;
    }

    .lg-tabs {
        margin-top: 20px;
    }

    .lg-pane-qr .lg-qr-frame,
    .lg-pane-qr .lg-qr-tip {
        display: none;
    }

    .lg-wechat-btn {
        display: flex;
    }

    .lg-pc-label { display: none; }
    .lg-mb-label { display: inline; }

    .lg-qr-box {
        width: 180px;
        height: 180px;
        padding: 12px;
    }

    .lg-qr-box #qrcode {
        width: 156px;
        height: 156px;
    }

    .lg-field input {
        font-size: 16px;
    }

    .lg-footer {
        padding: 12px 16px 18px;
        gap: 7px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-v2 *,
    .login-v2 *::before,
    .login-v2 *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}