/* Signup 样式 - 优化字体清晰度 */

/* ========== 字体优化 ========== */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ========== 背景容器 ========== */
.auth-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* 渐变网格覆盖 */
.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(240, 147, 251, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
  opacity: 0.8;
  z-index: 1;
}

/* 浮动光球 */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(168, 85, 247, 0.6));
  top: -10%;
  left: -10%;
  animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.5), rgba(245, 87, 108, 0.5));
  bottom: -10%;
  right: -10%;
  animation: orbFloat2 18s ease-in-out infinite 7s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(102, 126, 234, 0.4));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat3 22s ease-in-out infinite 14s;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(50px, -50px); }
  66% { transform: translate(-50px, 50px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-60px, 40px); }
  66% { transform: translate(40px, -60px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%); }
  33% { transform: translate(calc(-50% + 30px), calc(-50% - 40px)); }
  66% { transform: translate(calc(-50% - 40px), calc(-50% + 30px)); }
}

/* ========== 毛玻璃卡片 - 增强背景不透明度 ========== */
.auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 25px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardEntrance 0.8s ease-out;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.auth-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ========== 卡片头部 - 优化字体清晰度 ========== */
.auth-header {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  padding: 36px 30px 28px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.auth-logo {
  font-size: 2.8rem;
  margin-bottom: 16px;
  color: #667eea;
  text-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.auth-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1f2937;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.auth-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
  font-weight: 500;
}

/* ========== 卡片内容区 ========== */
.auth-body {
  padding: 32px 30px 36px;
  background: rgba(255, 255, 255, 0.5);
}

.auth-form {
  margin-top: 0;
}

/* ========== 按钮样式 ========== */
.auth-button {
  width: 100%;
  height: 52px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  color: white;
}

.auth-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.45);
}

/* ========== 登录链接 ========== */
.login-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: #4b5563;
  font-size: 0.95rem;
}

.login-link-text {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  margin-left: 6px;
  transition: all 0.25s ease;
}

.login-link-text:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ========== 字段提示和错误样式 ========== */
.field-hint {
  color: #9ca3af;
  font-size: 0.85rem;
  margin-top: 6px;
  margin-left: 4px;
}

.field-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* ========== 验证规则样式 ========== */
.validation-rules {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.validation-rule {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  transition: color 0.3s ease;
  font-weight: 500;
}

.rule-valid {
  color: #10b981;
}

.rule-invalid {
  color: #6b7280;
}

/* 内联验证错误样式 */
.inline-validation-error {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.inline-validation-error .error-icon {
  color: #ef4444;
  font-size: 0.9rem;
  flex-shrink: 0;line-height: 1.4;
}

.inline-validation-error .error-text {
  color: #dc2626;
  font-size: 0.875rem;
  line-height: 1.4;
  flex: 1;
  font-weight: 500;
}

/* ========== 密码强度样式 ========== */
.password-strength {
  margin-top: 10px;
}

.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.strength-weak { background: #ef4444; }
.strength-medium { background: #f59e0b; }
.strength-strong { background: #10b981; }
.strength-very-strong { background: #059669; }

.strength-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.strength-0 { color: #9ca3af; }
.strength-1 { color: #ef4444; }
.strength-2 { color: #f59e0b; }
.strength-3 { color: #10b981; }
.strength-4 { color: #059669; }

/* ========== 验证码区域 ========== */
.captcha-section {
  margin-bottom: 20px;
}

/* ========== 邮箱验证码样式 ========== */
.email-code-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.email-code-input {
  flex: 1;
}

.email-code-button {
  min-width: 120px;
  height: 48px !important;
  padding: 0 20px !important;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease !important;
  letter-spacing: 0.5px;
}

.email-code-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.email-code-button:disabled {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

/* ========== 服务条款样式 ========== */
.terms-checkbox {
  margin-top: 12px;
}

.terms-checkbox .el-checkbox__label {
  color: #4b5563;
  font-size: 0.9rem;
}

.terms-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.terms-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ========== 服务器错误样式 ========== */
.server-errors {
  margin-bottom: 20px;
}

/* ========== 提示框样式 ========== */
.prompt-content {
  text-align: center;
  padding: 20px 0;
}

.prompt-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.prompt-icon.success {
  color: #10b981;
}

.prompt-icon.error {
  color: #ef4444;
}

.prompt-message {
  font-size: 1.1rem;
  color: #1f2937;
  margin: 0;
  font-weight: 500;
}

/* ========== Element Plus 样式覆盖 ========== */
/* 隐藏 Element Plus 的错误信息 */
.auth-form .el-form-item__error {
  display: none !important;
}

/* 修复 overflow 冲突 */
.auth-form .el-form-item,
.auth-form .el-form-item__content {
  overflow: visible !important;
}

.auth-form .custom-validation {
  display: block !important;
  visibility: visible !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 99999 !important;
}

.auth-form .custom-validation .validation-rule {
  display: flex !important;
  visibility: visible !important;
}

.auth-card .el-form-item,
.auth-card .el-form-item__content {
  overflow: visible !important;
}

/* ========== 输入框样式优化 ========== */
.auth-form .el-input__wrapper {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  padding: 4px 16px;
  transition: all 0.3s ease;
  min-height: 48px;
}

.auth-form .el-input__wrapper:hover {
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.auth-form .el-input__wrapper.is-focus {
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2), 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.auth-form .el-input__inner {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  height: 40px;
}

.auth-form .el-input__inner::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* 输入框图标样式 */
.auth-form .el-input__prefix {
  color: #667eea;
  font-size: 16px;
}

.auth-form .el-input__suffix {
  color: #9ca3af;
}

/* 密码显示/隐藏按钮 */
.auth-form .el-input__password {
  color: #667eea;
  cursor: pointer;
  transition: color 0.25s ease;
}

.auth-form .el-input__password:hover {
  color: #764ba2;
}

/* ========== 输入框前缀图标优化 ========== */
.auth-form .el-input__prefix-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form .el-input__prefix-inner i,
.auth-form .el-input__prefix-inner .el-icon {
  font-size: 18px !important;
  color: #667eea !important;
}

/* ========== 人机验证（Turnstile）样式 ========== */
.captcha-section {
  margin-bottom: 24px;
}

.captcha-section .cf-turnstile,
.captcha-section iframe {
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Turnstile 容器美化 */
.turnstile-wrapper {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.turnstile-wrapper > div {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.15);
}

/* ========== 响应式设计 ========== */
@media (max-width: 480px) {
  .auth-container {
    padding: 10px;
  }

  .auth-header {
    padding: 28px 20px 22px;
  }

  .auth-body {
    padding: 24px 20px 28px;
  }

  .auth-title {
    font-size: 1.6rem;
  }

  .auth-subtitle {
    font-size: 0.9rem;
  }

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

  .email-code-button {
    min-width: auto;
  }

  .validation-rules {
    flex-direction: column;
    gap: 5px;
  }

  .auth-button {
    height: 48px;
    font-size: 1rem;
  }
}
