*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --lk-blue: #3b82f6;
    --lk-blue-deep: #2563eb;
    --lk-blue-soft: #60a5fa;
    --lk-navy: #071530;
    --lk-text: #0f172a;
    --lk-muted: #94a3b8;
    --lk-line: #e2e8f0;
    --lk-field: #f1f5f9;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--lk-navy) !important;
    color: var(--lk-text);
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 64px;
}

/* ===== 背景氛围 ===== */
.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 55% at 50% 40%, rgba(56, 120, 255, .38), transparent 65%),
        radial-gradient(ellipse 50% 40% at 12% 80%, rgba(30, 80, 200, .4), transparent 60%),
        radial-gradient(ellipse 40% 35% at 88% 18%, rgba(40, 100, 220, .28), transparent 55%),
        linear-gradient(165deg, #050e28 0%, #0c1f4a 42%, #091636 100%);
}

.login-bg .mesh {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    opacity: .55;
}

.login-bg .m1 {
    width: 420px;
    height: 420px;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    background: rgba(59, 130, 246, .45);
    animation: breath 9s ease-in-out infinite;
}

.login-bg .m2 {
    width: 280px;
    height: 280px;
    left: 8%;
    bottom: 8%;
    background: rgba(37, 99, 235, .35);
    animation: breath 11s ease-in-out infinite reverse;
}

.login-bg .m3 {
    width: 220px;
    height: 220px;
    right: 6%;
    top: 12%;
    background: rgba(96, 165, 250, .28);
    animation: breath 10s ease-in-out infinite 1s;
}

.login-bg .grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(120, 170, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 255, .06) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: .5;
    mask-image: radial-gradient(ellipse at 50% 42%, #000 12%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 42%, #000 12%, transparent 70%);
}

.login-bg .orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 220, 255, .7), rgba(140, 190, 255, 0) 70%);
    box-shadow: 0 0 18px rgba(120, 180, 255, .55);
    animation: floaty 8s ease-in-out infinite;
}

.login-bg .o1 { width: 14px; height: 14px; left: 16%; top: 20%; }
.login-bg .o2 { width: 10px; height: 10px; right: 18%; top: 24%; animation-delay: 1.2s; }
.login-bg .o3 { width: 18px; height: 18px; left: 24%; bottom: 16%; animation-delay: 2s; }
.login-bg .o4 { width: 8px; height: 8px; right: 28%; bottom: 22%; animation-delay: .6s; }

.login-bg .dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(190, 220, 255, .75);
    box-shadow: 0 0 10px rgba(140, 190, 255, .9);
}

.login-bg .d1 { left: 10%; top: 38%; }
.login-bg .d2 { left: 72%; top: 14%; }
.login-bg .d3 { right: 12%; bottom: 28%; }
.login-bg .d4 { left: 38%; bottom: 12%; }
.login-bg .d5 { right: 34%; top: 58%; }
.login-bg .d6 { left: 58%; top: 22%; width: 3px; height: 3px; }

.login-bg .hud {
    position: absolute;
    left: 50%;
    top: 44%;
    width: min(82vw, 880px);
    height: min(82vw, 880px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(80, 150, 255, .16) 0%, transparent 26%),
        radial-gradient(circle at center, transparent 32%, rgba(90, 160, 255, .16) 33%, transparent 36%),
        radial-gradient(circle at center, transparent 46%, rgba(80, 150, 255, .13) 47%, transparent 50%),
        radial-gradient(circle at center, transparent 60%, rgba(70, 140, 255, .1) 61%, transparent 64%);
    box-shadow:
        inset 0 0 120px rgba(70, 140, 255, .2),
        0 0 140px rgba(40, 110, 220, .22);
    pointer-events: none;
}

.login-bg .hud-ring {
    position: absolute;
    left: 50%;
    top: 44%;
    border-radius: 50%;
    border: 1px solid rgba(150, 200, 255, .28);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-bg .r1 {
    width: min(46vw, 460px);
    height: min(46vw, 460px);
    box-shadow: 0 0 50px rgba(90, 160, 255, .18);
}

.login-bg .r2 {
    width: min(62vw, 620px);
    height: min(62vw, 620px);
    border-style: dashed;
    opacity: .72;
    animation: spin 52s linear infinite;
}

.login-bg .r3 {
    width: min(78vw, 780px);
    height: min(78vw, 780px);
    opacity: .42;
    border-color: rgba(120, 180, 255, .2);
}

.login-bg .hud-arc {
    position: absolute;
    left: 50%;
    top: 44%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(147, 197, 253, .55);
    border-right-color: rgba(147, 197, 253, .15);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-bg .a1 {
    width: min(54vw, 540px);
    height: min(54vw, 540px);
    animation: spin 28s linear infinite;
}

.login-bg .a2 {
    width: min(70vw, 700px);
    height: min(70vw, 700px);
    border-top-color: rgba(96, 165, 250, .35);
    animation: spin 40s linear infinite reverse;
}

/* ===== 中央卡片 ===== */
.login-card {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    width: min(960px, 94vw);
    min-height: 520px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(180, 210, 255, .18);
    box-shadow:
        0 40px 100px rgba(2, 10, 36, .55),
        0 0 0 1px rgba(255, 255, 255, .04) inset;
    animation: cardIn .6s cubic-bezier(.22, 1, .36, 1) both;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.login-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px;
    color: #fff;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, .12) 42%, rgba(140, 180, 255, .08) 100%);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-right: 1px solid rgba(255, 255, 255, .2);
}

.login-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(480px 300px at 10% -10%, rgba(255, 255, 255, .28), transparent 55%),
        radial-gradient(360px 240px at 90% 110%, rgba(80, 140, 255, .2), transparent 50%);
    pointer-events: none;
}

.login-side::after {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, transparent, rgba(147, 197, 253, .85), transparent);
    box-shadow: 0 0 16px rgba(96, 165, 250, .6);
}

.side-top,
.side-bottom {
    position: relative;
    z-index: 1;
}

.side-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 22px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(226, 240, 255, .92);
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(8px);
}

.side-top h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.25;
    text-shadow: 0 4px 24px rgba(0, 20, 60, .35);
}

.side-top h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 500;
    opacity: .92;
    letter-spacing: .04em;
}

.side-top p {
    margin: 0;
    font-size: 13px;
    letter-spacing: .12em;
    color: rgba(230, 240, 255, .72);
}

.side-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 20, 60, .25));
}

.side-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    height: 34px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    color: #e8f3ff;
    background: linear-gradient(135deg, rgba(120, 180, 255, .35), rgba(80, 140, 255, .2));
    border: 1px solid rgba(190, 220, 255, .4);
    box-shadow: 0 8px 20px rgba(20, 60, 140, .2);
}

.login-main {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 52px 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-head h3 {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -.03em;
}

.login-head p {
    margin: 0;
    font-size: 14px;
    color: var(--lk-muted);
    line-height: 1.55;
}

.login-head .demo {
    margin-top: 10px;
    color: #d97706;
    font-size: 12px;
}

.login-form {
    margin-top: 32px;
}

.field {
    margin-bottom: 18px;
}

.input-wrap {
    position: relative;
}

.input-wrap.has-icon .layui-input,
.input-wrap.has-icon .login-input {
    padding: 0 16px 0 46px !important;
}

.input-wrap .ico {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 2;
    display: inline-flex;
    pointer-events: none;
    transition: color .2s;
}

.input-wrap:focus-within .ico {
    color: var(--lk-blue);
}

/* 强制覆盖 public.css / 暗色主题：直角 + 深色底 */
html.dark .login-page .login-input,
html.dark .login-page .login-form .layui-input,
html.dark .login-page #username,
html.dark .login-page #password,
body.dark .login-page .login-input,
body.dark .login-page .login-form .layui-input,
.login-page .login-input,
.login-page .login-form .layui-input,
.login-page .login-form input.layui-input,
.login-page #username,
.login-page #password,
.login-page input[name="captcha"],
.login-page input[name="ga_code"] {
    height: 50px !important;
    line-height: 50px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    font-size: 14px !important;
    color: #0f172a !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: border-color .2s, box-shadow .2s, background .2s !important;
}

.login-page .input-wrap.has-icon .layui-input,
.login-page .input-wrap.has-icon .login-input,
.login-page #username {
    padding: 0 16px 0 46px !important;
}

.login-page #password,
.login-page .login-input[type="password"] {
    padding: 0 46px 0 46px !important;
}

.login-page input[name="captcha"],
.login-page input[name="ga_code"] {
    padding: 0 16px !important;
}

html.dark .login-page .login-input:hover,
.login-page .login-input:hover,
.login-page .login-form .layui-input:hover,
.login-page #username:hover,
.login-page #password:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

html.dark .login-page .login-input:focus,
html.dark .login-page .login-form .layui-input:focus,
.login-page .login-input:focus,
.login-page .login-form .layui-input:focus,
.login-page #username:focus,
.login-page #password:focus,
.login-page input[name="captcha"]:focus,
.login-page input[name="ga_code"]:focus {
    border-color: rgba(59, 130, 246, .55) !important;
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .14) !important;
}

.login-page .login-input::placeholder,
.login-page .login-form .layui-input::placeholder,
.login-page #username::placeholder,
.login-page #password::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    z-index: 2;
    transition: color .2s;
}

.toggle-pw:hover {
    color: #475569;
}

.toggle-pw svg {
    width: 20px;
    height: 20px;
    display: block;
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
    align-items: center;
}

.validateImg {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--lk-line);
    cursor: pointer;
}

.row-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 20px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 15px;
    height: 15px;
    accent-color: var(--lk-blue);
    cursor: pointer;
}

.login-btn {
    position: relative;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 48%, #2563eb 100%);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .18em;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 12px 28px rgba(37, 99, 235, .35),
        inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-btn span {
    position: relative;
    z-index: 1;
}

.login-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, .28) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.login-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow:
        0 16px 34px rgba(37, 99, 235, .42),
        inset 0 1px 0 rgba(255, 255, 255, .28);
}

.login-btn:hover::after {
    transform: translateX(120%);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(190, 210, 245, .5);
}

.login-footer a,
.login-footer span {
    color: rgba(190, 210, 245, .5);
    text-decoration: none;
}

.login-footer a:hover {
    color: rgba(220, 235, 255, .8);
}

.padding-5 {
    padding: 0 6px;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes breath {
    0%, 100% { opacity: .4; transform: scale(1); }
    50% { opacity: .65; transform: scale(1.08); }
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(22px) scale(.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 860px) {
    body { overflow: auto; }
    .login-page { padding: 20px 14px 52px; }
    .login-card {
        grid-template-columns: 1fr;
        width: min(430px, 96vw);
        min-height: auto;
        border-radius: 16px;
    }
    .login-side {
        min-height: 190px;
        padding: 28px 24px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .18);
    }
    .login-side::after { display: none; }
    .side-badge { margin-bottom: 14px; }
    .side-top h1 { font-size: 24px; }
    .side-top h2 { font-size: 15px; }
    .login-main { padding: 32px 24px 28px; }
    .login-head h3 { font-size: 26px; }
    .login-bg .hud,
    .login-bg .hud-ring,
    .login-bg .hud-arc { display: none; }
}
