/* auth-modal.css — 进入网站先弹出的注册/登录软闸门（可关闭继续浏览）
   视觉语言与站点 variables.css 保持一致（--navy / --electric / --teal ...） */

.am-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 31, 77, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  font-family: var(--font-sans);
}
.am-overlay.am-show { display: flex; }

.am-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(11, 31, 77, 0.28);
  padding: 34px 30px 30px;
  text-align: center;
  animation: amPop .25s ease;
}
@keyframes amPop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.am-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.am-close:hover { background: #e2e8f0; color: var(--text); }

.am-brand {
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 6px;
}
.am-title { font-size: 23px; font-weight: 900; color: var(--navy); margin: 0 0 6px; line-height: 1.25; }
.am-sub { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 18px; }

.am-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.am-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
}
.am-tab.active { background: var(--card); color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.am-field { text-align: left; margin-bottom: 12px; }
.am-field label { display: block; font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.am-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  color: var(--text);
  box-sizing: border-box;
  font-family: inherit;
}
.am-input:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 3px rgba(45, 124, 246, .15); }

.am-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 12.5px;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  text-align: left;
}

.am-btn {
  width: 100%;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  padding: 13px;
  cursor: pointer;
  font-family: inherit;
}
.am-btn-primary { background: var(--electric); color: #fff; }
.am-btn-primary:hover { background: var(--cobalt); }
.am-btn-primary:disabled { opacity: .7; cursor: default; }
.am-btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); margin-top: 6px; }
.am-btn-ghost:hover { background: #f8fafc; color: var(--text); }

.am-hint { font-size: 12px; color: var(--muted); margin: 14px 0 4px; }
.am-hint a { color: var(--electric); font-weight: 700; text-decoration: none; }

.am-divider { display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-size: 11px; margin: 14px 0; }
.am-divider::before, .am-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

@media (max-width: 480px) {
  .am-card { padding: 28px 20px 24px; }
}
