/* =====================================================================
   学阅平台登录页样式 v3.6 —— 2026-09-19 忘记密码弹窗交互
   设计要点: 高透玻璃大卡片(背景清晰透出) + 等高面板(页签切换零跳动) +
            面板原生完整边框(四角连续圆弧) + 页签描边/居中下划线 +
            按钮循环扫光 + 页面级氛围动画
   v3.5: 新增 :-webkit-autofill/:autofill 规则,浏览器自动填入账号密码时
         输入框观感与手工输入一致(盖住内部浅蓝底色,恢复白字/白图标)
   v3.6: 找回密码弹窗改为屏幕居中;预设问题/问题答案 label 后支持红色
         行内提示(旋转小图标+文字);新密码框默认禁用由 JS 按验证结果启用
   说明: 类名/ID 与 login.js、example.js 的选择器保持兼容;
        #userLogin/#login_container 的显隐由内联 style 切换,这里只做外观。
   ===================================================================== */

:root {
  --panel-h: 480px; /* 账号面板与扫码面板共用的等高面板高度(容纳 300x400 二维码) */
  --qr-scale: 1;
  --edge-color: rgba(255, 255, 255, 0.45);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  color: #ffffff;
  background: #001422 url('../img/new/background_1280.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* 大屏使用高清背景 */
@media (min-width: 1600px) {
  body {
    background-image: url('../img/new/background_2560.jpg');
  }
}

/* ---- 背景氛围光点(两个漂移的柔光球,纯装饰) ---- */
body::before,
body::after {
  content: '';
  position: fixed;
  z-index: 1;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  pointer-events: none;
}

body::before {
  left: -14vmax;
  top: -10vmax;
  background: radial-gradient(circle at 50% 50%, rgba(64, 166, 255, 0.3), transparent 62%);
  animation: orb-drift-a 16s ease-in-out infinite alternate;
}

body::after {
  right: -16vmax;
  bottom: -12vmax;
  background: radial-gradient(circle at 50% 50%, rgba(126, 92, 255, 0.26), rgba(58, 212, 222, 0.14) 45%, transparent 66%);
  animation: orb-drift-b 19s ease-in-out infinite alternate;
}

@keyframes orb-drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(9vmax, 7vmax, 0) scale(1.12);
  }
}

@keyframes orb-drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.06);
  }
  to {
    transform: translate3d(-8vmax, -6vmax, 0) scale(0.94);
  }
}

#container {
  display: none; /* 旧版遗留容器 */
}

/* ============ 外层玻璃卡片(v3: 更透,背景灯光清晰透出) ============ */
.wrapper {
  position: relative;
  display: flex;
  width: min(1180px, 92vw);
  height: min(670px, 80vh);
  min-height: 520px;
  margin: auto; /* body 为 flex 时保证内容超高可滚动 */
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 28px;
  background: linear-gradient(120deg, rgba(125, 170, 225, 0.1) 0%, rgba(88, 138, 205, 0.05) 48%, rgba(170, 215, 250, 0.13) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
  box-shadow: 0 30px 80px rgba(0, 16, 40, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 70px rgba(150, 200, 255, 0.05);
  overflow: hidden;
  z-index: 3;
  animation: card-in 0.9s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============ 左侧品牌区(整体水平居中, 白色文字, 入场分级 + 浮动) ============ */
.brand-panel {
  flex: 0 0 54%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 32px;
  min-width: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 34px);
  animation: brand-float 6s ease-in-out infinite, fade-up 0.8s 0.15s both;
}

@keyframes brand-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-book {
  width: clamp(90px, 10.5vw, 150px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0, 25, 60, 0.45));
}

.brand-name {
  font-size: clamp(52px, 6.4vw, 100px);
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-shadow: 0 4px 20px rgba(0, 25, 60, 0.55);
}

.brand-subtitle {
  margin-top: clamp(18px, 2.6vh, 32px);
  font-size: clamp(17px, 1.6vw, 25px);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 25, 60, 0.6);
  animation: fade-up 0.8s 0.3s both;
}

/* 标签行(理论课程 | 实践课程 | 编程评测) */
.brand-tags {
  margin-top: clamp(16px, 2.4vh, 30px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: clamp(13px, 1.05vw, 17px);
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 8px rgba(0, 25, 60, 0.6);
  animation: fade-up 0.8s 0.45s both;
}

.brand-tags span {
  white-space: nowrap;
  letter-spacing: 0.06em;
}

.brand-tags span:not(:last-child)::after {
  content: '|';
  margin: 0 clamp(10px, 1.3vw, 20px);
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

/* ============ 右侧表单区 ============ */
.main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 52px 34px 18px;
  min-width: 0;
}

.form {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  animation: fade-up 0.8s 0.35s both;
}

/* ---- 页签(v3.4: 页签坐在面板完整顶边线上——左右/顶描边落在线条上形成 T 形连接,
        底边不设描边避免双线;面板四角原生 24px 圆角,与左下/右下形式一致) ---- */
.tabBox {
  text-align: left;
}

.login-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-left: 32px; /* 首个页签落在面板顶边平直段(>左上圆角切点 24px) */
  margin-bottom: 0; /* 页签底边正好落在面板顶边线上 */
  position: relative;
  z-index: 2;
}

.tab {
  position: relative;
  padding: 10px 24px 16px;
  font-size: 17px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--edge-color); /* 左右/顶描边与面板边框同色,落点自然连接 */
  border-bottom: none; /* 底边交给面板顶边线,避免双线 */
  border-radius: 16px 16px 0 0;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
}

.tab-active {
  color: #ffffff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09); /* 与面板底色一致,内部无接缝 */
  border-color: rgba(255, 255, 255, 0.55);
}

/* 屏蔽 login_ercode.css 全局 `.tab-active::before` 的通栏蓝色条(下划线歪的根源) */
.tabBox .tab::before {
  content: none !important;
  display: none !important;
}

/* 激活页签文字正下方的白色短下划线:左右内缩=页签左右内边距,保证与文字居中对齐 */
.tabBox .tab-active::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 8px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(207, 231, 255, 0.65), #ffffff);
}

/* 右上角悬浮切换角标:原稿无此元素,隐藏(example.js 切换逻辑不受影响) */
.ercode_tab {
  display: none !important;
}

/* ---- 等高玻璃面板:账号表单 与 微信扫码容器 共用同一尺寸规格,切换零跳动 ----
   边框用原生 border(非 inset shadow):四角均为连续 24px 圆弧,线条不断开;
   页签左右描边正好坐落在顶边线上,形成"页签边框与面板边框连接"的观感。 */
.login-panel,
#login_container {
  position: relative;
  box-sizing: border-box;
  height: var(--panel-h);
  border: 1px solid var(--edge-color);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.09);
  padding: 36px 30px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---- 输入区 ---- */
.item {
  position: relative;
  margin-bottom: 20px;
}

/* 服务器选择仅多服务器部署时启用(body 加 hide-server 类即隐藏) */
.hide-server .server-item {
  display: none;
}

#login .item label {
  display: none; /* 设计稿采用占位符,不显示 label(保留在 DOM 中供脚本与无障碍) */
}

#resetPwd .item label,
#forgetPwd .item label {
  display: block;
  padding-bottom: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

input[type='text'].tb,
input[type='password'].tb,
input[type='email'].tb,
select.tb {
  width: 100%;
  height: 52px;
  line-height: 50px;
  padding: 0 18px 0 48px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 16px; /* ≥16px 防止 iOS 聚焦自动放大 */
  outline: none;
  box-shadow: inset 0 1px 4px rgba(0, 20, 50, 0.18);
  transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.field-pwd input.tb {
  padding-right: 48px; /* 预留右侧眼睛按钮位 */
}

/* 密码可见性切换按钮(睁眼=明文, 闭眼=密文),由页内脚本控制 .revealed 状态 */
.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.pwd-toggle:hover,
.pwd-toggle:focus-visible {
  color: #ffffff;
  outline: none;
}

.pwd-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.pwd-toggle .icon-eye-open {
  display: none;
}

.pwd-toggle.revealed {
  color: #9fd0ff;
}

.pwd-toggle.revealed .icon-eye-open {
  display: block;
}

.pwd-toggle.revealed .icon-eye-closed {
  display: none;
}

#resetPwd input.tb,
#forgetPwd input.tb,
#login .server-item select.tb {
  padding-left: 18px;
}

input.tb::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

input.tb:focus,
select.tb:focus {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(120, 190, 255, 0.35);
}

/* ---- 浏览器自动填充样式与手工输入保持一致 ----
   Chrome/Edge 的自动填充浅蓝背景由浏览器内部样式绘制,页面 CSS 无法用
   background-color 覆盖,只能用超大半径 inset box-shadow 盖住;
   文字/光标颜色用 -webkit-text-fill-color / caret-color 恢复白色。
   --autofill-cover 为不透明"合成色":等于正常态 rgba(255,255,255,0.1) 玻璃底
   叠加背景图后的实测观感(背景图光晕上下渐变,两个字段各取 1280/1920 两档
   视口取样均值);若更换背景图,需重新取样同步更新这两个值。 */
input.tb {
  --autofill-cover: #5aadfd; /* 兜底:重设/找回密码面板等无专属取样的输入框 */
}

/* 专属取样色必须直接挂在输入框上:若定义在 .field-name/.field-pwd 父级,
   会被 input.tb 自身的兜底值(元素自身声明优先于继承)覆盖而不生效 */
.field-name input.tb {
  --autofill-cover: #5a96fd;
}

.field-pwd input.tb {
  --autofill-cover: #5ac4fd;
}

input.tb:-webkit-autofill,
input.tb:-webkit-autofill:hover,
input.tb:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  /* 顶部内阴影列在前(叠在上层),保留正常态的立体描边;1000px inset 盖住内部填充底色 */
  -webkit-box-shadow: inset 0 1px 4px rgba(0, 20, 50, 0.18), inset 0 0 0 1000px var(--autofill-cover);
  box-shadow: inset 0 1px 4px rgba(0, 20, 50, 0.18), inset 0 0 0 1000px var(--autofill-cover);
  transition: background-color 99999s ease-in-out 0s, border-color 0.2s, box-shadow 0.2s; /* 超长过渡冻结填充底色变化 */
}

input.tb:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  border-color: rgba(255, 255, 255, 0.85);
  -webkit-box-shadow: inset 0 1px 4px rgba(0, 20, 50, 0.18), inset 0 0 0 1000px var(--autofill-cover), 0 0 0 3px rgba(120, 190, 255, 0.35);
  box-shadow: inset 0 1px 4px rgba(0, 20, 50, 0.18), inset 0 0 0 1000px var(--autofill-cover), 0 0 0 3px rgba(120, 190, 255, 0.35);
}

/* Firefox 标准伪类:其内部还会用 filter 压暗填充框,一并还原 */
input.tb:autofill {
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  caret-color: #ffffff;
  filter: none;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 4px rgba(0, 20, 50, 0.18), inset 0 0 0 1000px var(--autofill-cover);
}

/* 输入框左侧白色图标 —— 用 mask 把旧蓝色图标染成白色 */
.field-name::before,
.field-pwd::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  pointer-events: none;
}

.field-name::before {
  -webkit-mask: url('user.png') no-repeat center / contain;
  mask: url('user.png') no-repeat center / contain;
}

.field-pwd::before {
  -webkit-mask: url('password.png') no-repeat center / contain;
  mask: url('password.png') no-repeat center / contain;
}

/* ---- 登录按钮(蓝色渐变胶囊 + 循环扫光) ---- */
.btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 56px;
  display: block;
  border: 0;
  border-radius: 28px;
  background-color: #2e82ee;
  background-image: linear-gradient(180deg, #4aacf7 0%, #3c96f2 45%, #2e82ee 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  line-height: 56px;
  text-align: center;
  outline: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(30, 110, 220, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  margin: 28px 0 0;
  padding: 0;
}

/* 光带从左到右循环扫过按钮 */
.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.16) 30%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.16) 70%, transparent 100%);
  transform: translateX(-260%) skewX(-22deg);
  animation: btn-shine 3s cubic-bezier(0.5, 0.05, 0.4, 0.95) infinite;
  pointer-events: none;
}

@keyframes btn-shine {
  0% {
    transform: translateX(-260%) skewX(-22deg);
  }
  55% {
    transform: translateX(330%) skewX(-22deg);
  }
  100% {
    transform: translateX(330%) skewX(-22deg);
  }
}

.btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(30, 110, 220, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled] {
  background-color: #5a7d9c !important;
  /* 加载态:灰蓝底色由静态改为渐变缓慢流动(indeterminate 进度感) */
  background-image: linear-gradient(110deg, #4d6f8d 0%, #5a7d9c 25%, #6d92b3 50%, #5a7d9c 75%, #4d6f8d 100%) !important;
  background-size: 220% 100%;
  animation: btn-loading-flow 2.4s linear infinite;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

@keyframes btn-loading-flow {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

.btn[disabled]::after {
  display: none;
}

/* 按钮内的进度小图标:白色圆环,按钮 [disabled](如"登录中...")时显示旋转 */
.btn i {
  display: none;
  vertical-align: middle;
  margin-right: 8px;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
}

.btn[disabled] i {
  display: inline-block;
  /* 旋转 + 呼吸,双动画叠加(transform/opacity 互不冲突) */
  animation: rotation 0.8s linear infinite, ring-pulse 1.6s ease-in-out infinite; /* 快于 .rotation 默认 2s,圆环更跟手 */
}

@keyframes ring-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* "登录中"后的动态省略号:三个圆点依次上浮闪烁(login.js 注入 .loading-dots 结构) */
.btn .loading-dots {
  letter-spacing: normal;
  text-indent: 0;
}

.btn .loading-dots .dot {
  display: inline-block;
  opacity: 0;
  animation: login-dot 1.2s ease-in-out infinite;
}

.btn .loading-dots .dot:nth-child(1) {
  animation-delay: 0s;
}

.btn .loading-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.btn .loading-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes login-dot {
  0% {
    opacity: 0;
    transform: translateY(2px);
  }

  30% {
    opacity: 1;
    transform: translateY(-1px);
  }

  60% {
    opacity: 0;
    transform: translateY(-2px);
  }

  100% {
    opacity: 0;
    transform: translateY(-2px);
  }
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.rotation {
  animation: rotation 2s linear infinite;
}

/* ---- 忘记密码(按钮下方右对齐) ---- */
.other-info {
  display: flex;
  justify-content: flex-end;
  margin: 12px 2px 4px 0;
  font-size: 13.5px;
}

.other-info a {
  color: #cfe4ff; /* 提亮并偏蓝,深/浅背景区都可读,与页面蓝色玻璃主题协调 */
  text-decoration: none;
  cursor: pointer; /* 无 href 的 <a> 需显式手型 */
  font-size: 14px;
  transition: color 0.2s, text-shadow 0.2s;
  text-shadow: 0 1px 4px rgba(0, 15, 40, 0.5);
}

.other-info a:hover,
.other-info a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  outline: none;
}

/* ---- 微信扫码容器(等高面板见上;iframe 绝对居中,与面板尺寸解耦) ---- */
#login_container {
  position: relative;
  overflow: hidden;
}

#login_container iframe {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 0;
  transform: translate(-50%, -50%) scale(var(--qr-scale));
}

/* 页签切换时两个面板淡入(元素由 display 切换重新显示,动画随之重放) */
#userLogin,
#login_container {
  animation: panel-fade 0.3s ease both;
}

@keyframes panel-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---- 重设密码 / 找回密码 面板(独立玻璃面板) ---- */
#userLogin h1 {
  display: none; /* 账号登录面板:标签页即标题 */
}

#resetPwd,
#forgetPwd {
  display: none;
  padding: 34px 30px 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
}

#resetPwd h1,
#forgetPwd h1 {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  line-height: 1.5;
  margin: 0 0 24px;
  border: 0;
}

#forgetPwd p {
  color: rgba(255, 255, 255, 0.85) !important;
}

#forgetPwd .back {
  float: none;
  display: inline-block;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---- 页脚 ---- */
.footpage {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  background: none;
}

.foot-text {
  text-align: center;
  padding: 14px 0 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 10, 25, 0.9), 0 0 2px rgba(0, 10, 25, 0.8);
}

/* ---- 找回密码弹窗按钮(bootstrap 白色弹窗内,保持深色) ---- */
.btn-modal {
  border-radius: 10px;
  padding: 6px 18px;
  font-size: 14px;
  cursor: pointer;
}

.btn-modal-default {
  border: 1px solid #c5d4de;
  background-color: #ffffff;
  color: #4a6b84;
}

.btn-modal-primary {
  border: 1px solid #2b87ea;
  background-color: #2b87ea;
  color: #ffffff;
}

/* ---- 找回密码弹窗(#myModal):页面 body 文字为白色(深色玻璃主题),
   Bootstrap 弹窗是白色卡片,标题/标签/关闭钮会继承白字而"隐形",此处显式给深色 ---- */
#myModal .modal-content {
  color: #1a1a1a;
  border: none;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 10, 30, 0.55);
}

#myModal .modal-header {
  border-bottom: 1px solid #ebebeb;
}

#myModal .modal-title {
  color: #1a1a1a; /* 关键修复:原继承 body 白色,白底白字不可见 */
  font-weight: 700;
}

#myModal .close {
  color: #8a97a8;
  opacity: 1;
  text-shadow: none;
}

#myModal .close:hover,
#myModal .close:focus {
  color: #1a1a1a;
}

#myModal .modal-body label {
  color: #4a5568;
  font-size: 14px;
}

#myModal .form-control {
  color: #1a1a1a;
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  box-shadow: none;
}

#myModal .form-control:focus {
  border-color: #7fb7ff;
  box-shadow: 0 0 0 3px rgba(127, 183, 255, 0.35);
  outline: none;
}

#myModal .modal-footer {
  border-top: 1px solid #ebebeb;
}

/* 弹窗垂直居中:仅在 .in(显示中)时改 flex,不影响 Bootstrap 用内联 display 控制显隐;
   子级 .modal-dialog 用 margin:auto 保证弹窗高于视口时也能安全滚动不裁切 */
#myModal.in {
  display: flex !important;
}

#myModal .modal-dialog {
  margin: auto;
}

/* 找回密码弹窗:label 后的红色行内提示(旋转小图标 + 文字),由 login.js 显隐 */
#myModal .inline-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  color: #d93831; /* 提示文字为红色 */
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

#myModal .inline-hint .hint-spinner {
  width: 12px;
  height: 12px;
  flex: none;
  border: 2px solid rgba(217, 56, 49, 0.25);
  border-top-color: #d93831;
  border-radius: 50%;
  display: inline-block;
  animation: rotation 0.8s linear infinite; /* 复用文件内已有的 rotation 关键帧 */
}

/* 找回密码弹窗内的新密码/确认新密码:右侧小眼睛切换按钮(结构同主登录框,
   但弹窗输入框是白底,图标颜色需用深色系) */
#myModal .pwd-input-wrap {
  position: relative; /* 小眼睛绝对定位的锚点:只包输入框,图标相对输入框垂直居中 */
}

#myModal .pwd-input-wrap .form-control {
  padding-right: 42px; /* 给右侧小眼睛留位,避免文字压在图标下 */
}

#myModal .pwd-toggle {
  color: #8a97a8; /* 白底上的深灰,与弹窗关闭按钮同色 */
}

#myModal .pwd-toggle:hover,
#myModal .pwd-toggle:focus-visible {
  color: #1a1a1a;
}

#myModal .pwd-toggle.revealed {
  color: #2b87ea; /* 明文状态用弹窗主按钮蓝,白底上清晰 */
}

/* =====================================================================
   响应式适配
   ===================================================================== */

/* 平板竖屏及以下:卡片改单列纵向,页面可滚动 */
@media (max-width: 1023px) {
  body {
    display: block;
    background-attachment: scroll; /* iOS 下 fixed 背景抖动问题 */
  }

  .wrapper {
    flex-direction: column;
    width: min(460px, 92vw);
    height: auto;
    min-height: 0;
    margin: 40px auto 64px;
    background: linear-gradient(165deg, rgba(110, 158, 215, 0.2) 0%, rgba(80, 130, 200, 0.14) 55%, rgba(150, 200, 245, 0.2) 100%);
  }

  .brand-panel {
    padding: 44px 24px 6px;
  }

  .brand-logo {
    gap: 16px;
  }

  .brand-book {
    width: clamp(70px, 18vw, 110px);
  }

  .brand-name {
    font-size: clamp(40px, 11vw, 64px);
  }

  .brand-subtitle {
    margin-top: 18px;
  }

  .brand-tags {
    margin-top: 16px;
  }

  .main {
    padding: 18px 30px 38px;
  }

  .login-tabs {
    margin-left: 28px;
  }

  .footpage {
    display: none;
  }
}

/* 手机:卡片铺满屏幕,内容更紧凑 */
@media (max-width: 480px) {
  .wrapper {
    width: 100vw;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    min-height: 100vh;
    background: linear-gradient(170deg, rgba(70, 115, 175, 0.34) 0%, rgba(52, 95, 155, 0.28) 55%, rgba(95, 150, 210, 0.34) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }

  .brand-panel {
    padding-top: 44px;
  }

  .brand-tags {
    display: none;
  }

  .main {
    padding: 10px 22px 40px;
  }

  .login-tabs {
    gap: 2px;
  }

  .tab {
    padding: 8px 18px 14px;
    font-size: 15px;
  }

  .tabBox .tab-active::after {
    left: 18px;
    right: 18px;
  }

  .login-panel,
  #login_container {
    padding: 24px 20px;
  }

  .form {
    max-width: none;
  }
}

/* PC 低高度(小笔记本/横屏矮窗口):压缩垂直留白,面板变矮、二维码整体缩放 */
@media (min-width: 1024px) and (max-height: 760px) {
  :root {
    --panel-h: 350px;
    --qr-scale: 0.8;
  }

  .brand-panel {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .brand-subtitle {
    margin-top: 12px;
  }

  .brand-tags {
    margin-top: 12px;
  }

  .login-tabs .tab {
    padding-top: 8px;
    padding-bottom: 12px;
  }

  .login-panel,
  #login_container {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .item {
    margin-bottom: 14px;
  }

  input[type='text'].tb,
  input[type='password'].tb,
  input[type='email'].tb,
  select.tb {
    height: 46px;
    line-height: 44px;
  }

  .btn {
    height: 48px;
    line-height: 48px;
    border-radius: 24px;
    margin-top: 18px;
  }
}

/* 超宽屏:卡片适当放大 */
@media (min-width: 2200px) {
  .wrapper {
    width: min(1500px, 86vw);
    height: min(780px, 74vh);
  }

  .form {
    max-width: 480px;
  }
}

/* 尊重系统"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- 全站通知横幅(#006 FR-8):登录页顶端显示生效中的通知,样式与站内横幅一致 ---- */
#globalNoticeBanner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1300;
  background: linear-gradient(90deg, #ff8a00, #e52e2e);
  color: #ffffff;
  font-weight: bold;
  font-size: 15px;
  line-height: 24px;
  padding: 6px 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  white-space: nowrap;
}

#globalNoticeBanner .notice-icon {
  display: inline-block;
  margin-right: 8px;
  transform-origin: center;
  animation: bitNoticeIconPulse 1.6s ease-in-out infinite;
}

/* ---- 通知横幅动态效果(#009):内容超宽时无缝跑马灯,悬停暂停,不超宽保持静态 ---- */
#globalNoticeBanner .notice-track {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

#globalNoticeBanner .notice-track.bit-notice-marquee {
  animation: bitNoticeMarquee linear infinite;
}

#globalNoticeBanner:hover .notice-track.bit-notice-marquee {
  animation-play-state: paused;
}

/* 半份内容:右侧留白成为循环间隔,保证两份内容拼接后无缝 */
#globalNoticeBanner .notice-half {
  padding-right: 80px;
}

/* 多条通知在同一滚动流中的分隔符 */
#globalNoticeBanner .notice-sep {
  margin: 0 18px;
  opacity: 0.9;
}

@keyframes bitNoticeMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes bitNoticeIconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  #globalNoticeBanner .notice-track.bit-notice-marquee,
  #globalNoticeBanner .notice-icon {
    animation: none;
  }
}

/* ---- 021 方案A:本机微信一键登录(扫码面板底部覆盖层,显隐由 login.html 页底脚本切换) ---- */
.wx-oneclick-zone {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.wx-oneclick-btn {
  box-sizing: border-box;
  padding: 9px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 1px;
  color: #06301f;
  background: linear-gradient(180deg, #4fe08a, #2fb7d8);
  box-shadow: 0 4px 14px rgba(47, 183, 216, 0.35);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.wx-oneclick-btn:hover,
.wx-oneclick-btn:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.wx-oneclick-btn:active {
  transform: scale(0.97);
}

.wx-oneclick-hint {
  margin: 0;
  max-width: 300px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(237, 246, 255, 0.85);
  text-shadow: 0 1px 3px rgba(6, 30, 55, 0.55);
}

@media (max-width: 768px) {
  .wx-oneclick-zone {
    bottom: 14px;
  }
}

