/* ============================================================
   注册 / 登录页样式（仅 login.html、signup.html 引入）
   颜色全部走 css/style.css 的变量，深浅色自动跟随
   ============================================================ */

.auth-wrap {
  max-width: 460px;
  margin: 44px auto 64px;
  padding: 0 16px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 26px 24px;
}

.auth-card h1 {
  font-size: 1.42rem;
  line-height: 1.35;
  color: var(--red-dark);
  letter-spacing: .5px;
}

.auth-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
}

/* ---------- 表单 ---------- */
#authForm { margin-top: 22px; }

.auth-field {
  display: block;
  margin-bottom: 16px;
}

.auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink);
}

.auth-field input {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-field input::placeholder { color: var(--muted); opacity: .75; }

.auth-field input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .12);
}

.auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.auth-submit:hover:not(:disabled) { background: var(--red-dark); border-color: var(--red-dark); }
.auth-submit:active:not(:disabled) { transform: scale(.985); }
.auth-submit:disabled { opacity: .65; cursor: not-allowed; }

/* ---------- Google 一键登录 ---------- */
.auth-google {
  width: 100%;
  margin-top: 22px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.auth-google svg { flex: none; }

.auth-google:hover:not(:disabled) {
  border-color: var(--muted);
  box-shadow: var(--shadow);
}

.auth-google:active:not(:disabled) { transform: scale(.985); }
.auth-google:disabled { opacity: .65; cursor: not-allowed; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: .8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

/* ---------- 忘记密码 ---------- */
.auth-forgot {
  margin: -4px 0 14px;
  text-align: right;
  font-size: .82rem;
}

.auth-forgot a {
  color: var(--muted);
  text-decoration: none;
}

.auth-forgot a:hover {
  color: var(--red);
  text-decoration: underline;
}

/* ---------- 提示信息 ---------- */
.auth-msg {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: .86rem;
  line-height: 1.6;
  word-break: break-word;
}

.auth-msg.error {
  background: rgba(200, 16, 46, .08);
  border: 1px solid rgba(200, 16, 46, .3);
  color: var(--red-dark);
}

.auth-msg.success {
  background: rgba(46, 139, 87, .1);
  border: 1px solid rgba(46, 139, 87, .35);
  color: var(--green);
}

/* ---------- 底部切换链接 ---------- */
.auth-alt {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: .88rem;
  color: var(--muted);
}

.auth-alt a {
  color: var(--red-dark);
  font-weight: 600;
  text-decoration: none;
}

.auth-alt a:hover { text-decoration: underline; }

/* ---------- 小字说明 ---------- */
.auth-note {
  margin-top: 14px;
  font-size: .78rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 480px) {
  .auth-wrap { margin: 24px auto 48px; }
  .auth-card { padding: 24px 18px 20px; }
  .auth-card h1 { font-size: 1.25rem; }
}
