.navbar {
  background-color: transparent;
  padding: 1.2rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(0);
  border-bottom: 1px solid transparent;
}
.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(44, 62, 80, 0) 0%, rgba(44, 62, 80, 0.2) 25%, rgba(44, 62, 80, 0.2) 75%, rgba(44, 62, 80, 0) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}
.navbar.scrolled {
  background-color: rgba(44, 62, 80, 0.75);
  padding: 0.8rem 0;
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.05);
}
.navbar.scrolled::before {
  opacity: 1;
}
.navbar.scrolled .brand .site-title {
  font-size: 1.6rem;
  transform: translateY(0);
}
.navbar.scrolled nav ul li a {
  font-size: 1rem;
}
.navbar.scrolled nav ul li a:after {
  bottom: -2px;
  height: 1px;
}
.navbar .header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}
.navbar .brand {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.navbar .brand .site-title {
  font-size: 1.8rem;
  color: white;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  margin: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}
.navbar .brand .site-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-style: italic;
  margin: 0;
  white-space: nowrap;
}
.navbar nav ul {
  list-style: none;
  display: flex;
  gap: 3rem;
  margin: 0;
  padding: 0;
}
.navbar nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  position: relative;
  padding: 0.5rem 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.navbar nav ul li a:after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #e74c3c;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  opacity: 0;
}
.navbar nav ul li a:hover:after,
.navbar nav ul li a.active:after {
  width: 100%;
  opacity: 1;
}
.navbar nav ul li a:hover {
  color: #e74c3c;
  transform: translateY(-1px);
}
.navbar nav ul li a.active {
  color: #e74c3c;
}
.navbar nav ul li a.active:after {
  opacity: 1;
}
.navbar-scroll-transition {
  transform: translateY(-8px);
  opacity: 0.85;
  background-color: rgba(44, 62, 80, 0.6);
  backdrop-filter: blur(8px) saturate(150%);
}
.navbar-scroll-visible {
  transform: translateY(0);
  opacity: 1;
}
@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 1rem;
    background-color: rgba(44, 62, 80, 0.85);
    backdrop-filter: blur(8px) saturate(160%);
  }
  .navbar::before {
    background: linear-gradient(90deg, rgba(44, 62, 80, 0.1) 0%, rgba(44, 62, 80, 0.3) 50%, rgba(44, 62, 80, 0.1) 100%);
  }
  .navbar.scrolled {
    padding: 0.6rem 0;
    background-color: rgba(44, 62, 80, 0.8);
  }
  .navbar.scrolled .brand .site-title {
    font-size: 1.3rem;
  }
  .navbar .header-content {
    padding: 0 1rem;
    display: none;
  }
  .navbar .brand {
    gap: 0.5rem;
  }
  .navbar .brand .site-title {
    font-size: 1.4rem;
  }
  .navbar .brand .site-subtitle {
    font-size: 0.8rem;
  }
  .navbar nav ul {
    gap: 1.5rem;
  }
  .navbar nav ul li a {
    font-size: 1rem;
  }
  .navbar nav ul li a:after {
    bottom: -2px;
    height: 1px;
  }
  .mobile-navbar {
    display: flex !important;
  }
  body {
    padding-bottom: 4.5rem;
  }
}
@media (max-width: 480px) {
  .navbar .brand .site-subtitle {
    display: none;
  }
  .navbar nav ul {
    gap: 1rem;
  }
}

/* 移动端底部导航 */
.mobile-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 0.8rem 0.5rem;
  z-index: 1000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-navbar {
  display: none;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.75rem;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-nav-link.active {
  color: #ff6b6b;
}

.mobile-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
