/* 登录/注册 — Grid居中 */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; margin: 0; padding: 0; overflow-x: hidden; }
body {
  min-height: 100%; margin: 0;
  overflow-x: hidden;
  background: #0f0f14;
  color: #e8e0d4;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  -webkit-font-smoothing: antialiased;
}

.auth-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: hidden;
}

.auth-card {
  background: #1a1a24;
  border-radius: 12px;
  padding: 2.4rem 2rem 2rem;
  width: min(100%, 360px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.4);
}

.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #c9a96e;
  letter-spacing: 0.2em;
  margin: 0 0 0.25rem;
}

.auth-card .sub {
  text-align: center;
  font-size: 0.82rem;
  color: #8a8580;
  margin: 0 0 1.8rem;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-form label {
  font-size: 0.74rem;
  color: #8a8580;
  letter-spacing: 0.06em;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.auth-form input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
  background: #12121a;
  color: #e8e0d4;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
  transition: box-shadow 0.2s;
}

.auth-form input:focus {
  box-shadow: 0 0 0 1px #c9a96e44 inset;
}

.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus,
.auth-form input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #12121a inset !important;
  -webkit-text-fill-color: #e8e0d4 !important;
  transition: background-color 5000s ease-in-out 0s;
}

.auth-btn {
  margin-top: 0.3rem;
  width: 100%;
  padding: 0.65rem;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #2a2a1a, #3a3525);
  color: #c9a96e;
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.1em;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-btn:hover {
  border-color: #c9a96e;
  box-shadow: 0 0 24px rgba(201,169,110,0.12);
  transform: translateY(-1px);
}

.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.auth-error {
  color: #d05a5a;
  font-size: 0.76rem;
  text-align: center;
  min-height: 1em;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.auth-link {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: #8a8580;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.auth-link a {
  color: #c9a96e;
  text-decoration: none;
  font-weight: 500;
}

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

.auth-back {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.76rem;
  color: #5a5550;
  text-decoration: none;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  transition: color 0.2s;
}

.auth-back:hover { color: #8a8580; }

/* ===== Mobile ===== */
@media (max-width: 420px) {
  .auth-wrapper { padding: 1rem 1rem; align-items: flex-start; padding-top: 2rem; }
  .auth-card { padding: 1.6rem 1.2rem 1.4rem; width: 100%; border-radius: 10px; }
  .auth-card h1 { font-size: 1.25rem; letter-spacing: 0.15em; }
  .auth-card .sub { font-size: 0.76rem; margin-bottom: 1.4rem; }
  .auth-form { gap: 0.6rem; }
  .auth-form label { font-size: 0.7rem; }
  .auth-form input { padding: 0.7rem 0.8rem; font-size: 1rem; }
  .auth-btn { padding: 0.7rem; font-size: 1rem; }
  .auth-link { font-size: 0.76rem; margin-top: 1rem; }
  .auth-back { font-size: 0.72rem; margin-top: 0.8rem; }
}
