/* 登录页：明亮赛博建造蓝图（背景氛围 + 品牌区 + 等距场景 + 流程条 + 登录卡） */

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    background:
        radial-gradient(1000px 620px at 82% -10%, rgba(74, 125, 255, .16), transparent 62%),
        radial-gradient(880px 560px at -6% 106%, rgba(0, 194, 255, .13), transparent 60%),
        radial-gradient(700px 480px at 108% 88%, rgba(122, 92, 255, .08), transparent 55%),
        linear-gradient(160deg, #f4f8ff 0%, #eaf1fb 55%, #eef3fc 100%);
    padding: 32px clamp(20px, 5vw, 72px);
    overflow: hidden;
    overflow: clip; /* clip 不产生滚动容器：装饰层溢出不会被 scroll-into-view 滚动 */
}

/* ---- 背景氛围层 ---- */
.login-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(47, 107, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 107, 255, .06) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(120% 95% at 50% 42%, #000 35%, transparent 100%);
    mask-image: radial-gradient(120% 95% at 50% 42%, #000 35%, transparent 100%);
}
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    opacity: .55;
}
.orb-a { width: 420px; height: 420px; top: -120px; right: -60px; background: rgba(74, 125, 255, .38); animation: orbFloat 11s ease-in-out infinite; }
.orb-b { width: 360px; height: 360px; bottom: -120px; left: -80px; background: rgba(0, 194, 255, .32); animation: orbFloat 13s .8s ease-in-out infinite reverse; }
.orb-c { width: 260px; height: 260px; top: 42%; right: 26%; background: rgba(122, 92, 255, .18); animation: orbFloat 15s .4s ease-in-out infinite; }
@keyframes orbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(14px, -18px, 0) scale(1.05); }
}

.bg-dots span {
    position: absolute;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #9dbcf0;
    opacity: .55;
    animation: dotDrift 7s ease-in-out infinite;
}
.bg-dots .d1 { top: 14%; left: 8%;  animation-delay: 0s; }
.bg-dots .d2 { top: 26%; left: 30%; animation-delay: .9s; }
.bg-dots .d3 { top: 68%; left: 14%; animation-delay: 1.7s; }
.bg-dots .d4 { top: 82%; left: 38%; animation-delay: 2.4s; }
.bg-dots .d5 { top: 12%; left: 56%; animation-delay: .5s; background: #7fd8ff; }
.bg-dots .d6 { top: 58%; left: 62%; animation-delay: 1.3s; background: #7fd8ff; }
.bg-dots .d7 { top: 74%; left: 82%; animation-delay: 2.1s; }
.bg-dots .d8 { top: 34%; left: 90%; animation-delay: 2.8s; background: #7fd8ff; }
@keyframes dotDrift {
    0%, 100% { transform: translateY(0); opacity: .55; }
    50% { transform: translateY(-12px); opacity: .95; }
}

/* ---- 主体两栏 ---- */
.login-main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    margin: auto; /* 高度不足时居中且不裁切溢出 */
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
}

/* ---- 品牌区 ---- */
.lp-intro { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { width: 46px; height: 48px; flex-shrink: 0; filter: drop-shadow(0 6px 12px rgba(47, 107, 255, .25)); }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-name {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--ink);
}
.brand-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: #7f97c4;
    border: 1px solid rgba(47, 107, 255, .18);
    background: rgba(255, 255, 255, .7);
    padding: 3px 9px;
    border-radius: 5px;
}
.brand-slogan { margin-top: 8px; font-size: 17px; color: var(--ink-2); letter-spacing: 1px; }
.brand-slogan .grad {
    font-style: normal;
    font-weight: 700;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---- 等距建造场景 ---- */
.scene-wrap {
    width: min(620px, 100%);
    margin: 0 auto;
    background: radial-gradient(58% 58% at 50% 46%, rgba(74, 125, 255, .12), transparent 72%);
}
.scene-tilt { transition: transform .18s ease-out; will-change: transform; }
.scene-svg { width: 100%; display: block; overflow: visible; }

.scene-svg .s-float { animation: heroFloat 3.4s ease-in-out infinite; }
.scene-svg .s-float-2 { animation: heroFloat 4.2s .6s ease-in-out infinite; }
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}
.scene-svg .s-guide { stroke-dasharray: 6 6; animation: guideDash 1s linear infinite; }
@keyframes guideDash { to { stroke-dashoffset: -24; } }
.scene-svg .s-flow { stroke-dasharray: 9 11; animation: flowDash 1.5s linear infinite; }
@keyframes flowDash { to { stroke-dashoffset: -40; } }
.scene-svg .s-pulse { transform-box: fill-box; transform-origin: center; animation: reticlePulse 1.8s ease-in-out infinite; }
@keyframes reticlePulse {
    0%, 100% { opacity: .6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.12); }
}
.scene-svg .s-wire { animation: wirePulse 2.6s ease-in-out infinite; }
@keyframes wirePulse {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}
.scene-svg .s-rotate { animation: spinSlow 28s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.scene-svg .s-shadow-float { animation: shadowPulse 3.4s ease-in-out infinite; }
@keyframes shadowPulse {
    0%, 100% { opacity: .22; }
    50% { opacity: .1; }
}

/* ---- 三步流程条 ---- */
.pipeline {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(40, 80, 180, .07);
    backdrop-filter: blur(8px);
}
.pl-step { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pl-num {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--cyan-deep);
}
.pl-ico {
    width: 19px; height: 19px; flex-shrink: 0;
    fill: none; stroke: var(--blue); stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.pl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-name { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: 1px; white-space: nowrap; }
.pl-desc { font-size: 11px; color: var(--ink-3); line-height: 1.5; white-space: nowrap; }
.pl-link {
    flex: 1;
    min-width: 16px;
    height: 0;
    border-top: 2px dashed rgba(90, 130, 220, .35);
    animation: linkDash 1.2s linear infinite;
}
@keyframes linkDash { to { border-top-color: rgba(0, 194, 255, .55); } }

/* ---- 登录卡 ---- */
.lp-access { display: flex; justify-content: flex-end; }
.access-card {
    position: relative;
    width: min(400px, 100%);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(18px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 18px;
    padding: 32px 34px 26px;
    box-shadow: 0 30px 70px rgba(38, 70, 160, .16), 0 6px 18px rgba(38, 70, 160, .08);
}

/* HUD 角框 */
.corner { position: absolute; width: 18px; height: 18px; }
.corner.tl { top: -2px; left: -2px; border-top: 2.5px solid var(--blue); border-left: 2.5px solid var(--blue); border-radius: 14px 0 0 0; }
.corner.tr { top: -2px; right: -2px; border-top: 2.5px solid var(--cyan); border-right: 2.5px solid var(--cyan); border-radius: 0 14px 0 0; }
.corner.bl { bottom: -2px; left: -2px; border-bottom: 2.5px solid var(--cyan); border-left: 2.5px solid var(--cyan); border-radius: 0 0 0 14px; }
.corner.br { bottom: -2px; right: -2px; border-bottom: 2.5px solid var(--blue); border-right: 2.5px solid var(--blue); border-radius: 0 0 14px 0; }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card-tag {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--cyan-deep);
}
.card-online {
    display: flex; align-items: center; gap: 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10px; letter-spacing: 2px;
    color: var(--ink-3);
}
.card-online i {
    width: 7px; height: 7px; border-radius: 50%;
    background: #22c58b;
    box-shadow: 0 0 0 3px rgba(34, 197, 139, .18);
    animation: onlineBlink 2.2s ease-in-out infinite;
}
@keyframes onlineBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.card-title { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: 10px; text-indent: 2px; }
.card-sub { margin: 8px 0 22px; color: var(--ink-3); font-size: 13px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--ink-2); }
.field-label em {
    font-style: normal;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: #a9b8d4;
}
.field-box { position: relative; display: flex; align-items: center; }
.field-ico {
    position: absolute; left: 13px;
    width: 17px; height: 17px;
    fill: none; stroke: #9db1d4; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
    pointer-events: none;
    transition: stroke .15s;
}
.login-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid #dbe4f3;
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, .75);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-input::placeholder { color: #aab6cf; }
.login-input:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .15);
}
.field-box:focus-within .field-ico { stroke: var(--blue); }

.login-btn {
    position: relative;
    overflow: hidden;
    margin-top: 4px;
    height: 46px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 8px;
    text-indent: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(47, 107, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}
.login-btn::after {
    content: "";
    position: absolute; top: 0; bottom: 0;
    left: -60%; width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-18deg);
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(47, 107, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.login-btn:hover::after { animation: sheen .8s ease; }
@keyframes sheen { to { left: 120%; } }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { cursor: default; transform: none; opacity: .85; }
.login-btn .btn-loading {
    display: none;
    position: absolute; inset: 0;
    align-items: center; justify-content: center; gap: 5px;
}
.login-btn .btn-loading i {
    width: 6px; height: 6px; border-radius: 50%;
    background: #fff;
    animation: loadDot 1s ease-in-out infinite;
}
.login-btn .btn-loading i:nth-child(2) { animation-delay: .15s; }
.login-btn .btn-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes loadDot {
    0%, 100% { opacity: .35; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}
.login-btn.is-loading .btn-label { visibility: hidden; }
.login-btn.is-loading .btn-loading { display: flex; }
.login-btn.is-loading::after { display: none; }

.login-error { min-height: 20px; color: #e5484d; font-size: 13px; }
.login-error.is-show { animation: errShake .35s ease; }

/* 注册表单里的隐私说明：紧跟昵称输入框的小字提示 */
.field-hint { margin: -8px 0 0; color: #93a3c0; font-size: 12px; line-height: 1.5; }
@keyframes errShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.card-note { margin-top: 16px; text-align: center; color: #93a3c0; font-size: 12px; }

/* ---- 入场动画 ---- */
@keyframes riseIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to { opacity: 1; transform: none; }
}
.brand { animation: riseIn .6s .05s both; }
.scene-wrap { animation: riseIn .7s .15s both; }
.pipeline { animation: riseIn .6s .28s both; }
.access-card { animation: cardIn .65s .2s both; }

/* ---- 响应式 ---- */
@media (max-width: 980px) {
    .login-main { grid-template-columns: 1fr; gap: 26px; }
    .lp-access { justify-content: center; }
    .scene-wrap { width: min(480px, 100%); }
}
@media (max-width: 620px) {
    .login-page { padding: 22px 16px; }
    .brand-name { font-size: 26px; letter-spacing: 4px; }
    .brand-slogan { font-size: 14px; }
    .pipeline { flex-direction: column; align-items: stretch; gap: 10px; }
    .pl-link { display: none; }
    .pl-desc { white-space: normal; }
    .access-card { padding: 26px 22px 22px; }
    .card-title { font-size: 26px; }
}

/* ---- 减动效偏好 ---- */
@media (prefers-reduced-motion: reduce) {
    .login-page *, .login-page *::before, .login-page *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* 注册/登录切换链接 */
.card-note a { color: #4a7dff; font-weight: 600; cursor: pointer; text-decoration: none; }
.card-note a:hover { text-decoration: underline; }

/* 注册方式二选一：分段切换 */
.reg-tabs { display: flex; gap: 3px; background: #eef2fb; border-radius: 8px; padding: 3px; }
.reg-tab {
    flex: 1;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: #8496b5;
    font-size: 13px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.reg-tab.is-active {
    background: #fff;
    color: #2b3a55;
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(46, 80, 180, .14);
}
