/* ===== 登录页专属样式 ===== */

/* ---------- 页面基底 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gj-space-lg);
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(0,0,0,0.03) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 5%, rgba(0,0,0,0.02) 0%, transparent 50%),
    linear-gradient(175deg, #fdfdfd 0%, #fbfbfb 25%, #fafafa 60%, #f9f9f9 100%);
  background-attachment: fixed;
  position: relative;
}

/* 右上角柔光 */
.login-page::before {
  content: '';
  position: fixed;
  top: -15%;
  right: -10%;
  width: 55%;
  height: 55%;
  background:
    radial-gradient(circle at 70% 30%, rgba(0,0,0,0.03) 0%, transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(0,0,0,0.025) 0%, transparent 50%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* 左下角柔光 */
.login-page::after {
  content: '';
  position: fixed;
  bottom: -8%;
  left: -5%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle at 30% 80%, rgba(0,0,0,0.02) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* ===== 动态柔光色块 ===== */
.aurora-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.aurora-blob--a {
  width: 600px;
  height: 600px;
  top: -22%;
  right: -14%;
  background: radial-gradient(circle at 50% 40%, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.01) 35%, transparent 70%);
  animation: driftA 28s ease-in-out infinite;
}
.aurora-blob--b {
  width: 540px;
  height: 540px;
  bottom: -18%;
  left: -10%;
  background: radial-gradient(circle at 45% 55%, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.04) 35%, transparent 70%);
  animation: driftB 32s ease-in-out infinite;
}
.aurora-blob--c {
  width: 380px;
  height: 380px;
  top: 5%;
  left: 8%;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.02) 40%, transparent 70%);
  animation: driftC 24s ease-in-out infinite;
}

@keyframes driftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  20%  { transform: translate(-80px, 80px) scale(1.12); }
  40%  { transform: translate(-140px, -25px) scale(0.88); }
  65%  { transform: translate(-40px, -80px) scale(1.08); }
  85%  { transform: translate(25px, 50px) scale(0.94); }
}
@keyframes driftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  30%  { transform: translate(90px, -65px) scale(1.14); }
  55%  { transform: translate(-50px, -110px) scale(0.86); }
  80%  { transform: translate(40px, -30px) scale(0.95); }
}
@keyframes driftC {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(70px, 50px) scale(1.08); }
  50%  { transform: translate(-40px, 70px) scale(0.9); }
  75%  { transform: translate(30px, -55px) scale(1.06); }
}

/* ---------- 容器 ---------- */
.login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* ---------- 品牌区 ---------- */
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.login-brand p {
  color: #8e8ea0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

/* ---------- 玻璃卡片 ---------- */
.login-container .gj-card {
  background: rgba(255,255,255,0.82);
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    0 1px 0 0 rgba(0,0,0,0.04) inset,
    0 4px 20px rgba(0,0,0,0.04),
    0 1px 4px rgba(0,0,0,0.03);
  padding: 28px 28px 32px;
  position: relative;
  overflow: hidden;
}

/* 卡片顶部微光条 */
.login-container .gj-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,0,0,0.03) 15%,
    rgba(0,0,0,0.05) 40%,
    rgba(0,0,0,0.05) 60%,
    rgba(0,0,0,0.03) 85%,
    transparent 100%);
  background-size: 200% 100%;
  pointer-events: none;
  z-index: 1;
  animation: lightSweep 10s ease-in-out infinite;
}
@keyframes lightSweep {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0% 0; }
}

/* ---------- 登录/注册 大切换 ---------- */
.mode-toggle {
  display: flex;
  margin-bottom: 22px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 4px;
}
.mode-toggle button {
  flex: 1;
  padding: 10px 18px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--gj-font);
  color: #888;
  border-radius: 24px;
  letter-spacing: 0.03em;
}
.mode-toggle button.active {
  background: #fff;
  color: #1a1a1a;
  box-shadow:
    0 1px 4px rgba(0,0,0,0.08),
    0 1px 2px rgba(0,0,0,0.04);
}

/* ---------- Tab 切换 ---------- */
.tab-row {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid rgba(0,0,0,0.08);
}
.tab-row button {
  padding: 8px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #999;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: all 0.25s;
  font-family: var(--gj-font);
  letter-spacing: 0.02em;
}
.tab-row button.active {
  color: #1a1a1a;
  border-bottom-color: #333;
  font-weight: 600;
}

/* ---------- 表单组 ---------- */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #555;
  letter-spacing: 0.02em;
}

/* ---------- 密码可见性切换 ---------- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input::-ms-reveal,
.password-wrapper input::-ms-clear {
  display: none !important; /* 隐藏 Edge 浏览器自带的密码小眼睛 */
}
#password::-ms-reveal,
#password::-ms-clear {
  display: none !important;
}
.password-wrapper input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #bbb;
  transition: color 0.2s, background 0.2s;
  z-index: 2;
}
.password-toggle:hover {
  color: #333;
  background: rgba(0,0,0,0.04);
}
.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* 输入框 */
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  font-size: 14px;
  font-family: var(--gj-font);
  transition: all 0.25s;
  background: rgba(255,255,255,0.6);
  color: #2c2c3a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) inset;
}
.form-group input::placeholder {
  color: #bbb;
}
.form-group input:focus {
  outline: none;
  border-color: rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.9);
  box-shadow:
    0 0 0 3px rgba(0,0,0,0.04),
    0 1px 3px rgba(0,0,0,0.03) inset;
}
.form-group input.input-error {
  border-color: rgba(0,0,0,0.35);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.06);
}
.field-error {
  color: var(--gj-danger);
  font-size: 12px;
  margin-top: 5px;
  min-height: 18px;
  letter-spacing: 0.01em;
}

/* ---------- 验证码行 ---------- */
.code-row {
  display: flex;
  gap: 10px;
}
.code-row input {
  flex: 1;
}
.code-row .gj-btn {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
  padding: 12px 18px;
  border-radius: 14px;
}

/* ---------- 记住密码 ---------- */
.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  margin-top: -4px;
}
.remember-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,0.2);
  border-radius: 5px;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.remember-row input[type="checkbox"]:checked {
  background: #1a1a1a;
  border-color: #1a1a1a;
}
.remember-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.remember-row input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(0,0,0,0.25);
  outline-offset: 2px;
}
.remember-row label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
}

/* ---------- 按钮 ---------- */
.gj-btn {
  border-radius: 14px !important;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gj-btn-primary {
  background: #1a1a1a !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}
.gj-btn-primary:hover {
  background: #333 !important;
  box-shadow: 0 6px 22px rgba(0,0,0,0.18) !important;
  transform: translateY(-1px);
}
.gj-btn-outline {
  border: 1.5px solid rgba(0,0,0,0.2) !important;
  color: #333 !important;
  background: rgba(255,255,255,0.5);
}
.gj-btn-outline:hover {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.35) !important;
}
.gj-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* 提交按钮 */
.submit-btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  font-size: 16px;
  border-radius: 14px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #1a1a1a !important;
  color: #fff !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
  position: relative;
}
.submit-btn:hover {
  background: #333 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
  transform: translateY(-1px);
}
.submit-btn .btn-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

/* ---------- 开发模式提示 ---------- */
.dev-hint {
  margin-top: 8px;
  padding: 9px 14px;
  background: rgba(254,243,199,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  font-size: 12px;
  color: #92400e;
  text-align: center;
  display: none;
  border: 1px solid rgba(251,191,36,0.2);
}

/* ---------- 通用错误提示 ---------- */
.alert-error {
  padding: 11px 16px;
  background: rgba(254,242,242,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(254,202,202,0.5);
  border-radius: 14px;
  color: var(--gj-danger);
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
  letter-spacing: 0.01em;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
  .login-container {
    max-width: 100%;
    padding: 0 4px;
  }
  .login-brand h1 {
    font-size: 26px;
  }
  .login-container .gj-card {
    padding: 22px 18px 26px;
  }
  .form-group input {
    padding: 11px 14px;
    border-radius: 12px;
  }
}
