/* ====================================================================
   account.css — 登录 / 注册页面专用样式
   （2026-09 第二轮重构：改成 RootData 参考图那种极简居中单栏布局，
   去掉上一轮桌面端的左右双栏大插画和分段胶囊 Tab，手机/电脑现在共用
   同一套布局规则，只是最大宽度随屏幕变化）。
   只在 public/account.html 里加载，只影响这一个页面。
   全部使用新的 auth- 前缀类名，不复用/不覆盖 style.css 里已有的
   .account-* 规则（那些规则被 contact.html 等其它页面复用，不能动）。
   颜色直接复用 style.css :root 里已有的品牌色变量，保持和全站视觉统一。
   ==================================================================== */

.auth-shell {
    min-height: 100vh;
    background-color: var(--page-bg, #F5F7FB);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 48px;
}

/* ---------------- 顶部：Logo 真正居中 + 右上角语言 ---------------- */

.auth-topbar {
    position: relative;
    width: 100%;
    max-width: 1280px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 8px;
    flex: none;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-number, #172033);
    line-height: 1;
}

.auth-logo-mark {
    color: var(--brand, #2563EB);
    flex: none;
    width: 28px;
    height: 28px;
}

.auth-logo-word {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-number, #172033);
    font-size: 1.4rem;
}

.auth-logo--header {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.auth-lang {
    position: relative;
    z-index: 5;
}

.auth-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border, #E2E7EF);
    background: var(--surface, #fff);
    color: var(--text-secondary, #8090A8);
    font-size: 0.85rem;
    cursor: pointer;
}

.auth-lang-btn:hover {
    border-color: var(--brand, #2563EB);
    color: var(--brand, #2563EB);
}

.auth-lang-globe,
.auth-lang-chevron {
    width: 15px;
    height: 15px;
    flex: none;
}

.auth-lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 140px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #E2E7EF);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    padding: 6px;
}

.auth-lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 0.86rem;
    color: var(--text-primary, #172033);
    cursor: pointer;
    text-align: left;
}

.auth-lang-option:hover {
    background: var(--surface-muted, #F8FAFC);
}

.auth-lang-option.is-active {
    color: var(--brand, #2563EB);
    font-weight: 600;
}

.auth-lang-check {
    width: 14px;
    height: 14px;
    flex: none;
    color: var(--brand, #2563EB);
}

/* ---------------- 主体：极简居中单栏 ---------------- */

.auth-main {
    width: 100%;
    max-width: 620px;
    display: flex;
    justify-content: center;
    flex: 1;
    padding-top: 28px;
}

/* 2026-09 v0 风格视觉优化：改成真正的白色卡片（浅灰页面背景 + 白色内容卡片两层
   结构，和全站其它页面统一），只加背景/边框/圆角/轻阴影/内边距这几条纯视觉属性，
   内部所有表单字段、id、提交逻辑一个字不动 */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #E5EAF2);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-elevated, 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.08));
    padding: 36px 32px 32px;
}

/* ---------------- Tab：干净文字 Tab，不用分段胶囊/下划线通栏 ---------------- */

.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 28px;
}

#accountTabs .account-tab {
    flex: none;
    padding: 0 0 10px;
    border: none;
    background: none;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted, #94A3B8);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

#accountTabs .account-tab.active {
    color: var(--brand, #2563EB);
    border-bottom-color: var(--brand, #2563EB);
}

/* 注册/登录两个表单共享同一块屏幕区域，用 hidden 属性切换显示，
   不需要额外定位技巧 */

/* ---------------- 表单通用 ---------------- */

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-number, #172033);
    margin-bottom: 7px;
}

.auth-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-field-label-row label {
    margin-bottom: 7px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted, #94A3B8);
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 44px;
    border-radius: 13px;
    border: 1px solid var(--border, #E2E7EF);
    background: var(--surface, #fff);
    font-size: 0.94rem;
    color: var(--text-number, #172033);
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: var(--text-muted, #94A3B8);
}

.auth-input:focus {
    outline: none;
    border-color: var(--brand, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-eye-btn {
    position: absolute;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    padding: 0;
    color: var(--text-muted, #94A3B8);
    cursor: pointer;
}

.auth-eye-btn svg {
    width: 19px;
    height: 19px;
}

.auth-eye-btn:hover {
    color: var(--text-secondary, #64748B);
}

/* 密码输入框右侧留出眼睛按钮空间 */
.auth-input-wrap.auth-input-wrap--password .auth-input {
    padding-right: 44px;
}

.auth-inline-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--brand, #2563EB);
    cursor: pointer;
    white-space: nowrap;
}

.auth-inline-link:hover {
    text-decoration: underline;
}

/* ---------------- 登录/注册切换提示 ---------------- */

.auth-switch-link {
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-secondary, #8090A8);
    margin: 0 0 16px;
}

.auth-switch-btn {
    border: none;
    background: none;
    padding: 0;
    margin-left: 2px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brand, #2563EB);
    cursor: pointer;
}

.auth-switch-btn:hover {
    text-decoration: underline;
}

/* ---------------- 错误提示 ---------------- */

.auth-error {
    font-size: 0.8rem;
    color: var(--loss, #DC2626);
    margin: 0 0 12px;
}

.auth-error[hidden] {
    display: none;
}

/* ---------------- 提交按钮 ---------------- */

.auth-submit-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 13px;
    background: var(--brand, #2563EB);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit-btn:hover {
    background: var(--brand-hover, #1D4ED8);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ---------------- "或"分隔线 ---------------- */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 0.82rem;
    color: #6B7280;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #DFE3EA;
}

/* ---------------- Google 登录/注册按钮（视觉占位，见 authPage.js 说明） ---------------- */

.auth-google-btn {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 13px;
    border: 1px solid var(--border, #E2E7EF);
    background: var(--surface, #fff);
    color: var(--text-number, #172033);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-google-btn:hover {
    background: var(--surface-muted, #F8FAFC);
}

.auth-google-icon {
    width: 19px;
    height: 19px;
    flex: none;
}

/* ---------------- 安全提示 + 底部法律文字 ---------------- */

.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 22px 0 0;
    font-size: 0.78rem;
    color: var(--text-secondary, #8090A8);
}

.auth-security-note svg {
    width: 15px;
    height: 15px;
    color: var(--profit, #16A34A);
    flex: none;
}

.auth-legal-footer {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.76rem;
    color: var(--text-muted, #94A3B8);
    line-height: 1.6;
}

.auth-legal-footer a {
    color: var(--text-secondary, #64748B);
    text-decoration: underline;
}

.auth-legal-footer a:hover {
    color: var(--brand, #2563EB);
}

.auth-back-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--text-muted, #94A3B8);
    text-decoration: none;
}

.auth-back-link:hover {
    color: var(--brand, #2563EB);
}

/* ---------------- Toast（忘记密码占位提示） ---------------- */

.auth-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(23, 32, 51, 0.92);
    color: #fff;
    font-size: 0.84rem;
    padding: 10px 18px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
    white-space: nowrap;
}

.auth-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ====================================================================
   桌面端（≥1024px）：仍然是同一套单栏布局，只是顶部区域留白更充足，
   表单最大宽度收在 560-620px 区间，不随屏幕变宽无限拉伸。
   ==================================================================== */
@media (min-width: 1024px) {
    .auth-shell {
        padding: 40px 32px 64px;
    }

    .auth-topbar {
        height: 64px;
    }

    .auth-logo-mark {
        width: 32px;
        height: 32px;
    }

    .auth-logo-word {
        font-size: 1.6rem;
    }

    .auth-main {
        max-width: 620px;
        padding-top: 40px;
    }

    .auth-card {
        max-width: 560px;
    }

    .auth-tabs {
        margin-bottom: 32px;
    }

    #accountTabs .account-tab {
        font-size: 1.3rem;
    }
}
