/* 头部 */
.header {
  height: 60px;
  transition: all 0.3s;
  animation: fade-in 0.5s;
}

.yublog_header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  z-index: var(--header-index);
  background-color: #fff;
}

.yublog_header_container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100vw;
  height: 100%;
  padding: 0 60px;
}
.yublog_header_left {
  display: flex;
  align-items: center;
}

.yublog_header_container .yublog_logo {
  margin-right: 40px;
}
.yublog_header_container .yublog_logo a {
  display: flex;
}
.yublog_header_container .yublog_logo img {
  min-width: 40px;
  max-width: 150px;
  height: 40px;
}
.yublog_header_container .yublog_nav {
  height: 60px;
}
.yublog_header_container .yublog_nav .yublog_nav_container {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 16px;
}
.yublog_nav .yublog_nav_container .yublog_nav_item {
  height: 100%;
  cursor: pointer;
  margin-right: 16px;
}
.yublog_nav .yublog_nav_container a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 6px;
  user-select: none;
  white-space: nowrap;
}
.yublog_nav_container .yublog_nav_item i {
  margin-right: 4px;
  font-size: 18px;
}

.yublog_nav_container .yublog_nav_item a::after {
  opacity: 0;
  position: absolute;
  bottom: 0;
  left: 6px;
  right: 6px;
  content: '';
  height: 3px;
  transform: scaleX(0.25);
  background: var(--theme-color);
  border-radius: 6px 6px 0 0;
  transition: opacity 0.5s, transform 0.5s;
  transition: opacity 0.5s, transform 0.5s, -webkit-transform 0.5s;
}

.yublog_nav_container .yublog_nav_item.active a::after {
  opacity: 1;
  position: absolute;
  bottom: 0;
  left: 6px;
  right: 6px;
  content: '';
  height: 3px;
  transform: scaleX(1);

  background: var(--theme-color);
  border-radius: 6px 6px 0 0;
  transition: opacity 0.5s, transform 0.5s;
  transition: opacity 0.5s, transform 0.5s, -webkit-transform 0.5s;
}

.yublog_nav_container .yublog_nav_item a:hover:after {
  opacity: 1;
  transform: scaleX(1);
}

.yublog_container .yublog_header_right {
  display: flex;
  align-items: center;
}

.yublog_container .yublog_header_right .yublog_login {
  flex-shrink: 0;
  /* 让按钮的高度时内容的高度 */
  height: 34px;

  font-size: 14px;
}

.yublog_header_user {
  width: 36px;
  height: 36px;
}
.user_dropdown_container {
  overflow: hidden;
  max-height: 0;
  position: absolute;
  width: 330px;
  margin-top: 60px;
  z-index: 9999;
  right: 8px;
  top: 8px;
  margin-right: 40px;
  transition: all 0.3s ease-in-out;
}

.user_dropdown_menu {
  border-radius: 4px;
  overflow: hidden;
  background-color: #fff;
}

/* .yublog_haslogin:hover .user_dropdown_container {
} */

/* 二级菜单 */

.sub-menu {
  position: absolute;
  display: none;
  border-radius: 5px;
  border: 1px solid #ececec;
  padding: 15px;
  margin-top: -10px;
  z-index: 9;
  background-color: #fff;
}
.sub-menu ul li {
  line-height: 30px;
}

.sub-menu a {
  color: #262626;
  position: relative;
  display: inline-block;
}
.sub-menu a:hover {
  color: var(--theme-color);
}

.yublog_nav .yublog_nav_container .yublog_nav_item:hover .sub-menu {
  display: block;
}

.yublog_search {
  display: flex;
  margin-right: 20px;
}

.yublog_search .search_input {
  width: 200px;
  height: 34px;
  border: 1px solid #ededed;
  border-radius: 6px 0 0 6px;
  background-color: #ebeef5;
}

.yublog_search .search_input.focus {
  border: 1px solid var(--theme-color);
}

.yublog_search .search_input input {
  width: 100%;
  height: 100%;
  border-radius: 6px 0 0 6px;
  padding-left: 10px;
  background-color: #ebeef5;
}

.yublog_search .search_btn {
  background-color: var(--theme-color);
  width: 66px;
  color: #fff;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

.yublog_search .search_btn i {
  font-size: 22px;
}
