:root {
    --primary: #78cfff;
    --primary-strong: #53b8f3;
    --primary-light: #aae4ff;
    --text-on-primary: #09283b;
    --glass-dark: rgba(16, 31, 46, .55);
    --glass-dark-strong: rgba(9, 21, 33, .72);
    --glass-light: rgba(245, 251, 255, .88);
    --glass-light-soft: rgba(225, 241, 251, .74);
    --glass-border: rgba(255, 255, 255, .32);
    --field-border: rgba(42, 92, 122, .18);
    --focus: rgba(83, 184, 243, .32);
    --modal-text: #153044;
    --muted-text: #587084;
    --danger: #bd2d3a;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: #f8fbff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(rgba(5, 12, 22, .18), rgba(5, 12, 22, .40)), url('./bg.jpg') center / cover fixed no-repeat;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.modal-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

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

button:not(:disabled),
a,
.captcha-image:not(.is-loading) {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: .66;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.glass-nav svg,
.service-card svg,
.modal-root svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.glass-nav {
    position: fixed;
    z-index: 20;
    top: max(16px, env(safe-area-inset-top));
    left: clamp(12px, 3vw, 42px);
    right: clamp(12px, 3vw, 42px);
    min-height: 76px;
    padding: 10px 14px 10px 18px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(18, 31, 44, .66), rgba(26, 39, 52, .42));
    box-shadow: inset 0 1px rgba(255, 255, 255, .20), 0 18px 55px rgba(0, 0, 0, .24);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    min-width: 0;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand img {
    width: 86px;
    height: auto;
    flex: none;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .28));
}

.brand span {
    overflow: hidden;
    font-size: clamp(16px, 1.8vw, 22px);
    font-weight: 750;
    letter-spacing: .04em;
    text-overflow: ellipsis;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    flex: none;
    gap: 10px;
}

.nav-button {
    min-width: 96px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 16px;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 650;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.nav-button.primary,
.service-button.primary,
.submit-button,
.ack-button {
    color: var(--text-on-primary);
    border-color: rgba(210, 243, 255, .92);
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    box-shadow: inset 0 1px rgba(255, 255, 255, .95), 0 9px 25px rgba(54, 172, 235, .27);
}

.nav-button:hover,
.service-button:not(.primary):hover,
.modal-close:hover,
.password-toggle:hover {
    border-color: rgba(255, 255, 255, .40);
    background-color: rgba(255, 255, 255, .20);
}

.nav-button.primary:hover,
.service-button.primary:hover,
.submit-button:hover,
.ack-button:hover {
    background: linear-gradient(180deg, #c0ebff, #69c5f6);
    box-shadow: inset 0 1px #fff, 0 12px 28px rgba(54, 172, 235, .35);
}

.nav-button:active,
.service-button:active,
.submit-button:active,
.ack-button:active,
.modal-close:active,
.password-toggle:active {
    filter: brightness(.94);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.captcha-image:focus-visible {
    outline: 3px solid rgba(159, 224, 255, .92);
    outline-offset: 3px;
}

.overview {
    min-height: 100vh;
    padding: 122px 20px 48px;
    display: grid;
    place-items: center;
}

.hero {
    width: min(640px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.slogan {
    width: min(550px, 86vw);
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .50));
}

.service-card {
    width: 100%;
    padding: 30px;
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(18, 34, 49, .64), rgba(10, 20, 31, .48));
    box-shadow: inset 0 1px rgba(255, 255, 255, .25), inset 0 -1px rgba(255, 255, 255, .06), 0 24px 80px rgba(0, 0, 0, .32);
    backdrop-filter: blur(28px) saturate(155%);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.service-button {
    min-width: 0;
    min-height: 62px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 19px;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px rgba(255, 255, 255, .16), 0 8px 20px rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, filter .2s ease;
}

.button-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .18);
    display: grid;
    place-items: center;
    flex: none;
}

.service-button.primary .button-icon {
    background: rgba(255, 255, 255, .36);
}

.modal-root:empty {
    display: none;
}

.modal-layer {
    position: fixed;
    z-index: 40;
    inset: 0;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background: rgba(4, 10, 17, .50);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    display: grid;
    place-items: center;
    animation: layer-in .22s ease-out both;
}

.form-modal,
.warning-modal {
    border: 1px solid rgba(255, 255, 255, .40);
    background: linear-gradient(145deg, var(--glass-light), var(--glass-light-soft));
    box-shadow: inset 0 1px rgba(255, 255, 255, .95), 0 28px 80px rgba(0, 0, 0, .38);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    color: var(--modal-text);
    animation: modal-in .24s ease-out both;
}

.form-modal {
    width: min(460px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 26px;
    border-radius: 28px;
    scrollbar-width: thin;
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 21px;
}

.modal-head-icon,
.warning-icon {
    display: grid;
    place-items: center;
    flex: none;
}

.modal-head-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #0d5a85;
    background: linear-gradient(180deg, #c4ecff, #8cd5fa);
    box-shadow: inset 0 1px #fff;
}

.modal-heading {
    min-width: 0;
}

.modal-heading h2,
.warning-modal h2 {
    margin: 0;
    color: var(--modal-text);
    font-size: 22px;
}

.modal-heading p {
    margin: 3px 0 0;
    color: var(--muted-text);
    font-size: 13px;
}

.modal-close,
.password-toggle {
    border: 1px solid rgba(28, 72, 99, .12);
    background: rgba(255, 255, 255, .42);
    color: #37566b;
    display: grid;
    place-items: center;
    transition: background-color .2s ease, border-color .2s ease, filter .2s ease;
}

.modal-close {
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border-radius: 13px;
    flex: none;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    margin: 0 0 7px 3px;
    color: #36566d;
    font-size: 13px;
    font-weight: 650;
}

.input-wrap {
    position: relative;
}

.input-wrap input,
.captcha-row input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--field-border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .66);
    box-shadow: inset 0 1px rgba(255, 255, 255, .85);
    color: #143044;
    outline: none;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.input-wrap input {
    padding: 0 15px;
}

.input-wrap.has-toggle input {
    padding-right: 50px;
}

.input-wrap input::placeholder,
.captcha-row input::placeholder {
    color: #7b8f9d;
}

.input-wrap input:focus,
.captcha-row input:focus {
    border-color: var(--primary-strong);
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 0 0 3px var(--focus);
}

.password-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-color: transparent;
    border-radius: 12px;
}

.password-toggle img {
    width: 21px;
    height: 21px;
    opacity: .62;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 10px;
}

.captcha-row input {
    min-width: 0;
    padding: 0 15px;
    text-transform: uppercase;
}

.captcha-image {
    position: relative;
    min-width: 0;
    min-height: 49px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--field-border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .76);
    display: grid;
    place-items: center;
    color: #286c92;
    font-size: 13px;
    font-weight: 650;
}

.captcha-image img {
    width: 100%;
    height: 47px;
    object-fit: cover;
}

.captcha-image.is-loading {
    color: #6c8291;
}

.captcha-image.is-cooling::after {
    content: "请稍候";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #486879;
    background: rgba(238, 248, 253, .82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-weight: 700;
}

.captcha-hint {
    margin: 6px 0 0 3px;
    color: #6b8190;
    font-size: 12px;
}

.submit-button,
.ack-button {
    min-height: 50px;
    border-radius: 17px;
    font-weight: 750;
    font-size: 16px;
    transition: background .2s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}

.submit-button {
    width: 100%;
    margin-top: 8px;
}

.warning-modal {
    width: min(410px, 100%);
    padding: 30px 28px 25px;
    border-radius: 28px;
    text-align: center;
}

.warning-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 13px;
    border-radius: 18px;
    color: #a55b08;
    background: linear-gradient(180deg, #fff0bd, #ffd878);
    box-shadow: inset 0 1px #fff, 0 9px 22px rgba(194, 126, 25, .19);
}

.warning-icon svg {
    width: 27px;
    height: 27px;
    stroke-width: 2.1;
}

.warning-modal p {
    margin: 22px 0 25px;
    color: #35546a;
    font-size: 16px;
    line-height: 1.7;
    text-align: center;
}

.ack-button {
    min-width: 180px;
    padding: 0 28px;
}

.field-error {
    margin: 6px 3px 0;
    color: var(--danger);
    font-size: 12px;
}

.input-wrap input[aria-invalid="true"],
.captcha-row input[aria-invalid="true"] {
    border-color: rgba(189, 45, 58, .72);
    box-shadow: 0 0 0 3px rgba(189, 45, 58, .13);
}

.pxmu-success-icon {
    width: 22px !important;
}

@keyframes layer-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    body {
        background-attachment: scroll;
    }

    .glass-nav {
        top: max(10px, env(safe-area-inset-top));
        left: 10px;
        right: 10px;
        min-height: 64px;
        padding: 8px 9px 8px 11px;
        border-radius: 20px;
        gap: 8px;
    }

    .brand {
        gap: 7px;
    }

    .brand img {
        width: 57px;
    }

    .brand span {
        font-size: 14px;
    }

    .nav-actions {
        gap: 7px;
    }

    .nav-button {
        min-width: 44px;
        min-height: 44px;
        padding: 0 12px;
        border-radius: 14px;
    }

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

    .overview {
        min-height: 100svh;
        padding: 106px 13px max(24px, env(safe-area-inset-bottom));
    }

    .hero {
        gap: 14px;
    }

    .slogan {
        width: 92%;
    }

    .service-card {
        padding: 20px 16px;
        border-radius: 25px;
    }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .service-button {
        min-height: 54px;
        padding: 0 19px;
        border-radius: 17px;
    }

    .modal-layer {
        place-items: center;
        padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }

    .form-modal {
        max-height: calc(100svh - 20px);
        padding: 20px 17px 18px;
        border-radius: 25px;
    }

    .modal-head {
        margin-bottom: 16px;
    }

    .modal-heading h2,
    .warning-modal h2 {
        font-size: 20px;
    }

    .field {
        margin-bottom: 11px;
    }

    .input-wrap input,
    .captcha-row input,
    .captcha-image {
        min-height: 46px;
    }

    .password-toggle {
        top: 1px;
        right: 1px;
        width: 44px;
        height: 44px;
    }

    .captcha-row {
        grid-template-columns: minmax(0, 1fr) 108px;
    }

    .captcha-image img {
        height: 44px;
    }

    .submit-button {
        min-height: 49px;
    }

    .warning-modal {
        padding: 26px 19px 21px;
        border-radius: 25px;
    }

    .warning-modal p {
        margin: 19px 0 23px;
    }

    .ack-button {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .brand img {
        width: 50px;
    }

    .brand span {
        max-width: 92px;
        font-size: 12px;
    }

    .service-card {
        padding: 16px 13px;
    }

    .service-button {
        min-height: 50px;
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    .glass-nav {
        position: absolute;
    }

    .overview {
        min-height: 560px;
        padding-top: 96px;
    }

    .modal-layer {
        align-items: center;
    }

    .form-modal {
        max-height: calc(100vh - 20px);
    }
}

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