/* 模态窗口的样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* 模态窗口内容 */
.modal-content {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  padding: 24px;
  border: none;
  width: 90%;
  max-width: 450px;
  border-radius: 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.4s ease-out;
  overflow: hidden;
}
.modal-content h2 {
  color: #2d3748;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.demo-description {
  font-size: 14px;
  text-align: center;
  color: #718096;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* 关闭按钮 */
.close {
  color: #a0aec0;
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  font-weight: 300;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 10;
}

.close:hover,
.close:focus {
  color: #e53e3e;
  background: rgba(229, 62, 62, 0.1);
  transform: rotate(90deg);
  text-decoration: none;
}

/* 选项卡样式 */
.tab {
  display: flex;
  background: #f7fafc;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.tab button {
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  flex: 1;
  padding: 10px 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #718096;
  font-size: 14px;
  font-weight: 500;
  border-radius: 7px;
  position: relative;
  z-index: 2;
}

.tab button:hover {
  color: #4a5568;
  background-color: rgba(255, 255, 255, 0.5);
}

.tab button.active {
  color: #2563eb;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

/* 选项卡内容 */
.tabcontent {
  display: none;
  padding: 0;
  animation: fadeInContent 0.4s ease-out;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 表单样式 */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

form label {
  color: #4a5568;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
  position: relative;
}

form input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #2d3748;
  background: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  outline: none;
}

form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

form input::placeholder {
  color: #a0aec0;
  font-size: 13px;
}

form button {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

form button:active {
  transform: translateY(0);
}

form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 验证码输入框容器 */
.code-input-container {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.code-input-container input {
  flex: 1;
  margin: 0;
}

.get-code-button {
  white-space: nowrap;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
  border: 2px solid #2563eb;
  border-radius: 10px;
  cursor: pointer;
  min-width: 100px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.get-code-button:hover {
  color: #fff;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.get-code-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: #f7fafc;
  color: #a0aec0;
  border-color: #e2e8f0;
}

.full-width-button {
  width: 100%;
}

.agreement {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-top: 6px;
}

.agreement input[type='checkbox'] {
  margin: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #e2e8f0;
  border-radius: 5px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}

.agreement input[type='checkbox']:hover {
  border-color: #2563eb;
}

.agreement input[type='checkbox']:checked {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  border-color: #2563eb;
  transform: scale(1.05);
}

.agreement input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.agreement label {
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.4;
  flex: 1;
}

.agreement a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.agreement a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.register-link {
  text-align: center;
  padding: 12px 0 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 14px;
}

.register-link a {
  color: #2563eb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.register-link a:hover {
  color: #1e40af;
  transform: translateX(2px);
}

/* 密码输入框容器 */
.password-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input input {
  width: 100%;
  padding-right: 52px;
}

/* 密码框眼睛图标按钮 */
.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #a0aec0;
  z-index: 10;
  display: none;
  border-radius: 50%;
  transition: all 0.3s ease;
  justify-content: center;
  align-items: center;
  padding:5px 5px;
}

.toggle-password:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  transform: translateY(-50%) scale(1.1);
}

.toggle-password i {
  font-size: 16px;
  pointer-events: none;
}

.toggle-password.show {
  display: flex;
}

.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 4px;
}
.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}
.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.username-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px 10px;
}
.username-dropdown .iconfont {
  font-size: 14px;
  color: #fff;
  margin-left: 5px;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #eee;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  min-width: 100px;
  z-index: 1000;
  margin-top: 5px;
}
.username-dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-item {
  padding: 8px 16px;
  color: #333;
  transition: background-color 0.3s;
  white-space: nowrap;
}
.dropdown-item:hover {
  background-color: #f5f5f5;
}

/* 添加一个透明的区域来保持下拉菜单的显示 */
.username-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}
/* 禁用浏览器默认的密码显示图标 */
input[type='password']::-ms-reveal,
input[type='password']::-ms-clear {
  display: none;
}

input[type='password']::-webkit-credentials-auto-fill-button,
input[type='password']::-webkit-strong-password-auto-fill-button {
  display: none !important;
}

/* Chrome/Safari 密码眼睛图标 */
input[type='password']::-webkit-textfield-decoration-container {
  display: none !important;
}

/* Edge 密码眼睛图标 */
input[type='password']::-ms-reveal {
  display: none;
}

      /* 自定义消息提示组件 */
      .message-container {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        pointer-events: none;
      }

      .message-item {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        margin-bottom: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        background: #fff;
        border: 1px solid #ebeef5;
        min-width: 380px;
        max-width: 500px;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        pointer-events: auto;
        position: relative;
        font-size: 14px;
        line-height: 1.5;
      }

      .message-item.show {
        opacity: 1;
        transform: translateY(0);
      }

      .message-item.hide {
        opacity: 0;
        transform: translateY(-20px);
      }

      .message-icon {
        margin-right: 10px;
        font-size: 16px;
        flex-shrink: 0;
      }

      .message-content {
        flex: 1;
        color: #606266;
      }

      .message-close {
        margin-left: 15px;
        cursor: pointer;
        color: #c0c4cc;
        font-size: 14px;
        transition: color 0.2s;
        flex-shrink: 0;
      }

      .message-close:hover {
        color: #909399;
      }

      /* 不同类型的消息样式 */
      .message-item.success {
        background: #f0f9ff;
        border-color: #b3d8ff;
      }
      .message-item.success .message-icon {
        color: #67c23a;
      }
      .message-item.success .message-content {
        color: #67c23a;
      }

      .message-item.error {
        background: #fef0f0;
        border-color: #fbc4c4;
      }
      .message-item.error .message-icon {
        color: #f56c6c;
      }
      .message-item.error .message-content {
        color: #f56c6c;
      }

      .message-item.warning {
        background: #fdf6ec;
        border-color: #f5dab1;
      }
      .message-item.warning .message-icon {
        color: #e6a23c;
      }
      .message-item.warning .message-content {
        color: #e6a23c;
      }

      .message-item.info {
        background: #f4f4f5;
        border-color: #d3d4d6;
      }
      .message-item.info .message-icon {
        color: #909399;
      }
      .message-item.info .message-content {
        color: #909399;
      }

/* 响应式设计 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-width: 400px;
    padding: 20px;
    margin: 16px;
    border-radius: 14px;
  }

  .modal-content h2 {
    font-size: 22px;
    margin-bottom: 14px;
  }

  form {
    gap: 12px;
  }

  form input {
    padding: 12px 14px;
    font-size: 16px; /* 防止iOS自动缩放 */
  }

  form button {
    padding: 12px 18px;
    font-size: 15px;
  }

  .get-code-button {
    padding: 12px 14px;
    min-width: 90px;
  }

  .code-input-container {
    flex-direction: column;
    gap: 10px;
  }

  .code-input-container input {
    width: 100%;
  }

  .get-code-button {
    width: 100%;
  }

  .tab button {
    padding: 8px 14px;
    font-size: 13px;
  }

  .agreement {
    padding: 10px;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 16px;
    width: 100%;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
    position: fixed;
    overflow-y: auto;
  }

  .close {
    top: 10px;
    right: 14px;
  }
}

/* 添加输入框聚焦时的浮动标签效果 */
.form-group {
  position: relative;
  margin-bottom: 18px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  transform: translateY(-10px) scale(0.85);
  color: #2563eb;
}

.form-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 0 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

/* 动画增强 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* 成功状态 */
.input-success {
  border-color: #48bb78 !important;
  box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.1) !important;
}

/* 错误状态 */
.input-error {
  border-color: #f56565 !important;
  box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.1) !important;
}

/* 微信扫码登录按钮样式 - 参考Vue组件.trans和.imgApp */
.wechat-login-trans {
  position: absolute;
  right: 0;
  top: 0;
  width: 84px;
  height: 84px;
  border-radius: 0 15px 0 0px;
  z-index: 10;
  transition: all 0.3s ease;
  background-image:url('/images/wechatCode.png');
  background-size: cover;
  background-color: #2b96e6; //图标优化 -- 换为白色线条图标 背景层添加背景色
  cursor: pointer;
}

.wechat-login-app {
  width: 84px;
  height: 84px;
  background: linear-gradient(225deg, transparent 45px, #fcfdfd 0);
  border-radius: 0 15px 0 0px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2b96e6;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* .wechat-login-app::before {
  content: '';
  display: block;
  width: 30px;
  height: 30px;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIyIDlDMjEuNCA5IDIwLjggOS4yIDIwLjQgOS42TDE2IDEzSDhDNiAxMyA0IDE1IDQgMTdWMjFDNCAyMyA2IDI1IDggMjVIMTZMMjAuNCAyOC40QzIwLjggMjguOCAyMS40IDI5IDIyIDI5QzIyLjYgMjkgMjMuMiAyOC44IDIzLjYgMjguNEMyNCAyOCAyNC4yIDI3LjQgMjQuMiAyNi44VjExLjJDMjQuMiAxMC42IDI0IDEwIDIzLjYgOS42QzIzLjIgOS4yIDIyLjYgOSAyMiA5WiIgZmlsbD0iIzJiOTZlNiIvPgo8cGF0aCBkPSJNOCAxNUg2VjE3SDhWMTVaTTEwIDE1SDEyVjE3SDEwVjE1Wk0xNCAxNUgxNlYxN0gxNFYxNVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik04IDE5SDEwVjIxSDhWMTlaTTEyIDE5SDE0VjIxSDEyVjE5Wk0xNiAxOUgxOFYyMUgxNlYxOVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: auto;
}

.wechat-login-app::after {
  content: '扫码';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 500;
  color: #2b96e6;
  white-space: nowrap;
} */

.wechat-login-trans:hover {
  background-color: #1e7bb8;
  transform: scale(1.05);
}

.wechat-login-trans:hover .wechat-login-app {
  color: #1e7bb8;
}

.wechat-login-trans:hover .wechat-login-app::before {
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIyIDlDMjEuNCA5IDIwLjggOS4yIDIwLjQgOS42TDE2IDEzSDhDNiAxMyA0IDE1IDQgMTdWMjFDNCAyMyA2IDI1IDggMjVIMTZMMjAuNCAyOC40QzIwLjggMjguOCAyMS40IDI5IDIyIDI5QzIyLjYgMjkgMjMuMiAyOC44IDIzLjYgMjguNEMyNCAyOCAyNC4yIDI3LjQgMjQuMiAyNi44VjExLjJDMjQuMiAxMC42IDI0IDEwIDIzLjYgOS42QzIzLjIgOS4yIDIyLjYgOSAyMiA5WiIgZmlsbD0iIzFlN2JiOCIvPgo8cGF0aCBkPSJNOCAxNUg2VjE3SDhWMTVaTTEwIDE1SDEyVjE3SDEwVjE1Wk0xNCAxNUgxNlYxN0gxNFYxNVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik04IDE5SDEwVjIxSDhWMTlaTTEyIDE5SDE0VjIxSDEyVjE5Wk0xNiAxOUgxOFYyMUgxNlYxOVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=');
}

.wechat-login-trans:hover .wechat-login-app::after {
  color: #1e7bb8;
}

/* 账号绑定相关样式 */
.bind-tab {
  flex: 1;
  text-align: center;
}

.bind-tab.active {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #2563eb;
}