body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.article-container div {
    line-height: 40px;
}
/* 去掉 a 标签下划线 */
a {
    text-decoration: none;
    color: black;
}

/* 去掉 li 标签前的小圆点 */
li {
    list-style-type: none;
    margin-bottom: 10px;
    /* 增加li元素的行间距 */
}

/* 页眉样式 */
header {
    background-color: #06c;
    color: white;
    padding: 20px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #e0e0e0;
}

/* 为导航第三个元素设置背景块 */
.nav-links li:nth-child(3) a {
    background-color: white;
    color: #06c;
    padding: 5px 10px;
    border-radius: 5px;
}

/* 主要内容区样式 */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.article-container {
    flex: 3;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 标题和作者信息居中 */
.article-container h1,
.article-meta {
    text-align: center;
}

.article-meta {
    color: #777;
    margin-bottom: 10px;
}

/* 在 article-meta 和 article-content 之间添加分割线 */
.article-meta::after {
    content: "";
    display: block;
    height: 1px;
    background-color: #ccc;
    margin-top: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 为文章内容正文添加左侧边距 */
.article-content {
    padding-left: 20px;
}

/* h2 标题设置颜色 */
.article-content h2 {
    color: #06c;
}

/* 内容 p 增加行间距 */
.article-content p {
    line-height: 35px;
}

.sidebar {
    flex: 1;
}

.widget {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* 为相关文章和标签云的标题添加蓝色背景和白色文字 */
.widget h3 {
    margin-top: 0;
    color: white;
    background-color: #06c;
    padding: 5px 10px;
    border-radius: 5px;
}

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

/* 一行四列文章列表样式 */
.article-list {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    padding: 0;
}

.article-list li {
    flex: 1;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-list li h4 {
    margin-top: -44px;
    margin-bottom: -45px;
    color: #06c;
}

.article-list li img {
    width: 100%;
    height: 50%;
    /* 将图片高度设置为 50% */
    border-radius: 8px;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.article-list li img:hover {
    filter: brightness(0.8);
}

.article-list li p {
    margin: 0;
    /* 去除 p 标签默认的外边距，使布局更紧凑 */
}

/* 页脚样式 */
footer {
    background-color: #06c;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

.footer-text {
    margin: 5px 0;
}

.copyright {
    color: #ccc;
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
   .hamburger {
        display: flex;
    }

   .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #06c;
        text-align: center;
    }

   .nav-links.active {
        display: flex;
    }

   .nav-links li {
        margin: 10px 0;
    }

   .main-content {
        flex-direction: column;
    }

   .article-list {
        flex-direction: column;
    }

    /* 手机端导航第三个元素背景块设置为白色，文字设置为蓝色 */
   .nav-links li:nth-child(3) a {
        background-color: white;
        color: #06c;
    }

    /* 手机端图片高度调整 */
   .article-list li img {
        height: 200px;
    }

    /* 手机端文章标题增加与图片的间距 */
   .article-list li h4 {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    /* 手机端li增加与页面的间距 */
   .article-list {
        margin: 15px;
        margin-top: 2px;
    }

    /* 手机端li与li之间的间距 */
   .article-list li + li {
        margin-top: -9px;
    }
}