/**
 * 登录分栏页：左视觉大气氛 + 右表单
 * body.ui-auth--split
 */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

body.ui-auth--split {
    /* 跟随全局主题（默认绿白：app-ui-theme.css） */
    --auth-accent: var(--ui-primary, #00b96b);
    --auth-accent-deep: var(--ui-primary-hover, #009a58);
    --auth-accent-soft: var(--ui-primary-soft, #e8f8f0);
    --auth-ink: var(--ui-text, #1e293b);
    --auth-muted: var(--ui-text-muted, #94a3b8);
    --auth-line: var(--ui-border, #dbe3f0);
    --auth-panel-bg: var(--ui-surface, #ffffff);
    --auth-page-bg: var(--ui-bg, #f5f7fa);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: var(--auth-page-bg);
    color: var(--auth-ink);
    font-family: 'Manrope', 'PingFang SC', 'Noto Sans SC', sans-serif;
}

body.ui-auth--split .header {
    display: none;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    width: 100%;
    height: 100vh;
    height: 100dvh;
    isolation: isolate;
}

/* —— 左侧：大气氛视觉 —— */
.auth-visual {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 55% 45% at 72% 38%, color-mix(in srgb, var(--auth-accent) 32%, transparent), transparent 60%),
        radial-gradient(ellipse 40% 35% at 28% 70%, color-mix(in srgb, var(--auth-accent-soft) 80%, transparent), transparent 55%),
        linear-gradient(165deg, color-mix(in srgb, var(--auth-accent-soft) 70%, #ffffff) 0%, #f8fbf9 42%, color-mix(in srgb, var(--auth-accent-soft) 55%, #ffffff) 100%);
}

.auth-visual__brand {
    position: absolute;
    z-index: 5;
    top: max(28px, env(safe-area-inset-top));
    left: max(32px, env(safe-area-inset-left));
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    max-width: min(90%, 520px);
}

.auth-visual__brand-en {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-accent);
    line-height: 1.2;
}

.auth-visual__brand-zh {
    margin: 0;
    font-size: clamp(0.92rem, 1.4vw, 1.05rem);
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

.auth-visual__stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

/* 同心涟漪 —— 对标参考图水面波纹 */
.auth-ripples {
    position: absolute;
    width: min(92vmin, 920px);
    height: min(92vmin, 920px);
    border-radius: 50%;
    top: 52%;
    left: 48%;
    transform: translate(-50%, -50%);
}

.auth-ripples span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--auth-accent) 22%, transparent);
    box-shadow:
        inset 0 0 40px color-mix(in srgb, var(--auth-accent) 14%, transparent),
        0 0 1px rgba(255, 255, 255, 0.6);
    animation: auth-ripple-breathe 8s ease-in-out infinite;
}

.auth-ripples span:nth-child(1) { inset: 8%; animation-delay: 0s; }
.auth-ripples span:nth-child(2) { inset: 16%; animation-delay: 0.4s; opacity: 0.9; }
.auth-ripples span:nth-child(3) { inset: 24%; animation-delay: 0.8s; opacity: 0.8; }
.auth-ripples span:nth-child(4) { inset: 32%; animation-delay: 1.2s; opacity: 0.7; }
.auth-ripples span:nth-child(5) { inset: 40%; animation-delay: 1.6s; opacity: 0.55; }
.auth-ripples span:nth-child(6) { inset: 48%; animation-delay: 2s; opacity: 0.4; }

@keyframes auth-ripple-breathe {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.035); opacity: 0.95; }
}

/* 柔光体 —— 对标视频高光扫过 */
.auth-glow {
    position: absolute;
    width: 48%;
    height: 48%;
    top: 18%;
    right: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--auth-accent) 48%, transparent), transparent 68%);
    filter: blur(28px);
    animation: auth-glow-drift 10s ease-in-out infinite alternate;
}

.auth-glow--soft {
    width: 36%;
    height: 36%;
    top: auto;
    bottom: 12%;
    left: 10%;
    right: auto;
    background: radial-gradient(circle, color-mix(in srgb, var(--auth-accent-soft) 85%, transparent), transparent 70%);
    animation-delay: -3s;
}

@keyframes auth-glow-drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-18px, 14px) scale(1.12); }
}

/* DIANDANG 字母：超大对角线斜排 + 随机飘入 */
.auth-relief {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    display: block;
    pointer-events: none;
}

.auth-relief__glow {
    position: absolute;
    left: 18%;
    top: 12%;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--auth-accent) 48%, transparent), color-mix(in srgb, var(--auth-accent) 16%, transparent) 42%, transparent 70%);
    filter: blur(40px);
    animation: auth-glow-drift 11s ease-in-out infinite alternate;
    pointer-events: none;
}

.auth-relief__platform {
    position: absolute;
    left: 50%;
    top: 52%;
    width: 120%;
    height: 46%;
    transform: translate(-50%, -40%) rotate(-34deg) scaleY(0.42);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.9) 0%, color-mix(in srgb, var(--auth-accent-soft) 75%, transparent) 40%, transparent 70%);
    box-shadow:
        0 30px 50px color-mix(in srgb, var(--auth-accent) 12%, transparent),
        inset 0 0 40px color-mix(in srgb, var(--auth-accent) 16%, transparent);
    filter: blur(0.5px);
    opacity: 0.8;
}

.auth-relief__word {
    --auth-diag: -34deg;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.02em, 0.4vw, 0.12em);
    width: max-content;
    max-width: none;
    transform: translate(-46%, -42%) rotate(var(--auth-diag));
    transform-origin: center center;
    transform-style: preserve-3d;
    font-family: 'Manrope', 'Avenir Next', 'Segoe UI', sans-serif;
    line-height: 0.88;
}

.auth-relief.is-assembled .auth-relief__word {
    animation: auth-relief-float 8s ease-in-out infinite;
}

@keyframes auth-relief-float {
    0%, 100% {
        transform: translate(-46%, -42%) rotate(var(--auth-diag)) translate3d(0, 0, 0);
    }
    50% {
        transform: translate(-46%, -42%) rotate(calc(var(--auth-diag) + 1.5deg)) translate3d(8px, -14px, 0);
    }
}

.auth-letter {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 按手绘：铺满左栏对角线 */
    font-size: clamp(4.8rem, 14.5vmin, 11rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    user-select: none;
    will-change: transform, opacity;
    opacity: 0;
    color: #e8efff;
    background: linear-gradient(
        115deg,
        #ffffff 0%,
        var(--auth-accent-soft) 28%,
        var(--auth-accent) 58%,
        var(--auth-accent-deep) 78%,
        #ffffff 100%
    );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter:
        drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9))
        drop-shadow(0 5px 0 color-mix(in srgb, var(--auth-accent) 30%, #c5d0e0))
        drop-shadow(0 14px 24px color-mix(in srgb, var(--auth-accent) 24%, transparent));
}

/* 轻微错位，强化对角线台阶感 */
.auth-letter:nth-child(1) { translate: 0 -0.08em; }
.auth-letter:nth-child(2) { translate: 0 -0.04em; }
.auth-letter:nth-child(3) { translate: 0 0; }
.auth-letter:nth-child(4) { translate: 0 0.04em; }
.auth-letter:nth-child(5) { translate: 0 0.08em; }
.auth-letter:nth-child(6) { translate: 0 0.12em; }
.auth-letter:nth-child(7) { translate: 0 0.16em; }
.auth-letter:nth-child(8) { translate: 0 0.2em; }

.auth-letter.is-in {
    background-position: 100% 0;
    animation: auth-letter-gradient 2.8s ease-in-out infinite alternate;
}

.auth-letter.is-in:nth-child(odd) { animation-delay: 0.2s; }
.auth-letter.is-in:nth-child(even) { animation-delay: 0.7s; }

@keyframes auth-letter-gradient {
    from {
        background-position: 0% 50%;
        filter:
            drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9))
            drop-shadow(0 5px 0 rgba(170, 190, 230, 0.42))
            drop-shadow(0 14px 24px color-mix(in srgb, var(--auth-accent) 22%, transparent))
            drop-shadow(6px 0 16px color-mix(in srgb, var(--auth-accent) 20%, transparent));
    }
    to {
        background-position: 100% 50%;
        filter:
            drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
            drop-shadow(0 5px 0 color-mix(in srgb, var(--auth-accent) 32%, #c5d0e0))
            drop-shadow(0 14px 24px color-mix(in srgb, var(--auth-accent) 28%, transparent))
            drop-shadow(14px 0 26px color-mix(in srgb, var(--auth-accent) 42%, transparent));
    }
}

.auth-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.auth-particles i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--auth-accent) 55%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--auth-accent) 45%, transparent);
    animation: auth-particle 9s linear infinite;
}

.auth-particles i:nth-child(1) { left: 18%; top: 28%; animation-duration: 8s; }
.auth-particles i:nth-child(2) { left: 72%; top: 22%; width: 4px; height: 4px; animation-duration: 11s; animation-delay: -2s; }
.auth-particles i:nth-child(3) { left: 64%; top: 68%; width: 5px; height: 5px; animation-duration: 10s; animation-delay: -4s; }
.auth-particles i:nth-child(4) { left: 30%; top: 74%; width: 3px; height: 3px; animation-duration: 12s; animation-delay: -1s; }
.auth-particles i:nth-child(5) { left: 48%; top: 16%; width: 4px; height: 4px; animation-duration: 9.5s; animation-delay: -3s; }

@keyframes auth-particle {
    0% { transform: translateY(0) scale(1); opacity: 0.2; }
    30% { opacity: 0.9; }
    100% { transform: translateY(-48px) scale(0.6); opacity: 0; }
}

.auth-toolbar {
    position: absolute;
    z-index: 8;
    top: max(20px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.auth-theme-switch .ui-theme-switch__btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    color: var(--auth-muted);
}
.auth-theme-switch .ui-theme-switch__btn:hover,
.auth-theme-switch .ui-theme-switch__btn[aria-expanded="true"] {
    color: var(--auth-accent);
    background: #fff;
}
.auth-theme-switch .ui-theme-panel {
    right: 0;
    left: auto;
}

.auth-lang {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.auth-lang a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
}

.auth-lang a.active,
.auth-lang a:hover {
    background: #fff;
    color: var(--auth-accent);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--auth-accent) 16%, transparent);
}

/* —— 右侧：登录表单 —— */
.auth-panel {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-panel-bg);
    padding: 48px 40px;
    box-shadow: -12px 0 40px color-mix(in srgb, var(--auth-accent) 8%, transparent);
}

.auth-panel__inner {
    width: 100%;
    max-width: 360px;
}

.auth-panel__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 0 36px;
}

.auth-panel__title span {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #334155;
}

.auth-panel__title::before,
.auth-panel__title::after {
    content: '';
    flex: 1;
    height: 1px;
    max-width: 72px;
    background: linear-gradient(90deg, transparent, var(--auth-accent));
}

.auth-panel__title::after {
    background: linear-gradient(90deg, var(--auth-accent), transparent);
}

.auth-field {
    margin-bottom: 16px;
}

.auth-input {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus-within {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-accent) 16%, transparent);
}

.auth-input__icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--auth-muted);
    display: grid;
    place-items: center;
}

.auth-input__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-input input {
    flex: 1;
    min-width: 0;
    border: none !important;
    outline: none;
    box-shadow: none !important;
    background: transparent !important;
    padding: 12px 0 !important;
    min-height: 0 !important;
    font-size: 14px;
    color: var(--auth-ink);
    font-family: inherit;
}

.auth-input input::placeholder {
    color: #b0bac8;
}

.auth-input__addon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-captcha-box {
    min-width: 72px;
    height: 34px;
    padding: 0 10px;
    border-radius: 4px;
    border: none;
    background: var(--auth-accent-soft);
    color: var(--auth-accent-deep);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: inherit;
}

.auth-captcha-box:hover {
    filter: brightness(0.97);
}

.auth-captcha-refresh {
    border: none;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
    font-size: 15px;
}

.auth-captcha-refresh:hover {
    color: var(--auth-accent);
}

.auth-toggle-pw {
    border: none;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 15px;
    line-height: 1;
}

.auth-toggle-pw:hover {
    color: var(--auth-accent);
}

.auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 22px;
    font-size: 13px;
    color: #64748b;
}

.auth-meta label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
}

.auth-meta input[type="checkbox"] {
    width: auto;
    min-height: auto;
    accent-color: var(--auth-accent);
}

.auth-meta a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-meta a:hover {
    text-decoration: underline;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 6px;
    background: var(--auth-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--auth-accent) 30%, transparent);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
    background: var(--auth-accent-deep);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--auth-accent) 36%, transparent);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
}

@media (max-width: 900px) {
    body.ui-auth--split {
        overflow: auto;
    }
    .auth-split {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100dvh;
    }
    .auth-visual {
        min-height: 42vh;
    }
    .auth-relief {
        inset: 0;
    }
    .auth-relief__word {
        --auth-diag: -28deg;
        transform: translate(-48%, -40%) rotate(var(--auth-diag));
    }
    .auth-letter {
        font-size: clamp(2.6rem, 12vmin, 4.4rem);
    }
    .auth-toolbar {
        right: auto;
        left: max(16px, env(safe-area-inset-left));
        top: auto;
        bottom: 16px;
    }
    .auth-theme-switch .ui-theme-panel {
        left: 0;
        right: auto;
    }
    .auth-panel {
        padding: 32px 24px 48px;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-ripples span,
    .auth-glow,
    .auth-relief__glow,
    .auth-relief.is-assembled .auth-relief__word,
    .auth-letter.is-in,
    .auth-particles i {
        animation: none !important;
    }
    .auth-letter {
        opacity: 1 !important;
        transform: none !important;
    }
}


/* 登录页深色外观 */
html[data-scheme="dark"] body.ui-auth--split {
    --auth-ink: var(--ui-text);
    --auth-muted: var(--ui-text-muted);
    --auth-line: var(--ui-border);
    --auth-panel-bg: var(--ui-surface);
    --auth-page-bg: var(--ui-bg);
}
html[data-scheme="dark"] .auth-visual {
    background:
        radial-gradient(ellipse 55% 45% at 72% 38%, color-mix(in srgb, var(--auth-accent) 28%, transparent), transparent 60%),
        radial-gradient(ellipse 40% 35% at 28% 70%, color-mix(in srgb, var(--auth-accent) 14%, transparent), transparent 55%),
        linear-gradient(165deg, #121820 0%, #161e28 50%, #121820 100%);
}
html[data-scheme="dark"] .auth-visual__brand-zh {
    color: var(--ui-text-secondary);
}
html[data-scheme="dark"] .auth-lang,
html[data-scheme="dark"] .auth-theme-switch .ui-theme-switch__btn {
    background: rgba(26, 35, 50, 0.72);
    border-color: var(--ui-border);
}
html[data-scheme="dark"] .auth-lang a {
    color: var(--ui-text-secondary);
}
html[data-scheme="dark"] .auth-lang a.active,
html[data-scheme="dark"] .auth-lang a:hover {
    background: var(--ui-surface);
    color: var(--auth-accent);
}
html[data-scheme="dark"] .auth-panel {
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}
html[data-scheme="dark"] .auth-panel__title span {
    color: var(--ui-text);
}
html[data-scheme="dark"] .auth-input {
    background: var(--ui-surface-muted);
    border-color: var(--ui-border);
}
