.fab-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  user-select: none;
  position: fixed;
  bottom: 60px;
  right: 60px;
  z-index: 1000;
}
@media (max-width: 640px) {
  .fab-container {
    bottom: 20px;
    right: 10px;
  }
  /* 移动端缩小按钮尺寸 */
  .fab-container .fab {
    height: 50px;
    width: 50px;
  }
  .fab-container .fab::before {
    height: 25px;
    width: 25px;
  }
  .fab-container .sub-button {
    height: 40px;
    width: 40px;
    bottom: 5px;
    right: 5px;
  }
  .fab-container .fab svg {
    width: 16px;
  }
  .fab-container .sub-button svg {
    width: 14px;
  }
  /* 移动端间距调整 */
  .fab-container:hover .sub-button:nth-child(2) {
    transform: translateY(-55px);
  }
  .fab-container:hover .sub-button:nth-child(3) {
    transform: translateY(-100px);
  }
  .fab-container:hover .sub-button:nth-child(4) {
    transform: translateY(-145px);
  }
  .fab-container:hover .sub-button:nth-child(5) {
    transform: translateY(-190px);
  }
  .fab-container:hover .sub-button:nth-child(6) {
    transform: translateY(-235px);
  }
}

/* 添加触摸设备的自动折叠功能 */
.fab-container.expanded .sub-button:nth-child(2) {
  transform: translateY(-80px);
}
.fab-container.expanded .sub-button:nth-child(3) {
  transform: translateY(-140px);
}
.fab-container.expanded .sub-button:nth-child(4) {
  transform: translateY(-200px);
}
.fab-container.expanded .sub-button:nth-child(5) {
  transform: translateY(-260px);
}
.fab-container.expanded .sub-button:nth-child(6) {
  transform: translateY(-320px);
}

/* 移动端调整 */
@media (max-width: 640px) {
  .fab-container.expanded .sub-button:nth-child(2) {
    transform: translateY(-55px);
  }
  .fab-container.expanded .sub-button:nth-child(3) {
    transform: translateY(-100px);
  }
  .fab-container.expanded .sub-button:nth-child(4) {
    transform: translateY(-145px);
  }
  .fab-container.expanded .sub-button:nth-child(5) {
    transform: translateY(-190px);
  }
  .fab-container.expanded .sub-button:nth-child(6) {
    transform: translateY(-235px);
  }
  
  /* 移动端触摸优化 - 增加触摸延迟自动折叠 */
  .fab-container.expanded {
    pointer-events: auto;
  }
  
  /* 移动端点击区域优化 */
  .fab-container .sub-button {
    min-height: 44px;
    min-width: 44px;
  }
}
.fab-container:hover {
  height: 100%;
}
.fab-container:hover .sub-button:nth-child(2) {
  transform: translateY(-80px);
}
.fab-container:hover .sub-button:nth-child(3) {
  transform: translateY(-140px);
}
.fab-container:hover .sub-button:nth-child(4) {
  transform: translateY(-200px);
}
.fab-container:hover .sub-button:nth-child(5) {
  transform: translateY(-260px);
}
.fab-container:hover .sub-button:nth-child(6) {
  transform: translateY(-320px);
}
.fab-container .fab {
  position: relative;
  height: 70px;
  width: 70px;
  background-color: #4ba2ff;
  border-radius: 50%;
  z-index: 2;
}
.fab-container .fab::before {
  content: " ";
  position: absolute;
  bottom: 0;
  right: 0;
  height: 35px;
  width: 35px;
  background-color: inherit;
  border-radius: 0 0 10px 0;
  z-index: -1;
}
.fab-container .fab .fab-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  border-radius: 50%;
}
.fab-container .fab .fab-content .material-icons {
  color: white;
  font-size: 48px;
}
.fab-container .sub-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  bottom: 10px;
  right: 10px;
  height: 50px;
  width: 50px;
  background-color: #4ba2ff;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.fab-container .sub-button:hover {
  cursor: pointer;
}
.fab-container .sub-button .material-icons {
  color: white;
  padding-top: 6px;
}
.fab svg {
  width: 20px;
  fill: white;
}
.sub-button svg {
  width: 20px;
  fill: white;
}