/* 移动端适配样式 */
html, body {
  width: 100%;
  min-width: 320px;
  max-width: 750px;
  margin: 0 auto;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* 内容容器 - 限制整体宽度为 750px */
.main-container {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
}

.content-wrapper {
  width: 100%;
  position: relative;
}

/* 认证页面公共样式 */
.auth-form-container {
  padding: 25px 20px;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  margin: 20px auto;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 20px);
}

/* H5移动端登录样式 */
.mobile-login {
  max-width: 100%;
  margin: 10px auto;
  border-radius: 12px;
  padding: 30px 15px;
}

.logo-section {
  text-align: center;
  margin-bottom: 30px;
}

.logo-section .logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 12px;
  object-fit: cover;
  border: 3px solid #f0f0f0;
}

.logo-section h2 {
  margin: 0 0 5px 0;
  font-size: 24px;
  color: #333;
  font-weight: 600;
}

.logo-section .subtitle {
  margin: 0;
  font-size: 14px;
  color: #888;
}

.van-tab__pane {
  padding: 10px 0;
  background-color: #f8f9fa;
  min-height: calc(100vh - 50px);
}

/* 限制 tabbar 宽度为 750px */
.pageTabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.van-tabbar--fixed {
    position: relative !important;
}

/* 桌面浏览器适配 - 限制 Tabbar 最大宽度 */
@media screen and (min-width: 768px) {
    .pageTabbar {
        max-width: 750px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 12px 12px 0 0;
    }
}

/* iPhone X 及以上机型底部安全区适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .van-tabbar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.form-footer a {
  color: #1989fa;
  text-decoration: none;
  margin-left: 5px;
  font-weight: 500;
}

.popup-content {
  padding: 35px 25px;
  text-align: center;
}

.popup-content p {
  margin: 15px 0;
  font-size: 17px;
  color: #333;
  font-weight: 500;
}

.popup-content h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #333;
  font-weight: 600;
}

.popup-content ul, .popup-content ol {
  text-align: left;
  padding-left: 20px;
  margin: 15px 0;
  color: #666;
  font-size: 14px;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 10px;
  font-size: 14px;
}

.remember-forgot a {
  color: #1989fa;
  text-decoration: none;
}

/* 调整vant表单样式 */
.van-cell {
  border-radius: 10px !important;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid #eee;
  background-color: #fafafa;
  transition: all 0.3s;
}

.van-cell:active {
  background-color: #f0f0f0;
}

.van-field__control {
  height: 46px;
  line-height: 46px;
  padding: 0 15px;
  font-size: 15px;
}

.van-field__label {
  color: #555;
  font-weight: 500;
}

.van-button--normal {
  height: 48px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
}

.van-button--info {
  background: linear-gradient(to right, #1989fa, #4fb8ff);
  border: none;
}

/* 移动端适配 */
@media screen and (max-width: 750px) {
  .auth-form-container {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 25px 15px;
    min-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .mobile-login {
    padding: 25px 10px;
  }
  
  .logo-section h2 {
    font-size: 22px;
  }
  
  .remember-forgot {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    text-align: center;
  }
  
  .form-footer {
    margin-top: 25px;
  }
}

@media screen and (max-width: 375px) {
  .auth-form-container {
    padding: 20px 10px;
  }
  
  .logo-section h2 {
    font-size: 20px;
  }
  
  .van-field__control {
    font-size: 14px;
  }
}

/* iPhone X 及以上机型适配 */
@media screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3),
       screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2),
       screen and (device-width: 360px) and (device-height: 780px) and (-webkit-device-pixel-ratio: 3),
       screen and (min-device-width: 414px) and (max-device-width: 768px) and (orientation: landscape) {
  .auth-form-container {
    padding-bottom: 30px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form-container {
  animation: fadeIn 0.4s ease-out;
}

/* 输入框聚焦效果 */
.van-field__control:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 137, 250, 0.2);
}

/* H5页面全屏适配 */
.h5-fullscreen {
  width: 100vw;
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  min-height: 100vh;
  box-shadow: none;
}

/* 必填字段星号样式 */
.required-label::before {
  content: '* ';
  color: #ee0a24;
  margin-right: 2px;
}