body.moonshot-login {
    background-color: #000;
    color: #fff;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* 页面跳转过场动画：顶级商业景深溶解（从深处浮现放大并淡入） */
@keyframes pageDepthFadeIn {
    from { transform: scale(0.97); opacity: 0; filter: blur(4px); }
    to { transform: scale(1); opacity: 1; filter: blur(0px); }
}

body.page-enter-active {
    animation: pageDepthFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#starCanvas {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    z-index: -1;
    pointer-events: none;
}

.ms-login-nav {
    padding: 40px;
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.logo-img {
    height: 44px;
    width: auto;
    position: relative;
    z-index: 2;
    mix-blend-mode: screen;
}

.logo-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    margin-left: -8px;
    transform: skewX(-12deg);
}

.ms-login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 104px 20px 48px;
}

.ms-login-box {
    width: 100%;
    max-width: 360px;
    padding: 40px 0;
}

.ms-login-box h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.04em;
}

.ms-login-box p {
    color: #888;
    margin: 0 0 48px;
    font-size: 1.1rem;
}

/* 适配 js/login.js 动态生成的表单结构 */
.form-block { 
    margin-bottom: 24px; 
}

.input-label {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.login-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: #fff;
    font-size: 1.2rem;
    padding: 12px 0;
    outline: none;
    transition: border-color 0.3s;
}

.login-input:focus {
    border-bottom-color: #fff;
}

/* 解决自动填充导致背景变色的问题 */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover, 
.login-input:-webkit-autofill:focus, 
.login-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #000 inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.code-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.send-code-btn {
    position: absolute;
    right: 0;
    bottom: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.send-code-btn:hover {
    color: #ccc;
}

.send-code-btn:disabled {
    color: #666;
    cursor: not-allowed;
}

.ms-tabs {
    display: flex;
    margin-bottom: 32px;
    border-bottom: 1px solid #333;
}

.ms-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #888;
    font-size: 16px;
    padding: 12px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.ms-tab.active {
    color: #fff;
    font-weight: 600;
}

.ms-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
}

.login-btn {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 99px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
    margin-top: 24px;
}

.login-btn:hover {
    transform: scale(1.02);
}

.login-btn:active {
    transform: scale(0.98);
}

/* === 密码输入框容器：position relative 以承载右侧切换按钮 === */
.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

/* 密码可见切换按钮 */
.pwd-toggle-btn {
    position: absolute;
    right: 0;
    bottom: 12px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.pwd-toggle-btn:hover {
    color: #fff;
}

.pwd-toggle-btn svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* 当有切换按钮时，输入框右侧留出按钮空间 */
.input-shell:has(.pwd-toggle-btn) .login-input {
    padding-right: 36px;
}

/* 密码强度指示器 */
.pwd-strength {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    transition: color 0.2s;
}

.pwd-strength-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.pwd-strength-bar {
    flex: 1;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: background 0.2s;
}

.pwd-strength-bar.active.weak    { background: #ef4444; }
.pwd-strength-bar.active.medium  { background: #f59e0b; }
.pwd-strength-bar.active.strong  { background: #10b981; }
.pwd-strength-bar.active.verystrong { background: #22c55e; }

.pwd-strength-label {
    min-width: 48px;
    text-align: right;
    transition: color 0.2s;
}

.pwd-strength-label.weak    { color: #ef4444; }
.pwd-strength-label.medium  { color: #f59e0b; }
.pwd-strength-label.strong  { color: #10b981; }
.pwd-strength-label.verystrong { color: #22c55e; }

/* "记住我"勾选框 */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.remember-me:hover {
    color: #fff;
}

.remember-me input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #fff;
    cursor: pointer;
}

.remember-me span {
    line-height: 1.4;
}

.login-btn.secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #333;
    margin-top: 12px;
}

.login-btn.secondary:hover {
    border-color: #fff;
}

.login-helper {
    margin-top: 24px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

.login-helper a {
    color: #fff;
    text-decoration: none;
}

.ms-error {
    display: none;
    color: #ff453a;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}

.ms-error.show { 
    display: block; 
}

/* ==========================================================================
   移动端适配 — 不影响桌面端
   ========================================================================== */
@media (max-width: 768px) {
    .ms-login-nav {
        padding: 20px 16px;
        box-sizing: border-box !important;
    }
    .nav-logo {
        display: none;
    }
    .ms-login-box {
        padding: 20px 0;
        max-width: 100%;
    }
    .logo-img {
        height: 36px;
    }
    .logo-text {
        font-size: 1.25rem;
    }
    .ms-login-box h2 {
        font-size: 1.5rem;
    }

    /* === 移动端紧凑化 === */
    .ms-login-box p {
        margin-bottom: 20px !important;
    }
    .ms-login-box h1 {
        font-size: 1.75rem;
    }
    .ms-login-container {
        align-items: flex-start;
        min-height: 100svh;
        padding: 96px 16px 32px;
    }
    .form-block {
        margin-bottom: 14px !important;
    }
    .ms-tabs {
        margin-bottom: 16px !important;
    }
    .login-btn {
        padding: 14px !important;
        margin-top: 12px !important;
    }

    /* === 触摸目标增大 === */
    .send-code-btn {
        min-height: 36px !important;
        padding: 8px 4px !important;
    }
    .pwd-toggle-btn {
        min-width: 36px !important;
        min-height: 36px !important;
        padding: 8px !important;
    }
    .pwd-toggle-btn svg {
        width: 18px;
        height: 18px;
    }

    /* === 记住我和密码强度间距 === */
    .remember-me {
        margin-top: 8px !important;
    }
    .remember-me input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
    }
    .pwd-strength {
        margin-top: 4px !important;
    }
    .login-helper {
        margin-top: 12px !important;
    }
    .login-helper a {
        display: inline-block;
        padding: 6px 0;
        min-height: 36px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .ms-login-nav {
        padding: 16px 14px;
        box-sizing: border-box !important;
    }
    .ms-login-box {
        padding: 16px 0 24px;
    }
    .logo-img {
        height: 30px;
    }
    .logo-text {
        font-size: 1.1rem;
    }
}

/* === 2026 account experience refresh === */
body.moonshot-login { background-color: #050607; min-height: 100vh; height: auto; }
.ms-login-container { padding: 104px 32px 48px; }
.ms-auth-shell {
    width: min(1040px, 100%); min-height: 650px; display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 8px;
    background: rgba(12,14,16,.78); box-shadow: 0 30px 90px rgba(0,0,0,.48);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.ms-auth-brand {
    position: relative; display: flex; flex-direction: column; justify-content: space-between;
    padding: 42px; overflow: hidden; color: #f5f7f8; border-right: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(148deg,rgba(34,197,94,.12),transparent 42%), linear-gradient(325deg,rgba(59,130,246,.1),transparent 46%), #0c0f11;
}
.ms-auth-brand::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .28;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
    background-size: 32px 32px; mask-image: linear-gradient(to bottom,transparent,#000 20%,#000 78%,transparent);
}
.brand-visual,.brand-copy,.brand-footer { position: relative; z-index: 1; }
.brand-visual { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; object-fit: contain; }
.brand-kicker { color: #cbd5d1; font-size: 12px; font-weight: 700; }
.brand-eyebrow { margin: 0 0 18px; color: #70d694; font-size: 12px; font-weight: 700; }
.brand-copy h2 { margin: 0; font-size: 38px; line-height: 1.28; font-weight: 650; letter-spacing: 0; }
.brand-copy h2 br { display: block; content: ''; margin-top: 5px; }
.brand-copy>p:last-child { max-width: 380px; margin: 22px 0 0; color: #9ca6a1; font-size: 15px; line-height: 1.75; }
.brand-footer { display: flex; align-items: center; gap: 10px; color: #7f8a85; font-size: 12px; }
.brand-status-dot { width: 3px; height: 3px; border-radius: 50%; background: #64706a; }
.ms-auth-shell .ms-login-box {
    width: 100%; max-width: none; box-sizing: border-box; padding: 54px 52px 30px;
    display: flex; flex-direction: column; justify-content: center; background: rgba(8,9,10,.68);
}
.auth-heading { margin-bottom: 28px; }
.auth-heading-kicker { display: block; margin-bottom: 12px; color: #7e8883; font-size: 12px; font-weight: 600; }
.ms-auth-shell .ms-login-box h1 { margin: 0 0 8px; font-size: 2rem; font-weight: 650; letter-spacing: 0; }
.ms-auth-shell .ms-login-box p { margin: 0; color: #8d9691; font-size: 14px; }
.ms-auth-shell .form-block { margin-bottom: 18px; }
.ms-auth-shell .input-label { margin-bottom: 7px; color: #aab2ae; font-weight: 500; }
.ms-auth-shell .login-input {
    box-sizing: border-box; padding: 13px 14px; color: #fff; font-size: 15px;
    background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.11); border-radius: 6px;
    transition: border-color .2s,background .2s,box-shadow .2s;
}
.ms-auth-shell .login-input:focus { border-color: rgba(112,214,148,.72); background: rgba(255,255,255,.055); box-shadow: 0 0 0 3px rgba(34,197,94,.1); }
.ms-auth-shell .login-input::placeholder { color: #5f6763; }
.ms-auth-shell .login-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #101213 inset !important; }
.ms-auth-shell .ms-tabs { margin-bottom: 24px; padding: 3px; border: 1px solid rgba(255,255,255,.09); border-radius: 6px; background: rgba(255,255,255,.025); }
.ms-auth-shell .ms-tab { padding: 9px 0; border-radius: 4px; }
.ms-auth-shell .ms-tab.active { background: rgba(255,255,255,.09); }
.ms-auth-shell .ms-tab.active::after { display: none; }
.ms-auth-shell .send-code-btn { right: 12px; bottom: 9px; padding: 5px 4px; color: #8ee0aa; }
.ms-auth-shell .code-shell .login-input { padding-right: 112px; }
.ms-auth-shell .pwd-toggle-btn { right: 10px; bottom: 8px; }
.ms-auth-shell .input-shell:has(.pwd-toggle-btn) .login-input { padding-right: 46px; }
.ms-auth-shell .remember-me { color: #828b86; }
.ms-auth-shell .remember-me input { width: 16px; height: 16px; accent-color: #3ecf76; }
.ms-auth-shell .login-btn { margin-top: 18px; padding: 14px; border-radius: 6px; transition: transform .2s,background .2s; }
.ms-auth-shell .login-btn:hover { transform: translateY(-1px); background: #e8ecea; }
.ms-auth-shell .login-helper { color: #707873; }
.ms-auth-shell .login-helper a { color: #c8cfcb; }
.ms-auth-shell .login-helper a:hover { color: #fff; }
.ms-auth-shell .ms-error {
    padding: 10px 12px; color: #ff9d96; text-align: left; border: 1px solid rgba(255,91,82,.2);
    border-radius: 6px; background: rgba(255,69,58,.075); align-items: flex-start; gap: 8px;
}
.ms-auth-shell .ms-error.show { display: flex; }
.auth-legal-links { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; }
.auth-legal-links a { color: #626a66; text-decoration: none; transition: color .2s; }
.auth-legal-links a:hover { color: #aab2ae; }
.auth-legal-links span { width: 1px; height: 10px; background: rgba(255,255,255,.12); }
.auth-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: #7d8681; font-size: 12px; line-height: 1.55; }
.auth-consent input { flex: 0 0 auto; width: 15px; height: 15px; margin: 2px 0 0; accent-color: #3ecf76; }
.auth-consent a { color: #b7c0bb; text-decoration: none; }
.auth-consent a:hover { color: #fff; }

@media (max-width: 768px) {
    .ms-login-container { align-items: flex-start; min-height: 100svh; padding: 82px 16px 28px; }
    .ms-auth-shell { display: block; min-height: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
    .ms-auth-brand { display: none; }
    .ms-auth-shell .ms-login-box { padding: 18px 0 28px; background: transparent; }
    .auth-heading { margin-bottom: 24px; }
    .ms-auth-shell .ms-login-box p { margin-bottom: 0 !important; }
}
@media (max-width: 480px) { .ms-login-container { padding-top: 72px; } }

/* === Legacy Fanxing login appearance: keep the original minimal layout === */
body.moonshot-login { background-color: #000; height: 100vh; min-height: 0; }
.ms-login-container { padding: 0; min-height: 0; align-items: center; }
.ms-auth-shell {
    display: block; width: 100%; min-height: 0; overflow: visible; border: 0;
    border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none;
}
.ms-auth-brand { display: none; }
.ms-auth-shell .ms-login-box {
    width: 100%; max-width: 360px; margin: 0 auto; padding: 40px;
    display: block; box-sizing: content-box; background: transparent;
}
.auth-heading { margin-bottom: 0; }
.auth-heading-kicker { display: none; }
.ms-auth-shell .ms-login-box h1 {
    margin: 0 0 8px; font-size: 2.5rem; font-weight: 600; letter-spacing: -0.04em;
}
.ms-auth-shell .ms-login-box p { margin: 0 0 48px; color: #888; font-size: 1.1rem; }
.ms-auth-shell .form-block { margin-bottom: 24px; }
.ms-auth-shell .input-label { color: #888; margin-bottom: 8px; font-weight: 400; }
.ms-auth-shell .login-input {
    background: transparent; border: 0; border-bottom: 1px solid #333; border-radius: 0;
    color: #fff; font-size: 1.2rem; padding: 12px 0; box-shadow: none;
}
.ms-auth-shell .login-input:focus { border-color: #fff; background: transparent; box-shadow: none; }
.ms-auth-shell .login-input::placeholder { color: #666; }
.ms-auth-shell .login-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #000 inset !important; }
.ms-auth-shell .ms-tabs { display: flex; margin-bottom: 32px; padding: 0; border: 0; border-bottom: 1px solid #333; border-radius: 0; background: transparent; }
.ms-auth-shell .ms-tab { padding: 12px 0; border-radius: 0; background: transparent; }
.ms-auth-shell .ms-tab.active { background: transparent; color: #fff; }
.ms-auth-shell .ms-tab.active::after { display: block; content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: #fff; }
.ms-auth-shell .send-code-btn { right: 0; bottom: 12px; padding: 0; color: #fff; }
.ms-auth-shell .send-code-btn:hover { color: #ccc; }
.ms-auth-shell .code-shell .login-input { padding-right: 112px; }
.ms-auth-shell .pwd-toggle-btn { right: 0; bottom: 12px; }
.ms-auth-shell .input-shell:has(.pwd-toggle-btn) .login-input { padding-right: 36px; }
.ms-auth-shell .login-btn { margin-top: 24px; padding: 16px; border-radius: 99px; }
.ms-auth-shell .login-btn:hover { transform: scale(1.02); background: #fff; }
.ms-auth-shell .remember-me { color: #888; }
.ms-auth-shell .remember-me input { width: 14px; height: 14px; accent-color: #fff; }
.ms-auth-shell .login-helper { margin-top: 24px; color: #666; }
.ms-auth-shell .login-helper a { color: #fff; }
.ms-auth-shell .ms-error { text-align: center; padding: 0; border: 0; border-radius: 0; background: transparent; align-items: center; justify-content: center; }
.auth-legal-links { margin-top: 22px; }
.auth-legal-links a { color: #555; }
.auth-legal-links a:hover { color: #aaa; }

@media (max-width: 768px) {
    .ms-login-container { align-items: center; min-height: 100vh; padding: 0 16px; }
    .ms-auth-shell .ms-login-box { padding: 28px 0; max-width: 100%; }
    .ms-auth-shell .ms-login-box h1 { font-size: 1.75rem; }
    .ms-auth-shell .ms-login-box p { margin-bottom: 20px !important; }
}
