/* 基础 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    SourceHanSansCN,
    -apple-system,
    BlinkMacSystemFont,
    Segoe UI,
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    Fira Sans,
    Droid Sans,
    Helvetica Neue,
    sans-serif;
}

a {
  text-decoration: none;
}

/* PC Header */
.header {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  position: sticky !important;
  top: 0;
  z-index: 1000;
}

/* 确保在所有页面上头部都能固定 */
site-header {
  display: block;
  width: 100%;
  background-color: white !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

site-header .header {
  position: sticky !important;
  top: 0;
  z-index: 1000 !important;
  background-color: white !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.header__main {
  width: 100%;
  max-width: 1512px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.header__logo-nav {
  flex: 1;
  display: flex;
  align-items: center;
}

.header__logo-text {
  color: #ef4444;
  font-size: 20px;
  line-height: 40px;
  font-weight: bold;
}

.header__devTip {
  font-size: 12px;
  line-height: 30px;
  color: #ef4444;
  margin-right: 32px;
}

.header__nav--pc {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 60px;
}

/* 激活导航项文本颜色 + 图标显示 */
.header__nav-item.active .header__nav-link {
  color: #cd4415;
}

.header__nav-item .header__nav-arrow-icon {
  display: none;
  /* 默认隐藏图标 */
}

.header__nav-item.active .header__nav-arrow-icon {
  display: inline-block;
  /* 激活显示图标 */
}

.header__nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 下拉菜单容器 */
.header__nav-item--dropdown {
  position: relative;
}

/* 隐藏下拉菜单 + 动画初始状态 */
.header__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.25s ease;
}

/* 菜单项样式 */
.header__dropdown a {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  font-size: 16px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

/* 悬停效果 */
.header__dropdown a:hover {
  background: #fef5f5;
  color: #cd4415;
}

/* 悬停显示菜单 + 动画效果 */
.header__nav-item--dropdown:hover .header__dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 确保主导航项在下拉层上方 */
.header__nav-item--dropdown:hover {
  z-index: 1001;
}

.header__nav-link {
  color: #303133;
  font-size: 16px;
  /* font-weight: bold; */
  line-height: 28px;
}

.header__nav-link:hover {
  color: #cd4415;
}

.header__actions--pc {
  display: flex;
  gap: 16px;
  align-items: center;
}

.header__search {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #eaeaea;
  /* position: absolute; */
  /* right: 450px; */
}

.header__input {
  border: none;
  outline: none;
  font-size: 14px;
  line-height: 28px;
  width: 120px;
}

.header__btn {
  width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.header__btn--register {
  color: #303133;
}

.header__btn--login {
  color: #fff;
  background: #cd4415;
}

.header__user--pc {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.header__user-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__user-name {
  color: #303133;
  font-size: 14px;
  line-height: 24px;
}

.header__user-icon {
  width: 16px;
  height: 16px;
}

/* 用户下拉菜单初始隐藏 */
.header__user-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.25s ease;
}

/* 菜单项样式 */
.header__user-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

/* 悬停效果 */
.header__user-dropdown a:hover {
  background: #fef5f5;
  color: #cd4415;
  cursor: pointer;
}

/* 悬停 a 时改变 img 的颜色 */
.header__user-dropdown a:hover img.header__user-icon {
  filter: invert(38%) sepia(89%) saturate(5291%) hue-rotate(1deg)
    brightness(97%) contrast(102%);
}

/* 悬停显示用户下拉菜单 */
.header__user--pc:hover .header__user-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 确保悬停时用户块在下拉层上方 */
.header__user--pc:hover {
  z-index: 1001;
}

.header__menu {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f5f7fa;
  position: relative;
  z-index: 1002;
  cursor: pointer;
}

/* PC端隐藏header__menu模块 */
@media (min-width: 769px) {
  .header__actions--pc .header__menu {
    display: none !important;
  }
}

/* PC隐藏移动端菜单 */
.header__mobile-menu,
.header__mobile-search,
.header__mobile-overlay,
.header__menu--mobile {
  display: none;
}

/* Footer */
.footer {
  width: 100%;
}

.footer__menu {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  /* background-color: #E4E7ED; */
  background-color: #3d3d3d;
}

.footer__menu-container {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
  max-width: 1200px;
}

.footer__menu-logo-warpper {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__menu-logo-image {
  width: 191px;
  height: 58px;
  display: block;
}

.footer__menu-logo-text {
  font-size: 14px;
  color: #ddd;
  line-height: 40px;
}

.footer__menu-link-warpper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__menu-link-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 12px;
}

.footer__menu-link-warpper a {
  font-size: 14px;
  line-height: 24px;
  color: #ddd;
}

.footer__menu-link-warpper a:hover {
  color: #fff;
}

.footer__menu-contact-warpper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__menu-contact-text {
  font-size: 14px;
  line-height: 24px;
  color: #ddd;
}

.footer__menu-qrcode-warpper {
  flex: 1;
  gap: 12px;
  display: flex;
  flex-direction: column;
}

.footer__menu-qrcode-image {
  width: 100px;
  height: 100px;
}

.footer__menu-qrcode-text {
  font-size: 14px;
  line-height: 24px;
  display: flex;
  justify-content: center;
  width: 120px;
  color: #ddd;
}

.footer__copyright {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: solid 1px #555;
  /* background-color: #E4E7ED; */
  background-color: #3d3d3d;
}

.footer__copyright a {
  color: #eee;
  font-size: 14px;
  line-height: 20px;
}

@media (max-width: 768px) {
  .header__logo-text {
    font-size: 16px;
  }

  /* 移动端隐藏footer的logo模块和二维码模块 */
  .footer__menu-logo-warpper,
  .footer__menu-qrcode-warpper {
    display: none !important;
  }

  /* 移动端快速链接横向排列 */
  .footer__menu-link-warpper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    align-items: center !important;
  }

  .footer__menu-link-warpper .footer__menu-link-title {
    width: 100% !important;
    margin-bottom: 8px !important;
  }

  .footer__menu-link-warpper a {
    flex: 1 !important;
    text-align: center !important;
    min-width: 80px !important;
  }

  .header__main {
    width: 100%;
    padding: 0 7px;
    justify-content: space-between;
  }

  .header__nav--pc {
    display: none;
  }

  /* 隐藏 PC 头部其他元素，只保留头像和箭头 */
  .header__actions--pc .header__search,
  .header__actions--pc .header__login,
  .header__actions--pc .header__menu {
    display: none !important;
  }

  /* 显示用户区 */
  .header__actions--pc .header__user {
    display: flex !important;
  }

  .header__user-name {
    display: none !important;
  }

  .header__menu--mobile {
    display: flex;
  }

  /* 遮罩：立即显示，无动画 */
  .header__mobile-overlay {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    pointer-events: none;
    /* 防止遮罩层阻止点击事件 */
  }

  /* 当菜单打开时，允许点击并显示 */
  .header__mobile-overlay.open {
    display: flex !important;
    pointer-events: auto;
  }

  /* 白色菜单 + 搜索整体包裹容器动画 */
  .header__mobile-content {
    width: 100%;
    background-color: #fff;
    transform: translateY(-100%);
    opacity: 0;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    pointer-events: auto;
    /* 确保菜单内容可以点击 */
  }

  .header__mobile-overlay.open .header__mobile-content {
    transform: translateY(0);
    opacity: 1;
  }

  /* 用户下拉菜单初始隐藏 */
  .header__user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.25s ease;
  }

  /* 白色菜单 */
  .header__mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .header__mobile-menu a {
    padding: 12px 12px;
    font-size: 14px;
    line-height: 24px;
    color: #303133;
    width: 100%;
  }

  /* 搜索 + 登录 */
  .header__mobile-search {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #fff;
  }

  .header__login {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .header__login a {
    flex: 1;
  }

  .header__login a .header__btn {
    width: 100%;
    justify-content: center;
  }

  .header__btn--register {
    box-sizing: border-box;
    border: 1px solid #eee;
  }
}

/* 兼容 1440px */
@media (max-width: 1420px) {
  .header__main {
    width: 100%;
    max-width: 1440px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
  }

  .header__tags-link {
    display: none;
  }

  .header__search {
    display: none;
  }

  /* .header__nav--pc {
		display: none;
	} */

  /* .header__actions--pc {
		display: none;
	} */

  /* 隐藏 PC 头部其他元素，只保留头像和箭头 */
  /* .header__actions--pc .header__search, */
  /* .header__actions--pc .header__login, */
  /* .header__actions--pc .header__menu {
		display: none !important;
	} */

  /* 显示用户区 */
  /* 	.header__actions--pc .header__user {
		display: flex !important;
	}

	.header__user-name {
		display: none !important;
	} */

  /* .header__menu--mobile {
		display: flex;
	} */

  /* 用户下拉菜单初始隐藏 */
  .header__user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 120px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.25s ease;
  }

  /* 遮罩：立即显示，无动画 */
  .header__mobile-overlay {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    pointer-events: none;
  }

  /* 当菜单打开时，允许点击并显示 */
  .header__mobile-overlay.open {
    display: flex !important;
    pointer-events: auto;
  }

  /* 白色菜单 + 搜索整体包裹容器动画 */
  .header__mobile-content {
    width: 100%;
    background-color: #fff;
    transform: translateY(-100%);
    opacity: 0;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .header__mobile-overlay.open .header__mobile-content {
    transform: translateY(0);
    opacity: 1;
  }

  /* 白色菜单 */
  .header__mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .header__mobile-menu a {
    padding: 12px 12px;
    font-size: 14px;
    line-height: 24px;
    color: #303133;
    width: 100%;
    border-bottom: solid #eeeeee 1px;
  }

  /* 搜索 + 登录 */
  .header__mobile-search {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #fff;
  }

  .header__login {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .header__btn {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }

  .header__btn--register {
    color: #303133;
  }

  .header__btn--login {
    color: #fff;
    background: #cd4415;
  }

  /* .header__login a {
		flex: 1;
	}

	.header__login a .header__btn {
		width: 100%;
		justify-content: center;
	}

	.header__btn--register {
		box-sizing: border-box;
		border: 1px solid #eee;
	} */
}

/* 兼容 1200px */
@media (max-width: 1180px) {
  .header__main {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    justify-content: space-between;
  }

  .header__nav--pc,

	/* 隐藏 PC 头部其他元素，只保留头像和箭头 */
	.header__actions--pc .header__search,
	.header__actions--pc .header__login,
	.header__actions--pc .header__menu {
    display: none !important;
  }

  /* 显示用户区 */
  .header__actions--pc .header__user {
    display: flex !important;
  }

  .header__user-name {
    display: none !important;
  }

  .header__menu--mobile {
    display: flex;
  }

  /* 遮罩：立即显示，无动画 */
  .header__mobile-overlay {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    pointer-events: none;
  }

  /* 当菜单打开时，允许点击并显示 */
  .header__mobile-overlay.open {
    display: flex !important;
    pointer-events: auto;
  }

  /* 白色菜单 + 搜索整体包裹容器动画 */
  .header__mobile-content {
    width: 100%;
    background-color: #fff;
    transform: translateY(-100%);
    opacity: 0;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .header__mobile-overlay.open .header__mobile-content {
    transform: translateY(0);
    opacity: 1;
  }

  /* 白色菜单 */
  .header__mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .header__mobile-menu a {
    padding: 12px 12px;
    font-size: 14px;
    line-height: 24px;
    color: #303133;
    width: 100%;
  }

  /* 搜索 + 登录 */
  .header__mobile-search {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #fff;
  }

  .header__login {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .header__login a {
    flex: 1;
  }

  .header__login a .header__btn {
    width: 100%;
    justify-content: center;
  }

  .header__btn--register {
    box-sizing: border-box;
    border: 1px solid #eee;
  }

  .header__devTip {
    margin-right: 0;
  }

  .footer {
    width: 100%;
  }

  .footer__menu {
    width: 100%;
    /* padding: 40px 40px; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #3d3d3d;
  }

  .footer__menu-container {
    display: flex;
    gap: 20px;
    flex-direction: column;
    max-width: 1200px;
  }

  /* 移动端隐藏footer的logo模块和二维码模块 */
  .footer__menu-logo-warpper,
  .footer__menu-qrcode-warpper {
    display: none;
  }

  .footer__menu-logo-image {
    width: 194px;
    height: 58px;
    display: block;
  }

  .footer__menu-logo-text {
    font-size: 14px;
    color: #ddd;
    line-height: 28px;
  }

  /* 移动端快速链接横向排列 */
  .footer__menu-link-warpper {
    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
  }

  .footer__menu-link-warpper .footer__menu-link-title {
    width: 100%;
    margin-bottom: 8px;
  }

  .footer__menu-link-warpper a {
    flex: 1;
    text-align: center;
    min-width: 80px;
  }

  .footer__menu-link-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: bold;
    color: #fff;
  }

  .footer__menu-link-warpper a {
    font-size: 14px;
    line-height: 24px;
    color: #ddd;
  }

  .footer__menu-link-warpper a:hover {
    color: #fff;
  }

  .footer__menu-contact-warpper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .footer__menu-contact-text {
    font-size: 14px;
    line-height: 24px;
    color: #ddd;
  }

  .footer__menu-qrcode-warpper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .footer__menu-qrcode-image {
    width: 100px;
    height: 100px;
  }

  .footer__menu-qrcode-text {
    font-size: 14px;
    line-height: 24px;
    display: flex;
    justify-content: center;
    width: 200px;
    color: #ddd;
  }

  .footer__copyright {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: solid 1px #555;
    background-color: #3d3d3d;
    padding: 10px;
  }

  .footer__copyright a {
    color: #ddd;
    font-size: 14px;
    line-height: 32px;
    text-align: center;
  }
}
