* {
  margin: 0;
  padding: 0;
}

html,
body {
  font-size: 9.5px;
  letter-spacing: 0.01rem;
  background-color: var(--bg-body);
  transition: color 400ms ease-in-out 0s, background-color 400ms ease-in-out 0s;
  font-family: Consolas, "Liberation Mono", Menlo, Monaco, "Source Han Sans CN",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.hidden {
  overflow: hidden;
  padding-right: 6px;
}

#app {
  position: relative;
  margin: 0 auto;
}

/*控制整个滚动条*/
::-webkit-scrollbar {
  background-color: transparent;
  width: 6px;
  height: 6px;
  background-clip: padding-box;
}

/*滚动条中滑块部分*/
::-webkit-scrollbar-thumb {
  background-color: rgba(144, 147, 153, 0.5);
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a4a4a4;
}

a {
  color: var(--color-text-a);
  text-decoration: none;
  background-color: transparent;
  transition: color 0.3s;
}

a:hover {
  color: var(--color-text-a-hover);
}

.flex-container {
  min-height: calc(100vh - 290px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-left: calc(100vw - 100%);
  /*transition: all 0.3s ease;*/
}

.header {
  padding: 50px 0;
}

.container {
  width: 50%;
  margin: 0 auto;
}

.index .post-list,
.friend-index .friend-list,
.archives .post-list,
.tag-index .tag-list,
.about-index .markdown-body {
  padding: 0 40px;
}

.category-index .category-list {
  padding: 0 110px;
}

.btn-catalog {
  display: none;
}

@media (max-width: 888px) {
  .container {
    width: 90%;
  }
  .index .post-list,
  .friend-index .friend-list,
  .archives .post-list,
  .tag-index .tag-list,
  .about-index .markdown-body {
    padding: 0;
  }
  .category-index .category-list {
    padding: 0 40px;
  }
  .btn-catalog {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    height: 24px;
    width: 24px;
    padding: 10px;
    z-index: 999;
    color: var(--color-text-a);
    background-color: rgb(255 255 255 / 50%);
  }
  .btn-catalog i {
    font-size: 24px;
  }
  .post-catalog {
    top: 44px !important;
    bottom: unset !important;
    right: 0 !important;
    width: unset !important;
    display: flex;
    justify-content: flex-end;
    padding: 10px !important;
    background-color: #fff;
    box-shadow: -1px 2px 5px 0px #999;
    opacity: 0.9;
    z-index: 9;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    transition: all 0.2s ease;
  }
  .post-catalog.hidden {
    opacity: 0 !important;
    top: 0 !important;
    z-index: -1 !important;
  }
  .post-catalog .title {
    display: none;
  }
  .post-catalog .catalog-content {
    height: unset !important;
  }
  .back-to-top {
    opacity: 0;
    z-index: -1;
  }
}

@media (max-width: 1200px) and (min-width: 887px) {
  .index .post-list,
  .friend-index .friend-list,
  .archives .post-list,
  .tag-index .tag-list,
  .about-index .markdown-body {
    padding: 0 20px;
  }
}

.post-item {
  display: flex;
  font-size: 1.6rem;
  margin-bottom: 20px;
  align-items: center;
  line-height: 21px;
}

.post-item .time-m-d {
  flex-shrink: 0;
  margin-right: 30px;
  color: var(--color-text-base);
  font-size: 1.5rem;
  line-height: 21px;
  /*font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif;*/
}

.post-item .title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-item .title .post-top {
  font-weight: 600;
  font-size: 1.7rem;
  padding-right: 8px;
}

.tag-details .time-m-d,
.archives .time-m-d,
.category-details .time-m-d {
  margin: 0 30px;
}

.avatar {
  text-align: center;
  padding-bottom: 30px;
  margin-left: calc(100vw - 100%);
}

.avatar img {
  height: 100px;
  width: 100px;
  border-radius: 50%;
}

.avatar .nickname {
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-a);
  padding-top: 10px;
}

.content {
  clear: both;
  padding: 0 20px;
}

.content-title {
  font-size: 1.6rem;
  color: var(--color-text-a);
  margin-bottom: 20px;
  /*font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif;*/
}

.navbar {
  margin-left: calc(100vw - 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar ul li {
  position: relative;
  display: inline-block;
  margin: 0 15px;
  font-size: 1.65rem;
  font-weight: bold;
  text-align: center;
}

.navbar ul li a {
  padding-bottom: 2px;
}

.navbar ul li a:hover::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 8px;
  opacity: 0.3;
  background-color: gray;
  width: 100%;
  border-radius: 3px;
}

.navbar ul li.active a {
  color: var(--color-text-a-active);
}

.navbar ul li.active a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 8px;
  opacity: 0.5;
  background-color: gray;
  width: 100%;
  border-radius: 3px;
}

@media (max-width: 888px) {
  .navbar ul li {
    margin: 0 10px;
  }
}

@media (max-width: 390px) {
  .navbar ul li {
    margin: 0 3px;
  }
}

.post-navigation {
  font-size: 1.5rem;
  padding: 20px 90px;
  text-align: right;
  color: var(--color-text-base);
}

.post-navigation i {
  font-weight: 600;
}

.post-navigation .page-num {
  padding: 0 10px;
}

@media (max-width: 888px) {
  .post-navigation {
    padding: 20px 0;
  }
}

@media (max-width: 1200px) and (min-width: 887px) {
  .post-navigation {
    padding: 20px 20px;
  }
}

.footer {
  padding-top: 30px;
  font-size: 1.2rem;
  color: #aaa;
}

.social {
  padding-bottom: 5px;
}

.social ul {
  text-align: center;
}

.social ul li {
  display: inline-block;
  padding: 0 5px;
}

.footer-more {
  padding-bottom: 5px;
  text-align: center;
}

.tag-list li {
  font-size: 1.6rem;
  display: inline-block;
  padding: 10px;
}

.tag-list li .tag-list-link {
  position: relative;
  padding: 0 2px;
  border-radius: 2px;
}

/*.tag-list li .tag-list-link:hover {
  color: #fff;
}*/

/*.tag-list li .tag-list-link::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2px;
  right: -2px;
  transition: transform 0.1s linear;
  background: gray;
  opacity: 0.8;
  transform: scaleX(0);
  transform-origin: right;
  z-index: -1;
  border-radius: 2px;
}

.tag-list li .tag-list-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}*/

.tag-list-count,
.category-list-count {
  padding: 0 5px;
  color: #aaa;
  font-size: 1.2rem;
  vertical-align: top;
}

.category-list .category-list-item {
  font-size: 1.6rem;
  padding: 5px 0;
}

.category-list .category-list-item::marker {
  content: "• ";
  color: var(--color-text-base);
}

.category-list .category-list-item .category-list-child {
  padding-left: 30px;
}

.friend-list-item {
  font-size: 1.6rem;
  padding: 10px;
}

.friend-list-item .nickname {
  padding-right: 10px;
  color: var(--color-text-a);
}

.post-details .post-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--color-text-a);
  padding-bottom: 10px;
}

.post-details .post-attach {
  font-size: 1.4rem;
  text-align: center;
  padding-bottom: 30px;
  color: var(--color-text-a);
}

.post-content {
  padding-bottom: 1rem;
}

.prev-or-next {
  font-size: 1.5rem;
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  margin: 3rem 0;
  border-top: 1px solid var(--color-divider-md-border);
}

.prev-or-next .post-foot-next,
.prev-or-next .post-foot-prev {
  white-space: nowrap;
}

.prev-or-next .post-attach {
  opacity: 0.9;
  font-size: 1.2rem;
  padding: 0 30px;
}

.post-attach .post-pubtime,
.post-attach .post-tags,
.post-attach .post-categories {
  padding: 0 10px;
}

@media (max-width: 768px) {
  .time-m-d {
    margin-right: 15px;
  }
  .tag-details .time-m-d,
  .archives .time-m-d {
    margin: 0 15px;
  }
}

.post-catalog {
  position: absolute;
  top: calc(290px + 88px + 30px);
  right: 50px;
  width: calc(20% - 50px);
  font-size: 1.4rem;
  padding-left: 10px;
}

.post-catalog .title {
  color: var(--color-text-base);
  font-size: 1.65rem;
  font-weight: bold;
  padding: 5px 0;
}

.catalog-content {
  overflow: auto;
}

.post-catalog .toc-child {
  padding-left: 10px;
}

.post-catalog li {
  list-style-type: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 2;
}

.toc-link {
  position: relative;
  padding: 3px 5px;
  opacity: 0.8;
  border-left: 2px solid transparent;
}

.toc-link.active {
  color: var(--color-text-a-active);
  opacity: 1;
}

.toc-link:hover::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 8px;
  height: 90%;
  background-color: gray;
  opacity: 0.3;
  border-radius: 3px;
}

.toc-link.active::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 8px;
  height: 90%;
  background-color: gray;
  opacity: 0.5;
  border-radius: 3px;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s ease;
  visibility: visible;
  padding-right: 6px;
  backdrop-filter: blur(8px);
}

.search-overlay.hidden {
  background-color: transparent;
  visibility: hidden;
  transition: visibility 0s linear 0.2s, background-color 0.2s;
  padding-right: 0;
}

.search-overlay.hidden .search-content {
  position: relative;
  top: 15%;
  opacity: 0;
}

.search-content {
  position: relative;
  top: 18%;
  opacity: 1;
  background-color: transparent;
  z-index: 999;
  border-radius: 10px;
  margin: 0 2rem;
  transition: top 0.2s ease, opacity 0.2s ease;
  outline: 0;
}

@media (min-width: 768px) {
  .search-content {
    width: 520px;
    margin: 0 auto;
  }
}

.search-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  background-color: var(--bg-content-search);
  padding: 0 8px;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.search-input {
  width: 100%;
  border: 0;
  outline: 0;
  background-color: transparent;
  padding: 0 10px;
  font-size: 1.6rem;
  height: 38px;
  line-height: 38px;
  color: var(--color-text-a);
}

.search-result {
  max-height: 350px;
  overflow: auto;
  background-color: var(--bg-content-search);
  border-radius: 10px;
  margin-top: 8px;
}

.search-result ul {
  padding: 10px;
}

.search-result-list li {
  list-style-type: none;
  padding: 10px;
  font-size: 1.6rem;
  border-bottom: 1px dashed var(--color-divider-md-border);
}

.search-result-list li:nth-last-of-type(1) {
  border-bottom: none;
}

.search-result-abstract {
  padding: 10px 10px 0 10px;
  font-size: 1.2rem;
  color: var(--color-text-sub);
  word-break: break-all;
}

.search-keyword {
  color: var(--color-text-md-code);
}

.local-search-empty {
  font-size: 1.6rem;
  color: var(--color-text-a);
}

.tools-bar {
  position: fixed;
  right: 2.2rem;
  bottom: 2.2rem;
}

.tools-bar .tools-bar-item {
  margin: 10px 0;
  font-weight: bold;
}

.tools-bar .back-to-top.hidden {
  display: none;
}

.share-icon {
  position: relative;
}

.share-content {
  position: absolute;
  top: 0;
  right: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  transition: all 0.3s;
  z-index: 2;
}

.share-content.hidden {
  opacity: 0;
  z-index: -1;
  right: -10px;
}

.share-content .share-item {
  padding: 0 10px;
}
