.floating-window {
    display: none; /* 默认隐藏 */
    position: fixed;
    right: 0;
    top: 25%;
    transform: translateY(-50%);
    background-color: #f9f9f9;
    border: 1px solid #d3d3d3;
    width: 80%; /* 移动端宽度占屏幕的80% */
    max-width: 450px; /* 设置最大宽度 */
    padding: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* 确保悬浮窗位于页面其他元素之上 */
  }
  
  .window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .close-btn {
    font-size: 24px;
    cursor: pointer;
  }
  
  .window-content {
    max-height: calc(100vh - 100px); /* 确保内容不会超出视口高度 */
    overflow-y: auto; /* 如果内容过长则允许滚动 */
    text-align: center; /* 居中显示 */
  }
  
  .window-content img {
    max-width: 100%; /* 确保图片不会超出窗口宽度 */
    height: auto; /* 保持图片比例 */
  }
  
  .window-content h2,
  .window-content p {
    margin: 5px 0; /* 缩小上下行距 */
  }
  
  .apply-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background-color: #A41B35;
    color: white;
    text-align: center;
    border: none;
    border-radius: 8px; /* 圆角矩形 */
    cursor: pointer;
    text-decoration: none;
  }
  
  @media (min-width: 768px) {
    .floating-window {
      width: 150px; /* 在较大屏幕上使用固定宽度 */
    }
  }
  /* 定义显示动画 */
  .show {
    display: block !important;
    animation: slideIn 0.3s forwards;
  }
  
  @keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
  }
  
  /* 移动端适配 */
  @media (max-width: 767px) {
    .floating-window {
      width: 30%; /* 移动端宽度占屏幕的90% */
      right: 0; /* 靠右侧显示 */
      left: auto; /* 重置left属性 */
      top: 25%; /* 调整悬浮窗位置 */
      transform: translateY(0); /* 重置transform属性 */
    }
  }

  .close-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
  .close-btn:hover {
    background: rgba(0, 0, 0, 0.5);
  }