/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 80px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to right,
    rgba(15, 21, 37, 0.95),
    rgba(20, 26, 44, 0.95)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

/* 添加导航栏滚动隐藏类 */
.navbar-hidden {
  transform: translateY(-100%);
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 60px;
  width: auto;
}

.logo-text {
  margin-left: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ccd6f6;
}

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

.nav-item {
  position: relative;
  margin: 0 10px;
}

.nav-link {
  display: block;
  padding: 10px 15px;
  color: #ccd6f6;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #c90101;
}

.nav-link.active {
  color: #c90101;
}

.nav-link.has-dropdown::after {
  content: "▼";
  font-size: 0.6rem;
  margin-left: 8px;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.nav-link.has-dropdown:hover::after {
  transform: rotate(-180deg);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background: rgba(20, 26, 44, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 8px 20px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  color: #c90101;
  background-color: rgba(255, 255, 255, 0.05);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: #ccd6f6;
  background: none;
  border: none;
  cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(20, 26, 44, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .nav-item {
    margin: 5px 0;
    width: 100%;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(30, 36, 54, 0.5);
    border-radius: 5px;
    transition: max-height 0.4s ease, padding 0.4s ease;
  }

  .dropdown.show {
    max-height: 500px;
    padding: 10px 0;
  }

  .nav-link.has-dropdown::after {
    float: right;
    margin-top: 5px;
  }
}

/* 为页面内容添加顶部空间，避免被导航栏遮挡 */
body {
  padding-top: 80px;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
