@charset "utf-8";

:root {
  --ink: #12151c;
  --ink-soft: #2c3340;
  --mist: #eef1f5;
  --paper: #ffffff;
  --line: rgba(18, 21, 28, 0.1);
  --accent: #e0a21a;
  --accent-deep: #b8820f;
  --muted: #6b7280;
  --max: 440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-en: "Avenir Next", "Helvetica Neue", var(--font-cn);
}

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

html { scroll-behavior: smooth; }

body.ma-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 登录/注册页头：单行对齐，不换行 */
body.ma-body .xb-header--auth {
  height: var(--nav-h);
  flex-shrink: 0;
}

body.ma-body .xb-header--auth .xb-header__inner {
  height: var(--nav-h);
  align-items: center;
}

body.ma-body .xb-nav--auth {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 18px;
  justify-content: flex-end;
}

body.ma-body .xb-nav--auth a {
  white-space: nowrap;
  font-size: 0.9rem;
}

body.ma-body .xb-menu-btn {
  display: none !important;
}

.ma-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 56px;
}

.ma-card {
  width: min(100%, var(--max));
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px 28px 28px;
  box-shadow: 0 18px 50px rgba(18, 21, 28, 0.06);
}

.ma-card--wide {
  width: min(100%, 640px);
}

.ma-card__title {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ma-card__sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.ma-card__sub a {
  color: var(--accent-deep);
  font-weight: 600;
  border-bottom: 1px solid rgba(184, 130, 15, 0.35);
}

.ma-card__sub a:hover { color: var(--ink); }

.ma-alert {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ma-alert--err {
  background: #fff5f4;
  border: 1px solid #f0c9c5;
  color: #b42318;
}

.ma-alert--ok {
  background: #f0faf3;
  border: 1px solid #c6e6d0;
  color: #1f7a3f;
}

.ma-field {
  margin-bottom: 14px;
}

.ma-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.ma-field input[type="text"],
.ma-field input[type="password"],
.ma-field input[type="email"],
.ma-field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 4px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.ma-field input:focus,
.ma-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 162, 26, 0.18);
}

.ma-field__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ma-field__row input { flex: 1; }

.ma-captcha {
  height: 40px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
}

.ma-captcha-link {
  font-size: 0.84rem;
  color: var(--accent-deep);
  white-space: nowrap;
}

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

.ma-keep {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 4px 0 18px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.ma-keep label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.ma-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.ma-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.ma-btn:hover { transform: translateY(-1px); }

.ma-btn--primary {
  background: var(--ink);
  color: #fff;
}

.ma-btn--primary:hover { background: var(--accent-deep); }

.ma-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.ma-btn--ghost:hover {
  background: var(--ink);
  color: #fff;
}

.ma-link {
  color: var(--muted);
  font-size: 0.9rem;
}

.ma-link:hover { color: var(--accent-deep); }

.ma-side {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.ma-side strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
}

/* 注册页表单兼容旧结构 */
.ma-reg-list > li {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  align-items: center;
}

.ma-reg-list > li > span:first-child {
  text-align: right;
  font-size: 0.88rem;
  color: var(--muted);
}

.ma-reg-list .intxt,
.ma-reg-list input[type="text"],
.ma-reg-list input[type="password"],
.ma-reg-list select {
  width: min(100%, 280px);
  border: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
}

.ma-reg-list .red { color: #b42318; }
.ma-reg-list em { font-style: normal; font-size: 0.82rem; color: var(--muted); }

.ma-contract {
  max-height: 120px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 8px 0 14px;
}

.ma-reg-tip {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

.rank {
  border: none;
  background: url("../images/rank.gif") no-repeat;
  width: 145px;
  height: 22px;
  vertical-align: middle;
  cursor: default;
}

.rank.r0 { background-position: 0 0; }
.rank.r1 { background-position: 0 -22px; }
.rank.r2 { background-position: 0 -44px; }
.rank.r3 { background-position: 0 -66px; }

@media (max-width: 640px) {
  .ma-card { padding: 24px 18px; }
  .ma-reg-list > li {
    grid-template-columns: 1fr;
  }
  .ma-reg-list > li > span:first-child { text-align: left; }
  .ma-reg-list .intxt,
  .ma-reg-list input[type="text"],
  .ma-reg-list input[type="password"],
  .ma-reg-list select { width: 100%; }
}
