* {
  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;
}

[v-cloak] {
  display: none !important;
}

/* 语言选择器 */
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-option .lang-img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

/* 主登录容器 */
#login {
  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;
}

/* 背景装饰元素 */
#login::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;
  position: relative;
}

/* 语言选择器定位 */
.login .lang-box {
  position: absolute;
  right: 0;
  top: -10px;
  z-index: 10;
}

.login .lang-box .el-select {
  width: 120px !important;
}

.login .lang-box .el-select .el-input__inner {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
}

/* 二维码切换按钮 */
.login .qr-code {
  position: absolute;
  right: 0;
  top: 40px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 8px;
  transition: all 0.2s;
}

.login .qr-code:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
}

.login .qr-code .login-icon,
.login .qr-code .icon {
  width: 24px;
  height: 24px;
  fill: #667eea;
}

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

.login-text .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;
  cursor: pointer;
}

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

/* 登录表单 */
.login-form {
  margin-top: 0;
}

/* 标签切换 */
.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(2)::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;
}

/* 记住密码和链接区域 */
.rember-item {
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.5;
}

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

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

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

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

.rember-item > span:last-child a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
}

.rember-item > span:last-child a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* 错误提示 */
.read-item {
  margin: 16px 0;
}

.read-item .el-alert {
  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);
}

/* 切换登录方式按钮 */
.pass-btn {
  width: 100%;
  height: 46px;
  margin-top: 12px;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pass-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
}

/* 分割线 */
.line-item {
  margin: 24px 0;
}

.line-item .el-divider {
  margin: 0;
}

.line-item .el-divider__text {
  background: rgba(255, 255, 255, 0.95);
  color: #718096;
  font-size: 14px;
  padding: 0 16px;
}

/* 第三方登录 */
.login-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.oauth-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.oauth-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.oauth-img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
}

/* 二维码区域 */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 0;
}

.qr-box-img {
  width: 200px;
  height: 200px;
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.qr-box-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.qr-expire-time {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
}

.qr-expire-time .el-icon-refresh-right {
  font-size: 30px;
}

.qr-box-tips {
  margin-top: 16px;
  font-size: 14px;
  color: #718096;
  text-align: center;
}

/* 微信账号选择 */
.qr-box-select-account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.qr-box-back {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #667eea;
  cursor: pointer;
  transition: color 0.2s;
}

.qr-box-back:hover {
  color: #764ba2;
}

.qr-box-select-account-title {
  font-size: 16px;
  font-weight: 500;
  color: #2d3748;
  text-align: center;
}

/* 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-radio__input.is-checked .el-radio__inner {
  border-color: #667eea !important;
  background: #667eea !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;
}

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

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

  .login .lang-box {
    top: -8px;
    right: -8px;
  }

  .login .qr-code {
    top: 32px;
    right: -8px;
  }

  .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;
  }

  .qr-box-img {
    width: 180px;
    height: 180px;
  }
}

@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%;
  }

  .qr-box-img {
    width: 160px;
    height: 160px;
  }
}

/* 现代化加载动画 */
#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;
}

/* 兼容旧的点状加载动画（保持向后兼容） */
.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 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);
  }
}

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