/* 表单容器 - 电脑端 */
.form-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  background-color: #2b2d36;
  color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  display: block;
  /* 电脑端默认显示 */
}

.form-container h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #3a3c47;
  color: #fff;
  font-size: 14px;
}

/* 关闭按钮样式 */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
}

/* 手机端按钮 */
.mobile-form-btn {/* 表单容器 */
.form-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  background-color: #2b2d36;
  color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  display: block;
  z-index: 9999;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
}

/* 通用按钮（默认隐藏） */
.mobile-form-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #2b2d36;
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 9998;
}

/* 手机端适配 */
@media (max-width: 767px) {
  .form-container {
    display: none;
  }

  .form-container.active {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    max-width: 400px;
  }

  .mobile-form-btn {
    display: flex;
  }
}

  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #2b2d36;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  display: none;
  /* 手机端默认隐藏，通过媒体查询显示 */
}

/* 媒体查询 - 手机端（宽度小于768px） */
@media (max-width: 767px) {

  .form-container {
    display: none;
    /* 手机端默认隐藏表单 */
  }

  .mobile-form-btn {
    display: flex;
    /* 手机端显示按钮 */
  }

  /* 居中显示表单 */
  .form-container.active {
    display: block;
    position: fixed;
    bottom: auto;
    right: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    max-width: 400px;
    z-index: 9999;
  }

  .form-container.active {
    display: block;
    /* 点击按钮后显示表单 */
    width: calc(100% - 40px);
    max-width: 400px;
  }
}