/* 认证页面通用样式 */

/* 基础字体大小设置 
html {
  font-size: 14px;
}
- 移动端优先 */

.module {
  padding: 0 1rem;
}

/* 页面布局 - 确保footer始终在底部 */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

footer {
  margin-top: auto;
}

/* 认证容器 - 响应式布局 */
.auth-container {
  background: #ffc7ce;
  border: 2px solid #ff3955;
  border-radius: 12px;
  width: calc(100% - 2rem);
  max-width: 380px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(255, 57, 85, 0.15);
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: .5rem;
}

.auth-header h2 {
  font-size: 1.5rem;
  color: #ff3955;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.auth-header p {
  font-size: 0.875rem;
  color: #666;
}

/* 表单样式 */
.auth-form {
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: .85rem;
}

.form-group label {
  display: block;
  font-size: 1.175rem;
  color: #333;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  border: 2px solid #ff3955;
  border-radius: 6px;
  transition: all 0.3s;
  background: #fff;
  color: #333;
}

.form-control:focus {
  outline: none;
  border-color: #ff3955;
  box-shadow: 0 0 0 3px rgba(255, 57, 85, 0.1);
  background: #fff;
}

.form-control.error {
  border-color: #ff4757;
  background: #fff5f5;
}

.error-message {
  color: #ff4757;
  font-size: 0.75rem;
  margin-top: 0.375rem;
  display: none;
}

.error-message.show {
  display: block;
}

.success-message {
  color: #4caf50;
  font-size: 0.75rem;
  margin-top: 0.375rem;
  display: none;
}

.success-message.show {
  display: block;
}

.password-strength {
  margin-top: 0.5rem;
  display: none;
}

.password-strength.show {
  display: block;
}

.strength-bar {
  height: 3px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.375rem;
}

.strength-bar-fill {
  height: 100%;
  transition: all 0.3s;
  width: 0;
}

.strength-bar-fill.weak {
  width: 33%;
  background: #ff4757;
}

.strength-bar-fill.medium {
  width: 66%;
  background: #ffa502;
}

.strength-bar-fill.strong {
  width: 100%;
  background: #4caf50;
}

.strength-text {
  font-size: 0.75rem;
  color: #999;
}

/* 按钮样式 */
.btn-submit {
  width: 100%;
  height: 2.75rem;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff3955 0%, #ff1744 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 1rem;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 57, 85, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 页脚链接 */
.auth-footer {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-footer p {
  font-size: 0.875rem;
  color: #666;
}

.auth-footer a {
  color: #ff3955;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* 返回首页链接 */
.back-home {
  text-align: center;
  margin-top: 1rem;
}

.back-home a {
  color: #ff3955;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s;
}

.back-home a:hover {
  text-decoration: underline;
}

/* 模态框样式 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 320px;
  width: 90%;
  text-align: center;
  animation: modalSlideIn 0.3s ease;
  border: 2px solid #ff3955;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.modal-icon.success {
  background: #ffc7ce;
  color: #ff3955;
}

.modal-icon.error {
  background: #ffebee;
  color: #ff4757;
}

.modal-title {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.modal-message {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-btn {
  padding: 0.625rem 1.5rem;
  background: linear-gradient(135deg, #ff3955 0%, #ff1744 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 57, 85, 0.3);
}

/* 桌面端响应式优化 */
@media screen and (min-width: 768px) {
  /* 重置根字体大小，避免在大屏幕上元素过大 */
  html {
    font-size: 16px;
  }
  
  /* 认证容器在桌面端的优化 */
  .auth-container {
    max-width: 420px;
    padding: 2.5rem 2rem;
  }
  
  .auth-header h2 {
    font-size: 1.75rem;
  }
  
  .auth-header p {
    font-size: 0.95rem;
  }
  
  .form-group label {
    font-size: 0.95rem;
  }
  
  .form-control {
    height: 2.75rem;
    font-size: 0.95rem;
    padding: 0 1rem;
  }
  
  .btn-submit {
    height: 2.75rem;
    font-size: 1.05rem;
  }
  
  .auth-footer p,
  .back-home a {
    font-size: 0.95rem;
  }
  
  /* 模态框在桌面端的优化 */
  .modal-content {
    max-width: 380px;
    padding: 2.5rem;
  }
  
  .modal-icon {
    width: 70px;
    height: 70px;
    font-size: 2.25rem;
  }
  
  .modal-title {
    font-size: 1.4rem;
  }
  
  .modal-message {
    font-size: 0.95rem;
  }
  
  .modal-btn {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
  }
}

/* 大屏幕优化 */
@media screen and (min-width: 1024px) {
  .auth-container {
    max-width: 450px;
  }
}



/* 桌面端优化 - 平板及以上 */
@media screen and (min-width: 768px) {
  .search-popup,.guide-content {
    max-width: 900px;
    margin: 0 auto;
  }
  .guide-nav-a {
    display: inline-block;
    width: 9.2%;
  }

}

/* 大屏幕优化 - 桌面显示器 */
@media screen and (min-width: 1024px) {
  
  .page {
    max-width: 1100px;
  }
  
  .footer {
    max-width: 1100px;

  }
  .search-popup,.guide-content  {
    max-width: 1100px;

  }
}

/* 超大屏幕优化 */
@media screen and (min-width: 1280px) {

  .page {
    max-width: 1200px;
  }
  .footer {
    max-width: 1200px;
  }
  .search-popup,.guide-content  {
    max-width: 1200px;

  }
}
