/* ==========================================
   注册页样式 - 重新设计版本
   配色：活力橙系
   ========================================== */

/* 主体区域 */
.register-main {
  min-height: 700px; /* 固定最小高度，注册表单更高 */
  background: linear-gradient(135deg, #F0FFF9 0%, #F5FFFE 50%, #F7F9FC 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px; /* 上部120px，下部60px */
}

/* 背景装饰 */
.register-main::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.register-main::after {
  content: '';
  position: absolute;
  bottom: -150px;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 166, 43, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}

/* 注册容器 */
.register-wrapper {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
}

/* 注册卡片 */
.register-card {
  background-color: var(--white);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  padding: 45px 40px;
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 标题区 */
.register-header {
  text-align: center;
  margin-bottom: 35px;
}

.register-header h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.2;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.register-header p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
}

/* 表单样式 */
.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group label i {
  color: var(--accent-color);
  font-size: 16px;
}

.form-control {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border: 2px solid #E8EAED;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-dark);
  background-color: #F8F9FA;
  transition: all var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* 带按钮的输入框 */
.input-with-button {
  position: relative;
  display: flex;
  gap: 10px;
}

.input-with-button .form-control {
  flex: 1;
}

.btn-code {
  height: 50px;
  padding: 0 20px;
  background: linear-gradient(135deg, #00D4AA 0%, #00B894 100%);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-code:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-code:disabled {
  background: #E2E8F0;
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* 密码输入框 */
.password-input {
  position: relative;
}

.password-input .form-control {
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 0;
  height: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  transition: color var(--transition-fast);
  background: none;
  border: none;
}

.toggle-password:hover {
  color: var(--accent-color);
}

/* 验证码输入框 */
.captcha-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-input .form-control {
  flex: 1;
}

.captcha-image {
  height: 50px;
  width: 120px;
  border-radius: var(--radius-md);
  background-color: #F8F9FA;
  border: 2px solid #E8EAED;
  cursor: pointer;
  transition: all var(--transition-base);
  object-fit: contain;
  flex-shrink: 0;
}

.captcha-image:hover {
  border-color: var(--accent-color);
  transform: scale(1.02);
}

.btn-refresh-captcha {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F8F9FA;
  border: 2px solid #E8EAED;
  border-radius: var(--radius-md);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-refresh-captcha:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--white);
  transform: rotate(180deg);
}

.btn-refresh-captcha i {
  font-size: 20px;
}

/* 密码强度指示器 */
.password-strength {
  margin-top: 8px;
  display: none;
}

.password-strength.show {
  display: block;
}

.strength-bar {
  height: 4px;
  background-color: #E8EAED;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.strength-fill {
  height: 100%;
  width: 0;
  transition: all var(--transition-base);
  border-radius: 2px;
}

.strength-fill.weak {
  width: 33.33%;
  background-color: #E53E3E;
}

.strength-fill.medium {
  width: 66.66%;
  background-color: #3B82F6;
}

.strength-fill.strong {
  width: 100%;
  background-color: #00D4AA;
}

.strength-text {
  font-size: 12px;
  color: var(--text-light);
}

.strength-text span {
  font-weight: 600;
}

.strength-text span.weak {
  color: #E53E3E;
}

.strength-text span.medium {
  color: #3B82F6;
}

.strength-text span.strong {
  color: #00D4AA;
}

/* 表单提示 */
.form-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.4;
}

/* 用户协议 */
.agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dark);
  font-weight: 400 !important;
  cursor: pointer;
  user-select: none;
}

.agreement input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-color);
  margin-top: 2px;
  flex-shrink: 0;
}

.agreement a {
  color: var(--accent-color);
  font-weight: 500;
}

.agreement a:hover {
  text-decoration: underline;
}

/* 提交按钮 */
.btn-submit {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--gradient-accent);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
  margin-top: 8px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 212, 170, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit i {
  font-size: 18px;
}

/* 表单底部 */
.form-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
}

.form-footer a {
  color: var(--accent-color);
  font-weight: 600;
  margin-left: 4px;
  transition: color var(--transition-fast);
}

.form-footer a:hover {
  color: #00B894;
  text-decoration: underline;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .register-main {
    min-height: 600px;
    padding: 80px 20px 40px; /* 上部80px，下部40px */
  }
  
  .register-card {
    padding: 35px 24px;
    border-radius: 20px;
  }
  
  .register-header h1 {
    font-size: 26px;
  }
  
  .register-header p {
    font-size: 14px;
  }
  
  .form-control {
    height: 48px;
    font-size: 14px;
  }
  
  .btn-code {
    height: 48px;
    padding: 0 16px;
    font-size: 13px;
  }
  
  .toggle-password {
    height: 48px;
  }
  
  .btn-submit {
    height: 52px;
    font-size: 15px;
  }
  
  .input-with-button {
    flex-wrap: wrap;
  }
  
  .input-with-button .form-control {
    flex: 1 1 100%;
  }
  
  .input-with-button .btn-code {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .register-card {
    padding: 30px 20px;
  }
  
  .captcha-input {
    flex-wrap: wrap;
  }
  
  .captcha-input .form-control {
    flex: 1 1 100%;
  }
  
  .captcha-image {
    width: calc(100% - 60px);
  }
}

/* Parsley错误样式 */
.parsley-errors-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  font-size: 13px;
  color: #E53E3E;
}

.parsley-errors-list li {
  display: flex;
  align-items: center;
  gap: 4px;
}

.parsley-errors-list li::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #E53E3E;
  color: white;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.parsley-error {
  border-color: #E53E3E !important;
  background-color: #FFF5F5 !important;
}

.parsley-error:focus {
  box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1) !important;
}
