/* @font-face {
    font-family: "阿里妈妈东方大楷 Regular";
    font-weight: 400;
    src: url("/fonts/OWEKl4qzJULIzLZ1wBt2x.woff2") format("woff2"),
    url("/fonts/OWEKl4qzJULIzLZ1wBt2x.woff") format("woff");
    font-display: swap;
  } */

/* 置灰代码 */

/* html {
    filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
    -webkit-filter: grayscale(100%);
} */

body {
    color: black;
    margin: auto;
    /* max-width: 50rem; */
    background-color: #faf9de;
    /* padding: 30px 15px; */
    box-sizing: border-box;
    /* font-family: "LXGW WenKai", sans-serif; */
    /* font-weight: bold; */
}

hr {
    background: linear-gradient(
        to right,
        red,
        orange,
        yellow,
        green,
        blue,
        indigo,
        violet
    );
    height: 3px;
    border: none;
    border-radius: 1px;
    background-size: 200% 100%;
    animation: animate-hr 10s linear infinite;
}

@keyframes animate-hr {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0 0;
    }
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container-single {
    display: flex;
    width: 75%;
}

.container-single-left {
    width: 75%;
}

.container-single-right {
    width: 25%;
}

.container-head,
.container-footer,
.container-contact,
.container-comment {
    width: 75%;
    height: 10%;
}

@media (max-width: 1080px) {
    .container-single-right {
        display: none;
        /* 在屏幕宽度小于等于 768px 时隐藏整个容器 */
    }
    .container-single-left,
    .container-single,
    .container-footer,
    .container-head,
    .container-comment,
    .container-contact {
        width: 100%;
    }
}

.sidebar {
    width: 250px;
    position: static;
    overflow-y: auto;
    padding: 20px;
}

/* 未访问的链接 */
a:link {
    color: red;
}

/* 用户已访问的链接 */
a:visited {
    color: #ff8e2d;
}

/* 用户鼠标悬停在链接上时 */
a:hover {
    color: #ff8e2d;
    text-decoration: underline;
}

.typing {
    width: 7.8em;
    white-space: nowrap;
    border-right: 2px solid transparent;
    animation:
        typing 3s steps(800, end),
        blink-caret 0.75s step-end infinite;
    overflow: hidden;
}

/* 打印效果 */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 7.8em;
    }
}

/* 光标闪啊闪 */
@keyframes blink-caret {
    from,
    to {
        box-shadow: 1px 0 0 0 transparent;
    }

    50% {
        box-shadow: 1px 0 0 0;
    }
}

.box {
    width: 100%;
    margin: 0 auto;
    /* border: 0px solid #ff6700; */
    overflow: hidden;
}

.animate {
    padding-left: 0px;
    padding-right: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 18px;
    color: #000;
    display: inline-block;
    white-space: nowrap;
    animation: 20s wordsLoop linear infinite normal;
}

@keyframes wordsLoop {
    0% {
        transform: translateX(0);
        -webkit-transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
        -webkit-transform: translateX(-100%);
    }
}

@-webkit-keyframes wordsLoop {
    0% {
        transform: translateX(0);
        -webkit-transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
        -webkit-transform: translateX(-100%);
    }
}

img {
    width: 100%;
    border-radius: 15px;
}

article {
    padding: 5px;
}

pre {
    overflow-x: auto;
    border-radius: 15px;
    padding: 15px;
    border: 5px solid #ddd;
}

code {
    color: #e6db74;
    padding: 3px;
    background-color: #272822;
}

.blog-post-content {
    overflow-x: auto;
}

#page-title {
    text-align: left;
    margin-left: 1rem;
    top: 50%;
}

#page-title h1 a,
.post a {
    color: black;
}

.date-time-font {
    font-family: "Ubuntu Mono";
}

#page-title a:hover,
.post a:hover {
    text-decoration: underline;
}

span {
    word-wrap: break-word;
}

#posts {
    padding-left: 2rem;
}

.post {
    padding-left: 1rem;
}

.blog-post {
    padding-left: 1rem;
    padding-right: 1rem;
}

.post-container {
    display: block;
}

.post-tags {
    padding-left: 1rem;
    padding-right: 1rem;
}

.post-tag-list {
    list-style-type: none;
    display: inline-block;
    padding-left: 0;
}

.post-tag-list-item {
    white-space: nowrap;
    display: inline-block;
}

.post-date-time {
    white-space: nowrap;
    vertical-align: initial;
}

.page-content {
    margin: 1rem;
}

.head-image {
    border-radius: 50%;
    width: 3rem;
    float: right;
    margin-right: 1rem;
}

.head-image-box {
    width: 100%;
}

.head-box img:hover {
    transition: all 2s;
    transform: rotate(360deg);
}

.title-box {
    width: 100%;
    /* float: right; */
    /* width: 65%; */
    text-overflow: unset;
}

.head-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
    justify-content: center;
}
.head-box img {
    height: auto;
    display: block;
    margin: 0 auto;
    max-width: 100%;
    margin-right: 1rem;
}

.head-box p {
    height: auto;
    display: block;
    margin: 0 auto;
}

.postitem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.postitem a {
    text-decoration: none;
    font-size: 18px;
}

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

.postitem time {
    font-size: 18px;
}

@media (max-width: 500px) {
    body {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .postitem {
        display: block;
    }

    .postitem a {
        display: block;
    }
}

#TableOfContents ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 1rem;
}

#TableOfContents li {
    margin: 0.25rem 0;
}

#TableOfContents ul ul {
    list-style-type: circle;
    padding-left: 1.25rem;
}

#TableOfContents ul ul ul {
    list-style-type: square;
}

#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 5px; /* 进度条高度 */
    width: 0; /* 初始宽度为0，随着阅读进度增加而增加 */
    background-color: #ff8e2d; /* 进度条颜色 */
    transition: width 0.3s ease; /* 进度条宽度变化动画效果 */
}

/* 只在文章内容内生效的表格样式 */
.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #fffbe6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-post-content th,
.blog-post-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0e6d2;
}

.blog-post-content th {
    background-color: #faf9de;
    color: #ff8e2d;
    font-weight: bold;
    font-size: 1.05em;
}

.blog-post-content tr:last-child td {
    border-bottom: none;
}

.blog-post-content tr:hover {
    background-color: #fff3d1;
    transition: background 0.2s;
}

/* 响应式表格：小屏幕下横向滚动，仅限文章内容 */
.blog-post-content .table-responsive {
    width: 100%;
    overflow-x: auto;
}

.blog-post-content .table-responsive table {
    min-width: 600px;
}

/* 下拉菜单样式 */
.menu-item {
    position: relative;
}

.dropdown-toggle.has-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-65%);
    background-color: #faf9de;
    border: 2px solid #ff8e2d;
    border-radius: 15px;
    padding: 10px 0;
    margin-top: 0;
    list-style: none;
    min-width: 150px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-menu li {
    padding: 8px 20px;
    white-space: nowrap;
}

.dropdown-menu li:hover {
    background-color: #fff3d1;
}

.dropdown-menu li a {
    text-decoration: none;
    display: block;
}

.dropdown-toggle.has-dropdown:hover + .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.menu-item:hover .dropdown-menu {
    display: block;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-sizing: border-box;
}

.dropdown-toggle .dropdown-caret {
    font-size: 0.8em;
}
