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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

#regist {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
}

/* 背景装饰元素 */
#regist::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.login-container {
  max-width: 520px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* 移除原有的复杂背景设计 */
.container-back {
  display: none;
}

.container-before {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 10px 20px rgba(0, 0, 0, 0.05);
  padding: 30px 40px;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login {
  padding: 0;
  font-size: 14px;
  color: #2d3748;
}

/* Logo 和标题区域 */
.login-text {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.login-text-title {
  font-size: 28px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-text-regist {
  font-size: 14px;
  color: #718096;
  margin-top: 8px;
}

.login-text-regist a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.login-text-regist a:hover {
  color: #764ba2;
}

/* 标签切换 */
.login-top {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.login-email,
.login-phone {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  color: #718096;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.login-email:hover,
.login-phone:hover {
  color: #667eea;
}

.login-email.active,
.login-phone.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

/* 表单样式 */
.form-main {
  margin-top: 0;
}

.form-item {
  margin-bottom: 20px;
  position: relative;
}

/* 输入框样式 */
.form-item .el-input {
  height: 48px;
  position: relative;
}

.form-item .el-input__inner {
  height: 48px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  padding: 0 16px 0 44px;
  transition: all 0.2s;
  background: #ffffff;
}

.form-item .el-input__inner:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-item .el-input__inner::placeholder {
  color: #a0aec0;
}

/* 输入框图标 - 使用更兼容的方式 */
.form-item::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
  opacity: 0.5;
  pointer-events: none;
}

/* 邮箱字段图标 */
.form-item:nth-child(1)::before {
  background-image: url('../img/account/icon_email.png');
}

/* 密码字段图标 */
.form-item:nth-child(3)::before,
.form-item:nth-child(4)::before {
  background-image: url('../img/account/icon_password.png');
}

/* 验证码字段图标 */
.code-item.form-item::before {
  background-image: url('../img/account/icon_code.png');
}

/* 手机字段图标 - 当显示手机号输入时 */
.form-item.phone-field::before {
  background-image: url('../img/account/icon_phone.png');
}



/* 选择器样式 */
.input-with-select .el-input-group__prepend {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0 12px;
  width: auto;
  min-width: 80px;
}

.input-with-select .el-input__inner {
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding-left: 16px; /* 手机号输入框不需要预留图标空间 */
}

/* 手机号字段的图标位置调整 */
.form-item.phone-field::before {
  display: none; /* 手机号输入框有前置选择器，隐藏图标 */
}

/* 验证码按钮 */
.code-item {
  display: flex;
  gap: 12px;
}

.code-item .el-input {
  flex: 1;
}

.code-btn {
  height: 48px;
  padding: 0 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.code-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.code-btn:disabled {
  background: #e2e8f0;
  color: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 自定义表单字段 */
.custom-form {
  margin: 20px 0;
}

.custom-form .el-form-item {
  margin-bottom: 20px;
}

.custom-form .el-form-item__label {
  color: #4a5568;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.2;
}

.custom-form .el-select,
.custom-form .el-input,
.custom-form .el-textarea {
  width: 100%;
}

.custom-form .el-select .el-input__inner,
.custom-form .el-textarea__inner {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s;
  padding-left: 44px; /* 为图标预留空间 */
}

.custom-form .el-select .el-input__inner:focus,
.custom-form .el-textarea__inner:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 自定义表单项的图标 */
.custom-form .el-form-item {
  position: relative;
}

.custom-form .el-form-item::before {
  content: '';
  position: absolute;
  left: 16px;
  top: calc(100% - 24px); /* 考虑到label的高度 */
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
  opacity: 0.5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23718096' viewBox='0 0 24 24'%3E%3Cpath d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
}

/* 复选框区域 */
.read-item {
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.read-item .el-checkbox {
  margin-right: 0;
}

.read-text {
  font-size: 14px;
  color: #718096;
  line-height: 1.5;
  flex: 1;
}

.read-text a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.read-text a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* 错误提示 */
.read-item .el-alert {
  margin: 16px 0;
  border-radius: 8px;
  border: none;
}

/* 注册按钮 */
.login-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.login-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

/* 其他按钮样式 */
.type-btn {
  width: 100%;
  height: 46px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  background: white;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s;
}

.type-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  #regist {
    padding: 16px 16px 60px 16px;
    min-height: 100vh;
  }

  .container-before {
    padding: 24px;
    margin: 0;
    border-radius: 12px;
  }

  .footer-copyright {
    position: fixed;
    bottom: 10px;
  }

  .footer-copyright p {
    font-size: 10px;
    padding: 0 10px;
  }

  .login-text-title {
    font-size: 24px;
  }

  .form-item .el-input__inner {
    height: 44px;
    font-size: 16px; /* 防止iOS缩放 */
  }

  .code-btn {
    height: 44px;
    padding: 0 16px;
    font-size: 14px;
  }

  .login-btn {
    height: 44px;
    font-size: 16px;
  }

  .login-email,
  .login-phone {
    padding: 10px 0;
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  .container-before {
    padding: 20px;
  }

  .login-text-title {
    font-size: 22px;
  }

  .code-item {
    flex-direction: column;
    gap: 12px;
  }

  .code-btn {
    width: 100%;
  }
}

/* Element UI 组件样式覆盖 */
.el-input__inner {
  transition: all 0.2s !important;
}

.el-checkbox__input.is-checked .el-checkbox__inner {
  background-color: #667eea !important;
  border-color: #667eea !important;
}

.el-checkbox__input.is-checked + .el-checkbox__label {
  color: #4a5568 !important;
}

.el-select-dropdown__item.selected {
  color: #667eea !important;
  font-weight: 500 !important;
}

.el-form-item__error {
  color: #e53e3e !important;
  font-size: 12px !important;
}

/* 版权信息 */
.footer-copyright {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1;
}

.footer-copyright p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  margin: 0;
  padding: 0 20px;
  line-height: 1.4;
}

/* 现代化加载动画 */
#mainLoading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* 主加载容器 */
.loading-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* 旋转圆环 */
.loading-spinner {
  position: relative;
  width: 60px;
  height: 60px;
}

.loading-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.loading-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  animation: spin 1.5s linear infinite reverse;
}

.loading-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  animation: spin 2s linear infinite;
}

/* 中心脉冲点 */
.loading-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 1.5s ease-in-out infinite;
}

/* 脉冲波纹效果 */
.loading-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 2s linear infinite;
}

.loading-pulse:nth-child(5) {
  animation-delay: 0.5s;
}

.loading-pulse:nth-child(6) {
  animation-delay: 1s;
}

/* 加载文字 */
.loading-text {
  color: white;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  opacity: 0.9;
  animation: fadeInOut 2s ease-in-out infinite;
}

/* 进度条 */
.loading-progress {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.8) 100%);
  border-radius: 1px;
  animation: progressMove 1.5s ease-in-out infinite;
}

/* 动画定义 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.7;
  }
}

@keyframes ripple {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
  }
  100% {
    width: 80px;
    height: 80px;
    opacity: 0;
  }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes progressMove {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(300px);
  }
}

/* 兼容旧的点状加载动画（保持向后兼容） */
.ddr {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  margin: 0 3px;
  animation: dotBounce 1.4s infinite ease-in-out both;
}

.ddr1 { animation-delay: -0.32s; }
.ddr2 { animation-delay: -0.16s; }
.ddr3 { animation-delay: 0s; }
.ddr4 { animation-delay: 0.16s; }
.ddr5 { animation-delay: 0.32s; }

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
