nav {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
  background-color: #ffffff00;
  color: #ffffff00;
  width: 100%;
  height: 56px;
  line-height: 56px;
}

/* 背景渐变和整体容器样式 */
.header-container {
  background: linear-gradient(to right, #88888896, #549fe1a8);
  padding: 20px 0;
  position: fixed; /* 改为固定定位 */
  width: 100%; /* 确保宽度占满 */
  top: 0; /* 固定在顶部 */
  left: 0; /* 确保左对齐 */
  z-index: 1000; /* 确保显示在其他内容之上 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
  padding: 0 15px;
}

/* Logo 和标题样式 */
.logo-title {
  flex-shrink: 0;
  /* 防止logo区域被压缩 */
  display: flex;
  align-items: center;
  margin-right: auto;
  /* 确保靠左 */
}

.site-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffffff;
  margin-left: 15px;
  width: 220px;
}

/* 导航栏样式 */
.nav-bar {
  display: flex;
  justify-content: center;
  flex-grow: 1;
  margin: 0 20px;
  text-align: center;
  align-items: center;
}

.nav-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 30px;
  /* 调整导航项间距 */
  align-items: center;
  /* 确保导航项垂直居中对齐 */
}

.nav-item {
  display: flex;
  align-items: center;
  height: 60px;
  /* 固定每个导航项的高度 */
}

.nav-item .nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  line-height: 1.5;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  /* 确保链接占满导航项高度 */
  text-align: center;
  line-height: 1.2;
  /* 调整行高使多行文本看起来更协调 */
  /* 修改padding，使用上下padding替代固定高度 */
  padding: 8px 16px;
}

.nav-item .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-item .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #00bcd4;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-item .nav-link:hover::after {
  width: 70%;
}

/* 登录按钮容器 */
.sign-in-wrapper {
  flex-shrink: 0;
  /* 防止按钮区域被压缩 */
  margin-left: 15px;
  /* 与其他元素保持间距 */
}

/* 登录按钮样式 */
.btn-sign-in {
  background-color: #ffffff;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  color: #283e51;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 16px;
  padding-bottom: 16px;
  white-space: nowrap;
  margin-left: 0;
  /* 移除之前的 margin */
  margin-right: 0;
  text-align: center;
}

.btn-sign-in:hover {
  background-color: #00bcd4;
  color: #ffffff;
}

/* 添加桌面端特定样式 */
@media (min-width: 1200px) {
  .nav-bar {
    display: block !important;
    /* 确保在桌面端始终显示 */
    position: static;
    background: transparent;
  }

  .nav-list {
    justify-content: center;
  }

  .hamburger {
    display: none;
  }
}

/* 动画效果 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-collapse.show .nav-item {
  animation: slideIn 0.3s ease forwards;
  animation-delay: calc(var(--item-index) * 0.1s);
}

/* 删除原有的 .navbar-toggler 相关样式 */

/* 自定义 hamburger 按钮样式 */
.hamburger {
  margin-left: 15px;
  /* 与登录按钮保持间距 */
  border-radius: 4px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.3);
}

/* 自定义汉堡按钮线条样式 */
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, #255e90, #1f364a);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  bottom: -8px;
}

/* 激活状态特效 */
.hamburger.is-active .hamburger-inner,
.hamburger.is-active .hamburger-inner::before,
.hamburger.is-active .hamburger-inner::after {
  background: linear-gradient(90deg, #255e90, #1f364a);
  box-shadow: 0 0 8px rgba(100, 255, 218, 0.5);
}

.hamburger.is-active {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.2);
}

/* 添加霓虹灯效果 */
@keyframes neon-glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 188, 212, 0.2);
  }

  50% {
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.4);
  }

  100% {
    box-shadow: 0 0 5px rgba(0, 188, 212, 0.2);
  }
}

.hamburger.is-active {
  animation: neon-glow 2s infinite;
}

/* 移动端导航菜单样式 */
.mobile-nav {
  display: none;
  padding: 1rem;
  backdrop-filter: blur(10px);
  position: absolute;
  left: 0;
  right: 0;
  z-index: 10;

  background-color: rgba(66, 60, 114, 0.644) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Safari 支持 */
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.mobile-nav.show {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 导航栏和右侧元素容器 */
.right-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .header-container {
    padding: 10px 0;
    height: 60px;
    /* 移动端降低高度 */
  }

  .site-title {
    font-size: 1.2rem;
    max-width: 150px;
  }

  .navbar-toggler {
    border: none;
    background: transparent;
    padding: 8px;
  }

  .nav-bar {
    display: none;
    /* 默认隐藏移动端导航 */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
  }

  .nav-bar.show {
    display: block;
    /* 当展开时显示 */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(40, 62, 81, 0.98);
    padding: 20px;
    backdrop-filter: blur(10px);
  }

  #navbarNav {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    height: auto;
  }

  #navbarNav.show {
    display: block !important;
  }

  #mobileNav {
    position: fixed; /* 改为固定定位 */
    width: 100%; /* 确保宽度占满 */
    top: 060px; /* 固定在顶部 */
    left: 0px;
    z-index: 1000; /* 确保显示在其他内容之上 */
  }

  .nav-list {
    flex-direction: column;
    gap: 10px;
  }

  .nav-item {
    height: auto;
    /* 在移动端取消固定高度 */
  }

  .nav-item .nav-link {
    display: block;
    padding: 12px 20px;
    text-align: center;
    min-height: 44px;
    min-width: 80vw;
    /* 移动端设置最小高度 */
  }

  .sign-in-wrapper {
    margin-left: 10px;
  }

  .btn-sign-in {
    padding: 8px 20px;
    font-size: 0.9rem;
  }

  .navbar-collapse.show .mobile-nav {
    display: flex;
  }

  .hamburger {
    padding: 8px;
    display: inline-block;
  }

  .hamburger-inner,
  .hamburger-inner::before,
  .hamburger-inner::after {
    width: 22px;
    background-color: #fff;
  }

  .header-inner {
    padding: 0 10px;
  }

  .right-section {
    gap: 10px;
  }

  .sign-in-wrapper {
    margin-left: 10px;
  }

  .hamburger {
    margin-left: 10px;
  }

  body {
    padding-top: 80px; /* 移动端header较小时的调整 */
  }
}

/* 移动导航菜单动画 */
#mobileNav {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobileNav.collapsing {
  transition: height 0.3s ease;
}

#mobileNav.show-nav {
  opacity: 1;
  transform: translateY(0);
}

/* 汉堡按钮动画优化 */
.hamburger {
  transition: all 0.3s ease-in-out;
}

.hamburger.is-active {
  transform: rotate(90deg);
}

@media (max-width: 450px) {
  .site-title {
    font-size: 1rem;
    max-width: 80px;
  }
}

/* 为了防止内容被固定header遮挡，需要为body添加上边距 */
body {
  padding-top: 100px; /* header的高度加padding的总和 */
}
