:root {
    color-scheme: dark;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body.register-body {
    color: #f7f9ff;
    background: #171b31;
}

button,
input {
    font: inherit;
    letter-spacing: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

[v-cloak] {
    display: none !important;
}

.register-page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden auto;
    background:
        repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 18px),
        linear-gradient(160deg, #1a1a2e 0%, #16213e 39%, #0f4560 70%, #534483 100%);
}

.register-page::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    content: "";
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 26%, rgba(4, 10, 22, 0.18));
}

.register-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 430px);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: max(34px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
    flex-direction: column;
    justify-content: center;
}

.brand-area {
    margin: 0 auto 20px;
    text-align: center;
}

.brand-logo {
    display: block;
    width: 184px;
    height: auto;
    margin: 0 auto 12px;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.28));
}

.brand-area h1 {
    margin: 0;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.24);
}

.brand-area p {
    margin: 7px 0 0;
    color: rgba(238, 244, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.register-card {
    width: 100%;
    padding: 28px 20px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.065);
    box-shadow: 0 24px 55px rgba(3, 10, 25, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.input-item {
    position: relative;
    display: flex;
    height: 54px;
    margin-bottom: 14px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 8px;
    background: rgba(6, 13, 32, 0.28);
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.input-item:focus-within {
    border-color: rgba(107, 210, 214, 0.72);
    background: rgba(6, 13, 32, 0.42);
    box-shadow: 0 0 0 3px rgba(89, 197, 201, 0.1);
}

.input-item > svg {
    width: 20px;
    height: 20px;
    margin: 0 13px 0 15px;
    flex: 0 0 auto;
    color: rgba(218, 229, 248, 0.62);
}

.input-item:focus-within > svg {
    color: #78d8db;
}

.input-item input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 14px 0 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    font-size: 15px;
    caret-color: #78d8db;
}

.input-item input::placeholder {
    color: rgba(218, 227, 243, 0.48);
    opacity: 1;
}

.agent-input input {
    padding-right: 94px;
}

.agent-input.locked input {
    color: rgba(255, 255, 255, 0.78);
    cursor: default;
}

.agent-badge {
    position: absolute;
    right: 10px;
    display: inline-flex;
    height: 26px;
    padding: 0 9px;
    align-items: center;
    border: 1px solid rgba(255, 214, 128, 0.25);
    border-radius: 6px;
    color: #ffe1a0;
    background: rgba(224, 158, 54, 0.14);
    font-size: 12px;
    white-space: nowrap;
}

.agent-tip {
    display: flex;
    min-height: 24px;
    margin: -2px 2px 14px;
    align-items: center;
    color: rgba(222, 235, 247, 0.68);
    font-size: 12px;
    line-height: 1.5;
}

.agent-tip svg {
    width: 15px;
    height: 15px;
    margin-right: 7px;
    color: #71d5b3;
}

.register-button {
    display: flex;
    width: 100%;
    height: 52px;
    margin-top: 7px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #7651a8 58%, #5d4b9b 100%);
    box-shadow: 0 8px 24px rgba(65, 74, 170, 0.35);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.register-button:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 10px 28px rgba(76, 85, 185, 0.42);
    transform: translateY(-1px);
}

.register-button:active:not(:disabled) {
    transform: translateY(1px);
}

.register-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.register-button svg,
.loading-spinner {
    width: 20px;
    height: 20px;
}

.loading-spinner {
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.login-entry {
    margin: 19px 0 0;
    color: rgba(224, 232, 246, 0.62);
    font-size: 13px;
    text-align: center;
}

.login-entry a {
    margin-left: 5px;
    color: #8fe1e0;
    font-weight: 600;
    text-decoration: none;
}

.login-entry a:hover {
    color: #b2f2ed;
    text-decoration: underline;
}

.page-foot {
    margin: 20px 0 0;
    color: rgba(219, 229, 244, 0.38);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.modal-mask {
    position: fixed;
    z-index: 10;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(3, 8, 20, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.message-modal {
    width: min(100%, 330px);
    padding: 26px 22px 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f8fbff;
    background: #202a43;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    text-align: center;
}

.message-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 15px;
    place-items: center;
    border-radius: 50%;
}

.message-icon.success {
    color: #83e6bd;
    background: rgba(63, 196, 143, 0.14);
}

.message-icon.error {
    color: #ffad9d;
    background: rgba(237, 100, 89, 0.14);
}

.message-icon svg {
    width: 28px;
    height: 28px;
}

.message-modal h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.4;
}

.message-modal p {
    margin: 10px 0 20px;
    color: rgba(224, 233, 246, 0.7);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.message-modal button {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: #667eea;
    font-weight: 600;
    cursor: pointer;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 720px) {
    .register-container {
        width: 460px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .brand-logo {
        width: 212px;
    }
}

@media (max-width: 359px) {
    .register-container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .register-card {
        padding-right: 15px;
        padding-left: 15px;
    }

    .input-item input {
        font-size: 14px;
    }
}

@media (max-height: 720px) {
    .register-container {
        justify-content: flex-start;
        padding-top: max(22px, env(safe-area-inset-top));
    }

    .brand-area {
        margin-bottom: 14px;
    }

    .brand-logo {
        width: 148px;
        margin-bottom: 6px;
    }

    .brand-area h1 {
        font-size: 24px;
    }

    .brand-area p {
        margin-top: 3px;
    }

    .register-card {
        padding-top: 20px;
    }

    .input-item {
        height: 50px;
        margin-bottom: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
