/* ─────────────────────────────────────────────────────────────────────
   Tabfun-Engine · 登录 / 注册 / 个人中心 设计 token。
   字体 / 配色跟 tabfun Chrome 扩展保持一致，方便日后跳转过来
   不会有视觉断层。
   ───────────────────────────────────────────────────────────────────── */
:root {
    --bg: #fafaf7;
    --surface: #fff;
    --text: #1c1c22;
    --text-sec: #50505a;
    --text-muted: #8e8e98;
    --border: rgba(15, 15, 28, 0.08);
    --border-strong: rgba(15, 15, 28, 0.14);
    --accent: #5e9eff;
    --accent-hover: #4b8aeb;
    --accent-soft: rgba(94, 158, 255, 0.10);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.10);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.10);
    --shadow: 0 30px 80px rgba(15, 15, 28, 0.10), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 36px 32px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.brand__mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6c9bff, #8b6dff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}
.brand__title { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }

h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.subtitle {
    margin: 0 0 24px;
    font-size: 13.5px;
    color: var(--text-sec);
}

/* ── Banner（错误 / 注册成功 / 已退出） ── */
.banner {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.banner--error   { background: var(--danger-soft);  color: var(--danger);  border-color: rgba(239, 68, 68, 0.22); }
.banner--success { background: var(--success-soft); color: var(--success); border-color: rgba(16, 185, 129, 0.22); }
.banner--info    { background: var(--accent-soft);  color: var(--accent);  border-color: rgba(94, 158, 255, 0.22); }
.banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }

/* ── Form ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sec);
    letter-spacing: 0.02em;
}
.field__input {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field__input::placeholder { color: var(--text-muted); }
.field__error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 2px;
}

/* ── Buttons ── */
/* ⚠️ 基类**不带底色**(border 也是 transparent)—— 必须配一个修饰符用
   (--primary / --ghost / --danger)。裸用 .btn 时:<button> 靠浏览器默认按钮
   底色勉强看得见,<a class="btn"> 则完全是一段粗体文字,点上去才知道能点。
   account.html 的「发送验证邮件」「绑定 Google」曾经就是裸用的。 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
    text-decoration: none;
}
.btn:active { transform: translateY(0.5px); }
.btn--primary {
    background: var(--accent);
    color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost {
    background: #fff;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--text-sec); }
.btn--danger {
    background: #fff;
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.36);
}
.btn--danger:hover { background: var(--danger-soft); }

/* ── 分隔线 + 文字 ── */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 11.5px;
    margin: 16px 0;
    letter-spacing: 0.08em;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── 底部跳转链接 ── */
.foot {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--text-sec);
}
.foot a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.foot a:hover { text-decoration: underline; }

/* "Forgot password?" under the password field on the sign-in page */
.field__aside { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--accent); text-decoration: none; }
.field__aside:hover { text-decoration: underline; }
