/* ============================================================
   作业闯关系统 · 登录/注册 — 移动端优先扁平设计（v5）
   风格：H5 手机适配 / 扁平化 / 干净简约
   主色：由后台「整站风格」统一控制（CSS 变量）
   ============================================================ */

.auth-body {
  overflow-x: hidden;
  background: var(--bg, #f5f7fa);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text, #1f2937);
  min-height: 100dvh;
}
[data-theme="dark"] .auth-body { background: #111827; }
[hidden], .auth-form.hidden { display: none !important; }

.auth-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #f5f7fa);
}
[data-theme="dark"] .auth-app { background: #111827; }

/* ---- H5 Hero 区 ---- */
.auth-app__hero {
  position: relative;
  flex: 0 0 auto;
  height: auto;
  min-height: 24vh;
  max-height: 30vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: calc(28px + var(--safe-top)) 24px 32px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}
[data-theme="dark"] .auth-app__hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); }

/* 装饰光斑（不使用 filter:blur，避免移动端键盘弹起时整页重绘发虚） */
.auth-app__hero::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -30px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,0.32), rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-app__hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,200,200,0.38), rgba(255,200,200,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* 主题切换 UI 已移除：整站风格由后台「系统设置 → 整站风格」统一设置，
   所有用户看到同一套主题，不再由用户自行切换。 */

.auth-app__brand { position: relative; z-index: 2; margin-top: 32px; margin-bottom: 42px; transform: translateY(-20px); animation: brandFadeIn .5s var(--ease) backwards; }
@keyframes brandFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(-20px); } }
.auth-app__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: #fff;
  color: var(--primary);
  margin: 0 auto 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  border: 2px solid rgba(255,255,255,0.6);
  overflow: hidden;
}
.auth-app__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.auth-app__title { font-size: 24px; font-weight: 700; margin: 0 0 2px; color: #fff; letter-spacing: -0.01em; }
.auth-app__subtitle { font-size: 14px; margin: 0; color: rgba(255,255,255,0.9); font-weight: 500; }
.auth-app__features { display: none; }

/* ---- 表单卡片 ---- */
.auth-app__sheet {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  /* 该元素是 <main>，会被 style.css 里主布局的
     min-height: calc(100dvh - var(--nav-height) - var(--safe-top)) 命中，
     但登录页没有顶部导航，会凭空多出一大段灰底，这里必须清零。
     同理 style.css 的 main{padding-top:15px !important} 会顶掉卡片的负 margin 衔接。 */
  min-height: 0;
  padding-top: 0 !important;
}
.auth-app__card {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  margin: -32px 16px 16px;
  padding: 20px 20px 16px;
  color: var(--text, #1f2937);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 24px;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.08));
  animation: fadeInUp .5s var(--ease) .1s backwards;
  overflow-y: auto;
}
[data-theme="dark"] .auth-app__card { background: #1f2937; border-color: #374151; color: #f9fafb; }
.auth-app__card > * { width: 100%; }
.auth-app__handle { display: none; }

.auth-app__card .flash {
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid transparent;
}
.auth-app__card .flash.success { background: #D1FAE5; color: #047857; }
.auth-app__card .flash.error { background: #FEE2E2; color: #B91C1C; }
.auth-app__card .flash.info { background: #DBEAFE; color: #1D4ED8; }
[data-theme="dark"] .auth-app__card .flash.success { background: rgba(16,185,129,0.15); color: #6EE7B7; }
[data-theme="dark"] .auth-app__card .flash.error { background: rgba(239,68,68,0.15); color: #FCA5A5; }
[data-theme="dark"] .auth-app__card .flash.info { background: rgba(59,130,246,0.15); color: #93C5FD; }

/* ---- 漂浮 Toast 提示（短暂显示自动消失） ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastIn .35s ease forwards;
  pointer-events: auto;
  max-width: 88vw;
  white-space: nowrap;
}
.toast.toast--hiding { animation: toastOut .3s ease forwards; }
.toast--error { background: rgba(254,202,202,0.92); color: #991B1B; border: 1px solid rgba(185,28,28,0.2); }
.toast--success { background: rgba(209,250,229,0.92); color: #065F46; border: 1px solid rgba(4,120,97,0.2); }
.toast--info { background: rgba(219,234,254,0.92); color: #1E40AF; border: 1px solid rgba(29,78,216,0.2); }
[data-theme="dark"] .toast--error { background: rgba(127,29,29,0.85); color: #FECACA; border-color: rgba(220,38,38,0.3); }
[data-theme="dark"] .toast--success { background: rgba(6,78,59,0.85); color: #A7F3D0; border-color: rgba(16,185,129,0.3); }
[data-theme="dark"] .toast--info { background: rgba(30,64,175,0.85); color: #BFDBFE; border-color: rgba(59,130,246,0.3); }
.toast__icon { font-size: 16px; flex-shrink: 0; }
.toast__text { line-height: 1.4; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to   { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.95); }
}

/* ---- 选项卡（分段控制器 / Pill 样式） ---- */
.auth-app__tabs {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  border-bottom: none;
  padding: 0;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 0;
}
[data-theme="dark"] .auth-app__tabs { background: #374151; }
.auth-app__tab-indicator { display: none; }
.auth-app__tab {
  position: relative;
  flex: 1;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
}
.auth-app__tab::after {
  content: none;
}
.auth-app__tab:hover { color: var(--text, #1f2937); text-decoration: none; }
.auth-app__tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb),0.3);
}
[data-theme="dark"] .auth-app__tab:hover { color: #f9fafb; }
[data-theme="dark"] .auth-app__tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* ---- 表单输入 ---- */
.auth-form { text-align: left; }
.auth-form.hidden { display: none; }
.auth-input {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  background: transparent;
  border: none;
  padding: 0;
}
.auth-input__icon {
  position: absolute;
  left: 16px;
  z-index: 1;
  font-size: 18px;
  opacity: 0.45;
  pointer-events: none;
  color: var(--text-muted, #9ca3af);
  transition: opacity .2s;
}
.auth-input:focus-within .auth-input__icon { opacity: 0.8; color: var(--primary); }
.auth-input input[type="text"], .auth-input input[type="password"], .auth-input input[type="email"] {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 14px;
  background: var(--bg, #f5f7fa);
  color: var(--text, #1f2937);
  /* 16px 是 iOS Safari 不触发聚焦自动放大的临界值，低于此值聚焦会放大导致“发虚/模糊” */
  font-size: 16px;
  padding: 0 44px 0 44px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
[data-theme="dark"] .auth-input input { background: #111827; border-color: #374151; color: #f9fafb; }
.auth-input input::placeholder { color: var(--text-muted, #9ca3af); }
.auth-input input:hover { border-color: var(--border-strong, #d1d5db); }
.auth-input input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface, #fff);
}
[data-theme="dark"] .auth-input input:focus { background: #1f2937; }
.auth-input__eye {
  position: absolute;
  right: 10px;
  z-index: 2;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.5;
  padding: 8px;
  border-radius: 8px;
  transition: all .2s var(--ease);
  color: var(--text-muted, #9ca3af);
}
.auth-input__eye:hover { opacity: 0.9; background: rgba(var(--primary-rgb),0.08); color: var(--primary); }
.auth-input--captcha { gap: 8px; padding: 0 10px 0 12px; }
.auth-input--captcha input { flex: 1 1 auto; padding: 0 12px !important; height: 48px; }
.auth-input--captcha img { flex: none; border-radius: 8px; cursor: pointer; }
.auth-help { font-size: 12px; color: var(--text-muted, #9ca3af); margin: -6px 0 12px 4px; }

/* 兼容 forgot/reset 页使用的标准表单结构 */
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-icon {
  position: absolute;
  left: 16px;
  z-index: 1;
  font-size: 18px;
  opacity: 0.45;
  pointer-events: none;
  color: var(--text-muted, #9ca3af);
  transition: opacity .2s;
}
.input-icon-wrap input[type="text"],
.input-icon-wrap input[type="password"],
.input-icon-wrap input[type="email"] {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 14px;
  background: var(--bg, #f5f7fa);
  color: var(--text, #1f2937);
  font-size: 16px;
  padding: 0 44px 0 44px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.input-icon-wrap input:focus { outline: none; border-color: var(--primary); background: var(--surface, #fff); }
.input-icon-wrap:focus-within .input-icon { opacity: 0.8; color: var(--primary); }
[data-theme="dark"] .input-icon-wrap input { background: #111827; border-color: #374151; color: #f9fafb; }
[data-theme="dark"] .input-icon-wrap input:focus { background: #1f2937; }
.pwd-toggle {
  position: absolute;
  right: 10px;
  z-index: 2;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.5;
  padding: 8px;
  border-radius: 8px;
  transition: all .2s var(--ease);
  color: var(--text-muted, #9ca3af);
}
.pwd-toggle:hover { opacity: 0.9; background: rgba(var(--primary-rgb),0.08); color: var(--primary); }

/* ---- 选项 / 协议 ---- */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 12px;
}
.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft, #6b7280);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
}
.auth-checkbox input { width: 16px; height: 16px; accent-color: var(--primary); flex: none; border-radius: 4px; }
.auth-link { color: var(--primary); font-weight: 600; font-size: 13px; text-decoration: none; transition: color .15s; }
.auth-link:hover { color: var(--primary-dark); text-decoration: underline; }
.auth-agreement { margin: 0 0 10px; line-height: 1.4; }
.auth-agreement .auth-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted, #9ca3af);
}
.auth-agreement .auth-checkbox input { flex: none; margin-top: 1px; }
.auth-agreement a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-agreement a:hover { text-decoration: underline; }
.auth-agreement__text { white-space: normal; word-break: break-word; }
.auth-agreement__error {
  width: 100%;
  margin: 6px 0 0;
  color: var(--danger, #e11d48);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
  box-sizing: border-box;
}
.auth-agreement.shake { animation: shakeX .4s ease; }
.auth-agreement.shake .auth-checkbox { color: var(--danger, #e11d48); }
.auth-agreement.shake .auth-checkbox input { outline: 2px solid var(--danger, #e11d48); outline-offset: 1px; }

.auth-hint {
  font-size: 13px;
  color: var(--text-soft, #6b7280);
  line-height: 1.6;
  margin: 0 0 16px;
}

/* ---- 主按钮 ---- */
.auth-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.02em;
}
.auth-btn:active { transform: scale(0.98); }
.auth-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb),0.28);
  position: relative;
  overflow: hidden;
}
.auth-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(var(--primary-rgb),0.38); }
.auth-btn--primary:active { transform: translateY(0) scale(0.98); }

/* forgot/reset 页按钮 */
.auth-submit { width: 100%; }

.auth-app__foot {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted, #9ca3af);
}
.auth-app__foot a { font-weight: 600; color: var(--primary); text-decoration: none; transition: color .15s; }
.auth-app__foot a:hover { color: var(--primary-dark); text-decoration: underline; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========== 移动端：hero 弹性吸收剩余高度，卡片保持浮起圆角，底部只留细边 ========== */
@media (max-width: 919px) {
  .auth-app {
    min-height: 100dvh;
    justify-content: flex-start;    /* hero 紧贴顶部，不再整体居中 */
  }
  .auth-app__hero {
    flex: 1 1 auto;                 /* 关键：由 hero 吃掉屏幕剩余高度，底部灰底随之收窄 */
    min-height: 26vh;
    max-height: 35vh;               /* 上限，避免超高屏上蓝色区过分膨胀 */
    justify-content: center;        /* 拉伸时 logo/标题自动垂直居中，不会头重脚轻 */
    padding: calc(48px + var(--safe-top)) 20px 34px;
    border-radius: 0 0 28px 28px;   /* 底部大圆角保持与卡片衔接 */
  }
  .auth-app__logo { width: 64px; height: 64px; font-size: 32px; margin-bottom: 10px; }
  .auth-app__title { font-size: 22px; margin-bottom: 3px; }
  .auth-app__subtitle { font-size: 13px; }
  .auth-app__sheet {
    flex: 0 0 auto;                 /* 卡片区按内容高度，不参与剩余空间分配 */
  }
  .auth-app__card {
    flex: 0 0 auto;                 /* 卡片按内容高度，保持浮起形态、不拉伸到屏底 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;    /* 表单从卡片顶部开始 */
    margin: -35px 16px calc(16px + var(--safe-bottom, 0px));  /* 底部只留细边，兼容全面屏安全区 */
    padding: 16px 18px 18px;
    border-radius: 24px;            /* 四角圆角，恢复卡片浮起观感 */
    overflow: visible;              /* 不内部滚动，内容超长时整页滚动 */
  }
  .auth-app__tabs { margin-bottom: 12px; padding: 3px; border-radius: 10px; }
  .auth-app__tab { padding: 9px 0; font-size: 14px; border-radius: 8px; }
  .auth-input { margin-bottom: 10px; }
  .auth-input input { height: 48px; }
  .auth-btn { height: 48px; }
}

/* ========== 桌面端：左右均衡分屏（全屏铺满） ========== */
@media (min-width: 920px) {
  .auth-app {
    position: relative;
    overflow: hidden;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    gap: 0;
    min-height: 100dvh;
  }

  .auth-app__hero {
    position: relative;
    z-index: 1;
    flex: 1 1 50%;
    min-height: 100dvh;
    height: auto;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 80px 64px;
    border-radius: 0;
    box-shadow: none;
    background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
  }
  [data-theme="dark"] .auth-app__hero { background-image: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); }

  .auth-app__brand {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 22px;
    transform: translateY(-45px);   /* 整体相对当前位置再上移 25px（抵消基础 -20px 后为 -45px） */
    animation: none;                /* 避免与基础 brandFadeIn 的 -20px 关键帧冲突造成跳动 */
  }
  .auth-app__logo { margin: 0; width: 80px; height: 80px; font-size: 40px; border-radius: 22px; flex: none; }
  .auth-app__brand-text { text-align: left; }
  .auth-app__title { font-size: 34px; margin: 0 0 2px; }
  .auth-app__subtitle { font-size: 16px; max-width: 340px; }

  .auth-app__features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    position: relative;
    z-index: 2;
    transform: translateY(-25px);   /* 与品牌组同步上移 25px，保持两者间距不变 */
  }
  .auth-app__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    padding: 10px 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .auth-app__features li > span {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.3);
  }

  /* 右侧独立浅灰/暗色面板，卡片在面板内居中（全屏铺满） */
  .auth-app__sheet {
    position: relative;
    z-index: 3;
    flex: 1 1 50%;
    min-width: 380px;
    min-height: 100dvh;
    align-self: stretch;
    margin: 0;
    padding: 40px;
    background: #f8f9fb;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  [data-theme="dark"] .auth-app__sheet { background: #111827; }

  .auth-app__card {
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 80px);
    margin: 0;
    padding: 40px;
    border-radius: 28px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 24px 70px rgba(0,0,0,.08), 0 8px 28px rgba(var(--primary-rgb),.08);
    overflow-y: auto;
  }
  [data-theme="dark"] .auth-app__card {
    background: rgba(31,41,55,.95);
    border-color: rgba(75,85,99,.45);
    box-shadow: 0 24px 70px rgba(0,0,0,.25), 0 8px 28px rgba(0,0,0,.15);
  }
}

/* ========== 协议弹窗居中 ========== */
.sheet-modal--center { align-items: center; justify-content: center; padding: 16px; }
.sheet-modal--center .sheet-panel {
  margin: 0;
  width: min(92vw, 460px);
  max-height: 80vh;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  background: var(--surface, #fff);
}
[data-theme="dark"] .sheet-modal--center .sheet-panel { background: #1f2937; }
.sheet-modal--center .sheet-handle { display: none; }
.sheet-modal--center .sheet-body { max-height: 54vh; }

/* ---- 小屏手机适配 ---- */
@media (max-width: 360px) {
  .auth-app__hero { padding: calc(6px + var(--safe-top)) 20px 20px; min-height: 18vh; border-radius: 0 0 24px 24px; }
  .auth-app__logo { width: 52px; height: 52px; font-size: 26px; border-radius: 16px; margin-bottom: 8px; }
  .auth-app__title { font-size: 20px; }
  .auth-app__subtitle { font-size: 13px; }
  .auth-app__card { margin: -22px 12px calc(14px + var(--safe-bottom, 0px)); padding: 14px 14px 16px; border-radius: 20px; }
  .auth-input input { height: 46px; font-size: 15px; }
  .auth-btn { height: 46px; font-size: 15px; }
  .auth-app__tabs { padding: 3px; border-radius: 10px; margin-bottom: 10px; }
  .auth-app__tab { font-size: 14px; }
}

/* ---- 短屏手机：从顶部排布，避免居中时顶部被裁切 ---- */
@media (max-height: 700px) {
  .auth-app__hero { min-height: 18vh; padding: calc(2px + var(--safe-top)) 20px 18px; }
  .auth-app__logo { width: 50px; height: 50px; font-size: 25px; margin-bottom: 6px; }
  .auth-app__title { font-size: 20px; }
  .auth-app__card { padding: 14px 16px 12px; }
  .auth-input { margin-bottom: 8px; }
  .auth-input input { height: 46px; }
  .auth-btn { height: 46px; }
}

/* ============================================================
   动态效果：登录页 hero 多种动画（效果已增强，明显可见）
   控制开关：<html data-anim="...">（后台「整站风格 → 动态效果」）
   可选值：none | cloud | aurora | particles | wave | neon
   兼容旧值：<html data-anim="1"> 等效于 cloud
   无障碍：仅当用户未开启系统「减弱动态效果」时生效。
   云朵/光斑使用多层柔光 radial-gradient 缓慢漂移，不使用 filter:blur，
   避免移动端键盘弹起时整页重绘发虚。
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  /* ---------- cloud：云朵飘动 + 渐变流动（苹果风，默认，增强） ---------- */
  [data-anim="1"] .auth-app__hero,
  [data-anim="cloud"] .auth-app__hero {
    background-size: 300% 300%;
    animation: heroGradShift 9s ease infinite;
  }
  [data-anim="1"] .hero-clouds,
  [data-anim="cloud"] .hero-clouds {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
  }
  [data-anim="1"] .hero-clouds::before,
  [data-anim="1"] .hero-clouds::after,
  [data-anim="cloud"] .hero-clouds::before,
  [data-anim="cloud"] .hero-clouds::after {
    content: '';
    position: absolute;
    top: -20%;
    width: 190%;
    height: 160%;
    will-change: transform;
  }
  [data-anim="1"] .hero-clouds::before,
  [data-anim="cloud"] .hero-clouds::before {
    left: -40%;
    background:
      radial-gradient(50% 50% at 18% 28%, rgba(255,255,255,.85), rgba(255,255,255,0) 72%),
      radial-gradient(40% 40% at 58% 58%, rgba(255,255,255,.7), rgba(255,255,255,0) 72%),
      radial-gradient(34% 34% at 40% 86%, rgba(255,255,255,.6), rgba(255,255,255,0) 72%);
    animation: cloudDrift 12s ease-in-out infinite;
  }
  [data-anim="1"] .hero-clouds::after,
  [data-anim="cloud"] .hero-clouds::after {
    right: -40%;
    background:
      radial-gradient(46% 46% at 76% 24%, rgba(255,255,255,.8), rgba(255,255,255,0) 72%),
      radial-gradient(36% 36% at 28% 54%, rgba(255,255,255,.65), rgba(255,255,255,0) 72%);
    animation: cloudDrift2 14s ease-in-out infinite;
  }

  /* ---------- aurora：极光流动（增强，多彩光带明显流动） ---------- */
  [data-anim="aurora"] .auth-app__hero {
    background: linear-gradient(120deg, #7c3aed, #2563eb, #06b6d4, #10b981, #7c3aed);
    background-size: 400% 400%;
    animation: auroraShift 10s ease infinite;
  }
  [data-anim="aurora"] .auth-app__hero::before {
    background: linear-gradient(115deg, transparent 30%, rgba(167,139,250,.65) 45%, rgba(34,211,238,.55) 55%, transparent 70%);
    background-size: 300% 100%;
    animation: auroraBand 8s ease infinite;
  }
  [data-anim="aurora"] .auth-app__hero::after {
    background: linear-gradient(115deg, transparent 20%, rgba(244,114,182,.55) 40%, rgba(52,211,153,.5) 60%, transparent 80%);
    background-size: 300% 100%;
    animation: auroraBand2 11s ease infinite;
  }

  /* ---------- particles：粒子浮点（增强，更多更大更亮） ---------- */
  [data-anim="particles"] .auth-app__hero {
    background-size: 300% 300%;
    animation: heroGradShift 13s ease infinite;
  }
  [data-anim="particles"] .hero-clouds {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
  }
  [data-anim="particles"] .hero-clouds::before,
  [data-anim="particles"] .hero-clouds::after {
    content: '';
    position: absolute;
    inset: -20% 0;
    will-change: transform, opacity;
  }
  [data-anim="particles"] .hero-clouds::before {
    background-image:
      radial-gradient(circle at 12% 86%, rgba(255,255,255,.95) 0, rgba(255,255,255,0) 5px),
      radial-gradient(circle at 38% 92%, rgba(255,255,255,.85) 0, rgba(255,255,255,0) 4px),
      radial-gradient(circle at 62% 88%, rgba(255,255,255,.9) 0, rgba(255,255,255,0) 5px),
      radial-gradient(circle at 86% 94%, rgba(255,255,255,.8) 0, rgba(255,255,255,0) 4px);
    background-size: 100% 130%;
    animation: particlesUp 7s linear infinite;
  }
  [data-anim="particles"] .hero-clouds::after {
    background-image:
      radial-gradient(circle at 24% 90%, rgba(255,255,255,.85) 0, rgba(255,255,255,0) 4px),
      radial-gradient(circle at 74% 84%, rgba(255,255,255,.8) 0, rgba(255,255,255,0) 4px),
      radial-gradient(circle at 50% 96%, rgba(255,255,255,.9) 0, rgba(255,255,255,0) 3px);
    background-size: 100% 120%;
    animation: particlesUp2 9s linear infinite;
  }

  /* ---------- wave：波浪呼吸（增强，幅度更大） ---------- */
  [data-anim="wave"] .auth-app__hero {
    animation: waveBreathe 5s ease-in-out infinite;
  }
  [data-anim="wave"] .auth-app__hero::before {
    background: radial-gradient(circle, rgba(255,255,255,.7), rgba(255,255,255,0) 70%);
    animation: waveMove 7s ease-in-out infinite;
  }
  [data-anim="wave"] .auth-app__hero::after {
    background: radial-gradient(circle, rgba(255,255,255,.6), rgba(255,255,255,0) 70%);
    animation: waveMove2 9s ease-in-out infinite;
  }

  /* ---------- neon：霓虹脉冲（增强，光晕更强） ---------- */
  [data-anim="neon"] .auth-app__hero {
    animation: neonPulse 2.4s ease-in-out infinite alternate;
  }
  [data-anim="neon"] .auth-app__hero::before {
    background: radial-gradient(circle, rgba(255,255,255,.85), rgba(255,255,255,0) 60%);
    animation: neonOrb1 4s ease-in-out infinite;
  }
  [data-anim="neon"] .auth-app__hero::after {
    background: radial-gradient(circle, rgba(255,255,255,.75), rgba(255,255,255,0) 60%);
    animation: neonOrb2 5s ease-in-out infinite;
  }

  /* 主按钮（登录/注册）渐变流动：除关闭外全部生效 */
  [data-anim]:not([data-anim="none"]) .auth-btn--primary {
    background-size: 300% 300%;
    animation: gradShift 7s ease infinite;
  }
}

@keyframes heroGradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes cloudDrift {
  0%   { transform: translate3d(-15%, 0, 0) scale(1.1); }
  50%  { transform: translate3d(20%, -12%, 0) scale(1.3); }
  100% { transform: translate3d(-15%, 0, 0) scale(1.1); }
}
@keyframes cloudDrift2 {
  0%   { transform: translate3d(15%, 0, 0) scale(1.28); }
  50%  { transform: translate3d(-20%, 14%, 0) scale(1.1); }
  100% { transform: translate3d(15%, 0, 0) scale(1.28); }
}
@keyframes auroraShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes auroraBand {
  0%   { background-position: 200% 0; opacity: .95; }
  50%  { background-position: -100% 0; opacity: .5; }
  100% { background-position: 200% 0; opacity: .95; }
}
@keyframes auroraBand2 {
  0%   { background-position: -100% 0; opacity: .85; }
  50%  { background-position: 200% 0; opacity: .4; }
  100% { background-position: -100% 0; opacity: .85; }
}
@keyframes particlesUp {
  0%   { transform: translate3d(0, 0, 0); opacity: .95; }
  100% { transform: translate3d(8%, -75%, 0); opacity: 0; }
}
@keyframes particlesUp2 {
  0%   { transform: translate3d(0, 0, 0); opacity: .9; }
  100% { transform: translate3d(-8%, -85%, 0); opacity: 0; }
}
@keyframes waveBreathe {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
@keyframes waveMove {
  0%,100% { transform: translate3d(-30%, -30%, 0) scale(1.2); }
  50%      { transform: translate3d(15%, 15%, 0) scale(1.8); }
}
@keyframes waveMove2 {
  0%,100% { transform: translate3d(30%, 15%, 0) scale(1.4); }
  50%      { transform: translate3d(-15%, -20%, 0) scale(2); }
}
@keyframes neonPulse {
  0%   { filter: brightness(1); box-shadow: inset 0 0 0 rgba(255,255,255,0); }
  100% { filter: brightness(1.3); box-shadow: inset 0 0 140px rgba(255,255,255,.45); }
}
@keyframes neonOrb1 {
  0%,100% { transform: translate3d(-25%, -25%, 0) scale(1.2); opacity: .9; }
  50%      { transform: translate3d(60%, 50%, 0) scale(1.9); opacity: .3; }
}
@keyframes neonOrb2 {
  0%,100% { transform: translate3d(25%, 15%, 0) scale(1.4); opacity: .8; }
  50%      { transform: translate3d(-50%, -40%, 0) scale(2.2); opacity: .2; }
}
