/* ------------------通用配置------------------- */

:root{
--maincolor: #c7254e;
--bordercl:rebeccapurple;
--callouctcolor:dodgerblue;
--hovercolor:navy;
--darkMaincolor: #e06c75;
--codeblockcolor: rgba(236, 236, 236, 0.5);
--codeblockDarkcolor: rgba(60, 62, 66, 0.4);
--tablecolor: rgba(199, 37, 78, 0.4);
--tableDarkcolor: rgba(171, 186, 191, 0.4);
--darkfontcolor: #abb2bf;
--mainArticleSize: 60%;
--rightSideSize: 16%;
--gMarginBottomSize: 8px;
}

html {
  color: #232333;
  font-family: 'Roboto Mono';
  font-size: 15px;
  line-height: 1.4em;
  overflow: hidden;
}

body{
  display: block;
  overflow: hidden;
  height: 100vh;
  background-size: 20px 20px;
  background-image:
    linear-gradient(to right, rgba(199, 37, 78, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(199, 37, 78, 0.05) 1px, transparent 1px);
}

* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 102, 102, 0.2) #ffffff;
  margin:unset;
}

::selection {
  color: #fff;
  background: var(--bordercl);
}

p {
  margin-bottom: var(--gMarginBottomSize);
}

svg {
  max-height: 15px;
}

time {
  color: grey;
}

h1 {
  margin-bottom: var(--gMarginBottomSize);
  font-size: 1.2rem;
}

h2 {
  margin-bottom: var(--gMarginBottomSize);
  font-size: 1.1rem;
}

h3, h4, h5 {
 margin-bottom: var(--gMarginBottomSize);
  font-size: 1.0rem;
}

/*--------------------引用块配置--------------------- */
blockquote {
  background: rgba(250, 235, 215, 0.4);
  color: var(--maincolor);
  padding: 0.5em;
  margin-bottom: var(--gMarginBottomSize);
  border-left: 2px solid var(--maincolor);
}

blockquote p {
  margin: 0;
}

/*-------------------a标签配置------------------- */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  border-bottom: 2px solid var(--maincolor);
}

/* --------------------分割线配置------------------- */
hr {
  border: 0;
  margin-bottom: var(--gMarginBottomSize);
  border-top-style: dotted;
  border-top-width: 4px;
  border-top-color: var(--bordercl);
}

/*----------------无序列表配置------------------- */
ul {
  list-style: none;
  padding-left: 2ch;
  margin-bottom: var(--gMarginBottomSize);
}
ul li {
  text-indent: -2ch;
}
ul > li::before {
  content: '• ';
  font-weight: bold;
}

/*--------------------表格配置---------------------*/
table {
  margin-bottom: var(--gMarginBottomSize);
  border-collapse: collapse;
  width: 100%;
}

table, table th, table td {
  /* border: 1px dotted #dfe2e5; */
  /* border: 1px dotted var(--maincolor); */
  border: 1px solid var(--tablecolor);
}

table th, table td {
  padding: 6px 13px;
  text-align: left;
}

table th {
  color: var(--maincolor);
  /* background-color: #ececec; */
  background-color: var(--codeblockcolor);
}

/*--------------------代码块配置---------------------*/
.highlight {
  position: relative;
}

code {
  /* background-color: #ececec; */
  background-color: var(--codeblockcolor);
  color: #c7254e;
  padding: .0em .2em;
  font-family: 'Roboto Mono';
  border-radius: 4px;
}

pre {
  margin-bottom: var(--gMarginBottomSize);
  position: relative;
  line-height: 1.2;
  padding: .5em;
  border-radius: 4px;
  overflow-x: auto;
  /* scrollbar-width: thin;
  scrollbar-color: rgba(102, 102, 102, 0.2) #ffffff; */
  background-color: var(--codeblockcolor) !important;
}

pre code {
  color: inherit;
  font-size: 100%;
  padding: 0;
}

/*--------------------复制按钮配置---------------------*/
.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  font-size: 12px;
  color: #fff;
  background: #666;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.highlight:hover .copy-code-btn {
  opacity: 1;
}

.copy-code-btn.success {
  background: #4caf50;
}

/* --------------------图片配置------------------- */
img {
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  /* border-color: #ececec; */
  border-color: var(--codeblockcolor);
  max-width: 100%;
}

/* --------------------common配置    ------------ */
.commonMain {
  margin-bottom: var(--gMarginBottomSize);
  height: 90vh;
  overflow-y: auto;
  overflow-wrap:break-word;
  display: flex;
  gap: 20px;
  justify-content: center; /*水平居中*/
  align-items: flex-start; /*顶端对齐*/
}

.commonArticle {
  width: var(--mainArticleSize);
  margin-left: auto;
  margin-right: 0;
}

.commonRightSide {
  top: 0em;
  color: #232333;
  position: sticky;
  align-self: flex-start;
  width: var(--rightSideSize);
  margin-right: auto;
}

.commonRightSide .content ul {
  margin-top: unset;
}

.commonRightSide .content li::before{
  content: none;
}

/*-------------------header配置-------------------*/
.headerMain {
  margin-top: 1em;
  margin-bottom: 2em;
  overflow-y: visible;
  overflow-wrap:break-word;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 1em;
  z-index: 20;
}

.headerMenu {
  display: flex;
  gap: 20px;
}

.headerMenu a {
  border-bottom: 2px solid var(--maincolor);
}

.headerMenuHome {
  flex: 0 0 41%;
}

.headerMenuHome, .headerMenuOthers {
  display: flex;
  gap: 10px;
}

.headerMenuOthers {
  flex: 0 0;
  margin-left: auto;
}

/*--------------------搜索框配置------------------- */
.headerMenu.searchActive nav:not(.headerMenuSearch) {
  display: none;
}

.headerMenuSearch {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
}

.headerMenuSearch.expanded {
  flex: 0 0 100%;
}

.headerMenuSearch .searchContainer {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-width:2px;
  position: relative;
}

.headerMenuSearch .searchInput {
  font-size: 1.2rem;
  width: 100%;
  padding-top: 3px;
  border-style: none;
  background-color: unset;
  border-bottom-style: solid;
  border-bottom-color: var(--maincolor);
}

.headerMenuSearch .searchInput:focus {
  outline: none;
  box-shadow: none;
}

.headerMenuSearch .searchOutput {
  background: rgba(255, 255, 255, 0.9);
  font-size: medium;
  font-weight: normal;
  line-height: 1.2em;
  padding-bottom: var(--gMarginBottomSize);
  position: absolute;
  top: 100%;
  width: 100%;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  /* box-shadow: 0 4px 8px rgba(199, 37, 78, 0.1); */
}

.headerMenuSearch .searchOutput a {
  border-bottom-style: none;
}

.headerMenuSearch .searchOutput a:hover {
  border-bottom: 2px solid var(--maincolor);
}

/* -------------------footer配置------------------- */
.footerMain {
  display: none;
  height: 10vh;
}

.footerMenu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top-style: dotted;
  border-top-width: 4px;
  border-top-color: var(--maincolor);
}

/*-----------------主页配置----------------------*/
.homeArticle .content-entry {
  /* margin-bottom: 0.25em; */
  display: flex;
  gap: 10px;
}

.homeArticle .content-time {
  flex: 0 0 16%;
}

.homeArticle .content-title {
  margin: unset;
  flex: 0 1 26%;
}

.homeArticle .content-entry .description {
  flex: 0 2 66%;
}

.homeArticle .content {
  min-height: 10vh;
}

.homeArticle .placeholder {
  min-height: 80vh;
}

/*----------------专栏页配置----------------------*/
.termsArticle .content .tags li::before{
  content: "🏷️ ";
}

.termsArticle .content a {
  font-size: 1.2rem !important;
}

/*-------------------列表页配置---------------------- */
.listRightSide {
  top: 2.6rem;
}

.listRightSide .content {
  display: none;
}

.listArticle .content a {
  font-size: 1.1rem !important;
}

.listArticle .content {
  min-height: 10vh;
}

.listArticle .placeholder {
  min-height: 80vh;
}

/* -------------------单页配置---------------------- */
#TableOfContents {
  max-height: 80vh;
  overflow-y: auto;
}

#TableOfContents ul {
  margin: unset;
}

/* 添加目录高亮样式 */
#TableOfContents a.active {
  font-weight: bold;
  font-size: medium;
  color: var(--maincolor);
}

.singleRightSide .tags ul{
  display: flex;
  gap: 20px;
  margin-top: var(--gMarginBottomSize);
}

.singleRightSide li {
  font-size: small;
  line-height: 1.2em;
}

.singleRightSide .tags a {
  /* font-size: medium; */
  color: var(--maincolor);
  background-color: rgba(245,222,179,0.3);
  border-radius: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

.singleRightSide .tags li::before{
  content: none;
}

.singleArticle a {
  color: mediumblue;
}

.singleArticle .footerMenu a {
  color: inherit;
}

.singleArticle .titleSection {
  margin-bottom: 2em;
}

.singleArticle .titleSection .title {
  margin-bottom: 0.2em;
}

.singleArticle .content {
  min-height: 10vh;
}

.singleArticle .placeholder {
  min-height: 80vh;
}

/*------------------窗口适配----------------------*/
@media (max-width: 768px) {
  .commonRightSide {
    display: none !important;
  }

  .homeArticle .content-entry {
    display: block;
  }

  .homeArticle .content-time {
    display: none;
  }

  .headerMenu, .commonArticle {
    width: 90%;
    margin-right: auto;
  }
  .listArticle time {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --mainArticleSize: 90%;
  }
  .homeArticle .content-time {
    flex: 0 0 20%;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  :root {
    --mainArticleSize: 80%;
  }
  .headerMenu a#tag {
    display: none;
  }
}

@media (min-width: 1441px) {
  :root {
    --mainArticleSize: 60%;
  }
  .headerMenu a#tag {
    display: none;
  }
}
