/**
 * 微光AI — 登录 / 注册 / 账户安全 / 验证码弹窗
 * 与站点深色科技风 + QQ 蓝点缀一致
 */

body.modal-open {
  overflow: hidden;
}

/* ---------- 遮罩 ---------- */
.page-weiguang .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.78);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.page-weiguang .modal-backdrop[hidden] {
  display: none !important;
}

.page-weiguang .modal-backdrop.is-visible {
  opacity: 1;
}

/* ---------- 弹窗容器 ---------- */
.page-weiguang .modal.modal--auth,
.page-weiguang .modal.modal--account,
.page-weiguang .modal.modal--captcha {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(420px, calc(100vw - 32px));
  max-height: min(92vh, 720px);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: linear-gradient(165deg, #141c2e 0%, #0c1018 55%, #0a0e14 100%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 229, 255, 0.08),
    0 0 40px rgba(0, 229, 255, 0.12);
  opacity: 0;
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-body, "Noto Sans SC", system-ui, sans-serif);
  color: #e8edf5;
}

.page-weiguang .modal[hidden] {
  display: none !important;
}

.page-weiguang .modal.modal--auth.is-visible,
.page-weiguang .modal.modal--account.is-visible,
.page-weiguang .modal.modal--captcha.is-visible,
.page-weiguang .modal.modal--inbox.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.page-weiguang .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #c5d4e8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.page-weiguang .modal-close:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.35);
  color: #fff;
}

/* ---------- 内层滚动区 ---------- */
.page-weiguang .auth-modal-inner {
  padding: 28px 26px 26px;
  padding-top: 22px;
  max-height: min(90vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.35) transparent;
}

.page-weiguang .auth-modal-title {
  margin: 0 0 18px;
  padding-right: 40px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f0f6ff;
}

/* ---------- 登录 / 注册 Tab ---------- */
.page-weiguang .auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.page-weiguang .auth-tabs--wrap {
  flex-wrap: nowrap;
}

.page-weiguang .auth-tab {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #8b9cb8;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.page-weiguang .auth-tab:hover {
  color: #dce8ff;
}

.page-weiguang .auth-tab.is-active {
  color: #061018;
  background: linear-gradient(180deg, #5ee9ff 0%, #00c8e8 45%, #00a8c8 100%);
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.35);
}

.page-weiguang .auth-tab[hidden] {
  display: none !important;
}

/* ---------- 提示条 ---------- */
.page-weiguang .auth-msg {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #7ee8ff;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.22);
}

.page-weiguang .auth-msg[hidden] {
  display: none !important;
}

.page-weiguang .auth-msg--error {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
}

.page-weiguang .auth-hint {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #8b9cb8;
}

.auth-field-purpose {
  margin: -2px 0 12px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #8b9cb8;
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #b8c5d8;
  cursor: pointer;
}

.auth-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #00e5ff;
  cursor: pointer;
}

.auth-consent__text a,
.auth-consent-link {
  color: #00e5ff;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  line-height: inherit;
  display: inline;
}

.auth-consent-link::after {
  border: none;
}

.auth-consent__text a:hover,
.auth-consent-link:active {
  color: #00ffa3;
}

.auth-consent-block {
  margin: 0 0 14px;
}

.auth-consent-block[hidden],
.auth-submit--guest[hidden],
.auth-extra--guest[hidden] {
  display: none !important;
}

.page-weiguang .auth-extra {
  margin: 12px 0 0;
  text-align: center;
}

.page-weiguang .auth-extra--left {
  margin: 0 0 8px;
  text-align: left;
}

.page-weiguang .auth-text-link {
  border: none;
  background: none;
  padding: 0;
  color: #00e5ff;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-weiguang .auth-text-link:hover {
  color: #7ee8ff;
}

/* ---------- 表单（竖排） ---------- */
.page-weiguang #authModal .auth-form,
.page-weiguang #accountModal .auth-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100%;
}

.page-weiguang #authModal .auth-form[hidden],
.page-weiguang #accountModal .auth-form[hidden] {
  display: none !important;
}

.page-weiguang #authModal .auth-label,
.page-weiguang #accountModal .auth-label {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9eb0c8;
}

.page-weiguang #authModal .auth-label > span:first-child,
.page-weiguang #accountModal .auth-label > span:first-child {
  display: block;
}

.page-weiguang #authModal .auth-label input,
.page-weiguang #authModal .auth-label select,
.page-weiguang #accountModal .auth-label input,
.page-weiguang #accountModal .auth-label select {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(0, 229, 255, 0.2) !important;
  background: rgba(5, 12, 24, 0.9) !important;
  color: #eef4ff !important;
  font-family: inherit !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  -webkit-appearance: none;
  appearance: none;
}

.page-weiguang #authModal .auth-label input::placeholder,
.page-weiguang #accountModal .auth-label input::placeholder {
  color: rgba(139, 156, 184, 0.65) !important;
}

.page-weiguang #authModal .auth-label input:focus,
.page-weiguang #authModal .auth-label select:focus,
.page-weiguang #accountModal .auth-label input:focus,
.page-weiguang #accountModal .auth-label select:focus {
  outline: none !important;
  border-color: rgba(0, 229, 255, 0.55) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(0, 229, 255, 0.18) !important;
}

.page-weiguang #authModal .auth-label select,
.page-weiguang #accountModal .auth-label select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #8b9cb8 50%),
    linear-gradient(135deg, #8b9cb8 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px) !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
}

/* 短信行 */
.page-weiguang .auth-sms-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-end !important;
  gap: 10px !important;
  width: 100%;
}

.page-weiguang .auth-label--grow {
  flex: 1 !important;
  min-width: 0 !important;
}

.page-weiguang .auth-sms-btn {
  flex-shrink: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}

.page-weiguang .auth-sms-btn:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.22);
  transform: translateY(-1px);
}

.page-weiguang .auth-sms-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 提交 */
.page-weiguang .auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 18px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(180deg, #5ee9ff 0%, #00b8d4 50%, #0097b8 100%);
  color: #041018;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.page-weiguang .auth-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(0, 229, 255, 0.42);
}

/* 行业下拉 */
.page-weiguang .reg-industry-wrap {
  position: relative;
  width: 100%;
}

.page-weiguang .reg-industry-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 36px 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(5, 12, 24, 0.9);
  color: #eef4ff;
  font-family: inherit;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
}

.page-weiguang .reg-industry-btn__text--ph {
  color: rgba(139, 156, 184, 0.75);
}

.page-weiguang .reg-industry-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: min(200px, 40vh);
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: #121a28;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.page-weiguang .reg-industry-list[hidden] {
  display: none !important;
}

.page-weiguang .reg-industry-list__item {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #e8edf5;
  cursor: pointer;
}

.page-weiguang .reg-industry-list__item:hover,
.page-weiguang .reg-industry-list__item.is-selected {
  background: rgba(0, 229, 255, 0.15);
}

/* 验证码弹窗 */
.page-weiguang .auth-captcha-hint {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  color: #8b9cb8;
  line-height: 1.55;
}

.page-weiguang .auth-captcha-target {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00e5ff;
}

.page-weiguang .auth-captcha-math {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.page-weiguang .auth-captcha-math__input {
  flex: 1;
  min-width: 80px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(5, 12, 24, 0.9);
  color: #eef4ff;
  font-size: 1rem;
}

.page-weiguang .auth-captcha-math__btn {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #5ee9ff, #00b8d4);
  color: #041018;
  font-weight: 700;
  cursor: pointer;
}

.page-weiguang .auth-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  min-height: 1.05em;
}

.page-weiguang .auth-field-hint--err {
  color: #fca5a5;
}

.page-weiguang .auth-field-hint--ok {
  color: #86efac;
}

/* 隐藏占位 stub */
.page-weiguang .wg-auth-stub {
  display: none !important;
}
