:root {
  --primary: #e91e63;
  --primary-dark: #c2185b;
  --secondary: #673ab7;
  --warning: #f72585;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  margin: 0;
}

.logo-con {
  position: fixed;
  top: 0;
  left: 0;
  height: 65px;
  z-index: 100;
  width: 100%;
  top: 0px;
  left: 0px;
  background-color: #fff;
  min-width: 580px;
}
.logo-con .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-con .wrapper .item-con-logo {
  display: inline-block;
  width: auto;
  height: 30px;
  margin: 10px 20px;
}
.logo-con .wrapper {
  height: 100%;
  width: 100%;
  margin: 0 auto;
}
.logo-con .wrapper .item-con-logo {
  height: 45px;
  display: flex;
  align-items: center;
}
.logo-con .wrapper .left img {
  height: 40px;
}
.logo-con .wrapper .right img {
  height: 24px;
}
.card {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  flex: 1;
  margin-top: 65px;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 20px auto 20px;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  padding-bottom: 10px;
  min-height: calc(100vh - 12rem); /* 视口高度减去上下边距和其他元素高度 */
  display: flex;
  flex-direction: column;
}

/* 表单头部 */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 20px 100px;
  text-align: center;
  position: relative;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3
  );
}

.header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.header-title {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
}

/* 表单主体 */
.form-container {
  padding: 2.5rem 1.25rem 1.25rem 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  position: relative;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  /* 固定高度：防止提示文本变化导致布局抖动 */
  min-height: 110px;
}

/* 按顺序延迟入场动画 */
.form-row:nth-child(1) .form-group:nth-child(1) {
  animation-delay: 0.1s;
}
.form-row:nth-child(1) .form-group:nth-child(2) {
  animation-delay: 0.2s;
}
.form-row:nth-child(2) .form-group:nth-child(1) {
  animation-delay: 0.3s;
}
.form-row:nth-child(2) .form-group:nth-child(2) {
  animation-delay: 0.4s;
}
.form-row:nth-child(3) .form-group:nth-child(1) {
  animation-delay: 0.5s;
}
.form-row:nth-child(3) .form-group:nth-child(2) {
  animation-delay: 0.6s;
}
.form-group.full-width {
  animation-delay: 0.7s;
  min-height: 160px; /* 文本域组高度适配 */
}
.form-row.captcha-row .form-group {
  animation-delay: 0.8s;
  min-height: 130px; /* 验证码组高度适配 */
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #212529;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 必填项标记 */
.required::after {
  content: '*';
  color: var(--warning);
  font-size: 1.2em;
  font-weight: bold;
}
.required-privacy::before {
  content: '*';
  color: var(--warning);
  font-size: 1.2em;
  font-weight: bold;
}

.icon {
  /* color: var(--primary); */
  font-size: 1.1em;
  font-weight: 700;
}

/* 输入框样式 - 保持固定不抖动 */
.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: #fafafa;
  /* 固定输入框高度，防止内容变化导致尺寸波动 */
  height: 52px;
  /* 移动端优化 */
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.2);
  background-color: white;
  /* 移除focus时的位移，避免抖动 */
  transform: none;
}

/* 文本域特殊处理 - 固定最小高度，禁止高度抖动 */
textarea.form-control {
  min-height: 120px;
  height: auto; /* 文本域允许自适应高度，但限制最小高度 */
  resize: vertical;
  line-height: 1.5;
  padding-top: 12px;
}

/* 验证码区域 */
.captcha-group {
  display: flex;
  align-items: center;
  gap: 15px;
}
.captcha-canvas {
  width: 120px;
  height: 50px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  background-color: #f9f9f9;
}

.captcha-img {
  height: 52px;
  width: 120px;
  border: 2px solid var(--light-gray);
  border-radius: var(--border-radius);
  background-color: #fafafa;
  cursor: pointer;
  transition: var(--transition);
  object-fit: cover;
}

.captcha-img:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* 隐私协议 */
.privacy-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  position: relative;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.privacy-input {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.privacy-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: var(--transition);
  margin-top: 2px;
}

.privacy-input:checked + .privacy-checkbox {
  background-color: var(--primary);
  border-color: var(--primary);
}

.privacy-input:checked + .privacy-checkbox::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.privacy-label {
  font-weight: 500;
  color: #212529;
  transition: var(--transition);
  font-size: 1rem;
}

.privacy-label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.privacy-label a:hover {
  text-decoration: underline;
}

.rule-tip {
  color: var(--gray);
  font-size: 0.85rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.rule-tip::before {
  content: 'ℹ';
  font-size: 1em;
}

/* 错误提示 - 错误时显示，覆盖规则提示位置 */
.error-message {
  color: var(--warning);
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.error-message::before {
  content: '⚠';
  font-size: 1em;
}

.error-input {
  border-color: var(--warning) !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 3px rgba(247, 37, 133, 0.1) !important;
  transform: none !important;
}

/* 提交成功提示 */
.success-message {
  text-align: center;
  color: #27ae60;
  font-size: 1.2rem;
  margin: 20px 0;
  padding: 20px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: var(--border-radius);
  display: none;
  animation: fadeIn 0.5s ease;
}

/* 提交按钮 */
.submit-btn {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border: none;
  padding: 14px 30px;
  font-size: 1.05rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  margin: 0 auto;
  font-weight: 600;
  box-shadow: 0 6px 15px rgba(233, 30, 99, 0.3);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
  margin-top: 4.3rem;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(233, 30, 99, 0.4);
}

.submit-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.submit-btn:hover::after {
  left: 100%;
}
.gongan {
  width: 12px;
  height: 12px;
}
.guang-gao {
  position: absolute;
  z-index: 12;
  line-height: 1em;
  padding: 5px 10px;
  background-color: #cccccc;
  text-align: center;
  font-size: 16px;
  border: 1px solid #dddddd;
  right: 36px;
  top: 75px;
}

/* footer - 固定在底部 */
.container-bottom {
  position: relative;
  z-index: 10; /* 确保在内容上方 */
  margin: 0 auto;
  width: 100%;
  color: #fff;
  background-color: #000;
  box-sizing: border-box;
  min-height: 60px;
  max-height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
}

.link-con {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}
.links {
  margin: 5px;
  position: absolute;
  left: 25%;
  top: 10%;
  font-size: 16px;
}

.container-bottom a,
.container-bottom span {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}
.links a {
  font-size: 16px;
}
.icon a {
  float: left;
}

/* 动画定义 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 页脚基础样式 */
.link-con .copyright {
  display: inline;
}

.link-con .icp-links {
  display: inline;
}

.link-con .icp-links a {
  margin-left: 10px;
}

/* 响应式适配 */

/* 平板适配 */
@media (max-width: 1024px) {
  .container {
    width: 95%;
    margin: 20px auto 20px;
  }

  .header h2 {
    font-size: 1.4rem;
  }

  .link-con {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
  }

  .link-con .copyright {
    display: block;
    width: 100%;
  }

  .link-con .icp-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .header {
    padding: 20px 15px;
  }
  /* 全局调整 */
  body {
    font-size: 14px;
  }

  /* Logo区域适配 */
  .logo-con {
    min-width: auto;
    height: 60px;
  }

  .logo-con .wrapper .item-con-logo {
    margin: 8px 15px;
  }

  .logo-con .wrapper .left img {
    height: 35px;
  }

  .logo-con .wrapper .right img {
    height: 20px;
  }

  /* 主容器适配 */
  .card {
    min-width: auto;
  }

  .container {
    width: 95%;
    margin: 15px auto 15px;
    border-radius: 8px;
  }

  /* 头部适配 */
  .header {
    padding: 30px;
  }

  .header h2 {
    font-size: 1.375rem;
  }

  .header-title {
    display: flex;
    gap: 2px;
    padding-top: 6px;
  }

  /* 表单行布局 */
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 15px;
  }

  /* 表单项适配 */
  .form-group {
    min-height: 85px;
  }

  .form-group label {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }
  .privacy-label {
    font-size: 0.95rem;
  }

  /* 输入框适配 */
  .form-control {
    height: 48px;
    padding: 12px 14px;
    font-size: 16px;
  }

  /* 文本域适配 */
  textarea.form-control {
    min-height: 100px;
    padding-top: 10px;
  }

  /* 验证码区域 */
  .captcha-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .captcha-img {
    width: 100%;
    height: 50px;
    margin-top: 0;
  }

  .privacy-label {
    line-height: 1.4;
  }

  /* 提交按钮适配 */
  .submit-btn {
    padding: 16px 25px;
    font-size: 1rem;
    width: 100%;
    margin-top: 62px;
  }

  /* 页脚适配 */
  .container-bottom {
    padding: 16px 20px;
    min-height: 80px;
  }

  .link-con {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
  }

  /* 移动端页脚两行布局 */
  .link-con .copyright {
    display: inline-block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
  }

  .link-con .icp-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
  }

  .container-bottom a,
  .container-bottom span {
    font-size: 14px;
  }

  .simple-message {
    top: 15px;
    left: 15px;
    right: 15px;
    transform: none;
    min-width: auto;
    max-width: none;
    padding: 12px 15px;
    font-size: 0.9rem;
  }
}

/* 横屏适配 */
@media (max-width: 768px) and (orientation: landscape) {
  .header {
    padding: 20px 15px;
  }
  .container {
    margin: 10px auto 10px;
  }

  .form-group {
    min-height: 80px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 15px 12px;
  }

  .header h2 {
    font-size: 1.1rem;
  }

  .form-row {
    gap: 10px;
    margin-bottom: 12px;
  }

  .form-group {
    min-height: 80px;
  }

  .form-control {
    height: 44px;
    padding: 10px 12px;
  }

  textarea.form-control {
    min-height: 90px;
  }

  .submit-btn {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  .logo-con {
    height: 60px;
  }

  .logo-con .wrapper .item-con-logo {
    margin: 6px 12px;
  }

  .logo-con .wrapper .left img {
    height: 30px;
  }

  .logo-con .wrapper .right img {
    height: 18px;
  }
}

/* 超小屏适配 */
@media (max-width: 375px) {
  .container {
    width: 95%;
    margin: 15px auto 15px;
    border-radius: 8px;
  }
  .submit-btn {
    margin-top: 42px;
  }
  .header h2 {
    font-size: 1.1rem;
  }

  .form-control {
    height: 42px;
    padding: 8px 10px;
    font-size: 16px;
  }

  .container-bottom a,
  .container-bottom span {
    font-size: 12px;
  }

  .link-con .copyright {
    display: inline-block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
  }
}
/* 小屏手机页脚进一步优化 */
.link-con .icp-links {
  gap: 8px;
}

.link-con .icp-links a {
  margin-left: 0;
}

/* 超小屏页脚优化 */
.container-bottom {
  padding: 10px 8px;
}

.link-con {
  gap: 6px;
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
  /* 移除悬停效果，优化触摸体验 */
  .submit-btn:hover {
    transform: none;
    box-shadow: 0 6px 15px rgba(233, 30, 99, 0.3);
  }

  .submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.4);
  }

  .form-control:focus {
    transform: none;
  }

  .captcha-img:hover {
    transform: none;
  }

  .privacy-label a:hover {
    text-decoration: none;
  }

  .privacy-label a:active {
    text-decoration: underline;
  }
}

/* 高分辨率屏幕适配 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-con .wrapper .left img,
  .logo-con .wrapper .right img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  /* 可以根据需要添加深色模式样式 */
}

/* 减少动画的用户偏好 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.simple-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 20px;
  min-width: 240px;
  max-width: 400px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  font-size: 1rem;
  font-family: 'Noto Sans SC', 'Segoe UI', sans-serif;
  text-align: center;
  z-index: 1000;
  opacity: 0;
  animation: message-fade-in 0.3s forwards;
  background-color: white;
  color: var(--warning); /* 使用页面定义的颜色 */
  border: 1px solid var(--warning); /* 使用页面定义的颜色 */
}

.simple-message.success {
  color: #67c23a; /* 成功信息颜色 */
  border: 1px solid #67c23a;
}

.simple-message.error {
  color: var(--warning); /* 错误信息颜色 */
  border: 1px solid var(--warning);
}

.simple-message.warning {
  color: #e6a23c; /* 警告信息颜色 */
  border: 1px solid #e6a23c;
}

.simple-message .close-icon {
  float: right; /* 改为右对齐 */
  margin-left: 8px; /* 调整间距 */
  cursor: pointer;
  font-size: 1.2em; /* 调整图标大小 */
}

@keyframes message-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.provacy-card {
  margin-top: 60px !important;
  display: flex !important;
  flex-direction: column !important;
}
