/* ==========================================================================
   云旭 SaaS · 登录 / 入口页
   全屏电竞背景 + 极光动画 + 玻璃卡片 + 浮动光斑
   底部版权：云旭网络科技有限公司 版权所有
   ========================================================================== */

.login-body {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 20px;
    overflow-x: hidden;
    background: #05070f;
}

/* ---------- 背景 ---------- */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #05070f;
    filter: saturate(1.08) contrast(1.02);
    transform: scale(1.03);
    animation: bgDrift 26s ease-in-out infinite alternate;
}

.login-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(90% 90% at 50% 46%, rgba(5, 7, 15, .12) 0%, rgba(5, 7, 15, .62) 62%, rgba(3, 5, 12, .9) 100%),
        linear-gradient(180deg, rgba(5, 7, 15, .5), transparent 28%, transparent 72%, rgba(5, 7, 15, .72));
}

@keyframes bgDrift {
    0% { transform: scale(1.03) translate3d(0, 0, 0); }
    100% { transform: scale(1.09) translate3d(-1.4%, -1%, 0); }
}

/* ---------- 极光 ---------- */
.login-aurora {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    mix-blend-mode: screen;
}

.login-aurora span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(72px);
    opacity: .55;
    animation: loginAurora 18s var(--ease) infinite alternate;
}

.login-aurora span:nth-child(1) {
    width: 44vw;
    height: 44vw;
    left: -10vw;
    top: -14vw;
    background: radial-gradient(circle, rgba(108, 140, 255, .62), transparent 68%);
}

.login-aurora span:nth-child(2) {
    width: 38vw;
    height: 38vw;
    right: -8vw;
    top: 4vh;
    background: radial-gradient(circle, rgba(179, 107, 255, .55), transparent 68%);
    animation-delay: -6s;
}

.login-aurora span:nth-child(3) {
    width: 50vw;
    height: 36vw;
    left: 24vw;
    bottom: -20vw;
    background: radial-gradient(circle, rgba(124, 242, 255, .4), transparent 70%);
    animation-delay: -11s;
}

.login-aurora span:nth-child(4) {
    width: 26vw;
    height: 26vw;
    right: 18vw;
    bottom: 8vh;
    background: radial-gradient(circle, rgba(255, 176, 32, .26), transparent 70%);
    animation-delay: -3s;
}

@keyframes loginAurora {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(3vw, 3vh, 0) scale(1.12); }
    100% { transform: translate3d(-3vw, -2vh, 0) scale(.94); }
}

/* 浮动光斑 */
.login-stage::before,
.login-stage::after {
    content: "";
    position: fixed;
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

.login-stage::before {
    width: 8px;
    height: 8px;
    left: 18%;
    top: 22%;
    background: rgba(124, 242, 255, .9);
    box-shadow: 0 0 18px rgba(124, 242, 255, .8), 0 0 46px rgba(108, 140, 255, .6);
    animation: orbFloat 12s ease-in-out infinite alternate;
}

.login-stage::after {
    width: 5px;
    height: 5px;
    right: 22%;
    bottom: 24%;
    background: rgba(179, 107, 255, .95);
    box-shadow: 0 0 16px rgba(179, 107, 255, .8), 0 0 42px rgba(179, 107, 255, .5);
    animation: orbFloat 9s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
    0% { transform: translate3d(0, 0, 0) scale(.9); opacity: .55; }
    50% { transform: translate3d(26px, -34px, 0) scale(1.15); opacity: 1; }
    100% { transform: translate3d(-18px, 24px, 0) scale(.8); opacity: .6; }
}

/* ---------- 舞台 ---------- */
.login-stage {
    position: relative;
    z-index: 2;
    width: min(430px, 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    animation: yxUp .6s var(--ease) both;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: left;
}

.login-brand img {
    width: 46px;
    height: 46px;
    padding: 7px;
    border: 1px solid rgba(108, 140, 255, .42);
    border-radius: 14px;
    background: radial-gradient(circle at 30% 20%, rgba(124, 242, 255, .24), rgba(108, 140, 255, .1) 55%, rgba(10, 16, 32, .6));
    box-shadow: 0 0 26px rgba(108, 140, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .18);
    object-fit: contain;
}

.login-brand div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.login-brand strong {
    font-size: 16px;
    font-weight: 650;
    letter-spacing: .05em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(108, 140, 255, .6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.login-brand small {
    margin-top: 1px;
    font-size: 9.5px;
    letter-spacing: .2em;
    color: #8fa2c8;
}

/* ---------- 玻璃卡片 ---------- */
.login-card {
    position: relative;
    padding: 26px 26px 22px;
    border: 1px solid rgba(150, 180, 255, .22);
    border-radius: 22px;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .015) 46%, rgba(255, 255, 255, .04)),
        rgba(9, 14, 28, .62);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    box-shadow:
        0 34px 80px rgba(2, 5, 14, .68),
        inset 0 1px 0 rgba(255, 255, 255, .2),
        inset 0 -1px 0 rgba(255, 255, 255, .04),
        0 0 0 1px rgba(108, 140, 255, .1);
    overflow: hidden;
    isolation: isolate;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, rgba(124, 242, 255, .5), transparent 34%, transparent 62%, rgba(179, 107, 255, .5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.login-card-glow {
    position: absolute;
    left: 50%;
    top: -120px;
    z-index: -1;
    width: 340px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 140, 255, .32), transparent 68%);
    filter: blur(24px);
    transform: translateX(-50%);
    pointer-events: none;
}

.login-card h1 {
    margin-bottom: 6px;
    font-size: 21px;
    font-weight: 650;
    letter-spacing: .03em;
    color: #fff;
    text-align: center;
}

.login-tip {
    margin-bottom: 20px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
    text-align: center;
}

/* ---------- 登录表单 ---------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form .form-item {
    gap: 7px;
}

.login-input {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input .ico {
    position: absolute;
    left: 13px;
    width: 16px;
    height: 16px;
    opacity: .55;
    pointer-events: none;
}

.login-input input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 40px;
    border: 1px solid rgba(150, 180, 255, .24);
    border-radius: 12px;
    color: var(--text);
    background: rgba(4, 8, 18, .55);
    transition: all .2s var(--ease);
}

.login-input input::placeholder {
    color: #69769a;
}

.login-input input:hover {
    border-color: rgba(150, 180, 255, .4);
}

.login-input input:focus {
    border-color: var(--primary);
    background: rgba(6, 11, 24, .82);
    box-shadow: 0 0 0 3px rgba(108, 140, 255, .16), 0 0 22px rgba(108, 140, 255, .22);
    outline: none;
}

.login-form .field .input {
    height: 46px;
    border-radius: 12px;
    background: rgba(4, 8, 18, .55);
}

.login-form .btn-block {
    height: 46px;
    margin-top: 4px;
    border-radius: 12px;
    font-size: 14px;
    letter-spacing: .06em;
}

.login-form .btn-block .ico {
    width: 17px;
    height: 17px;
}

/* 表单错误 / 提示 */
.form-error,
.alert {
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-left-width: 3px;
    border-radius: 11px;
    font-size: 12.5px;
    line-height: 1.6;
    animation: yxUp .3s var(--ease) both;
}

.alert-error,
.form-error {
    color: #ffc1cd;
    border-color: rgba(255, 92, 122, .36);
    border-left-color: var(--red);
    background: rgba(255, 92, 122, .12);
}

.alert-warn {
    color: #ffe0a6;
    border-color: rgba(255, 176, 32, .34);
    border-left-color: var(--amber);
    background: rgba(255, 176, 32, .1);
}

.alert-success {
    color: #b9ffdd;
    border-color: rgba(61, 220, 151, .34);
    border-left-color: var(--green);
    background: rgba(61, 220, 151, .1);
}

/* 快捷登录 */
.oauth-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.oauth-title {
    width: 100%;
    margin-bottom: 2px;
    font-size: 11.5px;
    letter-spacing: .08em;
    color: var(--muted-2);
}

.oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1 1 44%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    font-size: 12.5px;
    color: var(--text-2);
    background: rgba(255, 255, 255, .04);
    transition: all .2s var(--ease);
}

.oauth-btn:hover {
    color: #fff;
    border-color: rgba(108, 140, 255, .5);
    background: rgba(108, 140, 255, .12);
}

.oauth-btn .ico {
    width: 17px;
    height: 17px;
}

/* 底部链接 */
.login-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.login-links .btn {
    flex: 1 1 44%;
    font-size: 12.5px;
    padding: 9px 10px;
}

.login-extra {
    margin-top: 15px;
    font-size: 12.5px;
    text-align: center;
    color: var(--muted);
}

.login-extra a {
    margin-left: 4px;
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-extra a:hover {
    color: #fff;
}

/* ---------- 人机验证占位 ---------- */
.geetest-box {
    width: 100%;
    min-height: 44px;
    border: 1px dashed rgba(108, 140, 255, .28);
    border-radius: 11px;
    background: rgba(108, 140, 255, .05);
}

.geetest-box:empty::after {
    content: "人机验证组件加载中…";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    font-size: 12px;
    color: var(--muted-2);
}

/* ---------- 门户入口 ---------- */
.portal-card {
    padding: 30px 28px 26px;
}

.portal-card h1 {
    text-align: center;
}

.portal-links {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: 6px;
}

.portal-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border: 1px solid rgba(150, 180, 255, .22);
    border-radius: 14px;
    color: var(--text);
    background:
        linear-gradient(150deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .01) 55%),
        rgba(255, 255, 255, .02);
    overflow: hidden;
    transition: all .22s var(--ease);
}

.portal-link::after {
    content: "";
    position: absolute;
    right: -28px;
    top: -28px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 140, 255, .3), transparent 68%);
    transition: transform .3s var(--ease);
    pointer-events: none;
}

.portal-link:hover {
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(108, 140, 255, .55);
    background: rgba(108, 140, 255, .1);
    box-shadow: 0 16px 34px rgba(4, 10, 24, .5), 0 0 0 1px rgba(108, 140, 255, .16);
}

.portal-link:hover::after {
    transform: scale(1.4);
}

.portal-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border: 1px solid rgba(108, 140, 255, .3);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(108, 140, 255, .2), rgba(108, 140, 255, .04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.portal-ico .ico {
    width: 30px;
    height: 30px;
    opacity: 1;
}

.portal-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.portal-text strong {
    font-size: 14px;
    color: #fff;
    letter-spacing: .02em;
}

.portal-text small {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.5;
}

/* ---------- 页脚 ---------- */
.login-bottom {
    padding: 2px 4px 0;
    font-size: 11px;
    letter-spacing: .04em;
    text-align: center;
    color: #74809f;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .login-body {
        padding: 24px 14px;
        align-items: flex-start;
    }

    .login-stage {
        gap: 14px;
        margin: auto 0;
    }

    .login-brand strong {
        font-size: 14px;
        max-width: 220px;
        white-space: normal;
    }

    .login-brand img {
        width: 40px;
        height: 40px;
    }

    .login-card {
        padding: 20px 16px 18px;
        border-radius: 18px;
    }

    .login-card h1 {
        font-size: 18px;
    }

    .login-tip {
        margin-bottom: 16px;
        font-size: 12px;
    }

    .login-links .btn,
    .oauth-btn {
        flex: 1 1 100%;
    }

    .portal-link {
        padding: 12px 13px;
        gap: 11px;
    }

    .portal-ico {
        width: 44px;
        height: 44px;
    }

    .portal-ico .ico {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 375px) {
    .login-card {
        padding: 17px 13px 15px;
    }

    .login-form .btn-block {
        font-size: 13px;
    }

    .portal-text small {
        display: none;
    }
}
