/* ===== 雄安 公共样式 =====
 * 设计稿原尺寸: 750 x 1624 (2x)  对应逻辑尺寸: 375 x 812
 * 基准字号: 1rem = 100vw / 37.5  (即 375px 宽时 1rem = 10px)
 * 所有尺寸均以 rem 表达，保证在不同手机尺寸上等比缩放
 * ============================ */

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: calc(100vw / 37.5);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
/* 小屏不至于过小，超大屏不至于过大 */
@media (min-width: 480px) {
    html { font-size: 12.8px; } /* 对应 480px */
}
@media (min-width: 600px) {
    html { font-size: 14px; }
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #fff;
    background-color: #0d1a5a;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

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

.page {
    position: relative;
    width: 100%;
    max-width: 48rem;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0 1.4rem;
    /* 预留底部 bottom-nav(fixed) 的高度，避免被遮挡 */
    padding-bottom: calc(13rem + env(safe-area-inset-bottom));
    background-image: url('../images/bg.jpg');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: #0d1a5a;
}

/* ===== 顶部 Logo ===== */
.hero {
    padding-top: 7.1rem;
    display: flex;
    justify-content: center;
}
.hero-logo {
    display: block;
    width: 28rem;
    height: auto;
    max-width: 80%;
}

/* ===== 卡片外壳 ===== */
.card-wrap {
    position: relative;
    margin: 13.8rem auto 0;
    width: 34.7rem;
    max-width: 100%;
}

/* 顶部 tab 栏：SVG 背景 + 文字覆盖
 * 设计稿 fLgzk: 367.1 x 89，主体 347 宽 + 右下 swoosh 延伸 20
 * 我们按 viewBox 694 x 89 绘制整条 bar（含两个 tab 50/50 + 右下 swoosh）
 * 注册页通过 scaleX(-1) 得到镜像，保证"主体 + 耳朵"方向正确 */
.card-header {
    position: relative;
    width: 100%;
    /* 以 card 宽 347 : 高 44.5 比例，取稍高于完美比例便于放字 */
    aspect-ratio: 694 / 89;
    filter: drop-shadow(0 0.2rem 0.4rem rgba(0, 0, 0, 0.12));
}
.tab-bar-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.tabs {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 2;
}
.tab {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    /* 主体占 80/89 ≈ 89.9% 高度，文字向上偏移一点点居于主体中央 */
    padding-bottom: 1rem;
    box-sizing: border-box;
}
.tab--active {
    color: #111;
}

.card {
    position: relative;
    background: #fff;
    padding: 2.4rem 1.8rem 2.6rem;
    border-radius: 0 0 1rem 1rem;
    margin-top: -0.1rem; /* 与 tab 主体底边无缝衔接 */
    z-index: 1;
}
.card--login {
    min-height: 27rem;
}
.card--register {
    min-height: 37.5rem;
}

/* ===== 表单通用 ===== */
.form {
    margin: 0;
    padding: 0;
}
.field {
    display: flex;
    align-items: center;
    height: 4rem;
    padding: 0 1.6rem;
    margin-bottom: 1.2rem;
    background: #eee9e9;
    border-radius: 99rem;
    gap: 0.8rem;
    position: relative;
}
.field__icon {
    flex: 0 0 auto;
    width: 1.8rem;
    height: 1.8rem;
    color: #6f6e6e;
    display: flex;
    align-items: center;
    justify-content: center;
}
.field__icon svg,
.field__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.field input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 1.4rem;
    color: #333;
}
.field input::placeholder {
    color: #8e8d8d;
}

/* 尾部带验证码图 */
.field--with-suffix {
    padding-right: 0.4rem;
}
.field__captcha {
    flex: 0 0 auto;
    height: 2.8rem;
    width: 8.5rem;
    object-fit: cover;
    border-radius: 0.4rem;
    cursor: pointer;
    background: #d9d9d9;
    user-select: none;
}

/* 表单错误提示 */
.form-msg {
    min-height: 1.6rem;
    font-size: 1.2rem;
    color: #e53935;
    padding: 0 1rem;
    margin: -0.4rem 0 0.6rem;
    line-height: 1.4;
}
.form-msg.is-success { color: #2e7d32; }

/* ===== 主按钮 ===== */
.btn-primary {
    display: block;
    width: 100%;
    height: 4rem;
    border: 0;
    margin-top: 0.6rem;
    border-radius: 99rem;
    background: linear-gradient(180deg, #325df9 0%, #1e3897 100%);
    color: #fff;
    font-size: 1.8rem;
    letter-spacing: 0.4em;
    box-shadow: 0 0.4rem 0.7rem rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}
.btn-primary:active {
    transform: translateY(1px);
    opacity: 0.95;
}
.btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== 底部三圆入口 ===== */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    padding: 1.6rem 3rem;
    padding-bottom: calc(1.6rem + env(safe-area-inset-bottom));
    z-index: 10;
    pointer-events: none;
}
.bottom-nav .nav-item {
    pointer-events: auto;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    flex: 0 0 auto;
}
.nav-icon {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background: linear-gradient(180deg, #325df9 0%, #1e3897 100%);
    border: 0.25rem solid #fff;
    box-shadow: 0 0.4rem 0.7rem rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-icon img {
    width: 56%;
    height: 56%;
    object-fit: contain;
}
.nav-item span {
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 0.05em;
}

/* ===== 窄高度屏幕（例如老机型） ===== */
@media (max-height: 680px) {
    .hero { padding-top: 3.6rem; }
    .card-wrap { margin-top: 3rem; }
}
/* 对非常小的屏幕再收紧 */
@media (max-width: 320px) {
    .tab { font-size: 1.6rem; }
    .field input { font-size: 1.3rem; }
    .btn-primary { font-size: 1.6rem; }
}

/* ===== 通用：在线客服 / 官方群聊 弹窗 ===== */
.service-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: svcFade 0.18s ease-out;
}
.service-modal[hidden] { display: none; }

@keyframes svcFade { from { opacity: 0; } to { opacity: 1; } }

.service-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(2px);
}

.service-modal__panel {
    position: relative;
    width: 30rem;
    max-width: 86vw;
    background: #fff;
    border-radius: 1.2rem;
    padding: 2.4rem 2rem 2rem;
    text-align: center;
    box-shadow: 0 0.8rem 2rem rgba(14, 25, 58, 0.25);
    animation: svcPop 0.22s cubic-bezier(.18,.89,.32,1.28);
}
@keyframes svcPop {
    from { transform: translateY(1rem) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.service-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1.1rem;
    border: 0.1rem solid #d0d4e0;
    background: #f5f7fb;
    color: #555a6c;
    cursor: pointer;
    border-radius: 99rem;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.05em;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.service-modal__close:hover { background: #eef0f7; color: #1a1f2e; border-color: #aab1c4; }
.service-modal__close:active { transform: scale(0.96); }

.service-modal__title {
    margin: 0 0 1.2rem;
    font-size: 1.7rem;
    font-weight: 700;
    color: #1a1f2e;
}

.service-modal__img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 24rem;
    margin: 0 auto 1.6rem;
    border-radius: 0.8rem;
    overflow: hidden;
    background: #f5f7fb;
    border: 0.1rem solid #eef0f7;
}
.service-modal__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.service-modal__btn {
    display: block;
    width: 100%;
    padding: 1.2rem 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #325df9, #6b8cff);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.05em;
    box-shadow: 0 0.4rem 1rem rgba(50, 93, 249, 0.3);
    transition: transform 0.12s, box-shadow 0.15s;
}
.service-modal__btn:hover {
    box-shadow: 0 0.5rem 1.2rem rgba(50, 93, 249, 0.45);
}
.service-modal__btn:active {
    transform: scale(0.985);
}

/* ===== 重要通知 · 公告海报弹窗（Figma 设计 1:1 复刻） ===== */
/* 无障碍隐藏辅助类 */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
/* 面板：锁定 Figma 原图比例 750:1334，整张背景使用公告图 */
.notice-modal__panel {
    position: relative;
    aspect-ratio: 750 / 1334;
    width: min(92vw, calc(92vh * 750 / 1334), 38rem);
    height: auto;
    max-width: none;
    max-height: 92vh;
    padding: 0;
    background: url('../images/notice/notice-bg.png') center / 100% 100% no-repeat transparent;
    border-radius: 0;
    box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.4);
    overflow: visible;
    text-align: left;
}
/* 关闭按钮：悬浮在蓝色边框右上角 */
.notice-modal__close {
    position: absolute;
    top: 1.2%;
    right: 3.5%;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    color: #1e3897;
    border: 0.1rem solid rgba(255, 255, 255, 0.5);
    border-radius: 99rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    box-shadow: 0 0.15rem 0.4rem rgba(0, 0, 0, 0.25);
    z-index: 3;
}
.notice-modal__close:hover {
    background: #ffffff;
    color: #0e255f;
    border-color: #ffffff;
}
/* 白纸内容区：覆盖在海报的白色纸张区域上（参照 Figma 百分比定位） */
/* 定位依据：原图 750×1334，"公告" 标题 ≈ 22-27%，其下蓝线 ≈ 29%；底蓝线 ≈ 71%，"雄安" 红字 ≈ 74-79% */
.notice-modal__paper {
    position: absolute;
    top: 33%;
    bottom: 36%;
    left: 15%;
    right: 15%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.3rem 0.3rem 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: #9bb0d6 transparent;
}
.notice-modal__paper::-webkit-scrollbar { width: 0.35rem; }
.notice-modal__paper::-webkit-scrollbar-thumb { background: #9bb0d6; border-radius: 99rem; }
/* 正文排版 */
.notice-modal__body {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #2a2f42;
    text-align: justify;
}
.notice-modal__body p {
    margin: 0 0 0.55rem;
    text-indent: 2em;
}
.notice-modal__body p:last-child { margin-bottom: 0; }
.notice-modal__body b {
    color: #c92e2e;
    font-weight: 700;
}
.notice-modal__lead {
    text-align: center !important;
    text-indent: 0 !important;
    margin: 0 0 0.5rem !important;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e3897;
    letter-spacing: 0.02em;
}
.notice-modal__tag {
    color: #1e63d8;
    margin-right: 0.35rem;
    font-weight: 700;
}
.notice-modal__links {
    margin: 0.6rem 0 0;
    padding: 0.7rem 0.8rem 0.5rem;
    list-style: none;
    background: rgba(247, 249, 253, 0.85);
    border-radius: 0.5rem;
    border: 0.08rem dashed #cdd5e6;
    text-indent: 0;
}
.notice-modal__links li {
    margin: 0 0 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-indent: 0;
}
.notice-modal__links li:last-child { margin-bottom: 0; }
.notice-modal__lkLabel {
    font-size: 0.82rem;
    color: #6b7080;
    font-weight: 600;
}
/* 可点击链接：胶囊按钮样式，确保明显、易点 */
.notice-modal__link {
    display: inline-block;
    max-width: 100%;
    padding: 0.4rem 0.7rem;
    background: #ffffff;
    color: #1e63d8;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    border: 0.08rem solid #b9cff4;
    border-radius: 0.4rem;
    word-break: break-all;
    line-height: 1.5;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: rgba(30, 99, 216, 0.18);
    cursor: pointer;
}
.notice-modal__link:hover,
.notice-modal__link:focus {
    background: #1e63d8;
    color: #ffffff;
    border-color: #1e63d8;
    text-decoration: none;
}
.notice-modal__link:active { transform: scale(0.985); }
/* 邀请码「点击复制」按钮 */
.notice-modal__code {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.6rem 0.3rem 0.8rem;
    background: #fff5f5;
    border: 0.08rem dashed #e2a3a3;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: rgba(201, 46, 46, 0.15);
    align-self: flex-start;
}
.notice-modal__code:hover { background: #ffe9e9; border-color: #c92e2e; }
.notice-modal__code:active { transform: scale(0.97); }
.notice-modal__code.is-copied { background: #e7f9ec; border-color: #39b469; }
.notice-modal__code-num {
    color: #c92e2e;
    font-family: "DIN Alternate", "Helvetica Neue", monospace;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}
.notice-modal__code-hint {
    color: #8a8fa3;
    font-size: 0.78rem;
    padding: 0.1rem 0.4rem;
    border-radius: 99rem;
    background: #ffffff;
    border: 0.05rem solid #e0e4ee;
}
.notice-modal__code.is-copied .notice-modal__code-hint {
    color: #2e8b57;
    border-color: #8fd8a5;
}

/* ===== 海报弹窗 · 二维码版（在线客服 / 官方群聊） ===== */
.notice-modal__paper--qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    overflow: hidden;
    padding: 0.2rem 0.2rem 0.3rem;
}
.notice-modal__paper--qr .notice-modal__lead {
    flex: 0 0 auto;
    margin: 0 !important;
    font-size: 0.9rem;
}
.notice-modal__qr-wrap {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    background: #ffffff;
    border-radius: 0.4rem;
    padding: 0.15rem;
    box-shadow: 0 0.15rem 0.6rem rgba(14, 25, 58, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}
.notice-modal__qr-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.notice-modal__cta {
    flex: 0 0 auto;
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: linear-gradient(135deg, #325df9 0%, #4f8bff 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 99rem;
    letter-spacing: 0.05em;
    box-shadow: 0 0.3rem 0.8rem rgba(50, 93, 249, 0.35);
    transition: transform 0.12s, box-shadow 0.15s;
    -webkit-tap-highlight-color: rgba(50, 93, 249, 0.18);
}
.notice-modal__cta:hover { box-shadow: 0 0.4rem 1rem rgba(50, 93, 249, 0.5); }
.notice-modal__cta:active { transform: scale(0.985); }
