#myNavBlock {
  display: flex;
  justify-content: center;
}

#myNavBlock .nav-container {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 20px;
  box-sizing: border-box;
  max-width: 100%;
}

#myNavBlock .nav-item:hover {
  background-color: #00FF00; /* 鼠标悬停时的背景颜色 */
  cursor: pointer;
}

#myNavBlock .nav-item {
  background: #FFFFFF;
  border-radius: 8px;
  width: 100px;     /* 固定宽度 */
  height: 40px;     /* 固定高度 */
  padding: 0 8px;   /* 移除垂直 padding，确保内容能垂直居中 */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  display: flex;              /* ✅ 关键：让 nav-item 成为 flex 容器 */
  align-items: center;        /* ✅ 垂直居中 */
}

#myNavBlock .nav-item a {
  display: inline-flex;
  align-items: center;        /* ✅ 图标 + 文字 垂直居中 */
  gap: 6px;
  font-size: 12px;
  text-decoration: none;
  color: #000033;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

#myNavBlock .nav-item img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;  /* 图标不缩小 */
}

@media (max-width: 700px) {
  #myNavBlock .nav-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
