
/* 菜单按钮样式 */
.menu-toggle {
  position: absolute;
  top: 42px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.menu-toggle.active{position: fixed;}
.menu-toggle span {
  display: block;
  width: 30px;
  height: 4px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* 菜单展开时的按钮样式（关闭图标） */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(18px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* 全屏菜单样式 */
.fullscreen-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(135deg, rgba(0, 100, 200, 0.95), rgba(0, 150, 255, 0.95));
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s ease;
}

.fullscreen-menu.active {
  height: 100%;
  opacity: 1;
}

/* 菜单内容样式 */
.menu-content {
  width: 90%;
  max-width: 1200px;
  color: white;
  padding: 20px;
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.5s ease 0.2s; /* 延迟0.2秒开始动画 */
}

.fullscreen-menu.active .menu-content {
  transform: translateY(0);
  opacity: 1;
}

/* 一级菜单网格布局 */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 30px;
}

.menu-grid > li {
  margin-bottom: 0;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

.fullscreen-menu.active .menu-grid > li {
  transform: translateY(0);
  opacity: 1;
  list-style: none;
}

/* 为每个菜单项添加不同的延迟 */
.menu-grid > li:nth-child(1) { transition-delay: 0.3s; }
.menu-grid > li:nth-child(2) { transition-delay: 0.4s; }
.menu-grid > li:nth-child(3) { transition-delay: 0.5s; }
.menu-grid > li:nth-child(4) { transition-delay: 0.6s; }
.menu-grid > li:nth-child(5) { transition-delay: 0.7s; }
.menu-grid > li:nth-child(6) { transition-delay: 0.8s; }
.menu-grid > li:nth-child(7) { transition-delay: 0.9s; }
.menu-grid > li:nth-child(8) { transition-delay: 1.0s; }

/* 一级菜单样式 */
.menu-grid a {
  color: white;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  transition: color 0.3s;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.menu-grid a:hover {
  color: #ffcc00;
}

/* 二级菜单样式 */
.submenuToggle {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.has-submenuToggle.active .submenuToggle {
  display: grid;
}

.submenuToggle li {
  margin-bottom: 5px;
  transform: translateY(10px);
  opacity: 1;
  transition: all 0.3s ease;
  list-style: none;
}

.has-submenuToggle.active .submenuToggle li {
  transform: translateY(0);
  opacity: 1;
}

/* 为二级菜单项添加不同的延迟 */
.has-submenuToggle.active .submenuToggle li:nth-child(1) { transition-delay: 0.2s; }
.has-submenuToggle.active .submenuToggle li:nth-child(2) { transition-delay: 0.3s; }
.has-submenuToggle.active .submenuToggle li:nth-child(3) { transition-delay: 0.4s; }
.has-submenuToggle.active .submenuToggle li:nth-child(4) { transition-delay: 0.5s; }
.has-submenuToggle.active .submenuToggle li:nth-child(5) { transition-delay: 0.6s; }
.has-submenuToggle.active .submenuToggle li:nth-child(6) { transition-delay: 0.7s; }
.has-submenuToggle.active .submenuToggle li:nth-child(7) { transition-delay: 0.8s; }
.has-submenuToggle.active .submenuToggle li:nth-child(8) { transition-delay: 0.9s; }

.submenuToggle a {
  font-size: 16px;
  padding: 2px 0;
  border-bottom: none;
  font-weight: normal;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-grid a {
    font-size: 18px;
  }

  .submenuToggle a {
    font-size: 14px;
  }
}


/* 按钮样式 */
#back-to-top {
  opacity: 0.9;
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  background-color: #fff;
  color: white;
  text-align: center;
  line-height: 50px;
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* 默认隐藏 */
  transition: opacity 0.3s;
  z-index: 9999;
  padding:3px;
}
#back-to-top img{max-width: 88%;margin:0 auto;top:6%;position: relative;}
#back-to-top:hover {
  opacity: 1;
  background-color: #fff;
}
