/* ============================================================
   驻马店登录弹窗 — 独立模块（XianLogin）
   仙侠暗色主题，xian-login-* 命名空间
   与项目 zhenfa.css 风格协调
   ============================================================ */

/* ===== 遮罩层 ===== */
.xian-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(7, 7, 13, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: xianLoginOverlayIn 0.35s ease;
}
.xian-login-overlay.closing {
  animation: xianLoginOverlayOut 0.3s ease forwards;
}
@keyframes xianLoginOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes xianLoginOverlayOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== 弹窗卡片 ===== */
.xian-login-modal {
  position: relative;
  background: linear-gradient(170deg, rgba(18, 14, 38, 0.98), rgba(8, 6, 20, 0.99));
  border: 1.5px solid rgba(155, 89, 182, 0.35);
  border-radius: 20px;
  width: min(92vw, 400px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 28px 28px;
  box-shadow:
    0 0 80px rgba(155, 89, 182, 0.12),
    0 0 40px rgba(139, 92, 246, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.55);
  animation: xianLoginCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}
.xian-login-modal.closing {
  animation: xianLoginCardOut 0.3s ease forwards;
}
@keyframes xianLoginCardIn {
  from { transform: scale(0.75); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes xianLoginCardOut {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.8); opacity: 0; }
}

/* 旋转光晕背景 */
.xian-login-bg-orbit {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(139, 92, 246, 0.05),
    transparent,
    rgba(212, 168, 67, 0.04),
    transparent
  );
  animation: xianLoginOrbit 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes xianLoginOrbit {
  to { transform: rotate(360deg); }
}

/* ===== 关闭按钮 ===== */
.xian-login-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 2;
  background: none;
  border: none;
  color: #7c6aaa;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
  padding: 4px;
}
.xian-login-close:hover {
  color: #f0c060;
  transform: rotate(90deg);
}

/* ===== 标题 ===== */
.xian-login-title {
  position: relative;
  z-index: 1;
  font-size: 22px;
  color: #f0c060;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: 3px;
}
.xian-login-subtitle {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #9b8ec4;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

/* ===== Tab 切换 ===== */
.xian-login-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 12px;
  padding: 3px;
}
.xian-login-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #9b8ec4;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
  letter-spacing: 1px;
}
.xian-login-tab.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(212, 168, 67, 0.15));
  color: #f0c060;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2);
}
.xian-login-tab:hover:not(.active) {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.08);
}

/* ===== 表单区域 ===== */
.xian-login-form {
  position: relative;
  z-index: 1;
  display: none;
  animation: xianLoginFadeIn 0.35s ease;
}
.xian-login-form.active {
  display: block;
}
@keyframes xianLoginFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 表单域 ===== */
.xian-login-field {
  margin-bottom: 16px;
}
.xian-login-field label {
  display: block;
  font-size: 12px;
  color: #9b8ec4;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

/* ===== 输入框包裹 ===== */
.xian-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.xian-login-input-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: #6b5e9e;
  pointer-events: none;
  z-index: 2;
}
.xian-login-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  background: rgba(10, 8, 24, 0.8);
  border: 1px solid rgba(155, 89, 182, 0.22);
  border-radius: 10px;
  color: #e0d8f0;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.xian-login-input-wrap input:focus {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 0 20px rgba(139, 92, 246, 0.05);
}
.xian-login-input-wrap input::placeholder {
  color: #5b4e7e;
}

/* ===== 验证码行 ===== */
.xian-login-code-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.xian-login-code-btn {
  white-space: nowrap;
  min-width: 100px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(155, 89, 182, 0.15));
  color: #c4b5fd;
  border: 1px solid rgba(155, 89, 182, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}
.xian-login-code-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(212, 168, 67, 0.25));
  border-color: rgba(212, 168, 67, 0.5);
  color: #f0c060;
}
.xian-login-code-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== 提交按钮 ===== */
.xian-login-submit {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 2px;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
  position: relative;
  overflow: hidden;
}
.xian-login-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s;
}
.xian-login-submit:hover {
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}
.xian-login-submit:hover::after {
  left: 100%;
}
.xian-login-submit:active {
  transform: scale(0.97);
}
.xian-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== 底部链接 ===== */
.xian-login-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: #6b5e9e;
}
.xian-login-link {
  color: #c4b5fd;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}
.xian-login-link:hover {
  color: #f0c060;
}

/* ===== 微信扫码区 ===== */
.xian-login-wechat-qr {
  text-align: center;
  padding: 20px 0 10px;
}
.xian-login-qr-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  background: rgba(139, 92, 246, 0.06);
  border: 2px dashed rgba(155, 89, 182, 0.25);
  border-radius: 16px;
  margin-bottom: 12px;
}
.xian-login-wechat-hint {
  font-size: 13px;
  color: #9b8ec4;
  letter-spacing: 1px;
}
.xian-login-wechat-btn {
  width: 100%;
  padding: 13px;
  margin-top: 12px;
  background: #07C160;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(7, 193, 96, 0.2);
}
.xian-login-wechat-btn:hover {
  box-shadow: 0 6px 28px rgba(7, 193, 96, 0.35);
  transform: translateY(-1px);
}
.xian-login-wechat-btn:active {
  transform: scale(0.97);
}

/* ===== Toast 提示 ===== */
.xian-login-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 8, 24, 0.95);
  color: #f0c060;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 100000;
  pointer-events: none;
  border: 1px solid rgba(155, 89, 182, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.xian-login-toast.show {
  opacity: 1;
}
.xian-login-toast.error {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* ===== 移动端适配 ===== */
@media (max-width: 480px) {
  .xian-login-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    border: none;
    padding: 40px 24px 32px;
  }
  .xian-login-title {
    font-size: 20px;
  }
  .xian-login-close {
    top: 18px;
    right: 18px;
    font-size: 24px;
  }
}

/* ===== 滚动条美化 ===== */
.xian-login-modal::-webkit-scrollbar {
  width: 4px;
}
.xian-login-modal::-webkit-scrollbar-track {
  background: transparent;
}
.xian-login-modal::-webkit-scrollbar-thumb {
  background: rgba(155, 89, 182, 0.2);
  border-radius: 2px;
}
