/* 登录页单屏精简版 —— 参考 Panda Mobile：亮黄主色、黑色胶囊、奶油底色 */
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/poppins-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/static/fonts/poppins-500.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/static/fonts/poppins-600.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/static/fonts/poppins-700.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/static/fonts/poppins-800.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --yellow: #04a79d;
    --yellow-deep: #038f86;
    --yellow-pale: rgba(4, 167, 157, .14);
    --cream: #f2f4f7;
    --tan: #f5f7fa;
    --ink: #12171d;
    --ink-2: #333333;
    --muted: #666666;
    --muted-2: #8a929c;
    --line: #e2e6ec;
    --soft: #f5f7fa;
    --white: #FFFFFF;
    --red-bg: #FFDEDE;
    --green: #2e7d32;
    --radius-card: 20px;
    --radius-input: 8px;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, .1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Hiragino Sans GB", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 0;
    background: none;
}

input {
    font: inherit;
    color: inherit;
}

svg {
    display: block;
    flex-shrink: 0;
}

h1, h2, h3, p, ul {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--yellow);
    color: var(--ink);
}

/* ---------- 单屏容器 ---------- */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--cream);
    background-image:
        radial-gradient(circle at 4% 0%, rgba(4, 167, 157, .16), transparent 36%),
        radial-gradient(circle at 96% 8%, rgba(4, 167, 157, .09), transparent 30%);
}

.page::after {
    content: "";
    position: absolute;
    right: -180px;
    bottom: -260px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    border: 90px solid rgba(4, 167, 157, .06);
    pointer-events: none;
}

/* ---------- 顶部 ---------- */
.topbar {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    max-width: 1160px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(145deg, #04a79d, #038f86);
    color: #fff;
    box-shadow: 0 4px 12px rgba(4, 167, 157, .24);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.brand-text em {
    margin-top: 2px;
    font-style: normal;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .17em;
    color: var(--muted-2);
    white-space: nowrap;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--muted);
}

.top-link {
    font-size: 14.5px;
    color: var(--ink-2);
    transition: color .2s ease;
}

.top-link:hover {
    color: var(--ink);
}

.top-divider {
    width: 1px;
    height: 14px;
    background: var(--line);
}

.top-tip {
    color: var(--muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border-radius: var(--radius-input);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-sm {
    height: 38px;
    padding: 0 16px;
    font-size: 14px;
}

.btn-yellow {
    background: var(--yellow);
    color: #fff;
}

.btn-yellow:hover {
    background: var(--yellow-deep);
}

/* ---------- 主区域 ---------- */
.main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 404px;
    align-items: center;
    gap: 64px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 24px 24px;
    flex: 1;
    min-height: 0;
}

.intro {
    max-width: 540px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
}

.eyebrow i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 3px rgba(4, 167, 157, .16);
}

.intro h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 4vw, 50px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.intro p {
    font-size: 16px;
    line-height: 1.7;
    color: #4d5f5e;
}

.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.stat {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
}

.stat strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--yellow);
    letter-spacing: -.01em;
    white-space: nowrap;
}

.stat span {
    font-size: 12px;
    color: rgba(255, 255, 255, .84);
    white-space: nowrap;
}

/* ---------- 登录卡片 ---------- */
.login-card {
    width: 100%;
    max-width: 404px;
    justify-self: end;
    padding: 26px 26px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.card-head h2 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.card-head p {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f2f7f6;
    border: 1px solid #d5ece9;
    color: #038f86;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.tab-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 16px 0 14px;
    padding: 4px;
    border-radius: 12px;
    background: var(--soft);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.tab-btn svg {
    width: 15px;
    height: 15px;
}

.tab-btn:hover {
    color: var(--ink);
}

.tab-btn.is-active {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 3px 8px rgba(24, 24, 24, .2);
}

.alert-error {
    margin-bottom: 12px;
    padding: 9px 11px;
    border-radius: 9px;
    background: var(--red-bg);
    color: #C53030;
    font-size: 13px;
    line-height: 1.5;
}

.field {
    margin-bottom: 12px;
}

.field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.input-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #9A9A9A;
    pointer-events: none;
    transition: color .2s ease;
}

.input-wrap input {
    width: 100%;
    height: 44px;
    padding: 0 13px 0 39px;
    border: 1px solid #e3eae8;
    border-radius: var(--radius-input);
    background: #f7faf9;
    font-size: 14.5px;
    outline: none;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.input-wrap input::placeholder {
    color: #a6a6a6;
}

.input-wrap input:focus {
    background: #fff;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(4, 167, 157, .18);
}

.input-wrap:focus-within .field-icon {
    color: var(--ink);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 14px;
    font-size: 13px;
    color: var(--muted);
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 15px;
    height: 15px;
    accent-color: var(--yellow);
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    height: 44px;
    background: var(--yellow);
    color: #fff;
    border-radius: var(--radius-input);
    font-size: 15.5px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(4, 167, 157, .28);
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-primary:hover {
    background: var(--yellow-deep);
    box-shadow: 0 10px 24px rgba(4, 167, 157, .34);
}

.btn-primary:active {
    transform: translateY(1px);
}

.register-line {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.register-line a {
    margin-left: 4px;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 2px solid var(--yellow);
    padding-bottom: 1px;
}

.register-line a:hover {
    background: var(--yellow-pale);
}

/* 扫码登录 */
.qrcode-login-block {
    display: none;
    padding-top: 2px;
    text-align: center;
}

.qr-frame {
    display: flex;
    justify-content: center;
    padding: 12px;
    border-radius: 14px;
    background: var(--soft);
}

#qrcode {
    display: flex;
    justify-content: center;
    padding: 10px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(24, 24, 24, .06);
}

#qrcode img {
    margin: 0 auto;
}

.qr-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 600;
}

.qr-tip svg {
    color: var(--green);
}

.qr-sub {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted-2);
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1160px;
    height: 44px;
    margin: 0 auto;
    padding: 0 24px calc(env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--muted-2);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.footer-links a {
    transition: color .2s ease;
}

.footer-links a:hover {
    color: var(--ink);
}

.dot {
    color: #D8D2C4;
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
    .topbar {
        height: 58px;
        padding: 0 18px;
    }

    .top-link,
    .top-divider,
    .top-tip {
        display: none;
    }

    .main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0;
        padding: 8px 18px 14px;
    }

    .intro {
        display: none;
    }

    .login-card {
        max-width: 420px;
        margin: 0 auto;
        justify-self: auto;
        padding: 22px 20px 18px;
    }

    .footer {
        justify-content: center;
        height: 40px;
        padding: 0 18px env(safe-area-inset-bottom);
        font-size: 11px;
    }

    .footer-copy {
        display: none;
    }

    .footer-links {
        gap: 6px;
    }
}

@media (max-width: 400px) {
    .brand-text em {
        display: none;
    }

    .topbar {
        height: 54px;
    }

    .login-card {
        padding: 20px 18px 16px;
        border-radius: 18px;
    }

    .card-head h2 {
        font-size: 19px;
    }

    .secure-badge {
        display: none;
    }

    .tab-switch {
        margin: 14px 0 12px;
    }

    .field {
        margin-bottom: 11px;
    }

    .input-wrap input,
    .btn-primary {
        height: 43px;
    }

    .footer {
        height: 36px;
    }
}

/* 矮屏适配，保证仍是一屏 */
@media (max-height: 700px) and (min-width: 901px) {
    .main {
        padding-top: 0;
        padding-bottom: 10px;
    }

    .intro h1 {
        font-size: 40px;
    }

    .mini-stats {
        margin-top: 16px;
    }

    .login-card {
        padding-top: 22px;
        padding-bottom: 18px;
    }

    .tab-switch {
        margin: 13px 0 12px;
    }

    .field {
        margin-bottom: 10px;
    }

    .input-wrap input,
    .btn-primary {
        height: 42px;
    }

    .footer {
        height: 38px;
    }
}

@media (max-height: 620px) and (max-width: 900px) {
    .topbar {
        height: 50px;
    }

    .login-card {
        padding: 16px 18px 14px;
    }

    .card-head p,
    .qr-sub {
        display: none;
    }

    .tab-switch {
        margin: 12px 0 10px;
    }

    .field {
        margin-bottom: 9px;
    }

    .form-row {
        margin-bottom: 10px;
    }

    .input-wrap input,
    .btn-primary {
        height: 40px;
    }

    .register-line {
        margin-top: 10px;
    }

    .footer {
        height: 32px;
    }
}

/* 横屏矮视口：进一步压缩，仍保持一屏 */
@media (max-height: 520px) and (max-width: 900px) {
    .topbar {
        height: 44px;
        padding: 0 14px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .brand-text strong {
        font-size: 15px;
    }

    .brand-text em {
        display: none;
    }

    .top-actions {
        gap: 8px;
    }

    .btn-sm {
        height: 32px;
        padding: 0 12px;
        font-size: 12px;
    }

    .main {
        justify-content: center;
        padding: 0 14px 4px;
    }

    .login-card {
        max-width: 400px;
        padding: 12px 16px 10px;
        border-radius: 16px;
    }

    .card-head h2 {
        font-size: 17px;
    }

    .card-head p,
    .secure-badge,
    .qr-sub {
        display: none;
    }

    .tab-switch {
        margin: 8px 0;
        padding: 3px;
    }

    .tab-btn {
        height: 30px;
        font-size: 12px;
    }

    .field {
        margin-bottom: 7px;
    }

    .field label {
        margin-bottom: 3px;
        font-size: 11px;
    }

    .input-wrap input {
        height: 33px;
        font-size: 12.5px;
    }

    .form-row {
        margin: 0 0 7px;
        font-size: 11px;
    }

    .btn-primary {
        height: 36px;
        font-size: 13px;
    }

    .register-line {
        margin-top: 7px;
        font-size: 11px;
    }

    .qr-frame {
        padding: 6px;
    }

    #qrcode {
        padding: 4px;
    }

    #qrcode canvas,
    #qrcode img {
        width: 140px !important;
        height: 140px !important;
    }

    .qr-tip {
        margin-top: 6px;
        font-size: 11px;
    }

    .footer {
        height: 26px;
        padding: 0 14px;
        font-size: 10px;
    }

    .footer-copy {
        display: none;
    }

    .footer-links {
        gap: 5px;
    }
}

/* ---------- 注册页 ---------- */
.page-register {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
}

.register-card {
    max-width: 420px;
}

.input-wrap.has-action input {
    padding-right: 118px;
}

.code-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    height: 32px;
    padding: 0 12px;
    transform: translateY(-50%);
    border-radius: 7px;
    background: var(--soft);
    color: #038f86;
    font-size: 12.5px;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease;
}

.code-btn:hover {
    background: #e8f5f3;
}

.code-btn:disabled {
    color: var(--muted-2);
    cursor: not-allowed;
}

.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    box-shadow: none;
}

/* ---------- 登录 / 注册 滑动页 ---------- */
.page-auth {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.auth-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 10px 24px 18px;
}

.auth-card {
    position: relative;
    width: min(920px, 100%);
    height: min(560px, calc(100dvh - 140px));
    overflow: hidden;
    border: 1px solid #d9e4e1;
    border-radius: 28px;
    background: var(--white);
    box-shadow: 0 0 0 1px rgba(4, 167, 157, .05), 0 26px 70px rgba(11, 18, 32, .14);
}

.auth-tabs {
    display: none;
}

.auth-panel {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
    height: 100%;
    padding: 0 48px;
    transition: transform .62s cubic-bezier(.65, .05, .36, 1), opacity .42s ease;
}

.auth-panel-register {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.auth-card.is-register .auth-panel-login {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.auth-card.is-register .auth-panel-register {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
}

.panel-head {
    margin-bottom: 18px;
}

.panel-head h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.panel-head p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.auth-panel .tab-switch {
    margin: 0 0 14px;
}

.auth-panel .register-line {
    margin-top: 16px;
}

/* 滑动面板 */
.auth-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 100;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, .3);
    border-radius: 220px 0 0 220px;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .2), transparent 46%),
        radial-gradient(circle at 88% 92%, rgba(255, 255, 255, .12), transparent 42%),
        linear-gradient(140deg, #04a79d 0%, #03938b 55%, #026f68 100%);
    box-shadow: -16px 0 44px rgba(3, 111, 104, .1);
    transition: transform .62s cubic-bezier(.65, .05, .36, 1), border-radius .62s ease;
}

.auth-overlay::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 44px solid rgba(255, 255, 255, .08);
    pointer-events: none;
}

.auth-card.is-register .auth-overlay {
    transform: translateX(-100%);
    border-left: 0;
    border-right: 1px solid rgba(255, 255, 255, .3);
    border-radius: 0 220px 220px 0;
    box-shadow: 16px 0 44px rgba(3, 111, 104, .1);
}

.overlay-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #fff;
    text-align: center;
    pointer-events: none;
    transition: opacity .42s ease, transform .55s ease;
}

.overlay-panel h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.overlay-panel p {
    max-width: 280px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .86);
}

.overlay-panel .btn {
    margin-top: 26px;
}

/* API 行业元素 */
.api-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
}

.api-chips span {
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .92);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
}

.api-term {
    width: 100%;
    max-width: 300px;
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    background: rgba(2, 32, 30, .28);
    overflow: hidden;
    text-align: left;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
    animation: api-float 5s ease-in-out infinite;
}

.api-term-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    background: rgba(255, 255, 255, .1);
}

.api-term-bar i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
}

.api-term-bar i:first-child {
    background: #ffd15c;
}

.api-term-bar em {
    margin-left: 6px;
    color: rgba(255, 255, 255, .72);
    font-size: 10px;
    font-style: normal;
    letter-spacing: .08em;
}

.api-term-body {
    margin: 0;
    padding: 10px 12px;
    color: rgba(255, 255, 255, .9);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 10.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.api-method {
    color: #bbf7ef;
    font-weight: 700;
}

.api-ok {
    color: #9ff3d8;
}

/* 注册面板：微信扫码优先 */
.register-qr-block {
    padding-top: 2px;
    text-align: center;
}

.register-qr-block .qr-tip {
    margin-top: 12px;
}

.register-qr-block .qr-sub {
    margin-top: 4px;
}

/* 新用户扫码结果弹窗 */
.auth-result-mask {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(11, 18, 32, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.auth-result-card {
    width: 100%;
    max-width: 340px;
    padding: 26px 22px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
    text-align: center;
}

.auth-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(4, 167, 157, .12);
    color: #04a79d;
}

.auth-result-icon svg {
    width: 26px;
    height: 26px;
}

.auth-result-card h3 {
    font-size: 19px;
    font-weight: 700;
}

.auth-result-card > p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.auth-result-account {
    margin: 14px 0 4px;
    padding: 10px;
    border-radius: 10px;
    background: var(--soft);
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .08em;
}

.auth-result-card .auth-result-tip {
    font-size: 11.5px;
    color: var(--muted-2);
    line-height: 1.6;
}

.auth-result-card .btn {
    width: 100%;
    margin-top: 16px;
}

@keyframes api-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.overlay-for-login {
    pointer-events: auto;
}

.overlay-for-register {
    opacity: 0;
    transform: translateX(36px);
}

.auth-card.is-register .overlay-for-login {
    opacity: 0;
    transform: translateX(-36px);
    pointer-events: none;
}

.auth-card.is-register .overlay-for-register {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, .78);
    background: transparent;
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, .16);
}

@media (max-width: 860px) {
    .page-auth {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }

    .auth-main {
        padding: 10px 14px 18px;
    }

    .auth-card {
        width: 100%;
        max-width: 460px;
        height: auto;
        max-height: none;
        border-radius: 24px;
    }

    .auth-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        margin: 14px 14px 0;
        padding: 4px;
        border-radius: 12px;
        background: var(--soft);
    }

    .auth-tabs a {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 38px;
        border-radius: 9px;
        color: var(--muted);
        font-size: 13.5px;
        font-weight: 600;
        text-decoration: none;
    }

    .auth-tabs a.is-active {
        background: var(--ink);
        color: #fff;
        box-shadow: 0 3px 8px rgba(24, 24, 24, .18);
    }

    .auth-panel {
        position: static;
        display: none;
        width: 100%;
        height: auto;
        padding: 18px 20px 22px;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto;
    }

    .auth-card:not(.is-register) .auth-panel-login {
        display: flex;
    }

    .auth-card.is-register .auth-panel-register {
        display: flex;
    }

    .auth-overlay {
        display: none;
    }

    .panel-head h2 {
        font-size: 22px;
    }

    .auth-panel .tab-switch {
        margin-top: 4px;
    }
}

/* 矮屏桌面：压缩间距，保证仍然一页显示 */
@media (max-height: 700px) and (min-width: 861px) {
    .panel-head {
        margin-bottom: 12px;
    }

    .panel-head p {
        display: none;
    }

    .auth-panel .field {
        margin-bottom: 9px;
    }

    .input-wrap input,
    .btn-primary {
        height: 40px;
    }

    .auth-panel .tab-switch {
        margin-bottom: 10px;
    }

    .auth-panel .register-line {
        margin-top: 10px;
        font-size: 12px;
    }

    .overlay-panel h2 {
        font-size: 26px;
    }

    .overlay-panel .btn {
        margin-top: 18px;
    }

    .api-term {
        margin-top: 14px;
    }
}
