/* 创客API 登录/注册弹窗 — 参考小云雀 1:1 */

.auth-page-body {
  margin: 0;
  min-height: 100svh;
  background: #0a0a0c;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
}

.auth-page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.auth-modal-root[hidden] {
  display: none !important;
}

.auth-modal-root--embedded {
  position: static;
  inset: auto;
  z-index: 1;
  min-height: auto;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.auth-modal {
  width: min(920px, 100%);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  position: relative;
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #666;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-close:hover {
  background: #fff;
  color: #111;
}

.auth-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

@media (max-width: 768px) {
  .auth-modal-body {
    grid-template-columns: 1fr;
  }

  .auth-modal-promo {
    display: none;
  }
}

.auth-modal-promo {
  position: relative;
  background: #111 url("https://images.unsplash.com/photo-1529699211952-734e80c4d42b?w=800&q=80") center/cover no-repeat;
  padding: 28px 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.auth-modal-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.auth-modal-promo > * {
  position: relative;
  z-index: 1;
}

.auth-promo-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
}

.auth-promo-desc {
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.88;
  margin: 0;
  max-width: 280px;
}

.auth-modal-form-wrap {
  padding: 36px 40px 28px;
  display: flex;
  flex-direction: column;
}

.auth-modal-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}

.auth-modal-subtitle {
  font-size: 13px;
  color: #888;
  margin: 0 0 24px;
  line-height: 1.5;
}

.auth-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.auth-mode-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.auth-mode-tab.active {
  color: #111;
  border-bottom-color: #111;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: #f3f3f5;
  font-size: 14px;
  color: #111;
  outline: none;
  transition: box-shadow 0.15s;
}

.auth-field input:focus {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: #f8f8fa;
}

.auth-field input::placeholder {
  color: #aaa;
}

/* 固定占位，避免登录/注册切换或错误显隐时窗体高度跳动 */
.auth-error {
  display: block;
  box-sizing: border-box;
  min-height: 36px;
  margin-bottom: 12px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: transparent;
  background: transparent;
  border-radius: 8px;
  border: 1px solid transparent;
  overflow: hidden;
}

.auth-error.visible {
  color: #e11d48;
  background: #fff1f2;
  border-color: #fecdd3;
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.auth-submit:hover {
  opacity: 0.88;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  font-size: 11px;
  color: #999;
  line-height: 1.6;
}

.auth-agreement input {
  margin-top: 3px;
  flex-shrink: 0;
}

.auth-agreement a {
  color: #6366f1;
  text-decoration: none;
}

.auth-agreement a:hover {
  text-decoration: underline;
}
