:root {
  --primary-color: #5a45ff;
  --primary-dark-color: #3f30b3;
  --primary-light-color: #ada2ff;

  --title-color: #393939;
  --text-color: #011810;
  --article-text-color: #3e3e3e;
  --text-dark-color: #000000;
  --text-light-color: #66666e;
  --text-grey-color: #909191;

  --body-bg-color: #FFFFFF;
  --card-bg-color: #FFFFFF;

  --line-color: #cecfcf;
  --line-light-color: #e9e9e9;
}

html.dark-theme {
  --primary-light-color: #303b35;

  --title-color: #f5f5f5;
  --text-color: #f1f1f1;
  --text-dark-color: #f5f5f5;
  --text-light-color: #909191;
  --text-grey-color: #909191;
  --article-text-color: #c8c8c8;

  --body-bg-color: #343b37;
  --card-bg-color: #1D2521;

  --line-color: #484f4b;
  --line-light-color: #323735;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* transition: all .22s ease; */
}

a {
  text-decoration: none;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  width: 100%;
  height: auto;
}

select {
  outline: none;
  border: 1px solid var(--primary-color);
  border-radius: .4rem;
  padding: 0 .8rem;
}

/* 滚动条样式 start*/

::-webkit-scrollbar {
  width: 5px;
  height: 6px;
  background-color: #f3f3f3;
}

::-webkit-scrollbar-track {
  background-color: #d6d7d6;
}

::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.55);
  background-color: rgba(0, 0, 0, 0.33);
}

/* 滚动条样式 end */

.clearfix {
  display: block;
  content: '';
  clear: both;
}

.scroll-top-btn {
  height: 4rem;
  width: 4rem;
  position: fixed;
  right: .8rem;
  bottom: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 2rem;
  border-radius: 50%;
  outline: none;
  appearance: none;
  border: none;
  cursor: pointer;
  pointer-events: none;
  z-index: 99;

  opacity: 0;
  transform: translateY(20px);
}

.scroll-top-btn:hover {
  background-color: rgba(0, 0, 0, 0.66);
}

.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* copy button end */


html {
  height: 100%;
  width: 100%;
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  height: 100%;
  width: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--body-bg-color);
}

.container {
  max-width: 124rem;
  min-width: 32.8rem;
  margin: 0 auto;
}

.app-main {
  min-height: 100vh;
  padding-top: 5rem;
  padding-left: .4rem;
  padding-right: .4rem;
}

/* ========================================================
    common end
============================================================*/

/* ======================== APP Header Start ============================= */
.app-header {
  position: fixed;
  z-index: 1000;
  left: 0;
  right: 0;
  height: 5rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.33);
  padding-left: .4rem;
  padding-right: .4rem;
}

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

.nav {
  display: flex;
  gap: 1.6rem;
}

.nav li a {
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  color: var(--text-color);
  font-size: 1.5rem;
  transition: all .22s ease;
}

.nav li a:hover,
.nav li a.active {
  color: var(--primary-color);
}

.nav li a.active {
  font-weight: 500;
}

.app-title {
  width: 22rem;
  color: var(--primary-color) !important;
  font-size: 1.8rem !important;
  font-weight: 900 !important;
  padding: 0 1.6rem;
}

/* app footer */
.app-footer .container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 5rem;
}

.app-footer .container section p {
  font-size: 1.3rem;
  color: var(--text-light-color);
}

/* home main */
.home-main::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 10% 30%,
      #fee06a 0%,
      #fff5cd 25%,
      #f7efe5 50%,
      #fff6d2 75%,
      transparent 100%);
  filter: blur(40px);
  z-index: -1;
  opacity: 1;
}

.hero-wrapper {
  height: 40rem;
}

.hero {
  height: inherit;
  display: grid;
  grid-template-columns: 7fr 5fr;
}

.hero-left__tips {
  text-transform: uppercase;
  font-size: 1.2rem !important;
  margin-bottom: 5rem;
  color: var(--text-light-color);
}

.hero-left {
  height: 100%;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2rem;
}

.hero-left h1 {
  font-size: 5rem;
}

.hero-left p {
  font-size: 1.8rem;
}

.a-guide a {
  display: flex;
  gap: .8rem;
  margin-top: 5rem;
  padding: .8rem 3rem;
  background-color: #000000;
  width: fit-content;
  color: #fff;
  font-size: 1.6rem;
  transition: all .22s ease;
}

.a-guide a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* =============== bluebook-main ================ */
.bluebook-main .container {
  display: grid;
  grid-template-columns: 22rem 1fr 22rem;
  gap: 1.6rem;
  min-height: calc(100vh - 5rem);
}

.book-menu,
.book-article,
.book-right {
  padding: 1.6rem 0;
}

.book-article {
  overflow: auto;
}

.book-menu {
  position: sticky;
  top: 5rem;
  height: 100vh;
  z-index: 80;
  overflow-y: scroll;
  padding: 1.6rem .6rem;
}

.bluebook-footer {
  height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bluebook-footer p {
  font-size: 1.4rem;
  color: var(--text-light-color);
}


.post-nav__menu>ul>li {
  padding-bottom: .4rem;
  margin-bottom: .4rem;
}

.post-nav__menu>ul>li:not(:last-child) {
  border-bottom: 1px solid var(--line-light-color);
}

.post-nav__subject {
  height: 3.2rem;
  line-height: 3.2rem;
  color: var(--text-color);
  font-size: 1.4rem;
  font-weight: 500;
  padding-left: .2rem;
  padding-right: .4rem;
  border-radius: .5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.post-nav__link {
  display: flex;
  min-height: 3rem;
  line-height: 1.4;
  align-items: center;
  color: var(--text-light-color);
  font-size: 1.4rem;
  font-weight: normal;
  padding: .4rem .2rem;
}

.post-nav__link.active-post {
  background-color: var(--primary-light-color);
  color: var(--primary-dark-color);
}

html.dark-theme .post-nav__link.active-post {
  background-color: #303b35;
  color: var(--primary-color);
}

.post-nav__link:not(.active-post):hover {
  background-color: #f5f4f4;
  color: var(--primary-color);
}

/* =========== article-style =========== */
.article__header {
  border-bottom: 1px solid var(--toc-border-color);
  margin-bottom: 1.6rem;
}

.article__header h1 {
  font-size: 2.6rem;
  font-weight: bolder;
  color: var(--primary-dark-color);
}

.article__body {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--article-text-color);
  word-wrap: break-word;
  word-break: normal;
  overflow-wrap: break-word;
}

.article__body h2 {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  vertical-align: middle;
  color: var(--text-color);
  font-size: 2.4rem;
  font-weight: 500;
  padding: .4rem 0;
}

.article__body h2:not(:first-child) {
  margin-top: 1.8rem;
  border-top: 1px solid #e2e2e2;
}

html.dark-theme .article__body h2:not(:first-child) {
  border-top-color: #323735;
}

.article__body h2::before {
  display: block;
  content: " ";
  font-weight: 510;
  border-radius: 5px;
  width: 3px;
  margin-top: 0.1rem;
  height: 2.4rem;
  margin-right: 0.6rem;
  background-color: var(--primary-color);
}

.article__body h3 {
  margin: 1.2rem 0;
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-color);
}

.article__body h4 {
  margin: 1.2rem 0;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-color);
}

.article__body p {
  font-size: 1.5rem;
  line-height: 1.6;
  text-underline-offset: .3rem;
  font-weight: normal;
  margin: 1.2rem 0;
}

.article__body a {
  color: var(--primary-color);
}

.article__body a:hover {
  text-decoration: underline;
}

.article__body strong {
  color: var(--title-color);
  font-weight: 500;
}

.article__body span strong {
  color: inherit !important;
}

.article__body ul {
  list-style: disc;
  margin: .8rem 0;
  list-style-position: inside;
}

.article__body ::marker {
  color: #059862;
}

.article__body ul ul,
.article__body ol ul {
  text-indent: 2rem;
  list-style: square;
  list-style-position: inside;
}

.article__body ul ul ul,
.article__body ol ul {
  text-indent: 4rem;
  list-style: square;
  list-style-position: inside;
}

.article__body ol ol {
  text-indent: 2rem;
  list-style: decimal;
  list-style-position: inside;
}

.article__body ol {
  list-style: decimal;
  margin: .8rem 0;
  list-style-position: inside;
}

.article__body li {
  margin-bottom: .8rem;
}

.article__body hr {
  border: none;
  border-top: .1rem solid var(--line-color);
  margin: 1.2rem 0;
}

.article__body table:not(.hljs-ln) {
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 1.4rem;
}

.article__body table:not(.hljs-ln) th,
.article__body table:not(.hljs-ln) tr,
.article__body table:not(.hljs-ln) td {
  border: .1rem solid var(--line-color);
  border-left: none;
  border-right: none;
  padding: .4rem;
}

.article__body table:not(.hljs-ln) th {
  font-weight: 500;
  background-color: #f2f2f2;
}

html.dark-theme .article__body table:not(.hljs-ln) th {
  background-color: #343b37;
}

.article__body table:not(.hljs-ln) tr:hover {
  background-color: #f9f9f9;
}

html.dark-theme .article__body table:not(.hljs-ln) tr:hover {
  background-color: #444947;
}

.article__body blockquote {
  font-size: 1.4rem;
  line-height: 1.8;
  margin: 1.6rem 0;
  padding: .8rem;
  border: 1px solid var(--inline-code-bg);
  border-radius: .4rem;
  background-color: var(--primary-light-color);
}

html.dark-theme .article__body blockquote {
  background-color: #303b35;
}

html.dark-theme .article__body span[style*="background-color"] {
  color: #494949;
}

.article__body pre {
  margin: .4rem 0;
  border-radius: .5rem;
}

/* copy button start */
pre[class*="prettyprint"] {
  -moz-tab-size: 4;
  -moz-hyphens: none;
  tab-size: 4;
  hyphens: none;
  overflow: hidden;
}

.copy-code-button {
  padding-top: .1rem;
  font-size: 2.2rem;
  cursor: pointer;
}

.copy-code-button:hover {
  color: var(--primary-color);
}

.copy-code-button.bi-clipboard-check {
  color: var(--primary-color);
}

/* copy button end */
.code-stars {
  height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .6rem;
  border-bottom: 1px solid var(--line-color);
}

.code-stars .code-lang {
  font-size: 1.4rem;
  color: var(--text-light-color);
}

/* 行内代码 */
.article__body code {
  padding: .1rem .2rem;
  font-size: 1.4rem;
  border-radius: .2rem;
  background-color: var(--primary-light-color);
  color: var(--primary-color);
}

.article__body code strong {
  color: var(--primary-color);
}

.article__body h2 code,
.article__body h3 code,
.article__body h4 code {
  margin: 0 .2rem;
  font-weight: 600;
}

.article__body h2 code {
  font-size: 2rem;
  padding: 0 .2rem;
}

.article__body h3 code {
  font-size: 1.8rem;
}

.article__body h4 code {
  font-size: 1.5rem;
}

.article__body pre,
.article__body pre code {
  background-color: #f2f2f2;
  color: var(--article-text-color);
}

.article__body pre code {
  font-size: 1.3rem;
  line-height: 1.6;
  border-bottom-left-radius: .5rem;
  border-bottom-right-radius: .5rem;
}

html.dark-theme .article__body pre,
html.dark-theme .article__body pre code {
  background-color: #343b37;
}

.hljs-ln-numbers {
  text-align: right;
  color: var(--text-grey-color);
  user-select: none;
}

.hljs-ln-code {
  padding-left: 1.6rem !important;
}

.article__body div[data-w-e-type="todo"] {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .2rem;
}

.article__body div[data-w-e-type="todo"]:first-of-type {
  margin-top: .4rem;
}

.article__body div[data-w-e-type="todo"]:last-of-type {
  margin-bottom: .8rem;
}

.article__body div[data-w-e-type="todo"] input[type="checkbox"] {
  appearance: none;
  vertical-align: middle;
  outline: none;
  width: 1.6rem;
  height: 1.6rem;
  border: .2rem solid #535858;
  padding: 0;
  margin: 0;
  border-radius: .2rem;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
}

.article__body div[data-w-e-type="todo"] input[type="checkbox"]:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.article__body div[data-w-e-type="todo"] input[type="checkbox"]:checked::after {
  position: absolute;
  content: "";
  height: .5rem;
  width: 1rem;
  border: .2rem solid #fff;
  border-top: none;
  border-right: none;
  border-radius: .2rem;
  top: .3rem;
  left: .1rem;
  transform: rotate(-45deg);
}

.pagin {
  min-height: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagin.up {
  border-bottom: 1px solid var(--line-color);
}

.pagin.down {
  border-top: 1px solid var(--line-color);
  margin: 3.2rem 0;
}

.pagin .pagin__link {
  max-width: 50%;
  height: 3.5rem;
  display: flex;
  align-items: center;
  line-height: 3.5rem;
  gap: .4rem;
  color: var(--text-light-color);
  font-size: 1.5rem;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.pagin .pagin__link.prev::before {
  content: "上一篇: ";
  color: var(--primary-dark-color);
  font-weight: 500;
}

.pagin .pagin__link.next::before {
  content: "下一篇: ";
  color: var(--primary-dark-color);
  font-weight: 500;
}

.pagin .pagin__link:hover {
  color: var(--primary-color);
}

/* adv-style */
.book-right {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.book-right .adv {
  height: 22rem;
  border-radius: .4rem;
}