:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  --blue: #168af4;
  --blue-hover: #0879df;
  --muted: #77777d;
  --hairline: #dedee3;
  --field: #fbfbfd;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f5f5f7; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
.auth-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; padding: 58px 24px 28px; display: flex; flex-direction: column; }
.brand-block { text-align: center; }
.brand-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: #0d0d0f; text-decoration: none; }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; color: #caff22; background: #101010; font: 800 21px/1 Arial, sans-serif; transform: skew(-8deg); }
.brand-word { font-size: 27px; line-height: 1; letter-spacing: -.07em; font-style: italic; font-weight: 800; }
.brand-block p { margin: 17px 0 26px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-card { padding: 0 28px 24px; background: #fff; border: 1px solid rgba(0, 0, 0, .05); border-radius: 20px; box-shadow: 0 18px 55px rgba(24, 31, 42, .08); overflow: hidden; }
.method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 -28px 34px; padding: 4px; border-radius: 0 0 12px 12px; background: #f0f0f2; }
.method-tab { min-height: 44px; padding: 0 12px; border-radius: 9px; color: #77777d; background: transparent; font-size: 15px; }
.method-tab.active { color: #1d1d1f; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); font-weight: 600; }
.auth-view[hidden], .login-method-panel[hidden], .method-tabs[hidden] { display: none !important; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.title-row h1 { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.view-note { margin: -12px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.5; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #48484a; font-size: 14px; }
input:not([type="checkbox"]) { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--hairline); border-radius: 12px; outline: 0; background: var(--field); color: #1d1d1f; font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input::placeholder { color: #98989e; }
input:not([type="checkbox"]):focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(22, 138, 244, .13); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 52px !important; }
.password-toggle { position: absolute; top: 50%; right: 8px; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; transform: translateY(-50%); border-radius: 8px; color: #77777d; background: transparent; }
.password-toggle:hover { color: #1d1d1f; background: #eef0f4; }
.password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle[aria-pressed="true"] { color: var(--blue); }
.form-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.remember { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.remember input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.text-link { padding: 2px 0; color: #0071e3; background: transparent; font-size: 14px; white-space: nowrap; }
.text-link:hover, .guest-link:hover, .auth-footer a:hover { text-decoration: underline; }
.primary { min-height: 54px; padding: 0 22px; border-radius: 999px; color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(22, 138, 244, .22); font-size: 17px; font-weight: 600; transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.primary:hover { background: var(--blue-hover); box-shadow: 0 9px 22px rgba(22, 138, 244, .27); }
.primary:active { transform: scale(.99); }
.primary:disabled, .secondary:disabled { opacity: .5; cursor: wait; }
.secondary { min-height: 52px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 12px; color: #1d1d1f; background: #f5f5f7; white-space: nowrap; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 124px; gap: 10px; align-items: end; }
.feedback { min-height: 20px; color: var(--muted); font-size: 13px; line-height: 1.45; text-align: center; }
.feedback.error { color: #c9343c; }
.feedback.success { color: #16845b; }
.wechat-panel { min-height: 312px; padding: 20px 0 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.wechat-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; color: #fff; background: #20b767; font-size: 18px; font-weight: 600; }
.wechat-panel h2 { margin: 20px 0 8px; font-size: 22px; font-weight: 600; }
.wechat-panel p { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.wechat-button { width: 100%; }
.guest-entry { margin-top: 32px; padding-top: 26px; border-top: 1px solid #e6e6e9; text-align: center; }
.guest-entry[hidden] { display: none; }
.guest-link { padding: 4px; color: #727277; background: transparent; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
.auth-footer { margin-top: auto; padding-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; color: #929298; font-size: 12px; text-align: center; }
.auth-footer a { color: #77777d; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; }
@media (max-width: 560px) {
  body { background: #fff; }
  .auth-shell { width: 100%; padding: 34px 0 0; }
  .brand-word { font-size: 25px; }
  .brand-block p { margin: 14px 0 24px; }
  .auth-card { flex: 1; padding: 0 22px 28px; border: 0; border-radius: 20px 20px 0 0; box-shadow: none; }
  .method-tabs { margin: 0 -22px 32px; border-radius: 0; }
  .auth-footer { margin-top: 0; padding: 20px 18px 24px; background: #fff; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
