/* 雀士个人中心登录 — 深色科技 + 玻璃拟态 */

:root {
    --ub-bg-deep: #020617;
    --ub-cyan: #2dd4bf;
    --ub-cyan-glow: rgba(45, 212, 191, 0.45);
    --ub-blue-glow: rgba(56, 189, 248, 0.35);
    --ub-glass-fill: rgba(15, 23, 42, 0.52);
    --ub-glass-edge: rgba(255, 255, 255, 0.14);
    --ub-glass-inner: rgba(255, 255, 255, 0.06);
    --ub-text: #f1f5f9;
    --ub-text-muted: rgba(148, 163, 184, 0.95);
    --ub-grid: rgba(94, 234, 212, 0.07);
}

.ub-login-page {
    margin: 0;
    min-height: 100vh;
    background: var(--ub-bg-deep);
    color: var(--ub-text);
}

/* 背景：网格 + 极光光斑 + 缓慢漂移 */
.ub-login-bg {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(45, 212, 191, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 60%, rgba(56, 189, 248, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 45% at 0% 80%, rgba(20, 184, 166, 0.1), transparent 45%),
        linear-gradient(180deg, #0c1222 0%, #020617 48%, #030712 100%);
}

.ub-login-bg::before {
    content: "";
    position: absolute;
    inset: -50%;
    z-index: 0;
    opacity: 0.55;
    background-image:
        linear-gradient(var(--ub-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--ub-grid) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: perspective(500px) rotateX(12deg) scale(1.15);
    animation: ub-grid-drift 28s linear infinite;
    pointer-events: none;
}

.ub-login-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 50% 100%, transparent 0%, rgba(2, 6, 23, 0.55) 72%);
    pointer-events: none;
}

/* 前景动效层：极光 / 斜光束 / 扫描线 / 噪点 / 星点 */
.ub-login-fx {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ub-login-fx__aurora {
    position: absolute;
    inset: -20%;
    opacity: 0.55;
    background:
        radial-gradient(ellipse 55% 40% at 20% 30%, rgba(45, 212, 191, 0.22), transparent 55%),
        radial-gradient(ellipse 50% 45% at 85% 20%, rgba(56, 189, 248, 0.18), transparent 50%),
        radial-gradient(ellipse 40% 35% at 60% 85%, rgba(20, 184, 166, 0.12), transparent 45%);
    animation: ub-aurora-shift 22s ease-in-out infinite alternate;
}

@keyframes ub-aurora-shift {
    0% {
        transform: translate(-3%, -2%) scale(1);
    }
    100% {
        transform: translate(4%, 3%) scale(1.06);
    }
}

.ub-login-fx__beam {
    position: absolute;
    top: -30%;
    left: -40%;
    width: 55%;
    height: 160%;
    opacity: 0.12;
    background: linear-gradient(
        115deg,
        transparent 42%,
        rgba(94, 234, 212, 0.55) 49.5%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(56, 189, 248, 0.45) 50.5%,
        transparent 58%
    );
    transform: rotate(-18deg);
    animation: ub-beam-sway 16s ease-in-out infinite alternate;
    filter: blur(0.5px);
}

@keyframes ub-beam-sway {
    0% {
        transform: rotate(-20deg) translateX(-4%);
        opacity: 0.08;
    }
    100% {
        transform: rotate(-15deg) translateX(8%);
        opacity: 0.16;
    }
}

.ub-login-fx__sweep {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.35), rgba(255, 255, 255, 0.2), transparent);
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.25);
    opacity: 0.65;
    animation: ub-sweep-y 9s ease-in-out infinite;
}

@keyframes ub-sweep-y {
    0%,
    8% {
        top: -5%;
        opacity: 0;
    }
    12% {
        opacity: 0.55;
    }
    45% {
        top: 108%;
        opacity: 0.35;
    }
    55%,
    100% {
        top: 108%;
        opacity: 0;
    }
}

.ub-login-fx__noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: ub-noise-flicker 0.35s steps(2) infinite;
}

@keyframes ub-noise-flicker {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-2%, -1%);
    }
}

.ub-login-sparks {
    position: absolute;
    inset: 0;
}

.ub-login-sparks i {
    position: absolute;
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(204, 251, 241, 0.85);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.65), 0 0 20px rgba(45, 212, 191, 0.25);
    animation: ub-spark 3.2s ease-in-out infinite;
}

.ub-login-sparks i:nth-child(1) {
    top: 18%;
    left: 12%;
    animation-delay: 0s;
}
.ub-login-sparks i:nth-child(2) {
    top: 62%;
    left: 8%;
    animation-delay: -0.6s;
}
.ub-login-sparks i:nth-child(3) {
    top: 28%;
    right: 14%;
    animation-delay: -1.1s;
}
.ub-login-sparks i:nth-child(4) {
    top: 78%;
    right: 22%;
    animation-delay: -1.8s;
}
.ub-login-sparks i:nth-child(5) {
    top: 44%;
    left: 22%;
    animation-delay: -2.2s;
}
.ub-login-sparks i:nth-child(6) {
    top: 12%;
    left: 48%;
    animation-delay: -0.3s;
}
.ub-login-sparks i:nth-child(7) {
    bottom: 20%;
    left: 38%;
    animation-delay: -2.6s;
}
.ub-login-sparks i:nth-child(8) {
    top: 52%;
    right: 10%;
    animation-delay: -1.4s;
}

@keyframes ub-spark {
    0%,
    100% {
        opacity: 0.15;
        transform: scale(0.6);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
    70% {
        opacity: 0.35;
        transform: scale(0.85);
    }
}

@keyframes ub-grid-drift {
    0% {
        transform: perspective(500px) rotateX(12deg) scale(1.15) translate(0, 0);
    }
    100% {
        transform: perspective(500px) rotateX(12deg) scale(1.15) translate(-48px, -48px);
    }
}

/* 主内容必须在背景层之上（.ub-login-bg 与 .container-fluid 为同一节点，勿用 .ub-login-bg .container-fluid） */
.ub-login-bg > .row {
    position: relative;
    z-index: 2;
}

/* 装饰光球 */
.ub-login-orbs {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ub-login-orbs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    opacity: 0.5;
    animation: ub-orb-float 14s ease-in-out infinite;
    pointer-events: none;
}

.ub-login-orbs span:nth-child(1) {
    width: min(42vw, 320px);
    height: min(42vw, 320px);
    top: -8%;
    left: -6%;
    background: var(--ub-cyan-glow);
    animation-delay: 0s;
}

.ub-login-orbs span:nth-child(2) {
    width: min(55vw, 420px);
    height: min(55vw, 420px);
    bottom: -18%;
    right: -12%;
    background: var(--ub-blue-glow);
    animation-delay: -5s;
}

.ub-login-orbs span:nth-child(3) {
    width: 180px;
    height: 180px;
    top: 42%;
    left: calc(50% - 90px);
    background: rgba(167, 139, 250, 0.2);
    animation-delay: -9s;
}

@keyframes ub-orb-float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(12px, -18px) scale(1.05);
    }
    66% {
        transform: translate(-16px, 10px) scale(0.98);
    }
}

/* 流动渐变描边外壳 + 入场 */
.ub-login-card-shell {
    position: relative;
    padding: 1px;
    border-radius: 1.125rem;
    background: linear-gradient(
        125deg,
        rgba(45, 212, 191, 0.55),
        rgba(148, 163, 184, 0.12),
        rgba(56, 189, 248, 0.5),
        rgba(45, 212, 191, 0.25),
        rgba(94, 234, 212, 0.45)
    );
    background-size: 320% 320%;
    filter: drop-shadow(0 0 28px rgba(45, 212, 191, 0.12));
    animation:
        ub-card-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both,
        ub-shell-flow 10s ease 0.75s infinite;
}

@keyframes ub-shell-flow {
    0%,
    100% {
        background-position: 0% 40%;
    }
    50% {
        background-position: 100% 60%;
    }
}

/* 玻璃卡片 */
.ub-login-card {
    position: relative;
    border-radius: 1.04rem;
    background: var(--ub-glass-fill);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid var(--ub-glass-edge);
    box-shadow:
        0 0 0 1px var(--ub-glass-inner) inset,
        0 32px 64px -24px rgba(0, 0, 0, 0.65),
        0 0 100px -30px var(--ub-cyan-glow);
    overflow: hidden;
    animation: ub-card-glow 5s ease-in-out infinite alternate;
}

@keyframes ub-card-glow {
    0% {
        box-shadow:
            0 0 0 1px var(--ub-glass-inner) inset,
            0 32px 64px -24px rgba(0, 0, 0, 0.65),
            0 0 80px -34px rgba(45, 212, 191, 0.12);
    }
    100% {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 36px 72px -20px rgba(0, 0, 0, 0.55),
            0 0 120px -28px rgba(45, 212, 191, 0.22);
    }
}

/* 卡片内流光扫过 */
.ub-login-card-shimmer {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.ub-login-card-shimmer::before {
    content: "";
    position: absolute;
    top: -60%;
    left: -80%;
    width: 55%;
    height: 220%;
    background: linear-gradient(
        102deg,
        transparent 35%,
        rgba(255, 255, 255, 0.06) 48%,
        rgba(45, 212, 191, 0.12) 50%,
        rgba(255, 255, 255, 0.05) 52%,
        transparent 65%
    );
    transform: rotate(22deg);
    animation: ub-shimmer-pass 8.5s ease-in-out infinite;
}

@keyframes ub-shimmer-pass {
    0% {
        transform: translateX(-140%) rotate(22deg);
    }
    55% {
        transform: translateX(220%) rotate(22deg);
    }
    100% {
        transform: translateX(220%) rotate(22deg);
    }
}

.ub-login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(45, 212, 191, 0.5),
        rgba(255, 255, 255, 0.35),
        rgba(56, 189, 248, 0.45),
        transparent
    );
    opacity: 0.85;
    pointer-events: none;
}

.ub-login-card .card-body {
    position: relative;
    z-index: 1;
}

/* 顶栏：扫描线微动 */
.ub-login-head {
    position: relative;
}

.ub-login-head::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.5rem;
    width: 120px;
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--ub-cyan), transparent);
    opacity: 0.65;
    border-radius: 2px;
    animation: ub-scanline 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ub-scanline {
    0%,
    100% {
        opacity: 0.35;
        width: 80px;
    }
    50% {
        opacity: 0.85;
        width: 140px;
    }
}

.ub-login-head .ub-login-title {
    animation:
        ub-head-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both,
        ub-title-flow 11s linear 0.85s infinite;
}

.ub-login-head .ub-login-sub {
    animation: ub-head-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes ub-head-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ub-login-badge {
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: rgba(45, 212, 191, 0.12);
    color: #99f6e4;
    border: 1px solid rgba(45, 212, 191, 0.35);
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.15);
    animation:
        ub-head-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both,
        ub-badge-pulse 3.2s ease-in-out 0.65s infinite;
}

@keyframes ub-badge-pulse {
    0%,
    100% {
        box-shadow: 0 0 18px rgba(45, 212, 191, 0.12);
        border-color: rgba(45, 212, 191, 0.32);
    }
    50% {
        box-shadow: 0 0 32px rgba(45, 212, 191, 0.35);
        border-color: rgba(94, 234, 212, 0.55);
    }
}

.ub-login-title {
    letter-spacing: 0.06em;
    font-weight: 600;
    background: linear-gradient(
        100deg,
        #e2e8f0 0%,
        #ccfbf1 22%,
        #5eead4 40%,
        #38bdf8 58%,
        #e2e8f0 78%,
        #94a3b8 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(45, 212, 191, 0.15));
}

@keyframes ub-title-flow {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.ub-login-sub {
    color: var(--ub-text-muted);
    letter-spacing: 0.08em;
    font-variant: all-small-caps;
}

.ub-login-hint {
    color: rgba(148, 163, 184, 0.85);
    font-size: 0.75rem;
    line-height: 1.55;
}

.ub-login-hint code {
    font-size: 0.68rem;
    color: #5eead4;
    background: rgba(45, 212, 191, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(45, 212, 191, 0.2);
}

/* 提示条玻璃化 */
.ub-login-card .alert {
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.ub-login-card .alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.35);
}

.ub-login-card .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
}

.ub-login-card .alert-info {
    background: rgba(56, 189, 248, 0.12);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.35);
}

/* Element Plus：暗色玻璃内表单 */
.ub-login-card .el-form-item {
    margin-bottom: 1.1rem;
}

.ub-login-card .el-form-item__label {
    color: rgba(226, 232, 240, 0.88) !important;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.ub-login-card .el-input__wrapper {
    background: rgba(2, 6, 23, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18) inset !important;
    border-radius: 0.5rem !important;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.ub-login-card .el-input__wrapper:hover {
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.35) inset !important;
}

.ub-login-card .el-input__wrapper.is-focus {
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.55) inset, 0 0 20px rgba(45, 212, 191, 0.12) !important;
}

.ub-login-card .el-input__inner {
    color: #f8fafc !important;
    --el-input-text-color: #f8fafc;
}

.ub-login-card .el-input__inner::placeholder {
    color: rgba(148, 163, 184, 0.65);
}

.ub-login-card .el-icon {
    color: rgba(148, 163, 184, 0.85);
}

.ub-login-card .el-button--primary {
    --el-button-bg-color: linear-gradient(135deg, #0d9488, #14b8a6);
    background: linear-gradient(135deg, #0f766e, #0d9488 40%, #14b8a6) !important;
    border: none !important;
    box-shadow: 0 4px 24px rgba(45, 212, 191, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.ub-login-card .el-button--primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 28px rgba(45, 212, 191, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.ub-login-card .el-button.is-plain.el-button--success {
    background: rgba(2, 6, 23, 0.35) !important;
    border-color: rgba(74, 222, 128, 0.45) !important;
    color: #bbf7d0 !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ub-login-card .el-button.is-plain.el-button--success:hover {
    background: rgba(22, 163, 74, 0.2) !important;
    border-color: rgba(74, 222, 128, 0.65) !important;
    color: #dcfce7 !important;
}

.ub-login-divider.el-divider {
    border-color: rgba(148, 163, 184, 0.25);
    margin: 1.35rem 0;
}

.ub-login-divider.el-divider .el-divider__text {
    background: transparent !important;
    color: rgba(148, 163, 184, 0.85);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    padding: 0 1rem;
}

@keyframes ub-card-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ub-login-bg::before,
    .ub-login-orbs span,
    .ub-login-head::after,
    .ub-login-fx__aurora,
    .ub-login-fx__beam,
    .ub-login-fx__sweep,
    .ub-login-fx__noise,
    .ub-login-sparks i,
    .ub-login-card-shell,
    .ub-login-card,
    .ub-login-card-shimmer::before,
    .ub-login-badge,
    .ub-login-title,
    .ub-login-sub,
    .ub-login-head .ub-login-badge,
    .ub-login-head .ub-login-title,
    .ub-login-head .ub-login-sub {
        animation: none !important;
    }

    .ub-login-card-shell,
    .ub-login-card {
        opacity: 1;
        transform: none;
    }

    .ub-login-title {
        color: var(--ub-text);
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        filter: none;
    }

    .ub-login-sub {
        opacity: 1;
    }
}
