html,
body {
    font-size: 14px;
    font-family: Helvetica, "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
    /* background: #f6f6f6; */
    margin: 0;
    padding: 0;
    overflow-y: auto;
    /* 内容可滚动 */
    scrollbar-width: none;
    /* Firefox 隐藏滚动条 */
    -ms-overflow-style: none;
    /* IE/Edge 隐藏滚动条 */
    scroll-behavior: smooth;
    /* height: 100%; */
    width: 100%;
    /* position: fixed; */
}

/* 顶部header栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fafafaaa;
    backdrop-filter: blur(3px);
    /* border-bottom: 1px solid #ddd; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.fixed-header {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    /* 水平居中 */
    padding: 4px 0px;
    /* 增加左右内边距 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 标题和图标左右分布 */
    box-sizing: border-box;
    width: 100%;
}

/* 隐藏复选框 */
.menu-toggle {
    display: none;
}

/* 三条横线图标 */
.menu-icon {
    padding: 0 15px;
    position: relative;
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
}

.menu-icon span {
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* 导航菜单 - 默认隐藏，带过渡 */
.header-nav {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fafafae0;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 130px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* 复选框选中时显示导航（带过渡） */
.menu-toggle:checked~.header-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.header-nav a {
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s;
}

.header-nav a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.title {
    font-size: 16px;
    font-weight: normal;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    margin: 0;
}

/* 搜索页跳转highlight */
.highlight {
    font-weight: 450;
    color: #666;
    background: #eee;
    padding: 3px 8px;
    margin: 0 1px;
    border-radius: 4px;
    text-decoration: none;
    border-radius: 3px;
}

/* 整体内容区 */
.container {
    max-width: 1000px;
    margin: 60px auto 30px;
    padding: 0 39px;
    line-height: 2.5;
}

/* 非移动端左侧sidebar区域 */
.sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 50px;
    bottom: 0;
    height: calc(100vh - 50px);
    width: 200px;
    padding: 0 25px 20px 25px;
    border-right: 1px solid #55555533;
    overflow-y: auto;
    scrollbar-width: none;
    flex: 1;
}

/* 上下弹性留白实现居中效果 */
.sidebar::before,
.sidebar::after {
    content: '';
    flex: 1;
    min-height: 15px;
    /* 最小留白 */
}

.sidebar::before {
    flex: 1;
    /* 调整比例可改变居中位置 */
}

.sidebar::after {
    flex: 1;
}

.subtitle {
    font-size: 14px;
    color: #888;
    line-height: 2;
}

.table {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.table-child {
    display: grid;
    padding: 0 25px;
    margin: 0 auto;
    text-align: center;
    line-height: 2;
}

.th {
    font-size: 12px;
    text-transform: uppercase;
    text-decoration: none;
    color: #888;
}

.th:hover {
    text-decoration: none;
}

/* 非移动端右侧主内容区域 */
.right-part {
    width: 100%;
    padding-left: 325px;
}

/* 折叠样式 */
.toggle {
    display: none;
}

.toggle-label {
    cursor: pointer;
    display: block;
    font-size: 14px;
    margin-top: 14px;
    user-select: none;
}

.toggle-label::before {
    content: "›";
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.2s;
}

.toggle:not(:checked)~.toggle-content {
    display: none;
}

.toggle:checked+.toggle-label::before {
    transform: rotate(90deg);
}

.toggle-content {
    /* display: none; */
    margin-left: 16px;
    font-size: 14px;
}

/* 左侧sidebar导航折叠样式补充 */
.togg a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.togg a::before {
    content: "\A0";
}

.toggle:checked+.toggle-label+.-content {
    display: block;
}

/* 最小宽度版权内容 */
#copyrightt {
    display: none;
}

/* 自适应宽度版权内容 */
#copyright {
    margin-top: auto;
    display: flex;
    position: relative;
    /* left: 50%; */
    /* transform: translate(-50%, -50%); */
    font-size: 13px;
    display: flex;
    justify-content: center;
    color: #888
}

/* 专题栏导航高亮设置 */
.active {
    text-shadow: 1px 1px 0 #888;
}

/* sidebar高亮设置 */
.nactive {
    text-align: center;
    line-height: 2;
    /* margin-bottom: 20px; */
    letter-spacing: 2px;
    font-size: 14px;
    text-shadow: 1px 1px 0 #888;
}

.unactive {
    text-align: center;
    line-height: 2;
    /* margin-bottom: 20px; */
    letter-spacing: 2px;
    font-size: 14px;
    text-shadow: 1px 1px 0 #55555533;
}

/* section页水平导航栏 */
.nav-categories {
    font-size: 14px;
    margin-bottom: 0px;
    /* margin-top: 14px; */
    padding-bottom: 0px;
}

/* section页目录格式 */
.article-list {
    width: 100%;
    font-size: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    /* 统一间距 */
    flex-wrap: wrap;
    /* 允许换行 */
}

.tag {
    font-size: 10px;
    flex: 0 0 auto;
    color: #333;
    background: #eee;
    padding: 3px 7px;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 5px;
}

a.tag:hover {
    background: #ccc;
}

.article-date {
    font-size: 10px;
    flex: 0 0 auto;
    min-width: 70px;
    /* 固定日期宽度 */
}

.article-list-title {
    font-size: 14px;
    flex: 1;
    /* 占满剩余空间 */
    min-width: 100px;
    /* 最小宽度，防止被压缩过小 */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin: 0;
    /* 重置 margin */
}

.article-list-title a {
    color: #333;
    text-decoration: none;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

a {
    color: #000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* single页文章标题 */
h2 {
    /* font-weight: normal; */
    font-size: 16px;
    margin: 0;
}


/* md文档格式 */
strong {
    font-weight: 450;
}


em {
    display: inline-block;
    font-style: normal;
    padding: 0 2px;
    text-decoration: underline;
}

p {
    font-size: 14px;
}

blockquote {
    border-left: 2px solid #666;
    margin: 0 0 0 -10px;
    padding: 0 10px;
    /* font-style: oblique; */
    color: #666;
}

blockquote p {
    line-height: 2.5;
    margin: 0;
}

li {
    /* border-left: 2px solid #666; */
    margin: 0;
    /* padding: 0 10px; */
    /* font-style: oblique; */
    color: #333
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 8px 0;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 前往上下篇 */
.nav-links {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.nav-links a {
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.return-link {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.return-link:hover {
    color: #000;
    text-decoration: none;
}

/* single页日期/tag的通用格式 */
.meta .article-date {
    font-size: 12px;
    color: #333;
}

.meta .tag {
    font-size: 12px;
    margin-left: 7px;
}

/* 置顶小球样式 */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 10px;
    width: 50px;
    height: 50px;
    background-color: #55555533;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    color: white;
    font-size: 24px;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

/* 悬停时显示并放大 */
.ball:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 点击收缩动画 */
.ball:active {
    animation: shrinkBounce 0.3s ease forwards;
}

/* 收缩再回弹动画 */
@keyframes shrinkBounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.7);
    }

    /* 收缩到 70% */
    100% {
        transform: scale(1);
    }

    /* 回弹 */
}

img {
    max-width: 100%;
    /* 图片最大宽度为容器宽度的 100% */
    height: auto;
}

.article-card {
    border: 1px solid #ddd;
    /* border-radius: 8px; */
    padding: 20px;
    background: #fff;
}

/* 文章卡片tag标签样式 */
.card .tag {
    font-size: 14px;
    margin-left: 7px;
}

.recent-abstract {
    margin-bottom: 16px;
    line-height: 2.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    /* 显示7行 */
    -webkit-box-orient: vertical;
    cursor: pointer;
}

.recent-abstract p {
    margin-top: 14px;
    margin-bottom: 0;
}

/* index.html展开全文按键 */
.expand-checkbox {
    display: none;
}

/* 点击后移除 -webkit-line-clamp 限制 */
.expand-checkbox:checked~.recent-abstract {
    -webkit-line-clamp: unset;
    /* 移除行数限制 */
    /* 保留其他所有样式不变 */
}

/* 文章卡片-展开全文标签 */
.expand-label {
    display: inline-block;
    margin-bottom: 12px;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.expand-label::after {
    content: "▼ 展开全文";
}

.expand-checkbox:checked~.expand-label::after {
    content: "▲ 收起全文";
}

/* 移动端主页在非移动端不显示 */
.mediaindex {
    display: none;
    /* height: 100vh; */
}


@media(max-width:460px) {
    #copyright {
        display: none;
    }

    #copyrightt {
        margin-top: auto;
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        /* 垂直居中 */
        min-height: 50px;
        font-size: 13px;
        color: #888
    }
}

/* 移动端适配 */
@media (max-width: 755px) {

    /* 导航菜单 */
    .header-nav {
        right: 0px;
        /* min-width: 100px; */
    }

    .header-nav a {
        padding: 2px 14px;
    }

    /* 移动端主页在移动端显示 */
    .mediaindex {
        min-height: 90vh;
        display: flex;
        flex-direction: column;
        overflow-y: visible;
    }



    .right-part {
        padding-left: 0;
    }

    /* 非移动端左侧sidebar */
    .sidebar {
        display: none;
    }

    /* 非移动端右侧主内容 */
    .indexrp {
        display: none;
    }
}