/* 网格容器 - 固定4列布局 */
.nav-grid {
  display: flex;
  flex-wrap: wrap;
  overflow-x: hidden;
  padding: 10px 0;
  margin: 0 !important;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

/* 单个导航项 - 固定4列宽度 */
.nav-item {
  flex: 0 0 auto;
  width: calc(25% - 3.75px);
  text-align: center;
  margin-bottom: 10px;
}

/* 图标样式 */
.nav-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 文字样式 */
.nav-item span {
  display: block;
  font-size: 12px;
  margin-top: 8px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图标悬停特效 */
.nav-item img:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* 滚动条样式 */
.nav-grid::-webkit-scrollbar {
  height: 8px;
}

.nav-grid::-webkit-scrollbar-track {
  background: #f0f7ff;
  border-radius: 10px;
}

.nav-grid::-webkit-scrollbar-thumb {
  position: relative;
  background: linear-gradient(90deg, 
    rgba(142, 197, 252, 0) 0%, 
    rgba(142, 197, 252, 0.8) 50%, 
    rgba(142, 197, 252, 0) 100%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: flowLight 3s infinite linear;
}

.nav-grid::-webkit-scrollbar-thumb::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.6) 50%, 
    rgba(255, 255, 255, 0) 100%);
  background-size: 200% 100%;
  animation: flowHighlight 2s infinite linear;
}

/* 流光动画关键帧 */
@keyframes flowLight {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes flowHighlight {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}