* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Segoe UI", Arial, Roboto, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
}

.flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-direction {
  flex-direction: column;
}

.hover-highlight {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.hover-highlight:hover {
  opacity: 0.85;
}

/* ====== 主容器 ====== */
.login-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.login-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ====== 登录布局层 ====== */
.login {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* ====== 角落覆盖层 ====== */
.corner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 19px 28px 20px;
  margin: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.corner .top,
.corner .butom {
  pointer-events: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ====== 语言选择器 ====== */
.lang {
  display: flex;
  align-items: center;
  width: fit-content;
  height: 39px;
  border-radius: 39px;
  white-space: nowrap;
  padding: 4px 8px;
  background: linear-gradient(180deg, hsla(0,0%,100%,0.5), #ffffff);
  box-shadow: 0 1px 4px 0 rgba(149,108,43,0.2), inset 0 1px 0 0 #ffffff;
  cursor: pointer;
  position: relative;
}

.lang .icon {
  width: 31px;
  height: 31px;
  border-radius: 31px;
  object-fit: cover;
  background: none;
  box-shadow: unset;
  padding: 0;
}

.lang span {
  font-size: 18px;
  color: #956c2b;
  font-weight: 400;
  font-family: "PingFang SC", sans-serif;
}

.lang .arrow {
  width: auto;
  height: 10px;
  margin-left: 10px;
}

/* ====== 声音图标 ====== */
.icon2 {
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, hsla(0,0%,100%,0.5), #ffffff);
  box-shadow: 0 1px 4px 0 rgba(149,108,43,0.2), inset 0 1px 0 0 #ffffff;
  border-radius: 3px;
  padding: 5px 8px;
  height: fit-content;
  cursor: pointer;
}

.icon2 img {
  height: 38px;
  width: auto;
}

/* ====== 后台管理 ====== */
.manage {
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, hsla(0,0%,100%,0.5), #ffffff);
  box-shadow: 0 1px 4px 0 rgba(149,108,43,0.2), inset 0 1px 0 0 #ffffff;
  border-radius: 3px;
  padding: 5px 8px;
  height: fit-content;
  cursor: pointer;
}

.manage img {
  height: 26px;
  width: auto;
}

.manage span {
  font-family: "PingFang SC", sans-serif;
  color: #956c2b;
  font-size: 18px;
  line-height: 18px;
  margin-left: 6px;
  white-space: nowrap;
}

/* ====== 客服 ====== */
.service {
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, hsla(0,0%,100%,0.5), #ffffff);
  box-shadow: 0 1px 4px 0 rgba(149,108,43,0.2), inset 0 1px 0 0 #ffffff;
  border-radius: 3px;
  padding: 5px 8px;
  height: fit-content;
  cursor: pointer;
}

.service img {
  height: 26px;
  width: auto;
}

.service span {
  font-family: "PingFang SC", sans-serif;
  color: #956c2b;
  font-size: 18px;
  line-height: 18px;
  margin-left: 6px;
  white-space: nowrap;
}

/* ====== 版本号 ====== */
.version {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%);
  display: flex;
  align-items: center;
}

.version span {
  font-size: 13px;
  color: #c5a36d;
  margin-left: 0;
  font-family: "PingFang SC", sans-serif;
}

.butom {
  position: relative;
}

/* ====== 内容区 ====== */
.content {
  width: 682px;
  position: relative;
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

/* ====== Logo ====== */
.logo {
  max-width: 215px;
  max-height: 190px;
  display: block;
  margin-bottom: 15px;
  object-fit: contain;
}

/* ====== 登录框 ====== */
.bg-login-box {
  width: 100%;
  height: 350px;
  background: url('../images/bg_dialog.png') no-repeat center center;
  background-size: 100% 100%;
  padding: 60px 85px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ====== 输入框容器 ====== */
.account, .password {
  width: 100%;
  height: 58px;
  background: rgba(0, 0, 0, 0.502);
  border-radius: 6px;
  box-shadow: 0 1px 0 0 hsla(0,0%,100%,0.502);
  display: flex;
  align-items: center;
  position: relative;
}

/* ====== Vant Field 样式 ====== */
.van-cell {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.van-cell--center {
  align-items: center;
}

.van-field {
  position: relative;
}

.van-field__label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  flex-shrink: 0;
  margin-right: var(--van-field-label-margin-right, 12px);
}

.account .van-field__label .left-ic {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.password .van-field__label .left-ic {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.van-field__control {
  flex: 1;
  display: flex;
  align-items: center;
}

.van-field__control--fit {
  width: 100%;
  height: 24px;
  font-size: 18px;
  color: #c5a36d;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  font-family: inherit;
  line-height: 24px;
}

.van-field__control--fit::placeholder {
  color: #c5a36d;
  font-size: 18px;
}

.password .right-ic {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: auto;
  object-fit: cover;
  cursor: pointer;
}

/* ====== 登录按钮区域 ====== */
.to-login {
  width: 100%;
  display: flex;
  gap: 30px;
}

.button {
  flex: 1;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  background: radial-gradient(59.96% 117.92% at 37.71% 0px, #fff4bb 0%, #eabc2b 100%);
  box-shadow: 
    inset 1px 1px 1px 0 hsla(0,0%,100%,0.149),
    inset -1px -1px 1px 0 rgba(0,0,0,0.302),
    0 2px 4px 0 rgba(0,0,0,0.149);
  transition: all 0.15s ease;
  line-height: 50px;
  text-align: center;
  position: relative;
}

.button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

.button span {
  font-size: 20px;
  color: #583a0f;
  font-weight: 400;
  line-height: 100%;
}

/* ====== 右侧浮动按钮 ====== */
.h5-code, .app-code, .line-check-par {
  position: absolute;
  height: 35px;
  min-width: 120px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, hsla(0,0%,100%,0.5), #ffffff);
  border-radius: 5px;
  font-size: 18px;
  line-height: 25px;
  color: #956c2b;
  cursor: pointer;
  box-shadow: 0 1px 4px 0 rgba(149,108,43,0.2), inset 0 1px 0 0 #ffffff;
  z-index: 8;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.h5-code:hover, .app-code:hover, .line-check-par:hover {
  filter: brightness(1.05);
  transform: translateY(-50%) translateX(2px);
}

.h5-code {
  top: calc(30% - 35px);
  right: 30px;
  transform: translateY(-50%);
}

.app-code {
  top: calc(30% + 35px);
  right: 30px;
  transform: translateY(-50%);
}

.line-check-par {
  top: calc(30% + 95px);
  right: 30px;
  transform: translateY(-50%);
}

.h5-code img, .app-code img, .line-check-par img {
  width: 25px;
  height: auto;
  object-fit: contain;
}

.h5-code span, .app-code span, .line-check-par span {
  font-size: 18px;
  line-height: 25px;
  color: #956c2b;
  font-weight: 400;
}

/* ====== Toast提示（Vant风格） ====== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  font-family: "PingFang SC", sans-serif;
  text-align: center;
  max-width: 80%;
  line-height: 1.5;
}

.toast.active {
  opacity: 1;
  visibility: visible;
}

/* ====== 登录按钮加载状态 ====== */
.button.loading {
  pointer-events: none;
  opacity: 0.8;
}

.button.loading span {
  opacity: 0;
}

.button.loading::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(88, 58, 15, 0.3);
  border-top-color: #583a0f;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====== 输入框错误抖动 ====== */
.account.error, .password.error {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ====== 通用弹窗遮罩（van-overlay风格） ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #1a1a1a;
  border: 1px solid rgba(197, 163, 109, 0.3);
  border-radius: 12px;
  padding: 24px;
  min-width: 320px;
  max-width: 420px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c5a36d;
  font-size: 20px;
  border-radius: 50%;
  transition: background 0.2s;
  background: none;
  border: none;
  font-family: inherit;
  line-height: 1;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(197, 163, 109, 0.15);
}

.modal-title {
  text-align: center;
  color: #eabc2b;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 18px;
  font-family: "PingFang SC", sans-serif;
}

/* ====== 滑块验证码 ====== */
.captcha-box {
  width: 340px;
}

.captcha-image-area {
  position: relative;
  width: 100%;
  height: 180px;
  background: #333;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.captcha-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-slider-img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: contain;
}

.captcha-slider-track {
  position: relative;
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
}

.captcha-slider-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: rgba(76, 175, 80, 0.3);
  border-radius: 20px;
  transition: none;
}

.captcha-slider-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  background: #eabc2b;
  border-radius: 50%;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #583a0f;
  font-size: 18px;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.captcha-slider-handle:active {
  cursor: grabbing;
}

.captcha-slider-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
  font-size: 13px;
  font-family: "PingFang SC", sans-serif;
  pointer-events: none;
  white-space: nowrap;
}

.captcha-tip {
  text-align: center;
  color: #c5a36d;
  font-size: 13px;
  margin-top: 10px;
  font-family: "PingFang SC", sans-serif;
}

/* ====== 右侧Popover（H5/APP左侧弹出） ====== */
.popover {
  position: absolute;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.2s ease;
}

.popover.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.popover::before {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 7px 0 7px 7px;
  border-color: transparent transparent transparent #fff;
}

.qr-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-code-img {
  width: 150px;
  height: 150px;
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qr-code-img canvas {
  width: 150px !important;
  height: 150px !important;
}

.qr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.qr-text {
  color: #956c2b;
  font-size: 13px;
  font-family: "PingFang SC", sans-serif;
  text-align: center;
}

/* ====== 线路检测弹窗 ====== */
.line-check-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.line-check-overlay.active {
  opacity: 1;
  visibility: visible;
}

.line-check-box {
  background: #1a1a1a;
  border: 1px solid rgba(197, 163, 109, 0.3);
  border-radius: 12px;
  padding: 24px;
  width: 420px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.line-check-overlay.active .line-check-box {
  transform: scale(1);
}

.line-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.line-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(197, 163, 109, 0.1);
  border-radius: 8px;
  transition: all 0.2s;
}

.line-check-item.api {
  cursor: pointer;
}

.line-check-item.api:hover {
  background: rgba(197, 163, 109, 0.1);
  border-color: rgba(197, 163, 109, 0.3);
}

.line-check-item.selected {
  border-color: #eabc2b;
  background: rgba(234, 188, 43, 0.08);
}

.line-check-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-check-name {
  color: #e0e0e0;
  font-size: 14px;
  font-family: "PingFang SC", sans-serif;
}

.line-check-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(234, 188, 43, 0.2);
  color: #eabc2b;
  font-family: "PingFang SC", sans-serif;
}

.line-check-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-check-time {
  color: #999;
  font-size: 12px;
  font-family: "PingFang SC", sans-serif;
  min-width: 60px;
  text-align: right;
}

.line-check-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 8px;
  font-family: "PingFang SC", sans-serif;
  white-space: nowrap;
}

.line-check-status.waiting {
  background: rgba(158, 158, 158, 0.2);
  color: #9e9e9e;
}

.line-check-status.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.line-check-status.timeout {
  background: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.line-check-status.fail {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

/* ====== 语言弹出层（底部弹出） ====== */
.lang-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lang-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lang-popup {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 420px;
  background: #1a1a1a;
  border-radius: 16px 16px 0 0;
  padding: 20px 0 0;
  z-index: 2001;
  transition: transform 0.3s ease;
}

.lang-popup-overlay.active .lang-popup {
  transform: translate(-50%, 0);
}

.lang-popup-title {
  text-align: center;
  color: #eabc2b;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 16px;
  font-family: "PingFang SC", sans-serif;
}

.lang-popup-list {
  display: flex;
  flex-direction: column;
}

.lang-popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.15s;
  color: #e0e0e0;
  font-size: 16px;
  font-family: "PingFang SC", sans-serif;
}

.lang-popup-item:hover {
  background: rgba(197, 163, 109, 0.08);
}

.lang-popup-item.current {
  color: #eabc2b;
}

.lang-popup-item img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.lang-popup-item .check-icon {
  margin-left: auto;
  color: #eabc2b;
  font-size: 18px;
  display: none;
}

.lang-popup-item.current .check-icon {
  display: block;
}

.lang-popup-cancel {
  margin-top: 8px;
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 16px;
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "PingFang SC", sans-serif;
}

.lang-popup-cancel:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ====== 声音图标定位 ====== */
.icon2 {
  position: relative;
}

/* ====== 响应式 ====== */
@media (max-width: 480px) {
  .bg-login-box {
    width: 92vw;
    max-width: 380px;
    padding: 40px 30px;
    height: auto;
    min-height: 300px;
  }
  
  .logo {
    max-width: 120px;
    max-height: auto;
  }
  
  .h5-code, .app-code, .line-check-par {
    display: none;
  }
  
  .corner {
    padding: 12px 16px;
  }
  
  .button span {
    font-size: 16px;
  }
  
  .content {
    width: auto;
    margin-bottom: 0;
  }
}
