:root {
    scroll-behavior: smooth;
}

body {
    font-size: 1rem;
}

h2 {
    font-size: 3rem;
}

#main {
    display: flex;
    max-width: 1600px;
    margin: 20px auto 0;
    clear: both;
}

#mainContent {
    flex: 0 1 1280px;
    max-width: 1280px;
}

#topics .postTitle {
    font-size: 2.6rem;
    border-bottom: groove;
    border-color: #cecece;
    font-weight: 900;
}

/* 标题 */
h2,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

#cnblogs_post_body h2,
#cnblogs_post_body h2 {
    text-align: center;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

#cnblogs_post_body h2 {
    font-size: 2.4rem;
}

#cnblogs_post_body h3 {
    font-size: 1.8rem;
    font-family: "PingFang SC", sans-serif;
}


#cnblogs_post_body h4 {
    font-size: 1.4rem;
    font-family: "PingFang SC", sans-serif;
}

#cnblogs_post_body h2,
#cnblogs_post_body h2,
#cnblogs_post_body h3 {
    font-style: normal;
}

#cnblogs_post_body h2,
#cnblogs_post_body h2,
#cnblogs_post_body h3,
#cnblogs_post_body h4,
#cnblogs_post_body h5,
#cnblogs_post_body h6,
#cnblogs_post_body p {
    position: relative;
}

#cnblogs_post_body h2,
#cnblogs_post_body h2,
#cnblogs_post_body h3,
#cnblogs_post_body h4,
#cnblogs_post_body h5,
#cnblogs_post_body h6,
#cnblogs_post_body p,
#cnblogs_post_body pre {
    width: inherit;
}

#cnblogs_post_body h2::after {
    content: "";
    display: block;
    width: 6.25rem;
    height: 1px;
    margin: 0 auto;
    border-bottom: 1px solid #2f2f2f;
}

#cnblogs_post_body h5 {
    font-size: 1.2rem;
}

/* img样式 */
#cnblogs_post_body img {
    display: block;
    box-shadow: 0px 8px 16px 1px hsla(0, 0%, 0%, 0.3);
    border-radius: 5px;
    margin: 1.5rem auto;
    width: 100%;
    image-orientation: from-image;
}

/* 代码样式 */
.cnblogs-markdown .hljs,
.cnblogs-markdown .hljs-subst {
    display: block;
    overflow-x: auto;
    padding: .5em;
    background: #282828;
    color: #ebdbb2;
}

.cnblogs-markdown code,
.cnblogs-post-body code {
    color: #c7254e;
    background-color: #f2f2f2;
    font-family: Consolas, Monaco, "Courier New", Courier, "Andale Mono", "Ubuntu Mono", monospace !important;
    font-size: 16px !important;
    line-height: 140%;
    margin: 1px 5px 4px 5px;
}

.cnblogs-markdown h2>code,
.cnblogs-markdown h3>code,
.cnblogs-markdown h4>code,
.cnblogs-markdown h5>code {
    font-size: 100% !important;
    line-height: 130%;
}

.cnblogs-markdown code.hljs {
    display: block;
    font-family: Consolas, Monaco, "Courier New", Courier, monospace !important;
    font-size: 10pt !important;
    overflow-x: auto !important;
    padding: 0.5em !important;
    scrollbar-width: thin !important;
    -moz-tab-size: 4 !important;
    tab-size: 4 !important;
    background-color: #282828 !important;
}

code.hljs table.hljs-ln {
    border: none !important;
}

.hljs-deletion,
.hljs-formula,
.hljs-keyword,
.hljs-link,
.hljs-selector-tag {
    color: #fb4934
}

.hljs-built_in,
.hljs-emphasis,
.hljs-name,
.hljs-quote,
.hljs-strong,
.hljs-title,
.hljs-variable {
    color: #83a598
}

.hljs-attr,
.hljs-params,
.hljs-template-tag,
.hljs-type {
    color: #fabd2f
}

.hljs-builtin-name,
.hljs-doctag,
.hljs-literal,
.hljs-number {
    color: #8f3f71
}

.hljs-code,
.hljs-meta,
.hljs-regexp,
.hljs-selector-id,
.hljs-template-variable {
    color: #fe8019
}

.hljs-addition,
.hljs-meta-string,
.hljs-section,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-string,
.hljs-symbol {
    color: #b8bb26
}

.hljs-attribute,
.hljs-bullet,
.hljs-class,
.hljs-function,
.hljs-function .hljs-keyword,
.hljs-meta-keyword,
.hljs-selector-pseudo,
.hljs-tag {
    color: #8ec07c
}

.hljs-comment {
    color: #928374
}

.hljs-link_label,
.hljs-literal,
.hljs-number {
    color: #d3869b
}

.hljs-comment,
.hljs-emphasis {
    font-style: italic
}

.hljs-section,
.hljs-strong,
.hljs-tag {
    font-weight: 700
}

#topics .postBody strong {
    color: #b5302e;
}

#topics .postBody blockquote {
    font-family: "仿宋", "华文仿宋", "楷体", "楷体-简", sans-serif;
    padding: 0.5rem 1rem;
    border-left: 8px solid #2f845e;
    background-color: rgba(66, 185, 131, 0.1);
    border-radius: 4px;
}

#topics .postBody blockquote p {
    margin-top: 0.2rem !important;
    margin-bottom: 0.2rem !important;
}

#topics .postBody blockquote p {
    color: #282c34;
}

.postBody hr {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-top: 2px dashed #abb2bf;
}

/* 代码行 */

.hljs-ln {
    max-width: 100% !important;
}

#cnblogs_post_body td {
    border: none;
    border-collapse: collapse;
    padding: initial;
    min-width: initial;
}

#cnblogs_post_body td.hljs-ln-numbers {
    text-align: center;
    color: #ccc;
    border-right: 1px solid #999;
    vertical-align: top;
    padding-right: 5px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#cnblogs_post_body td.hljs-ln-code {
    padding-left: 10px;
}

.hljs-ln-n {
    width: max-content;
    display: inline-block;
    padding: 0 3px;
}

/* 文章内表格样式 */

#cnblogs_post_body .table-wrapper table {
    width: 100%;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    border-collapse: separate;
    overflow: hidden;
    white-space: pre-wrap;
    page-break-inside: auto;
    text-align: left;
    border-spacing: 0;
}

#cnblogs_post_body .table-wrapper thead {
    background-color: #e7ecf3;
    color: #000;
}

#cnblogs_post_body .table-wrapper tr {
    page-break-inside: avoid;
    page-break-after: auto;
}

#cnblogs_post_body .table-wrapper td {
    min-width: 32px;
}

#cnblogs_post_body .table-wrapper thead:first-child tr:first-child th,
#cnblogs_post_body .table-wrapper thead+tbody tr:first-child td {
    border-top: 0;
}

#cnblogs_post_body .table-wrapper th:first-child,
#cnblogs_post_body .table-wrapper td:first-child {
    border-left: 0;
}


#cnblogs_post_body .table-wrapper th,
#cnblogs_post_body .table-wrapper td {
    border: initial;
    padding: 8px 14px;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
    background-color: initial;
}

#cnblogs_post_body .table-wrapper tr th {
    border-bottom: 0;
}

/* 键盘样式 */
#cnblogs_post_body kbd {
    display: inline-block;
    padding: 3px 5px;
    font: 15px monospace;
    line-height: 13px;
    color: #444d56;
    vertical-align: middle;
    background-color: #fafbfc;
    border-bottom-color: #d1d5da;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    box-shadow: inset 0 -1px 0 #d1d5da;
    margin: auto 3px;
}

/* 目录 */
#catalog {
    position: fixed;
    top: 499px;
    width: 220px;
    left: 9%;
    box-shadow: 0px 8px 16px 1px hsla(0, 0%, 0%, 0.3);
    border-radius: 5px;
    background-color: white;
    padding: 5px;
}

.catalog {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.3;
    color: #333;
    list-style: none;
}

.catalog.h2 {
    font-weight: 600;
    color: #000;
}

.catalog-list .catalog.h2:first-child>a {
    margin-top: 0;
}

.catalog-list .catalog.h2>a {
    margin: 6px 0;
    padding: 4px 0 4px 21px;
}

.catalog-list .catalog.active>a {
    color: #007fff;
    background-color: #f3f3f3;
    border-radius: 10px;
}

.catalog-list .catalog a {
    display: block;
    position: relative;
    padding: 4px 0 4px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}

.catalog-list .catalog a:hover {
    color: #007fff;
    background-color: #f3f3f3;
    border-radius: 10px;
}

.catalog-list .catalog.h2>a::before {
    left: 5px;
    margin-top: -3px;
    width: 6px;
    height: 6px;
}

.catalog-list .catalog a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -2px;
    width: 4px;
    height: 4px;
    background-color: currentColor;
    border-radius: 50%;
}

.sub-list {
    margin: 0;
    padding: 0;
}

.catalog-list .catalog.h3>a {
    padding-left: 36px;
}

.catalog-list .catalog.h3>a::before {
    left: 24px;
}

.catalog-list .catalog.h4>a {
    padding-left: 50px;
    font-size: 0.8rem;
}

.catalog-list .catalog.h4>a::before {
    left: 38px;
}

.catalog-list .catalog.h5>a {
    padding-left: 58px;
    font-size: 0.7rem;
}

.catalog-list .catalog.h5>a::before {
    left: 46px;
    background-color: #a6a6a6;
}

.catalog-list a {
    color: initial;
}



/* 右下角浮动块 */
#custom-bottom {
    bottom: 20px;
    color: #333;
    font-size: 12px;
    background: #fff;
    box-shadow: 0px 1px 16px 1px hsla(0, 0%, 0%, 0.3);
    padding: 0 4px;
    position: fixed;
    right: 735px;
    border-radius: 30px;
}


#custom-bottom>div {
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-repeat: no-repeat;
    background-position: 50%;
}

#custom-btm {
    border-bottom: 1px solid #eaebec;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' d='M-1-1h2302v1248H-1z'/%3E%3Cg%3E%3Cpath d='M1.2 18.455h13.6c.665 0 1.2-.533 1.2-1.19 0-.659-.537-1.19-1.2-1.19H1.2c-.665 0-1.2.534-1.2 1.19 0 .66.537 1.19 1.2 1.19zm.402-10.319l5.597 5.56c.248.246.511.374.772.382V1h-1.57c-.883 0-1.598.71-1.598 1.585v3.966h-2.4c-2.4 0-.8 1.585-.8 1.585zm12.74 0s1.599-1.585-.8-1.585h-2.4V2.585C11.142 1.71 10.427 1 9.544 1h-1.57v13.078c.26-.008.522-.134.772-.383l5.597-5.559z' fill-rule='nonzero' fill='%23A9B3C1'/%3E%3C/g%3E%3C/svg%3E");
}

#custom-btm:hover {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' d='M-1-1h2302v1248H-1z'/%3E%3Cg%3E%3Cpath d='M1.2 18.455h13.6c.665 0 1.2-.533 1.2-1.19 0-.659-.537-1.19-1.2-1.19H1.2c-.665 0-1.2.534-1.2 1.19 0 .66.537 1.19 1.2 1.19zm.402-10.319l5.597 5.56c.248.246.511.374.772.382V1h-1.57c-.883 0-1.598.71-1.598 1.585v3.966h-2.4c-2.4 0-.8 1.585-.8 1.585zm12.74 0s1.599-1.585-.8-1.585h-2.4V2.585C11.142 1.71 10.427 1 9.544 1h-1.57v13.078c.26-.008.522-.134.772-.383l5.597-5.559z' fill-rule='nonzero' fill='%23000'/%3E%3C/g%3E%3C/svg%3E");
}

#custom-edit {
    border-bottom: 1px solid #eaebec;
    background-image: url("data:image/svg+xml,%3Csvg width='17' height='20' viewBox='0 0 17 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23A9B3C1' fill-rule='evenodd'%3E%3Cpath d='M11.316 2.294l-8.05 8.05a.601.601 0 0 0 0 .848l2.542 2.542a.602.602 0 0 0 .849 0l8.05-8.05a.601.601 0 0 0 0-.848l-2.543-2.542a.602.602 0 0 0-.848 0zM14.282.175l2.543 2.543a.601.601 0 0 1 0 .848l-.848.848a.602.602 0 0 1-.848 0L12.588 1.87a.601.601 0 0 1 0-.849l.848-.848a.601.601 0 0 1 .846.002zM2.894 11.398L5.6 14.106a.3.3 0 0 1-.115.496l-4.09 1.382a.3.3 0 0 1-.379-.38l1.382-4.088a.3.3 0 0 1 .496-.118z' fill-rule='nonzero'/%3E%3Crect stroke='%23A9B3C1' x='.5' y='18.5' width='16' height='1' rx='.5'/%3E%3C/g%3E%3C/svg%3E");
}

#custom-edit:hover {
    background-image: url("data:image/svg+xml,%3Csvg width='17' height='20' viewBox='0 0 17 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%231979FF' fill-rule='evenodd'%3E%3Cpath d='M11.316 2.294l-8.05 8.05a.601.601 0 0 0 0 .848l2.542 2.542a.602.602 0 0 0 .849 0l8.05-8.05a.601.601 0 0 0 0-.848l-2.543-2.542a.602.602 0 0 0-.848 0zM14.282.175l2.543 2.543a.601.601 0 0 1 0 .848l-.848.848a.602.602 0 0 1-.848 0L12.588 1.87a.601.601 0 0 1 0-.849l.848-.848a.601.601 0 0 1 .846.002zM2.894 11.398L5.6 14.106a.3.3 0 0 1-.115.496l-4.09 1.382a.3.3 0 0 1-.379-.38l1.382-4.088a.3.3 0 0 1 .496-.118z' fill-rule='nonzero'/%3E%3Crect stroke='%231979FF' x='.5' y='18.5' width='16' height='1' rx='.5'/%3E%3C/g%3E%3C/svg%3E");
}

#custom-top {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='18' viewBox='0 0 16 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.8 0H1.2C.534 0 0 .533 0 1.19c0 .658.537 1.189 1.2 1.189h13.6c.665 0 1.2-.533 1.2-1.19C16 .53 15.463 0 14.8 0zm-.402 10.319L8.8 4.759c-.248-.246-.511-.374-.772-.383v13.079h1.57c.883 0 1.598-.71 1.598-1.586v-3.965h2.4c2.4 0 .8-1.585.8-1.585zm-12.74 0s-1.599 1.585.8 1.585h2.4v3.965c0 .876.715 1.586 1.598 1.586h1.57V4.376c-.26.009-.522.135-.772.383l-5.596 5.56z' fill='%23A9B3C1' fill-rule='nonzero'/%3E%3C/svg%3E");
}

#custom-top:hover {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='18' viewBox='0 0 16 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.8 0H1.2C.534 0 0 .533 0 1.19c0 .658.537 1.189 1.2 1.189h13.6c.665 0 1.2-.533 1.2-1.19C16 .53 15.463 0 14.8 0zm-.402 10.319L8.8 4.759c-.248-.246-.511-.374-.772-.383v13.079h1.57c.883 0 1.598-.71 1.598-1.586v-3.965h2.4c2.4 0 .8-1.585.8-1.585zm-12.74 0s-1.599 1.585.8 1.585h2.4v3.965c0 .876.715 1.586 1.598 1.586h1.57V4.376c-.26.009-.522.135-.772.383l-5.596 5.56z' fill='%23000' fill-rule='nonzero'/%3E%3C/svg%3E");
}


#cnblogs_post_body .hljs-ln-code p {
    margin: 0 !important;
}

/*
 * 边栏 
 */

/* 标签栏 */
.catListTag,
#sidebar_postcategory {
    padding-bottom: 1px;
}

.catListTag ul,
#sidebar_postcategory ul {
    margin: 15px;
    border: none;
    padding-left: 5px;
}

.catListTag ul li,
#sidebar_postcategory ul li {
    display: inline-block !important;
    border: 1px solid #eee;
    line-height: 0.5rem;
    margin: 0.15rem 0.15rem;
    background: #F3F3F3;
}

#sidebar_postcategory ul li {
    padding: 0;
}

#sidebar_postcategory ul li:hover {
    background: #ff5e52;
    cursor: pointer;
    color: #fff;
}

#sidebar_postcategory ul li a {
    padding: 15px 10px 15px 20px;
    display: inline-block;
}

#sidebar_postcategory ul li a:hover {
    color: #fff;
    border-bottom: none;
}