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

strong {
    font-weight: 450;
}

p {
    font-size: 14px;
}

body::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Edge 隐藏滚动条 */
}

.container {
    max-width: 680px;
    margin: 60px auto 30px;
    line-height: 2.5;
}

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

.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:checked+.toggle-label::before {
    transform: rotate(90deg);
}

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

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

#copyright {
    font-size: 13px;
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
    color: #888
}

/* 专题栏导航 */
.navbar {
    margin-top: 45px;
}

.navbar a {
    font-size: 14px;
    color: #888;
}

.nav-categories {
    font-size: 14px;
    margin-bottom: 0px;
    margin-top: 45px;
    padding-bottom: 0px;
}

.article-list-title {
    font-size: 14px;
    margin: 4px 0;
}

.article-list-date {
    font-size: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #eee;
}

.article-list-tag {
    font-size: 10px;
}

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

a:hover {
    text-decoration: underline;
}

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

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

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

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 {
    /* padding: 0.4em 0.8em; */
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.return-link {
    /* margin-top: 40px; */
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

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

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

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

/* 文章tag标签样式 */
a.tag {
    color: #333;
    background: #eee;
    padding: 3px 7px;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 5px;
}

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

.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;
}

/* 在 CSS 末尾添加 */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
        margin: 60px 24px 20px;
        padding: 0 15px;
    }
}

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

.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: "▲ 收起全文";
}

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

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


.title {
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: normal;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    margin: 0;
}

/* 隐藏复选框 */
.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: #fafafaaa;
    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);
}

/* 移动端适配 */
@media (max-width: 600px) {
    .header-nav {
        right: 0px;
        /* min-width: 100px; */
    }

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