* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  position: relative;
}

/* 返回首页链接 */
.back-home {
  position: fixed;
  top: 20px;
  left: 20px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: 0.2s;
  z-index: 10;
}
.back-home:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateX(-3px);
}

.card {
  width: 100%;
  max-width: 390px;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

h1 { font-size: 22px; margin: 0 0 6px; text-align: center; color: #111827; }
.sub { text-align: center; color: #6b7280; font-size: 13px; margin: 0 0 22px; }

.tabs {
  display: flex; background: #f3f4f6; border-radius: 10px;
  padding: 4px; margin-bottom: 20px;
}

.tab {
  flex: 1; border: 0; background: transparent; padding: 9px 0;
  border-radius: 8px; cursor: pointer; font-size: 14px;
  color: #4b5563; font-weight: 600; transition: 0.2s;
}
.tab.active { background: #fff; color: #4f46e5; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }

form { display: none; flex-direction: column; gap: 12px; }
form.active { display: flex; }

input {
  padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 10px;
  font-size: 15px; outline: none; transition: 0.2s; font-family: inherit;
}
input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

button.submit {
  padding: 12px; border: 0; border-radius: 10px; background: #4f46e5;
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
button.submit:hover { background: #4338ca; }
button.submit:disabled { opacity: 0.6; cursor: not-allowed; }

.msg { min-height: 20px; text-align: center; font-size: 13px; margin: 14px 0 0; }
.msg.err { color: #dc2626; }
.msg.ok { color: #16a34a; }