/* 登录注册模态框简约精致设计 */
:root {
  --primary-color: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #4338ca;
  --primary-gradient: linear-gradient(to right, #4f46e5, #6366f1);
  --text-color: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --bg-color: #ffffff;
  --input-bg: #f8fafc;
  --border-color: #e2e8f0;
  --error-color: #ef4444;
  --success-color: #10b981;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
}

/* 模态框背景虚化效果 */
.modal-backdrop {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-color: rgba(15, 23, 42, 0.6);
}

/* 为不支持backdrop-filter的浏览器提供备用方案 */
@supports not ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .modal-backdrop {
    background-color: rgba(15, 23, 42, 0.8);
  }
}

.modal-backdrop.show {
  opacity: 1;
}

/* 模态框动画效果增强 */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translateY(-20px) scale(0.98);
  opacity: 0;
}

.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* auth-modal特定动画效果 */
.auth-modal.fade .modal-dialog {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease-out;
  transform: translateY(-30px) scale(0.95);
  opacity: 0;
}

.auth-modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* 模态框基础样式 */
.auth-modal {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  border: none;
  max-width: 400px;
  margin: 1.75rem auto;
}

/* 增加模态框内容的深度感 */
.auth-modal .modal-content {
  border: none;
  background: transparent;
}

.auth-modal .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background-color: var(--bg-color);
  position: relative;
}

.auth-modal .modal-title {
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.auth-modal .btn-close {
  padding: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.auth-modal .btn-close:hover {
  opacity: 1;
}

.auth-modal .modal-body {
  padding: 1.5rem;
}

.auth-modal .text-center {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

/* 表单样式 */
.auth-form {
  margin-top: 1rem;
}

.auth-form .form-group {
  position: relative;
  margin-bottom: 1.25rem;
  height: 42px;
}

/* 带有帮助文本的表单组 */
.auth-form .form-group:has(.form-text) {
  margin-bottom: 1.75rem;
}

/* 备用方案 - 针对不支持:has选择器的浏览器 */
#registerUsername {
  margin-bottom: 0;
}

.auth-form .form-group:first-child {
  margin-bottom: 1.75rem;
}

.auth-form .form-control {
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.75rem 0.75rem 2.25rem;
  height: 42px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

/* 隐藏placeholder文字 - 立即隐藏 */
.auth-form .form-control::placeholder {
  color: var(--text-lighter);
  opacity: 0.7;
  font-size: 0.875rem;
}

.auth-form .form-control:focus::placeholder {
  color: transparent;
  opacity: 0;
}

.auth-form .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
  background-color: white;
}

.auth-form .form-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-lighter);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  pointer-events: none;
}

.auth-form .form-control:focus + .form-icon {
  color: var(--primary-light);
}

/* 完全隐藏标签 */
.auth-form .form-label {
  display: none;
}

.auth-form .form-text {
  color: var(--text-lighter);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
}

/* 密码字段样式 */
.auth-form .password-field {
  position: relative;
  margin-bottom: 2.5rem;
}

.auth-form .password-field .form-text {
  margin-top: 1.5rem;
  position: absolute;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: visible;
  z-index: 5;
}

.auth-form .toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-lighter);
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.auth-form .toggle-password:hover {
  color: var(--primary-light);
}

/* 密码强度指示器 */
.password-strength {
  height: 4px;
  background-color: var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  overflow: hidden;
  position: absolute;
  bottom: -2rem;
  left: 0;
  right: 0;
  z-index: 4;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  background-color: var(--primary-light);
  transition: width 0.3s ease, background-color 0.3s ease;
}

/* 密码强度反馈文字 - 删除此部分 */
.password-feedback {
  display: none; /* 隐藏密码强度反馈文字 */
}

/* 移除之前的样式，避免冲突 */
#password-feedback {
  display: none; /* 隐藏密码强度反馈文字 */
}

/* 表单复选框样式 */
.auth-form .form-check {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.auth-form .form-check-input {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.auth-form .form-check-input:checked {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.auth-form .form-check-label {
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
}

.auth-form .forgot-link {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.auth-form .forgot-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* 提交按钮样式 */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit i {
  font-size: 0.9375rem;
  margin-right: 0.5rem;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.auth-submit:hover i {
  transform: translateX(-3px);
}

.auth-submit span {
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.auth-submit:hover span {
  transform: translateX(3px);
}

/* 流光效果 */
.auth-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.7s ease;
  animation: shimmer 3s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    left: -100%;
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* 消息提示样式 */
.auth-message {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.auth-message i {
  margin-right: 0.75rem;
  font-size: 1rem;
}

.auth-message.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-message.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* 底部链接 */
.auth-links {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.auth-links span {
  color: var(--text-light);
  margin-right: 0.5rem;
}

.auth-links a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  margin-top: 0.25rem;
}

.auth-links a:hover {
  color: var(--primary-dark);
}

.auth-links a i {
  font-size: 0.875rem;
  margin-right: 0.375rem;
  transition: transform 0.2s ease;
}

.auth-links a:hover i {
  transform: translateX(2px);
}

.auth-links a span {
  color: inherit;
  margin-right: 0;
}

/* 协议同意样式 */
.agreement {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.agreement .form-check-input {
  margin-top: 0.25rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.agreement .form-check-label {
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
}

.agreement a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.agreement a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 576px) {
  .auth-modal {
    max-width: 100%;
    margin: 1rem;
  }
  
  .auth-modal .modal-body {
    padding: 1.25rem;
  }
  
  .auth-modal .modal-header {
    padding: 1rem 1.25rem;
  }
}

/* 注册表单布局优化 - 双列布局 */
@media (min-width: 480px) {
  .register-form-row {
    display: flex;
    gap: 1rem;
  }
  
  .register-form-row .form-group {
    flex: 1;
    min-width: 0;
  }
  
  .register-form-row .password-field {
    margin-bottom: 3rem;
  }
}

/* 注册表单布局优化 - 双列布局 */
.register-form-row {
  display: flex;
  gap: 1rem;
}

.register-form-row .form-group {
  flex: 1;
  min-width: 0;
}

/* 确保在小屏幕上切换回单列布局 */
@media (max-width: 576px) {
  .register-form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* 调整密码强度条在双列布局中的位置 */
.register-form-row .password-field .password-strength {
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  right: 0;
} 