:root {
    --background: #f7fbff;
    --foreground: #101828;
    --card: rgba(255, 255, 255, 0.28);
    --border: rgba(18, 92, 185, 0.12);
    --primary: #1677ff;
    --secondary: #22d3ee;
    --muted: rgba(255, 255, 255, 0.56);
    --muted-foreground: #667085;
    --accent: rgba(129, 212, 255, 0.56);
    --destructive: #d92d20;
    --color-primary: #1677ff;
    --color-secondary: #22d3ee;
    --color-accent: rgba(129, 212, 255, 0.56);
    --color-chart-1: #60a5fa;
    --color-chart-3: #3b82f6;
    --color-chart-4: #10b981;
    --color-chart-5: #facc15;
    --angle-1: -75deg;
    --angle-2: -45deg;
}
@property --angle-1 { syntax: "<angle>"; inherits: false; initial-value: -75deg; }
@property --angle-2 { syntax: "<angle>"; inherits: false; initial-value: -45deg; }
* { box-sizing: border-box; }
html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body { min-height: 100%; }
body {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--foreground);
    font-family: "Microsoft YaHei UI", "PingFang SC", "HarmonyOS Sans SC", "Segoe UI", sans-serif;
    user-select: none;
}
input, textarea, select { user-select: text; }
@keyframes float1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-15px, 20px) scale(1.05); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes float2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(20px, -15px) scale(0.95); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
.gradient-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #eef7ff 54%, #ffffff 100%);
}
.gradient-background svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.74; }
.gradient-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(22,119,255,.13) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .36;
    mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
}
.gradient-background::after {
    content: "";
    position: absolute;
    inset: -18%;
    background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.48), transparent 42%);
    backdrop-filter: blur(1.5px);
}
.auth-brand {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: .5rem;
    color: var(--primary);
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 28px rgba(22,119,255,.16), inset 0 0 0 1px rgba(22,119,255,.12);
    backdrop-filter: blur(14px);
}
.brand-mark svg { width: 1.35rem; height: 1.35rem; }
.auth-brand h1 { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -.025em; color: var(--foreground); white-space: nowrap; }
.auth-stage {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 5.5rem 1rem 2.25rem;
    background: var(--card);
}
.auth-flow { width: 100%; max-width: 320px; margin: 0 auto; }
.auth-flow-wide { max-width: 420px; }
.auth-fieldset {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    min-height: 360px;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    border: 0;
    margin: 0;
    padding: .5rem;
}
.auth-fieldset[disabled] { opacity: .72; pointer-events: none; }
.step-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: opacity 350ms cubic-bezier(.4,0,.2,1), transform 350ms cubic-bezier(.4,0,.2,1), filter 350ms ease-out;
}
.step-hidden-left { opacity: 0; transform: translateX(-30px) scale(.95); filter: blur(6px); pointer-events: none; position: absolute; }
.step-hidden-right { opacity: 0; transform: translateX(30px) scale(.95); filter: blur(6px); pointer-events: none; position: absolute; }
.step-active { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); pointer-events: auto; position: relative; }
.step-title { text-align: center; display: flex; flex-direction: column; gap: .5rem; }
.step-title h2 {
    margin: 0;
    font-family: "Times New Roman", "Songti SC", "SimSun", serif;
    font-size: clamp(2.35rem, 10vw, 3rem);
    line-height: 1;
    font-weight: 300;
    letter-spacing: -.055em;
    white-space: nowrap;
    color: var(--foreground);
}
.step-title p { margin: 0; font-size: .875rem; font-weight: 700; color: var(--muted-foreground); }
.provider-row { display: flex; width: 100%; align-items: center; justify-content: center; gap: .75rem; }
.provider-card { flex: 1; border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; border-radius: 9999px; }
.provider-card .glass-button { width: 100%; padding: .66rem .9rem; border-radius: 9999px; }
.provider-card .glass-button-text { display: flex; align-items: center; justify-content: center; gap: .45rem; font-size: .75rem; font-weight: 800; letter-spacing: -.02em; }
.provider-card svg { width: 1rem; height: 1rem; }
.divider { display: flex; width: 100%; align-items: center; gap: .5rem; padding: .1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(22,119,255,.18), transparent); }
.divider span { color: #98a2b3; font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.step-form { width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.field-label {
    position: absolute;
    z-index: 10;
    left: 1rem;
    top: -1.5rem;
    color: var(--muted-foreground);
    font-size: .75rem;
    font-weight: 800;
}
.glass-button-wrap {
    --anim-time: 400ms;
    --anim-ease: cubic-bezier(.25,1,.5,1);
    --border-width: clamp(1px, .0625em, 4px);
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
    transition: transform var(--anim-time) var(--anim-ease);
}
.glass-button-wrap:has(.glass-button:active) { transform: rotateX(20deg); }
.glass-button-shadow {
    --shadow-cutoff-fix: 2em;
    position: absolute;
    width: calc(100% + var(--shadow-cutoff-fix));
    height: calc(100% + var(--shadow-cutoff-fix));
    top: calc(0% - var(--shadow-cutoff-fix) / 2);
    left: calc(0% - var(--shadow-cutoff-fix) / 2);
    filter: blur(8px);
    transition: filter var(--anim-time) var(--anim-ease);
    pointer-events: none;
    z-index: 0;
}
.glass-button-shadow::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: linear-gradient(180deg, rgba(22,119,255,.12), rgba(255,255,255,.32));
    width: calc(100% - var(--shadow-cutoff-fix) - .25em);
    height: calc(100% - var(--shadow-cutoff-fix) - .25em);
    top: calc(var(--shadow-cutoff-fix) - .5em);
    left: calc(var(--shadow-cutoff-fix) - .875em);
    padding: .125em;
    box-sizing: border-box;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    transition: all var(--anim-time) var(--anim-ease);
    opacity: 1;
}
.glass-button {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(4px);
    transition: all var(--anim-time) var(--anim-ease);
    background: linear-gradient(-75deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.78) 50%, rgba(255,255,255,.36) 100%);
    box-shadow: inset 0 .125em .125em rgba(255,255,255,.82), inset 0 -.125em .125em rgba(22,119,255,.06), 0 .25em .125em -.125em rgba(30,94,150,.18), 0 0 .1em .25em inset rgba(255,255,255,.22);
}
.glass-button:hover {
    transform: scale(.97);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 .125em .125em rgba(255,255,255,.9), inset 0 -.125em .125em rgba(22,119,255,.08), 0 .15em .05em -.1em rgba(30,94,150,.2), 0 0 .05em .1em inset rgba(255,255,255,.45);
}
.glass-button-text {
    position: relative;
    display: block;
    z-index: 2;
    color: rgba(16,24,40,.9);
    text-shadow: 0 .25em .05em rgba(30,94,150,.08);
    transition: all var(--anim-time) var(--anim-ease);
}
.glass-button-text::after {
    content: "";
    display: block;
    position: absolute;
    width: calc(100% - var(--border-width));
    height: calc(100% - var(--border-width));
    top: calc(0% + var(--border-width) / 2);
    left: calc(0% + var(--border-width) / 2);
    box-sizing: border-box;
    border-radius: 9999px;
    overflow: clip;
    background: linear-gradient(var(--angle-2), transparent 0%, rgba(255,255,255,.2) 40%, rgba(255,255,255,.72) 50%, transparent 60%);
    z-index: 3;
    mix-blend-mode: screen;
    pointer-events: none;
    background-size: 200% 200%;
    background-position: 0% 50%;
    transition: background-position 500ms var(--anim-ease);
}
.glass-button:hover .glass-button-text::after { background-position: 25% 50%; }
.glass-button::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: 9999px;
    width: calc(100% + var(--border-width));
    height: calc(100% + var(--border-width));
    top: calc(0% - var(--border-width) / 2);
    left: calc(0% - var(--border-width) / 2);
    padding: var(--border-width);
    box-sizing: border-box;
    background: conic-gradient(from var(--angle-1) at 50% 50%, rgba(22,119,255,.34) 0%, transparent 20% 80%, rgba(22,119,255,.34) 100%), linear-gradient(180deg, rgba(255,255,255,.64), rgba(22,119,255,.06));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    transition: all var(--anim-time) var(--anim-ease);
    box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgba(255,255,255,.5);
    pointer-events: none;
}
.glass-button:hover::after { --angle-1: -120deg; }
.glass-input-wrap { position: relative; z-index: 2; transform-style: preserve-3d; border-radius: 9999px; width: 100%; }
.glass-input {
    display: flex;
    position: relative;
    width: 100%;
    align-items: center;
    gap: .5rem;
    border-radius: 9999px;
    padding: .25rem;
    min-height: 3.5rem;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(4px);
    transition: all 400ms cubic-bezier(.25,1,.5,1);
    background: linear-gradient(-75deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.78) 50%, rgba(255,255,255,.34) 100%);
    box-shadow: inset 0 .125em .125em rgba(255,255,255,.82), inset 0 -.125em .125em rgba(22,119,255,.06), 0 .25em .125em -.125em rgba(30,94,150,.16), 0 0 .1em .25em inset rgba(255,255,255,.16);
}
.glass-input-wrap:focus-within .glass-input {
    backdrop-filter: blur(8px);
    box-shadow: inset 0 .125em .125em rgba(255,255,255,.9), inset 0 -.125em .125em rgba(22,119,255,.05), 0 .15em .05em -.1em rgba(30,94,150,.18), 0 0 .05em .1em inset rgba(255,255,255,.36);
}
.glass-input::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: 9999px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    top: -1px;
    left: -1px;
    padding: 1px;
    box-sizing: border-box;
    background: conic-gradient(from var(--angle-1) at 50% 50%, rgba(22,119,255,.32) 0%, transparent 25% 75%, rgba(22,119,255,.32) 100%), linear-gradient(180deg, rgba(255,255,255,.7), rgba(22,119,255,.05));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    transition: all 400ms cubic-bezier(.25,1,.5,1);
    pointer-events: none;
}
.glass-input-wrap:focus-within .glass-input::after { --angle-1: -125deg; }
.glass-input-text-area { position: absolute; inset: 0; border-radius: 9999px; pointer-events: none; }
.glass-input-text-area::after {
    content: "";
    display: block;
    position: absolute;
    inset: 1px;
    border-radius: 9999px;
    overflow: clip;
    background: linear-gradient(var(--angle-2), transparent 0%, rgba(255,255,255,.34) 40%, rgba(255,255,255,.72) 50%, transparent 60%);
    z-index: 3;
    mix-blend-mode: screen;
    pointer-events: none;
    background-size: 200% 200%;
    background-position: 0% 50%;
    transition: background-position 500ms cubic-bezier(.25,1,.5,1);
}
.glass-input-wrap:focus-within .glass-input-text-area::after { background-position: 25% 50%; }
.field-icon {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    padding-left: .5rem;
    overflow: hidden;
    color: rgba(16,24,40,.78);
    transition: all 300ms ease-in-out;
}
.field-icon svg { width: 1.1rem; height: 1.1rem; }
.icon-plain { border: 0; background: transparent; cursor: pointer; }
.glass-input input {
    position: relative;
    z-index: 10;
    height: 2.5rem;
    width: 0;
    flex-grow: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--foreground);
    font-size: 1rem;
    font-weight: 650;
}
.glass-input input::placeholder { color: rgba(16,24,40,.42); }
.action-box {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    overflow: hidden;
    width: 2.5rem;
    padding-right: .25rem;
    transition: all 300ms ease-in-out;
}
.action-box.is-hidden { width: 0; padding-right: 0; }
.icon-button { width: 2rem; height: 2rem; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 9999px; }
.icon-button .glass-button { width: 2rem; height: 2rem; border-radius: 9999px; }
.icon-button svg { width: 1rem; height: 1rem; }
.back-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: rgba(16,24,40,.66);
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    transition: color 180ms ease;
}
.back-link:hover { color: var(--foreground); }
.back-link svg { width: .92rem; height: .92rem; }
.resend-link {
    align-self: center;
    border: 0;
    background: transparent;
    color: #0f5fe8;
    font-size: .78rem;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
}
.resend-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.resend-link[disabled] { color: #98a2b3; cursor: not-allowed; text-decoration: none; }
.auth-error {
    width: 100%;
    margin: 0;
    padding: .75rem .9rem;
    border-radius: 1rem;
    color: var(--destructive);
    border: 1px solid rgba(217,45,32,.18);
    background: rgba(255,241,240,.82);
    box-shadow: 0 12px 30px rgba(217,45,32,.08);
    backdrop-filter: blur(12px);
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.55;
}
.auth-switch { display: flex; align-items: center; justify-content: center; gap: .5rem; color: #667085; font-size: .82rem; font-weight: 700; }
.auth-switch a, .login-options a, .text-link { color: #0f5fe8; font-weight: 900; text-decoration: none; }
.auth-switch a:hover, .login-options a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.login-options { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: -.35rem; color: #667085; font-size: .78rem; font-weight: 800; }
.login-options label { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
.login-options input { appearance: none; width: 1rem; height: 1rem; border-radius: .4rem; border: 1px solid rgba(22,119,255,.24); background: rgba(255,255,255,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.88); }
.login-options input:checked { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 4px #fff, 0 6px 14px rgba(22,119,255,.22); }
.login-persist-note { display: inline-flex; align-items: center; gap: .4rem; }
.login-persist-note::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.text-link { border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
.input-hint { margin: -1rem 0 0; color: #98a2b3; font-size: .75rem; font-weight: 650; line-height: 1.45; text-align: center; }
.profile-form { gap: 1rem; }
.profile-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.profile-grid .glass-input { min-height: 3.25rem; }
.profile-grid .glass-input input { height: 2.35rem; }
.captcha-flow { display: grid; grid-template-columns: 1fr 116px; gap: .65rem; align-items: center; }
.captcha-image { width: 116px; height: 3.5rem; border-radius: 9999px; border: 1px solid rgba(22,119,255,.13); background: rgba(255,255,255,.66); box-shadow: 0 12px 26px rgba(30,94,150,.12); cursor: pointer; object-fit: cover; backdrop-filter: blur(8px); }
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    background: rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
    transition: opacity 300ms ease-out;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal-box {
    position: relative;
    display: flex;
    width: min(calc(100vw - 2rem), 30rem);
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 1rem;
    padding: 2.35rem 3rem;
    border-radius: 1rem;
    border: 4px solid rgba(255,255,255,.68);
    background: rgba(255,255,255,.78);
    box-shadow: 0 28px 80px rgba(22,119,255,.16), inset 0 1px 0 rgba(255,255,255,.9);
    transform: scale(.9);
    opacity: 0;
    transition: transform 300ms cubic-bezier(.34,1.56,.64,1), opacity 300ms ease-out;
}
.modal-overlay.is-open .modal-box { transform: scale(1); opacity: 1; }
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 180ms ease;
}
.modal-close:hover { color: var(--foreground); }
.modal-close svg { width: 1rem; height: 1rem; }
.modal-close.is-hidden { display: none; }
.modal-icon { display: flex; width: 3rem; height: 3rem; align-items: center; justify-content: center; color: var(--primary); }
.modal-icon svg { width: 3rem; height: 3rem; }
.modal-icon .spin { animation: spin 1s linear infinite; }
.modal-icon .success { color: #16a34a; }
.modal-icon .error { color: var(--destructive); }
.modal-text-window { position: relative; display: flex; width: 100%; min-height: 3rem; align-items: center; justify-content: center; overflow: hidden; text-align: center; }
#modal-text { margin: 0; max-width: 100%; color: var(--foreground); font-size: 1rem; font-weight: 750; line-height: 1.35; white-space: nowrap; word-break: keep-all; transition: opacity 300ms ease, transform 300ms ease; }
#modal-text.is-changing { opacity: 0; transform: translateY(-10px); }
.modal-cta { display: none; }
.modal-cta.is-visible { display: block; }
.modal-button { border: 0; background: transparent; cursor: pointer; border-radius: 9999px; }
.modal-button .glass-button { border-radius: 9999px; padding: .7rem 1.5rem; }
.auth-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    line-height: 1;
}
.auth-svg svg { display: block; width: 100%; height: 100%; }
.provider-card .auth-svg { width: 1rem; height: 1rem; }
.field-icon .auth-svg { width: 1.1rem; height: 1.1rem; }
.icon-button .auth-svg { width: 1rem; height: 1rem; }
.back-link .auth-svg { width: .92rem; height: .92rem; }
.modal-close .auth-svg { width: 1rem; height: 1rem; }
@media (min-width: 768px) { .auth-brand { left: 50%; transform: translateX(-50%); } }
@media (max-width: 520px) {
    .auth-stage {
        min-height: 100svh;
        min-height: 100dvh;
        align-items: flex-start;
        padding: 5.5rem max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .auth-brand { top: 1.15rem; left: 1.15rem; }
    .step-title h2 { font-size: 2.25rem; white-space: normal; }
    .provider-row { gap: .55rem; }
    .provider-card .glass-button-text { font-size: .7rem; }
    .captcha-flow { grid-template-columns: 1fr; }
    .auth-flow, .auth-flow-wide { width: 100%; max-width: 320px; }
    .auth-fieldset { min-height: 0; padding: .25rem 0 1rem; }
    .step-card { gap: 1.25rem; }
    .glass-input input { min-width: 0; font-size: 16px; }
    .profile-grid { grid-template-columns: 1fr; }
    .captcha-image { width: 100%; }
    .login-options { align-items: flex-start; flex-direction: column; }
    .modal-box { padding: 2.25rem 1.15rem; }
    #modal-text { font-size: 1rem; letter-spacing: -.03em; white-space: normal; word-break: break-word; }
}
@media (max-width: 360px) {
    .auth-brand h1 { font-size: .9rem; }
    .step-title h2 { font-size: 2rem; }
    .auth-stage { padding-left: .75rem; padding-right: .75rem; }
    .glass-input { min-height: 3.35rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
