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

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

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

/* ========== 背景光球 ========== */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(168, 85, 247, 0.6));
  top: -15%;
  left: -10%;
  animation: float1 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: float2 18s ease-in-out infinite 5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  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: float3 22s ease-in-out infinite 10s;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -40px); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, 30px); }
}

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

/* ========== 主内容区 - 毛玻璃卡片 ========== */
.auth-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: slideUp 0.6s ease-out;
}

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

/* ========== 品牌区域 ========== */
.brand-section {
  text-align: center;
  margin-bottom: 36px;
}

.brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #667eea;
  text-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

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

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

/* ========== 表单样式 ========== */
.auth-form {
  width: 100%;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.form-item {
  margin-bottom: 0;
}

.form-item .el-form-item__error {
  padding-top: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* 输入框样式 */
.auth-input .el-input__wrapper {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 6px 16px;
  transition: all 0.3s ease;
}

.auth-input .el-input__wrapper:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.auth-input .el-input__wrapper.is-focus {
  box-shadow: 0 6px 28px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

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

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

.input-icon {
  color: #667eea;
  font-size: 18px;
}

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

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

.code-input .el-input__inner {
  letter-spacing: 4px;
  font-weight: 600;
  text-align: center;
}

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

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

/* ========== 操作按钮区 ========== */
.action-section {
  margin-bottom: 24px;
}

.primary-btn {
  width: 100%;
  height: 52px;
  font-size: 16px;
  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;
}

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

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

/* 次要按钮样式 */
.secondary-btn {
  height: 48px;
  font-size: 15px;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.secondary-btn:hover {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
}

.btn-icon {
  margin-right: 8px;
}

/* ========== 底部链接 ========== */
.footer-links {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.link-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.link-item:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #764ba2;
}

/* ========== 2FA 内容区 ========== */
.twofa-content {
  width: 100%;
}

/* 2FA 提示框 */
.twofa-notice {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-radius: 16px;
  border-left: 4px solid #667eea;
  margin-bottom: 32px;
}

.notice-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.notice-text {
  flex: 1;
}

.notice-text strong {
  display: block;
  color: #1f2937;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.notice-text p {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  font-weight: 500;
}

/* 重发验证码区域 */
.resend-section {
  text-align: center;
  margin-bottom: 24px;
}

.countdown-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.resend-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #667eea;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.resend-btn:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.1);
  color: #764ba2;
}

.resend-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 2FA 操作按钮区 */
.twofa-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 覆盖 Element Plus 相邻按钮默认 margin-left */
.twofa-actions .el-button + .el-button {
  margin-left: 0;
}

/* Ghost 按钮 */
.ghost-btn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  color: #667eea;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ghost-btn:hover {
  background: rgba(102, 126, 234, 0.08);
  border-color: #667eea;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* 返回链接区域 */
.back-link-section {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.back-link:hover {
  color: #764ba2;
  background: rgba(102, 126, 234, 0.08);
}

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

  .auth-content {
    padding: 36px 28px;
  }

  .brand-section {
    margin-bottom: 32px;
  }

  .brand-icon {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }

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

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

  .primary-btn {
    height: 48px;
    font-size: 15px;
  }
}
