.nav-main {
  /* 保留原有样式 */
  /*background: rgba(47, 156, 220, 0.15);*/
  background: gray;
  box-sizing: border-box;
  border-width: 0px 0px 1px 0px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.nav-placeholder {
  /* height: 60px; */
  /* 与导航栏高度相同 */
}

.nav-container {
  /*max-width: 1280px;*/
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  padding: 20px 0;
  color: #fff;
  text-decoration: none;
}


.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
}

.nav-item {
  position: relative;
}



/* 底部白色横杠样式 - 使用伪元素实现 */
.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  /* border-radius: 5px; */
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  height: 5px;
  background-color: white;
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 40%;
  /* 悬停时横杠展开 */
}

/* 当前选中项的样式 */
.nav-item.active::after {
  width: 40%;
  background-color: white;
}

.nav-link {
  display: block;
  padding: 20px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
  box-sizing: border-box;
  border-bottom: 5px solid rgba(255, 255, 255, 0);
}

.nav-link:hover {
  color: #6a0dad;
  box-sizing: border-box;
  /* border-bottom: 3px solid rgba(255, 255, 255, 1); */
}


/* 完全重构的下拉菜单样式 */
.nav-menu-ul {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(172, 128, 216, 0.7);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  min-width: 120px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 100;
  list-style: none;
  padding: 0;
  /* 顶部增加10px内边距 */
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  visibility: hidden;
  z-index: 9999;
}

/* 关键修复：创建悬停连接区域 */
.nav-item:hover .nav-menu-ul {
  opacity: 1;
  visibility: visible;
}

/* 确保下拉菜单保持显示 */
.nav-menu-ul:hover {
  opacity: 1;
  visibility: visible;
}

/* 第一个菜单项特殊处理 */
.nav-menu-ul li:first-child {
  padding-top: 15px;
  /* 增加顶部内边距 */
  margin-top: -15px;
  /* 补偿内边距 */
  position: relative;
}

/* 创建悬停缓冲区（不可见） */
.nav-menu-ul::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
  z-index: 101;
}

.dropdown-item {
  min-width: 120px;
  text-wrap: wrap;
  width: 100%;
  text-align: center;
  display: block;
  padding: 12px 15px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  /* border-bottom: 1px solid #f0f0f0; */
  transition: all 0.2s;
}

.dropdown-item:hover,
.dropdown-item.active {
  /* min-width: 130px; */
  width: 100%;
  text-align: center;
  background-color: #6a0dad;
  color: white;
}

.content-area {
  min-height: 1000px;
  padding: 20px;
  background-color: #f9f9f9;
}
