:root {
    --primary-color: #1f2328;
    --secondary-color: #636c76;
    --link-color: #0969da;
    --border-color: #d0d7de;
    --border-muted-color: #d0d7deb3;
    --neutral-muted-color: #afb8c133;
    --bg-muted-color: #f6f8fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", Helvetica, Tahoma, Arial, "Microsoft YaHei", 微软雅黑, 黑体, Heiti, sans-serif, SimSun, 宋体, serif;
    color: var(--primary-color);
    line-height: 1.6;
    font-size: 16px;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid var(--border-muted-color);
    margin: 1rem 0;
    padding: 0;
}

img {
    max-width: 100%;
    display: inline-block;
    cursor: pointer;
}

a img {
    border: none;
}

/* pre, code, kbd, samp {
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, "Microsoft YaHei", monospace;
    font-size: 14px;
    color: var(--primary-color);
    padding: .2rem .4rem;
    margin: 0;
    background-color: var(--neutral-muted-color);
    border-radius: 6px;
    white-space: break-spaces;
} */


code {
    border: 1px dotted #999;
    background-color: #f0f0f0;
    padding: 1px 5px;
    line-height: 125%;
    word-wrap:break-word;
    white-space: pre-wrap;    
    border-radius: 3px;
    margin: 0 5px;
}
pre {
    border: 1px solid #999;
    background-color: #f0f0f0;
    padding: 5px;
    word-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 14px;
    border-radius: 8px;
}
pre code {
    border: 0;
    background: none;
    padding: 0;
    word-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-all;
}
.highlight>pre {
  padding: 10px; 
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-all;
}
.highlight {
  line-height: 18px;
  position: relative;
}

.highlight::before {
  /* 移除原来的实现 */
  display: none;
}

/* 纯CSS实现代码块语言标识 */
.highlight code[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 0;
  color: #333;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 10px;
  text-transform: uppercase;
  background-color: #f0f0f0;
  z-index: 10;
  border-bottom-left-radius: 5px;
  border-left: 1px solid #999;
  border-bottom: 1px solid #999;
}
blockquote {
    border-left: 4px solid #8fe5f7;
    padding: 0 15px;
    color: #000000;
}

figure {
    margin: 0;
    text-align: center;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}

blockquote {
    margin-left: 4px;
    padding-left: 20px;
    color: var(--secondary-color);
    border-left: 4px solid var(--border-color);
}

blockquote cite {
    font-size: 70%;
    opacity: .8;
}

blockquote em {
    font-weight: 600;
}

a {
    color: var(--primary-color);
    text-decoration: none
}

a.title {
    font-size: 1.125rem;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}

h3, h4, h5, h6 {
    margin:16px 0;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4, h5, h6 {
    font-size: 1.125rem;
}

.align-center {
    text-align: center;
}

.align-left {
    text-align: left;
}

.align-right {
    text-align: right;
}

ul {
    list-style-type: disc;
    padding-left: 32px;
}

ol {
    padding-left: 18px;
}

ul.flat {
    margin: 0;
    padding: 0;
}

ul.flat li {
    display: inline-block;
    list-style: none;
    margin-left: 5px;
}

svg {
    vertical-align: text-bottom;
}

.site-title a {
    text-decoration: none !important;
    font-family: 'Lucida Calligraphy', 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.site-title img {
    display: inline-block;
    height: 28px;
}

.post ul li,
.post ol li {
    line-height: 2rem;
}

.post ul li p {
    display: inline;
}

.main {
    max-width: 760px;
    margin: 40px auto 0;
}

header {
    margin-bottom: 40px;
}

header h1 {
    padding: 0;
    font-size: 1.6rem;
    margin: 0;
}

header nav {
    display: flex;
    padding-top: 10px;
    border-bottom: 1px solid var(--border-color);
}

header nav ul,
header nav li {
    margin: 0;
}

header nav ul.flat {
    display: inline-block;
    padding: 0;
}

header nav .nav-page {
    flex-grow: 1;
}

header nav .nav-page li {
    margin-right: 10px;
}

header nav .nav-social li {
    margin-left: 5px;
}

header nav ul.flat li {
    list-style: none;
    line-height: 2rem;
    text-transform: capitalize;
}

header nav .nav-page li.active a {
    color: var(--primary-color);
}

header nav .nav-page li a {
    color: var(--link-color);
    font-size: 16px;
}

header nav ul.flat li a:hover {
    text-decoration: underline;
}

header .site-description {
    display: flex;
    justify-content: space-between;
    height: 32px;
    line-height: 32px;
}

header .site-description span {
    padding: 0;
    margin: 0;
    font-size: 14px;
    font-style: italic;
}

header .site-description .social {
    padding: 0;
    border: none;
    min-width: 50px;
}

header .site-description .flat {
    float: right;
}

header .site-description .social ul a {
    display: inline-block;
    text-decoration: none;
}

.recent-posts .posts .post {
    margin-bottom: 20px;
}

.recent-posts .posts .post .meta,
.post .post-header .meta,.post-header .meta {
    font-size: 12px;
    color: var(--secondary-color);
}

.post .post-header {
    margin-bottom: 30px;
}

.post .post-header .title {
    margin: 0;
}

.post-tags {
    margin-top: 20px;
}

.post .post-header .meta,.post-header .meta {
    padding-left: 5px;
    margin-top: 10px;
}

.post .draft-label {
    color: var(--primary-color);
    font-size: 12px;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 6px;
    background-color: var(--neutral-muted-color);
}

.post .categories-label a {
    color: inherit;
    text-decoration: none;
    margin-left: 4px;
}

.post .categories-label a:hover {
    color: var(--link-color)
}

.post-tags .tags {
    margin-top: 40px;
}

.post-tags .tags li {
    margin-bottom: 0;
}

.post-tags .tags a {
    display: inline-block;
    font-size: 14px;
    color: var(--link-color);
    text-decoration: underline;
}

.post-tags .tags a:hover {
    text-decoration: underline;
}

.posts {
    list-style-type: none;
    padding: 0;
}

.tags svg {
    color: var(--secondary-color);
}

footer {
    text-align: right;
    color: var(--secondary-color);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    margin-top: 30px;
}

footer a {
    color: var(--secondary-color);
}

footer a:hover {
    color: var(--link-color);
    text-decoration: underline;
}

a.back_to_top {
    text-decoration: none;
    position: fixed;
    bottom: 20px;
    right: 40px;
    font-size: 48px;
    display: none;
}

.page-title {
    padding-left: 10px;
    font-size: 24px;
    border-left: 4px solid var(--border-color);
}

.terms {
    margin-top: 20px;
    padding: 0 10px;
}

.terms a {
    margin-right: 15px;
    display: inline-block;
    color: var(--link-color);
}

.categories.terms a {
    display: block;
    line-height: 28px;
    margin-right: 0px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.terms .terms_count {
    display: inline-block;
    position: relative;
    top: -4px;
    right: 1px;
    color: var(--secondary-color);
    font-size: 12px;
}

.pagination {
    margin: 0;
    padding: 20px 0 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
}

.pagination li {
    list-style: none;
    display: inline-block;
    margin: 0;
    padding: 0;
}

.pagination .page-prev {
    margin-right: 20px;
    padding-right: 20px;
}

.pagination .page-item.page-prev {
    text-align: left;
}

.pagination .page-item.page-next {
    text-align: right;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

table th {
    background-color: var(--bg-muted-color);
}

table th, table td {
    padding: 5px 20px;
    border: 1px solid var(--border-color);
}

.highlight {
    background: var(--bg-muted-color);
}

.highlight pre,
.highlight code,
.highlight kbd,
.highlight samp {
    font-weight: normal;
    background-color: inherit;
    /* white-space: pre; */
    word-break: break-all;
    word-wrap: break-word;
}

.highlight pre {
    margin-bottom: 0;
    margin-top: 0;
    padding: 8px;
    word-wrap:break-word;
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
}

.highlight pre code {
    padding: 0;
}

.highlight pre::-webkit-scrollbar {
    height: 10px;
}

.highlight pre::-webkit-scrollbar-button {
    display: none;
}

.highlight pre::-webkit-scrollbar-thumb {
    min-height: 16px;
    background-color: var(--border-muted-color);
    background-clip: padding-box;
    border: 3px solid var(--bg-muted-color);
    border-radius: 5px;
}

.highlight pre::-webkit-scrollbar-thumb:active {
    background-color: var(--border-color);
    border-width: 2px;
}

.markdown {
    margin-top: 10px;
}

.markdown a {
    color: var(--link-color);
    text-decoration: underline;
    position: relative;
    transform: perspective(1px) translateZ(0);
    -webkit-transform: perspective(1px) translateZ(0);
    -webkit-transition-property: color;
    transition-property: color;
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.3s;
}

.markdown h2 {
    position: relative;
    margin: 24px 0px 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-muted-color);
}

.markdown p {
    text-align: justify;
    word-wrap: break-word;
    margin: 1px 0;
}

.markdown table {
    display: block;
    width: 100%;
    max-width: 100%;
    width: max-content;
    overflow: auto;
}

/* 捐赠弹窗 */
.md-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50%;
    max-width: 600px;
    min-width: 320px;
    height: auto;
    z-index: 2000;
    visibility: hidden;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
}

.md-show {
    visibility: visible;
    opacity: 1;
}

.md-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    visibility: hidden;
    top: 0;
    left: 0;
    z-index: 1000;
    opacity: 0;
    background: rgba(0, 0, 0, .2);
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}

.md-show ~ .md-overlay {
    opacity: 1;
    visibility: visible;
}

.md-content {
    background: #fff;
    border-radius: 2px;
    margin: 0 auto;
    box-shadow: 0 20px 40px 0 rgba(0, 35, 90, .1), 0 0 2px 0 rgba(0, 35, 90, .06);
    padding: 40px 0 56px;
    -webkit-transform: scale(0.7);
    transform: scale(0.7);
    opacity: 0;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;

}

.md-content h1 {
    font-size: 1.375rem;
    margin: 0 40px;
}

.md-content p {
    margin: 16px 40px 0;
}

.md-show.md-modal .md-content {
    transform: scale(1);
    opacity: 1;
}

.md-content .donate-list {
    text-align: center;
    margin-top: 36px;
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 0;
}

.md-content .donate-list .donate-type {
    position: relative;
    width: 30%;
    max-width: 160px;
    height: auto;
    vertical-align: middle;
    border: 1px solid var(--border-muted-color);
    border-radius: 2px;
    -webkit-transition: all .2s;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-content .donate-type:hover {
    border: 1px solid var(--link-color);
}

.md-content .donate-list .donate-type .pal-logo {
    position: absolute;
    width: 80%;
    margin: 0;
    opacity: 1;
    -webkit-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

.md-content .donate-list .donate-type .pal-info {
    position: relative;
    width: 100%;
    margin: 0;
    opacity: 0;
    -webkit-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

.md-content .donate-list .donate-type:hover .pal-info {
    opacity: 1;
}

@media (max-width: 768px) {

    .main {
        padding: 16px;
        margin: 0 auto;
    }

    header h2 {
        display: none;
    }

    .recent-posts .posts .post {
        margin-bottom: 20px;
    }

    .md-donate {
        display: none;
    }
}

/*animation starts*/
@-webkit-keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translateY(-3px);
    }
    100% {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
  }
  
@keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translateY(-3px);
        transform: translateY(-3px);
    }
    100% {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
  }
/*animation ends*/

.line {
    border-top: 1px dotted var(--border-color);
    margin-top: 10px;
}

.tags {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    color: var(--primary-color);
}

.tags .tag:not(:last-child) {
    margin-right: .5rem;
}

/* 模态框样式 */
#image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#modal-image {
    max-width: 90%;
    max-height: 90%;
}

#close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}