#new_header {
  width: 100%;
  background: transparent;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background-color 0.1s ease, box-shadow 0.3s ease;
}

#new_header.scrolled {
  background-color: #0000006a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

header {
  background-color: #333;
  color: white;
}

#new_header #logo {
  display: flex;
  align-items: center;
}

#new_header #logo img {
  width: 100px;
}

.header-container {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 100px;
}

a {
  cursor: pointer !important;
}

.container {
  display: flex;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 100px;
}

.logo a {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: white;
  padding: 10px 5px;
  margin: 0 10px;
  border-radius: 4px;
  transition: 0.3s;
  box-sizing: border-box;
  position: relative;
}

.nav-links a:hover {
  color: rgb(245, 183, 75);
}

/* 子菜单样式 */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary-color);
  list-style: none;
  padding: 10px 0;
  z-index: 1000;
}

/* 子菜单展开时 */
.submenu.open {
  display: block;
}

.submenu li {
  margin: 0;
}

.submenu a {
  padding: 10px 15px;
  width: 150px;
  display: block;
}

.nav-links li:hover .submenu {
  display: block;
}

/* 移动版弹出搜索框样式 */
.mobile-search-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 400px;
  position: relative;
}

.popup-content input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  outline: none;
}

.popup-content button {
  width: 100%;
  padding: 10px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.popup-content button:hover {
  background-color: #555;
}

.close-popup-area {
  display: flex;
  justify-content: space-between;
}

.close-popup-area button {
  width: 47%;
}

.close-popup {
  position: absolute;
  top: -10px;
  right: 5px;
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  color: #000;
}

.menu-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

.mobile-search-icon {
  display: none;
  font-size: 24px;
  margin-left: 15px;
  cursor: pointer;
}

#footer {
  clear: both;
  background: var(--footer-bg-color);
  font-size: 14px;
  border-top: 4px solid var(--footer-border-color);
}

.footer-nav {
  display: flex;
  justify-content: center;
  color: #fff;
  box-sizing: border-box;
  padding-top: 20px;
  white-space: nowrap;
  flex-wrap: wrap;
}

.footer-nav span {
  margin: 5px;
}

.footer-nav a {
  color: var(--footer-link-text-color);
}

.footer-desc {
  margin: 0 auto;
  text-align: center;
  color: #ffffff;
  padding: 15px;
  max-width: 711px;
}

/* 手机屏幕支持 */
@media (max-width: 768px) {
  /* 禁用 :hover 在移动端显示子菜单 */
  .nav-links li:hover > .submenu {
    display: none; /* 覆盖掉 hover 的效果 */
  }

  /* 通过点击时添加 .open 类来显示子菜单 */
  .submenu.open {
    display: block !important; /* 使用 JavaScript 控制 .open 类的显示 */
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--header-bg);
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 20px;
    z-index: 1000;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .nav-links a {
    padding: 10px;
  }

  .submenu {
    position: relative;
    top: 0;
    background-color: var(--submenu-bg-color);
    width: 100%;
    padding: 0;
  }

  .submenu li {
    margin-left: 10px;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-icon {
    display: block;
  }

  .container {
    padding: 10px 20px;
  }

  .header-container {
    padding: 10px 15px;
  }

  .active a {
    background-color: initial !important;
  }

  .nav-content {
    display: flex;
    align-items: center;
  }

  .famous-nav-item {
    min-width: 90px;
  }

  .nav-links a:after {
    display: none;
  }

  #new_header {
    position: static !important;
  }

  .header-container {
    justify-content: space-between;
  }
}

.main-image {
  user-select: none;
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}

.main-image .main-image-photo {
  width: 100%;
  height: auto;
  max-width: 1280px;
}

.main-image-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 5vw;
}

.main-image-text h1 {
  color: #fff;
  font-size: 2.6em;
  margin: 0;
  letter-spacing: 6px;
}

.main-image-text h2 {
  color: #fff;
  font-size: 1.4em;
  margin: 0;
  margin-top: 10px;
  font-weight: 600;
}

.main-join-link {
  display: inline-flex;
  transition: all 0.4s;
  padding: 8px 15px;
  border-radius: 45px !important;
  background-color: transparent !important;
  background-image: linear-gradient(
    to right,
    #9213ab 0,
    #5c107f 51%,
    #932bc4 100%
  );
  background-size: 200% auto !important;
  background-position-x: 2.55543%;
  background-position-y: -96.1669%;
  margin-top: 16px;
  color: #fff;
  text-decoration: none;
  align-items: center;
}

.main-join-link:hover {
  background-position: right center;
}

.main-join-link img {
  width: 25px;
  height: 25px;
  margin-right: 4px;
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .main-image-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0vw;
    width: 50%;
  }

  .main-image-text h1 {
    color: #fff;
    font-size: 1.3em;
    margin: 0;
    letter-spacing: 2px;
    line-height: 1.3;
  }

  .main-image-text h2 {
    color: #fff;
    font-size: 10px;
    margin: 0;
    margin-top: 10px;
  }

  .main-join-link {
    padding: 5px 10px;
    font-size: 12px;
  }

  .main-join-link img {
    width: 20px;
    height: 20px;
  }
}
