/* ============================================================
   登录页 · 现代深色高级感
   ============================================================ */

.auth-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 28px) 28px calc(env(safe-area-inset-bottom) + 28px);
  background: #05070b;
  color: #eaeef6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
}

/* ============================================================
   背景装饰
   ============================================================ */
.auth-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
}

.auth-bg-orb-1 {
  width: 340px; height: 340px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, #d4af7a 0%, transparent 70%);
  opacity: .28;
}

.auth-bg-orb-2 {
  width: 380px; height: 380px;
  bottom: -140px; right: -120px;
  background: radial-gradient(circle, #5b6fd8 0%, transparent 70%);
  opacity: .22;
}

.auth-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}

/* ============================================================
   内容层
   ============================================================ */
.auth-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   顶部品牌
   ============================================================ */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4af7a;
  background: linear-gradient(140deg, rgba(212, 175, 122, .18), rgba(212, 175, 122, .04));
  border: 1px solid rgba(212, 175, 122, .25);
  box-shadow:
    0 8px 24px -10px rgba(212, 175, 122, .4),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.brand-name {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #eaeef6;
}
.brand-name b {
  color: #d4af7a;
  font-weight: 500;
  margin-left: 3px;
}

/* ============================================================
   主标题
   ============================================================ */
.auth-head {
  margin-bottom: 40px;
}

.auth-head h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, .65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-head h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin: 18px 0 0;
  color: #eaeef6;
}

.auth-head p {
  font-size: 13px;
  color: rgba(234, 238, 246, .42);
  margin: 8px 0 0;
  letter-spacing: .5px;
}

/* ============================================================
   表单
   ============================================================ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}

.input-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(212, 175, 122, .5), rgba(212, 175, 122, 0), rgba(212, 175, 122, 0));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.input-wrap:focus-within {
  background: rgba(212, 175, 122, .035);
  border-color: rgba(212, 175, 122, .28);
  box-shadow:
    0 0 0 4px rgba(212, 175, 122, .06),
    0 8px 24px -12px rgba(212, 175, 122, .35);
}

.input-wrap:focus-within::before { opacity: 1; }

.input-prefix {
  font-size: 15px;
  font-weight: 600;
  color: #eaeef6;
  letter-spacing: .3px;
  flex-shrink: 0;
}

.input-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, .12);
  margin: 0 14px 0 12px;
  flex-shrink: 0;
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: rgba(234, 238, 246, .35);
  margin-right: 12px;
  flex-shrink: 0;
  transition: color .2s;
}

.input-wrap:focus-within .input-icon { color: #d4af7a; }

.input-wrap input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #eaeef6;
  font-size: 15px;
  font-family: inherit;
  min-width: 0;
  letter-spacing: .3px;
}

.input-wrap input::placeholder {
  color: rgba(234, 238, 246, .3);
  font-size: 14.5px;
}

.input-eye {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: rgba(234, 238, 246, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
  transition: color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.input-eye:hover,
.input-eye:active {
  color: #d4af7a;
  background: rgba(212, 175, 122, .08);
}

.input-eye svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* 记住我 + 忘记密码 */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 8px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .02);
  flex-shrink: 0;
  position: relative;
  transition: all .2s;
}

.check-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0c11' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5 10 17.5 19 7'/></svg>");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .15s;
}

.remember input:checked ~ .check-box {
  background: linear-gradient(140deg, #e8c896, #d4af7a);
  border-color: #d4af7a;
  box-shadow: 0 0 0 3px rgba(212, 175, 122, .15);
}

.remember input:checked ~ .check-box::after { opacity: 1; }

.check-text {
  font-size: 13px;
  color: rgba(234, 238, 246, .55);
}

.forgot {
  font-size: 13px;
  color: rgba(212, 175, 122, .85);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}
.forgot:hover, .forgot:active { color: #e8c896; }

/* ============================================================
   提交按钮
   ============================================================ */
.btn-submit {
  width: 100%;
  height: 56px;
  margin-top: 6px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(140deg, #f4dfb8 0%, #d4af7a 55%, #b8925f 100%);
  color: #0a0c11;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 14px 34px -12px rgba(212, 175, 122, .55),
    0 4px 12px rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .18s cubic-bezier(.4, 0, .2, 1), box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}

.btn-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  transition: left .6s;
}

.btn-submit:hover::after { left: 100%; }

.btn-submit:hover {
  box-shadow:
    0 18px 40px -12px rgba(212, 175, 122, .7),
    0 6px 16px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .35);
}

.btn-submit:active {
  transform: scale(.985);
  box-shadow:
    0 8px 20px -10px rgba(212, 175, 122, .55),
    inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-submit svg {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform .2s;
}

.btn-submit:hover svg { transform: translateX(2px); }

/* ============================================================
   分隔线
   ============================================================ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 34px 0 22px;
}

.auth-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}

.auth-divider em {
  font-style: normal;
  font-size: 11.5px;
  color: rgba(234, 238, 246, .35);
  letter-spacing: 1.5px;
  flex-shrink: 0;
}

/* ============================================================
   快捷登录
   ============================================================ */
.quick-actions {
  display: flex;
  justify-content: center;
  gap: 42px;
  margin-bottom: 12px;
}

.quick-actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  color: rgba(234, 238, 246, .55);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s;
}

.quick-actions button:hover { color: #eaeef6; }

.qa-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1), box-shadow .25s;
  position: relative;
}

.qa-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
  pointer-events: none;
}

.quick-actions button:active .qa-icon {
  transform: scale(.9);
}

.qa-wechat {
  background: linear-gradient(140deg, #3fd35a 0%, #1ea52e 100%);
  color: #fff;
  box-shadow:
    0 8px 22px -8px rgba(45, 193, 0, .55),
    inset 0 -2px 6px rgba(0, 0, 0, .12);
}

.qa-account {
  background: linear-gradient(140deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
  color: #eaeef6;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 22px -8px rgba(255, 255, 255, .18);
}

.qa-register {
  background: linear-gradient(140deg, #e8c896 0%, #d4af7a 100%);
  color: #0a0c11;
  box-shadow:
    0 8px 22px -8px rgba(212, 175, 122, .55),
    inset 0 -2px 6px rgba(0, 0, 0, .1);
}

.qa-label {
  font-weight: 500;
  letter-spacing: .3px;
}

/* ============================================================
   页脚
   ============================================================ */
.auth-footer {
  margin-top: auto;
  padding-top: 34px;
  text-align: center;
}

.auth-footer p {
  font-size: 11px;
  color: rgba(234, 238, 246, .25);
  line-height: 1.9;
  margin: 0;
  letter-spacing: .5px;
}

.auth-footer p + p { margin-top: 2px; }

/* ============================================================
   小屏优化
   ============================================================ */
@media (max-height: 720px) {
  .auth-brand { margin-bottom: 32px; }
  .auth-head { margin-bottom: 28px; }
  .auth-head h1 { font-size: 38px; }
  .auth-head h2 { font-size: 17px; margin-top: 14px; }
  .auth-divider { margin: 24px 0 18px; }
  .auth-footer { padding-top: 22px; }
}

@media (max-width: 360px) {
  .auth-page { padding-left: 22px; padding-right: 22px; }
  .auth-head h1 { font-size: 38px; }
  .quick-actions { gap: 32px; }
  .qa-icon { width: 46px; height: 46px; }
  .input-wrap { height: 52px; }
  .btn-submit { height: 52px; }
}

/* ============================================================
   减少动画偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .btn-submit::after { display: none; }
  .input-wrap, .btn-submit, .qa-icon { transition: none; }
}
/* ============================================================
   注册页
   ============================================================ */

.auth-register {
  padding-top: calc(env(safe-area-inset-top) + 20px);
  padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
}

.auth-head-register {
  margin-bottom: 28px;
}

.auth-head-register h1 {
  font-size: 38px;
}

.auth-head-register h2 {
  font-size: 17px;
  margin-top: 14px;
}

.auth-form-register {
  gap: 8px;
}

.reg-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: border-color .2s;
}

.reg-row:focus-within {
  border-bottom-color: rgba(212, 175, 122, .4);
}

.reg-row-last {
  border-bottom: none;
}

.reg-label {
  min-width: 52px;
  font-size: 14px;
  font-weight: 600;
  color: #d4af7a;
  letter-spacing: .5px;
  flex-shrink: 0;
  text-align: right;
}

/* 注册页输入框——去掉包裹外观 */
.input-wrap-line {
  flex: 1;
  height: 48px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  min-width: 0;
  position: relative;
}

.input-wrap-line::before {
  display: none;
}

.input-wrap-line:focus-within {
  background: transparent;
  border: none;
  box-shadow: none;
}

.input-wrap-line input {
  width: 100%;
  height: 100%;
  padding: 0 30px 0 0;
  background: transparent;
  border: none;
  outline: none;
  color: #eaeef6;
  font-size: 14.5px;
  font-family: inherit;
  letter-spacing: .3px;
}

.input-wrap-line input::placeholder {
  color: rgba(234, 238, 246, .28);
  font-size: 14px;
}

.reg-hint {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  color: rgba(234, 238, 246, .3);
  pointer-events: none;
  letter-spacing: .5px;
}

/* 协议勾选 */
.remember-agree {
  margin-top: 14px;
  margin-bottom: 6px;
  align-items: flex-start;
}

.remember-agree .check-box {
  margin-top: 1px;
}

.remember-agree .check-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(234, 238, 246, .55);
  flex-wrap: wrap;
}

.remember-agree .check-text a {
  color: #d4af7a;
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}

.remember-agree .check-text a:hover {
  color: #e8c896;
}

/* 底部返回 */
.register-back {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(234, 238, 246, .4);
}

.register-back a {
  color: #d4af7a;
  text-decoration: none;
  font-weight: 600;
  margin-left: 6px;
  transition: color .2s;
}

.register-back a:hover {
  color: #e8c896;
}

/* ============================================================
   登录模式切换动画
   ============================================================ */
.input-wrap {
  transition: all .28s cubic-bezier(.4, 0, .2, 1),
              opacity .24s ease,
              transform .24s cubic-bezier(.4, 0, .2, 1);
}

.input-wrap.mode-hide {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  position: absolute;
  left: 28px;
  right: 28px;
  visibility: hidden;
}

/* 注册页小屏适配 */
@media (max-height: 760px) {
  .auth-register { padding-top: calc(env(safe-area-inset-top) + 12px); }
  .auth-head-register { margin-bottom: 18px; }
  .auth-head-register h1 { font-size: 32px; }
  .auth-head-register h2 { font-size: 15px; margin-top: 10px; }
  .reg-row { padding: 2px 0; }
  .input-wrap-line { height: 42px; }
  .register-back { padding-top: 12px; }
}

@media (max-width: 360px) {
  .reg-label { min-width: 46px; font-size: 13px; }
}