/* ========= 目录侧边栏（移动端抽屉） ========= */
@media (max-width: 992px) {

    /* 抽屉本体：默认隐藏在右侧屏外 */
    #post-toc{
        position: fixed !important;   /* 覆盖原框架的 position */
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        padding-top: 8rem;
        padding-bottom: 3rem;
        background: var(--bg-color);
        transform: translateX(100%);
        transition: transform .3s ease;
        z-index: 1002;
        overflow-y: auto;
        box-shadow: -4px 0 8px rgba(0,0,0,.12);
    }
    /* 打开状态 */
    #post-toc.open{
        transform: translateX(0) !important;    /* 用 !important 防止被覆盖 */
    }

    #post-toc.wow{
        visibility:visible !important;
        animation:none !important;
    }

    #post-toc.fadeInUp{
        animation-delay: 0ms !important;
        visibility: visible !important;
        animation-name: none !important;
    }

    /* 遮罩 */
    .sidebar-backdrop{
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease;
        z-index: 999;
        transition: transform .3s ease;
    }
    .sidebar-backdrop.open{
        opacity: 1;
        visibility: visible;
    }

    /* 小屏目录按钮 */
    #page_sidebar-toggle{
        position: fixed;
        right: 50px;
        bottom: 150px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        font-size: 15px;
        padding: 0;
        border: 1px solid var(--blue-color);
        background: var(--blue-color);
        color: #fff;
        cursor: pointer;
        z-index: 1001;
    }
}

/* ≥768px：抽屉回归文档流，按钮隐藏 */
@media (min-width: 993px){
    #page_sidebar-toggle{ display:none; }
    .post-toc{ position:static !important; transform:none !important; box-shadow:none; }
}


@keyframes flashHighlight {
    0% {color: var(--blue-color); }
    50% { background-color: transparent; }
    100% {color: var(--blue-color); }
}

.highlight-flash {
    animation: flashHighlight 1.5s ease-in-out;
    transition: background-color 0.3s;
}

@keyframes flashHighlight-2 {
    0% {color: orangered; }
    50% { background-color: transparent; }
    100% {color: orangered; }
}

.highlight-flash-2 {
    animation: flashHighlight-2 1.5s ease-in-out;
    transition: background-color 0.3s;
}

@keyframes flashHighlight-3 {
    0% {color: limegreen; }
    50% { background-color: transparent; }
    100% {color: limegreen; }
}

.highlight-flash-3 {
    animation: flashHighlight-3 1.5s ease-in-out;
    transition: background-color 0.3s;
}

.content__sidebar {
    padding: 20px;
    position: sticky;
}

.sidebar__widget h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

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

.sidebar__widget ul li {
    margin-bottom: 10px;
}

.sidebar__widget ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 18px;
}

/* sidebar */
.sidebar__widget-title h4 {
    font-size: 22px;
    position: relative;
    padding-bottom: 12px;
    color: var(--text-color);
}
.sidebar__widget-title h4::after {
    position: absolute;
    content: "";
    left: 0;
    bottom: 0;
    width: 60px;
    height: 2px;
    background: var(--blue-color);
}
.sidebar__widget-content .search {
    position: relative;
}
.sidebar__widget-content .search input {
    width: 100%;
    height: 50px;
    line-height: 50px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    border: none;
    outline: none;
    padding: 0 15px;
    background: #f7f7f7;
    color: var(--text-color);
}
.sidebar__widget-content .search input::placeholder {
    color: #8f8f9a;
}
.sidebar__widget-content .search button {
    position: absolute;
    top: 0;
    right: 0;
    height: 50px;
    width: 50px;
    line-height: 50px;
    color: var(--blue-color);
    background: transparent;
}

/* =========================
   1 级导航的样式
   ========================= */

.sidebar__widget-content .cat-link > ul > li {
    margin-bottom: 15px;
}
.sidebar__widget-content .cat-link > ul > li:last-child {
    margin-bottom: 0;
}
.sidebar__widget-content .cat-link > ul > li > a {
    padding-left: 20px;
    font-size: 19px;     /* 也可让二级字体略小，区分层级 */
    position: relative;
    font-weight: 500;
}
.sidebar__widget-content .cat-link > ul > li > a::after {
    position: absolute;
    content: "";
    left: 0;
    top: 0;
    font-family: "Font Awesome 5 Pro";
    font-size: 16px;
    color: var(--blue-color);
}
.sidebar__widget-content .cat-link > ul > li > a:hover {
    color: var(--blue-color);
}
.sidebar__widget-content .cat-link > ul > li > a:hover::after {
    left: 5px;
}

/* =========================
   2 级导航的样式
   ========================= */

/* 二级菜单列表 (如果要让 ul 缩进/分隔开) */
.sidebar__widget-content .cat-link > ul > li > ul {
    margin-top: 10px;    /* 与一级之间的上下间隔 */
    padding-left: 17px;  /* 整体缩进，使其看上去层级更明显 */
    list-style: none;    /* 去掉默认的圆点，改用自定义箭头或符号 */
}

/* 二级菜单的 <li> 可以与一级保持相同间隔，也可再缩小一些 */
.sidebar__widget-content .cat-link > ul > li > ul > li {
    margin-bottom: 10px;
}

/* 二级菜单的 <a> 链接样式 */
.sidebar__widget-content .cat-link > ul > li > ul > li > a {
    padding-left: 24px;  /* 在一级的基础上稍加缩进 */
    font-size: 17px;     /* 也可让二级字体略小，区分层级 */
    font-weight: 500;    /* 让二级文字稍微轻一点 */
    position: relative;
}

/* 二级菜单的箭头或标记符号 (可以换其他符号，或保持一致) */
.sidebar__widget-content .cat-link > ul > li > ul > li > a::before {
    content: "";                /* 也可换成其他unicode或icon */
    font-family: "Font Awesome 5 Pro";
    font-size: 14px;
    color: orangered;
    position: absolute;
    left: 8px;
    top: -5%;
}

/* 根据需要也可在 hover 时位移 */
.sidebar__widget-content .cat-link > ul > li > ul > li > a:hover::before {
    left: 11px;
}

.sidebar__widget-content .cat-link > ul > li > ul > li > a:hover {
    color: orangered
}

/* =========================
   3 级导航的样式
   ========================= */

/* 三级菜单列表 */
.sidebar__widget-content .cat-link > ul > li > ul > li > ul {
    margin-top: 8px;
    padding-left: 16px;   /* 进一步缩进 */
    list-style: none;
}

/* 三级菜单 <li> 的间距 */
.sidebar__widget-content .cat-link > ul > li > ul > li > ul > li {
    margin-bottom: 8px;
}

/* 三级菜单的 <a> */
.sidebar__widget-content .cat-link > ul > li > ul > li > ul > li > a {
    padding-left: 26px;
    font-size: 16px;
    font-weight: 450;
    position: relative;
}

/* 三级的箭头或符号 (可再用其他符号区别) */
.sidebar__widget-content .cat-link > ul > li > ul > li > ul > li > a::before {
    content: "";
    font-size: 12px;
    font-family: "Font Awesome 5 Pro";
    color: #28a745;
    position: absolute;
    left: 12px;
    top: -10%;
}

.sidebar__widget-content .cat-link > ul > li > ul > li > ul > li > a:hover::before {
    left: 16px;
}

.sidebar__widget-content .cat-link > ul > li > ul > li > ul > li > a:hover {
    color: #28a745;
}


/* recent post */
.rc-thumb img {
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 50%;
}

.rc-text h6 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 5px;
    color: var(--text-color);
}
.rc-text h6 a:hover {
    color: var(--blue-color);
}

.rc-meta span {
    font-weight: 500;
}

.tags a {
    display: inline-block;
    height: 34px;
    line-height: 30px;
    text-align: center;
    padding: 2px 16px;
    font-size: 16px;
    font-weight: 500;
    background-color: #eee;
    color: #333;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 10px;
    margin-right: 8px;
    margin-bottom: 10px;
    margin-top: 10px;
}
.tags a:hover {
    color: #ffffff;
    background: var(--blue-color);
    border-color: var(--blue-color);
}