/* 弹窗遮罩 */
.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.auth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(19,19,19,0.3);
}
.auth-box {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 370px;
  max-width: calc(100vw - 2rem);
  max-height: 100vh;
    -webkit-overflow-scrolling: touch;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
  animation: authFadeIn .25s ease;
  z-index: 1;
}
@keyframes authFadeIn {
  from { opacity: 0; transform: scale(.97) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-close {
  position: absolute; top: .5rem; right: .5rem;
  background: none; border: none; cursor: pointer;
  color: #999; padding: 4px; line-height: 1;
}
.auth-close:hover { color: #333; }

/* 表单切换 */
.auth-form { display: none; }
.auth-form.show { display: block !important; }

.auth-title { font-size: .9375rem; font-weight: 600; margin-bottom: .25rem; }
.auth-subtitle { font-size: .8125rem; color: #555; margin-bottom: .75rem; }
.auth-switch { margin-top: .75rem; font-size: .75rem; color: #888; }
.auth-switch a { color: #555; text-decoration: none; margin-left: .25rem; }
.auth-switch a:hover { text-decoration: underline; }

/* 表单样式 */
.auth-form-inner .form-group { margin-bottom: .5rem; text-align: left; }
.auth-form-inner .form-label {
  display: block; font-size: .6875rem; letter-spacing: .05em;
  color: #888; margin-bottom: .125rem;
}
.auth-form-inner .form-input {
  width: 100%; padding: .45rem .75rem; font-size: .8125rem;
  border: 1px solid #e5e5e5; border-radius: 6px;
  outline: none; transition: border-color .2s;
  box-sizing: border-box;
}
.auth-form-inner .form-input:focus { border-color: #999; }
.captcha-row { display: flex; gap: .5rem; align-items: center; }
.captcha-row .form-input { flex: 1; }
.captcha-img {
  height: 32px; border-radius: 4px; cursor: pointer;
  border: 1px solid #e5e5e5;
}
.submit-btn {
  width: 100%; padding: .5rem; margin-top: .5rem;
  box-sizing: border-box;
  background: #171717; color: #fff; border: none; border-radius: 6px;
  font-size: .8125rem; cursor: pointer; transition: background .2s;
}
.submit-btn:hover { background: #333; }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* 弹窗 Toast */
.auth-toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  background: #171717; color: #fff; padding: .5rem 1.25rem;
  border-radius: 6px; font-size: .8125rem;
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 10001;
}
.auth-toast.show { opacity: 1; }

/* 短信按钮 */
.modal-sms-btn {
  padding: .4rem .75rem; font-size: .75rem;
  background: #f5f5f5; border: 1px solid #e5e5e5;
  border-radius: 6px; cursor: pointer; color: #555;
}
.modal-sms-btn:disabled { opacity: .5; cursor: not-allowed; }
/* 短信验证码行 */
.sms-row { display: flex; gap: .5rem; align-items: center; }
.sms-row .form-input { flex: 1; }

/* 同意协议行 */
.agree-row {
  display: flex; align-items: center; gap: .375rem;
  font-size: .75rem; color: #888; margin: .5rem 0;
}
.agree-row a { color: #555; text-decoration: none; }
.agree-row a:hover { text-decoration: underline; }
.agree-row input[type="checkbox"] { width: 14px; height: 14px; accent-color: #171717; }

/* 密码显示/隐藏按钮 */
.form-group [data-lucide="eye"] { z-index: 2; }


/* 手机版：底部滑入 */
@media (max-width: 480px) {
  .auth-modal { padding: 0; align-items: flex-end; }
  .auth-box {
    width: 100%; max-width: 100%;
    border-radius: 14px 14px 0 0;
    padding: 1rem .75rem .75rem;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch;
    animation: authSlideUp .3s ease;
  }
}
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}
