@font-face {
    font-family: "AlimamaFangYuan";
    src: url("/font/AlimamaFangYuanTi-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AlimamaFangYuan";
    src: url("/font/AlimamaFangYuanTi-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AlimamaFangYuan";
    src: url("/font/AlimamaFangYuanTi-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --green: #4caf50;
    --green-dark: #3f9143;
    --green-soft: rgba(76, 175, 80, .09);
    --text: #333;
    --muted: #6b6b6b;
    --line: rgba(0, 0, 0, .075);
    --red: #d32f2f;
    --red-soft: rgba(211, 47, 47, .07);
    --amber: #e65100;
    --amber-soft: rgba(230, 81, 0, .07);
    --card: rgba(255, 255, 255, .93);
    --shadow: rgba(0, 0, 0, .085);
}

* { box-sizing: border-box; }
html { min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background-color: #f8f9fa;
    background-image:
        linear-gradient(rgba(255, 255, 255, .82) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .82) 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: "AlimamaFangYuan", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    height: 54px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid rgba(255, 255, 255, .75);
    box-shadow: 0 4px 20px var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.brand { color: var(--green); font-size: 19px; font-weight: 700; }
.home-link { padding: 7px 12px; border-radius: 12px; color: var(--green); font-size: 13px; font-weight: 600; }
.home-link:hover { background: var(--green-soft); }
.page { padding: 74px 0 38px; }
.container { width: min(100% - 32px, 720px); margin: 0 auto; }

.hero-notice,
.portal-card,
.privacy-card {
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .78);
    box-shadow: 0 8px 30px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hero-notice { padding: 26px 28px 24px; border-radius: 22px; }
.hero-notice::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -45px;
    right: -35px;
    width: 138px;
    height: 138px;
    border-radius: 50%;
    background: var(--green-soft);
}

.eyebrow { color: var(--green-dark); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; }
.hero-notice h1 { margin: 4px 0 6px; display: flex; align-items: center; gap: 9px; font-size: 24px; line-height: 1.4; }
.hero-notice p { margin: 0; color: var(--muted); font-size: 13.5px; }
.pulse-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--green); animation: pulse 2s ease-in-out infinite; }

.step-strip { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.step-strip span { padding: 7px 8px; border-radius: 10px; color: #8a8a8a; background: rgba(0, 0, 0, .03); text-align: center; font-size: 11.5px; font-weight: 600; }
.step-strip .active { color: #fff; background: var(--green); }
.step-strip .done { color: var(--green-dark); background: var(--green-soft); }

.section-label { margin: 21px 0 11px; display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.section-label::before { content: ""; width: 3px; height: 16px; border-radius: 3px; background: var(--green); }
.portal-card { min-height: 310px; padding: 24px; border-radius: 20px; }

.notice { margin-bottom: 16px; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; }
.notice.error { color: var(--red); border: 1px solid rgba(211, 47, 47, .18); background: var(--red-soft); }
.notice.success { color: var(--green-dark); border: 1px solid rgba(76, 175, 80, .2); background: var(--green-soft); }
.notice.warning { color: var(--amber); border: 1px solid rgba(230, 81, 0, .18); background: var(--amber-soft); }

.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { color: #444; font-size: 12.5px; font-weight: 600; }
.field input {
    width: 100%;
    height: 43px;
    padding: 0 13px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 11px;
    outline: 0;
    color: var(--text);
    background: rgba(255, 255, 255, .82);
    font-size: 13.5px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input::placeholder { color: #aaa; }
.field input:focus { border-color: rgba(76, 175, 80, .7); background: #fff; box-shadow: 0 0 0 3px rgba(76, 175, 80, .1); }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 9px; }
.code-button {
    height: 43px;
    padding: 0 11px;
    border: 1px solid rgba(76, 175, 80, .25);
    border-radius: 11px;
    color: var(--green-dark);
    background: var(--green-soft);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.code-button:hover:not(:disabled) { border-color: var(--green); }
.code-button:disabled { opacity: .6; cursor: not-allowed; }
.divider { margin: 3px 0 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11.5px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.consent { display: grid; grid-template-columns: 17px 1fr; gap: 8px; align-items: start; color: var(--muted); font-size: 12px; line-height: 1.7; cursor: pointer; }
.consent input { width: 15px; height: 15px; margin: 3px 0 0; accent-color: var(--green); }

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 43px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.primary-button { margin-top: 3px; border: 0; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-dark)); box-shadow: 0 4px 14px rgba(76, 175, 80, .27); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(76, 175, 80, .34); }
.secondary-button { margin-top: 10px; border: 1px solid var(--line); color: var(--muted); background: rgba(0, 0, 0, .025); }
.link-button { text-align: center; }
.password-note { margin: 13px 0 0; color: #8a8a8a; text-align: center; font-size: 11.5px; }

.field-message { min-height: 17px; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.field-message:empty { display: none; }
.field-message.ok { color: var(--green-dark); }
.field-message.error { color: var(--red); }
.field-message.checking { color: var(--muted); }

.wechat-gate { padding: 20px 10px 18px; display: grid; justify-items: center; text-align: center; }
.wechat-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: var(--green); box-shadow: 0 6px 18px rgba(76, 175, 80, .28); font-size: 20px; font-weight: 700; }
.wechat-gate h2 { margin: 13px 0 5px; font-size: 18px; }
.wechat-gate p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }

.verified-card,
.pending-card { margin-bottom: 16px; padding: 14px; display: flex; align-items: center; gap: 12px; border-radius: 13px; }
.verified-card { color: var(--green-dark); border: 1px solid rgba(76, 175, 80, .2); background: var(--green-soft); }
.pending-card { color: var(--amber); border: 1px solid rgba(230, 81, 0, .18); background: var(--amber-soft); }
.verified-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--green); font-weight: 700; }
.verified-card > div, .pending-card > div { min-width: 0; display: grid; gap: 1px; }
.verified-card strong, .pending-card strong { font-size: 13.5px; }
.verified-card small, .pending-card small { color: var(--muted); font-size: 11.5px; }
.spinner { width: 22px; height: 22px; flex: 0 0 auto; border: 2px solid rgba(230, 81, 0, .18); border-top-color: var(--amber); border-radius: 50%; animation: spin .8s linear infinite; }

.account-summary { margin: 0 0 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.account-summary div { min-width: 0; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .025); }
.account-summary dt { color: var(--muted); font-size: 10.5px; }
.account-summary dd { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 600; }

.privacy-card { margin-top: 16px; padding: 19px 21px; border-radius: 17px; }
.privacy-card h2 { margin: 0 0 7px; font-size: 14px; }
.privacy-card p { margin: 5px 0 0; color: var(--muted); font-size: 11.8px; line-height: 1.8; }

.code-message { margin-top: 6px; font-size: 11.5px; }
.code-message.ok { color: var(--green-dark); }
.code-message.error { color: var(--red); }

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
    .topbar { height: 50px; padding: 0 14px; }
    .brand { font-size: 17px; }
    .page { padding-top: 63px; }
    .container { width: min(100% - 20px, 720px); }
    .hero-notice { padding: 19px 17px 17px; border-radius: 17px; }
    .hero-notice h1 { font-size: 20px; }
    .hero-notice p { font-size: 12.3px; }
    .step-strip { margin-top: 14px; gap: 5px; }
    .step-strip span { padding: 6px 3px; font-size: 10.5px; }
    .section-label { margin-top: 16px; }
    .portal-card { padding: 17px 15px 18px; border-radius: 16px; }
    .privacy-card { padding: 16px; border-radius: 15px; }
    .code-row { grid-template-columns: minmax(0, 1fr) 100px; gap: 7px; }
    .code-button { padding: 0 7px; font-size: 11.5px; }
}

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