/* 登录弹窗（邀请码 + 昵称 + 头像） */
.login-mask {
  position: fixed;
  inset: 0;
  background: rgba(50, 30, 20, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: loginFadeIn 0.3s ease;
}
@keyframes loginFadeIn { from { opacity: 0; } to { opacity: 1; } }
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--paper, #FFFFFF);
  border-radius: 24px;
  box-shadow: 0 20px 60px -10px rgba(60, 30, 10, 0.4);
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.login-card::before {
  content: "";
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  background: linear-gradient(135deg, #FFD8A8, #B33A2A, #B8902F);
  border-radius: 28px;
  z-index: -1;
  opacity: 0.25;
  filter: blur(12px);
}
.login-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--ink, #2A2520);
}
.login-sub {
  font-size: 13px;
  color: var(--muted, #8A7B6C);
  text-align: center;
  line-height: 1.5;
}
.login-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-label {
  font-size: 13px;
  color: var(--ink-soft, #4D423A);
  font-weight: 600;
}
.login-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--line, #E6DCC9);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 18px;
  font-family: inherit;
  background: #FAF6EE;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
}
.login-input:focus { border-color: var(--accent, #B33A2A); }
.login-input:disabled { background: #F5EFE6; color: var(--muted); }

.login-hint {
  min-height: 18px;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
.login-hint.ok { color: #5A7A4E; }
.login-hint.err { color: #B33A2A; }

.login-avatars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 2px;
}
.login-avatar {
  height: 44px;
  border: 1.5px solid var(--line, #E6DCC9);
  border-radius: 12px;
  background: #FAF6EE;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}
.login-avatar:hover { transform: scale(1.06); }
.login-avatar.active {
  background: var(--accent-soft, #FCEDE9);
  border-color: var(--accent, #B33A2A);
  transform: scale(1.06);
}

.login-actions { margin-top: 4px; }
.login-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: var(--line, #E6DCC9);
  color: var(--ink-soft, #4D423A);
  transition: all 0.2s;
}
.login-btn.primary {
  background: linear-gradient(135deg, #B33A2A, #8E2A1C);
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(179, 58, 42, 0.4);
}
.login-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -2px rgba(179, 58, 42, 0.5); }
.login-btn.primary:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.login-foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted, #8A7B6C);
  margin-top: 2px;
}
.login-foot-link {
  color: var(--accent, #B33A2A);
  text-decoration: none;
  margin-left: 4px;
  font-weight: 600;
}
.login-foot-link:hover { text-decoration: underline; }

.shake { animation: loginShake 0.4s ease; }
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
