/* =====================================================================
 *  用户登录页样式
 *  视觉风格对标 123.95fa.cn/ds/user/login.php
 *  作用域：全部限定在 .ds-login 内，不影响站内其他页面
 * ===================================================================== */

.ds-login {
  --ds-primary: #2d67ff;
  --ds-primary-hover: #1e54ec;
  --ds-primary-soft: #3a7bff;
  --ds-primary-disabled: #9bb3f3;
  --ds-primary-border: #c5d6ff;
  --ds-title: #111827;
  --ds-text: #1f2937;
  --ds-text-sub: #6b7280;
  --ds-text-muted: #9ca3af;
  --ds-field: #f5f7fb;
  --ds-page: #f3f6fb;
  --ds-glow: #e6ecf7;

  min-height: 100vh;
  /* 站点若配置了全屏背景图，站内会输出 <img class="full-bg">：
     它是 position:fixed 且 z-index 为 auto，会盖住所有静态定位的兄弟内容。
     这里显式建立层叠上下文，保证登录内容始终在背景图之上。 */
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 28px;
  background:
    radial-gradient(circle at 12% 10%, var(--ds-glow) 0, transparent 38%),
    radial-gradient(circle at 88% 90%, var(--ds-glow) 0, transparent 40%),
    var(--ds-page);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ds-text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.ds-login,
.ds-login *,
.ds-login *::before,
.ds-login *::after { box-sizing: border-box; }

/* 站点后台配置了全屏背景图时，让背景图露出来 */
.ds-login--bgimg { background: transparent; }

/* 登录页纯色画布背景：不加载站点背景图，整页铺纯色 */
.ds-login--solid { background: #eef3fb; }

.ds-login a { color: var(--ds-primary); text-decoration: none; }
.ds-login a:hover,
.ds-login a:focus { color: var(--ds-primary-hover); text-decoration: none; }

.ds-login input { font-family: inherit; font-size: 15px; color: var(--ds-text); background: transparent; border: 0; outline: 0; width: 100%; }
.ds-login input::placeholder { color: var(--ds-text-muted); }
.ds-login button { font-family: inherit; border: 0; cursor: pointer; outline: 0; }

.ds-login :focus-visible { outline: 2px solid var(--ds-primary); outline-offset: 2px; }

/* =====================================================================
 *  表单主体（移动优先：单列居中）
 * ===================================================================== */
.ds-login-page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.ds-login-brand { text-align: center; margin-bottom: 36px; }
.ds-brand-icon {
  width: 96px; height: 96px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--ds-primary-soft) 0%, var(--ds-primary-hover) 100%);
  box-shadow: 0 18px 32px -12px rgba(45, 103, 255, .45);
}
.ds-brand-icon svg { width: 48px; height: 48px; color: #fff; }
.ds-brand-title { margin: 0 0 8px; font-size: 34px; font-weight: 700; letter-spacing: 1px; color: var(--ds-title); }
.ds-brand-subtitle { margin: 0; font-size: 14px; color: var(--ds-text-muted); }

.ds-login-card {
  width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 24px 22px 26px;
  box-shadow: 0 12px 32px -16px rgba(31, 41, 55, .12);
}
.ds-card-title { display: none; }
.ds-card-sub { display: none; }

/* ---------- 输入项 ---------- */
.ds-form-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 16px 0 46px;
  margin-bottom: 14px;
  background: var(--ds-field);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color .15s, background .15s;
}
.ds-form-item:focus-within { border-color: var(--ds-primary-border); background: #fff; }
.ds-form-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ds-text-muted);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ds-form-icon svg { width: 18px; height: 18px; }
.ds-form-eye {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px;
  color: var(--ds-text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ds-form-eye svg { width: 20px; height: 20px; }
.ds-form-eye:hover { color: var(--ds-primary); }
.ds-form-item.with-eye { padding-right: 42px; }
.ds-form-item.with-action { padding-right: 118px; }
.ds-form-action {
  position: absolute; right: 6px; top: 6px; bottom: 6px;
  min-width: 104px; padding: 0 14px;
  border-radius: 8px;
  font-size: 13px; color: #fff;
  background: var(--ds-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  user-select: none;
}
.ds-form-action.is-disabled { background: var(--ds-primary-disabled); cursor: not-allowed; }

/* ---------- 验证码插槽 ---------- */
.ds-captcha-slot { margin: 2px 0 14px; min-height: 0; }
.ds-captcha-slot:empty { margin: 0; }
.ds-captcha-tip { font-size: 13px; color: var(--ds-text-muted); text-align: center; padding: 10px 0; }
.ds-captcha-loading { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 0; }
.ds-captcha-loading i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ds-primary-border);
  animation: ds-captcha-bounce 1.2s infinite ease-in-out both;
}
.ds-captcha-loading i:nth-child(2) { animation-delay: .16s; }
.ds-captcha-loading i:nth-child(3) { animation-delay: .32s; }
.ds-captcha-loading i:nth-child(4) { animation-delay: .48s; }
@keyframes ds-captcha-bounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---------- 主按钮 ---------- */
.ds-login-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border-radius: 10px;
  background: var(--ds-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 2px;
  box-shadow: 0 10px 22px -10px rgba(45, 103, 255, .6);
  transition: background .15s, box-shadow .15s;
}
.ds-login-btn:hover { background: var(--ds-primary-hover); }
.ds-login-btn:active { background: var(--ds-primary-hover); box-shadow: 0 6px 14px -8px rgba(45, 103, 255, .6); }
.ds-login-btn:disabled,
.ds-login-btn.is-disabled { background: var(--ds-primary-disabled); box-shadow: none; cursor: not-allowed; }

/* ---------- 辅助行 ---------- */
.ds-login-reg { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--ds-text-sub); }
.ds-login-reg a { margin-left: 4px; font-weight: 500; }
.ds-login-links { margin: 16px 0 0; display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 13px; }

.ds-login-social { margin: 18px 0 0; display: flex; align-items: center; justify-content: center; gap: 14px; }
.ds-login-social::before,
.ds-login-social::after { content: ""; height: 1px; flex: 1 1 auto; background: var(--ds-field); }
.ds-login-social a { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; }
.ds-login-social a img { width: 100%; height: 100%; object-fit: cover; }

.ds-login-agreement {
  margin-top: auto;
  padding-top: 28px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; color: var(--ds-text-muted);
}
.ds-login-agreement svg { width: 14px; height: 14px; color: var(--ds-primary); flex-shrink: 0; }
.ds-login-agreement a { color: var(--ds-primary); }

/* =====================================================================
 *  桌面双栏（≥992px）
 * ===================================================================== */
.ds-login-aside { display: none; }

@media (min-width: 992px) {
  .ds-login {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 48px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px;
    min-height: 100vh;
  }

  .ds-login-aside {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding-right: 24px;
  }
  .ds-aside-logo {
    width: 64px; height: 64px;
    margin-bottom: 32px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, var(--ds-primary-soft) 0%, var(--ds-primary-hover) 100%);
    box-shadow: 0 18px 32px -14px rgba(45, 103, 255, .55);
  }
  .ds-aside-logo svg { width: 34px; height: 34px; color: #fff; }
  .ds-aside-title { margin: 0 0 18px; font-size: 44px; font-weight: 700; line-height: 1.25; letter-spacing: 1px; color: var(--ds-title); }
  .ds-aside-sub { margin: 0 0 42px; max-width: 520px; font-size: 18px; line-height: 1.6; color: var(--ds-text-sub); }

  .ds-aside-art {
    position: relative;
    width: 100%; max-width: 540px;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, #dbe5f7 0%, #f0f4fb 100%);
    box-shadow: 0 30px 60px -30px rgba(31, 41, 55, .25);
  }
  .ds-aside-art::before,
  .ds-aside-art::after {
    content: ""; position: absolute; border-radius: 14px;
    box-shadow: 0 8px 24px -10px rgba(31, 41, 55, .18);
  }
  .ds-aside-art::before { left: 8%; top: 18%; width: 42%; height: 64%; background: linear-gradient(180deg, #fff 0%, #f7faff 100%); }
  .ds-aside-art::after { right: 8%; top: 14%; width: 42%; height: 72%; background: #fff; }
  .ds-aside-art .bar1,
  .ds-aside-art .bar2,
  .ds-aside-art .bar3,
  .ds-aside-art .line1 { position: absolute; border-radius: 4px; background: var(--ds-primary); }
  .ds-aside-art .bar1 { left: 14%; top: 55%; width: 6%; height: 18%; opacity: .85; }
  .ds-aside-art .bar2 { left: 22%; top: 48%; width: 6%; height: 25%; opacity: .65; }
  .ds-aside-art .bar3 { left: 30%; top: 42%; width: 6%; height: 31%; opacity: .45; }
  .ds-aside-art .line1 { right: 14%; top: 32%; width: 34%; height: 3px; background: linear-gradient(90deg, var(--ds-primary), #7aa6ff); opacity: .8; }
  .ds-aside-art .dot1,
  .ds-aside-art .dot2,
  .ds-aside-art .dot3 { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--ds-primary); }
  .ds-aside-art .dot1 { right: 48%; top: 30%; background: var(--ds-primary); }
  .ds-aside-art .dot2 { right: 30%; top: 45%; background: #7aa6ff; }
  .ds-aside-art .dot3 { right: 14%; top: 60%; background: var(--ds-primary-disabled); }

  .ds-login-page {
    flex: 0 0 420px;
    width: 420px;
    max-width: 420px;
    margin: auto 0;
    align-self: center;
    padding: 48px 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 60px -30px rgba(31, 41, 55, .18);
  }
  .ds-login-brand { display: none; }
  .ds-login-card { padding: 0; background: transparent; border-radius: 0; box-shadow: none; }
  .ds-card-title { display: block; margin: 0 0 8px; font-size: 26px; font-weight: 700; text-align: center; color: var(--ds-title); }
  .ds-card-sub { display: block; margin: 0 0 28px; font-size: 14px; text-align: center; color: var(--ds-text-muted); }
  .ds-login-agreement { padding-top: 24px; }
}
