/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "微软雅黑", sans-serif;
    background-color: #f0f2f5;
}

/* 主体内容容器 */
.container {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    width: 80%;
    margin: 0 auto;
    max-width: 1280px;
}

/* 左侧内容区域 */
.left-content {
    background-color: #fff;
    border: 1px solid #ddd; /* 边框颜色 */
    padding: 20px;
    border-radius: 8px; /* 圆角边框 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    margin-bottom: 20px; /* 与右侧区域的间距 */
    flex: 1;
}

/* 媒体查询：针对手机屏幕 */
@media (max-width: 768px) {
    .container {
        flex-direction: column; /* 改为垂直布局 */
        width: 100%; /* 宽度占满屏幕 */
    }

    .left-content {
        margin-top: 14px; /* 调整上边距 */
        margin-right: 0; /* 去除右边距 */
    }
}

/* 底部样式 */
.footer {
    background-color: #000;
    color: #fff;
    padding: 40px 0 0 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    width: 30%;
    margin-bottom: 20px;
}

.footer-section h2 {
    color: #ffc107;
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 10px;
}

.footer-section p {
    line-height: 1.6;
}

.footer-section ul {
    list-style-type: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffc107;
}

.footer-bottom {
    background-color: #111;
    text-align: center;
    padding: 10px 0;
    border-top: 1px solid #333;
}


/*---*/
.sidebar {
    width: 22%;
    margin-left: 24px;
}

.sidebar-nav, .sidebar-recent-posts {
    background-color: #fff; /* 背景颜色 */
    border-radius: 8px; /* 圆角 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    overflow: hidden; /* 隐藏溢出内容 */
    margin-bottom: 20px; /* 两个模块之间的间距 */
}

.sidebar-nav h3, .sidebar-recent-posts h3 {
    background-color: #f0f0f0; /* 标题背景色 */
    padding: 10px 15px; /* 标题内边距 */
    margin: 0; /* 去除默认外边距 */
    font-size: 16px; /* 标题字体大小 */
    font-weight: normal;
    border-bottom: 1px solid #ddd; /* 标题下边框 */
}

.sidebar-nav ul, .sidebar-recent-posts ul {
    list-style: none; /* 去除列表样式 */
    padding: 0; /* 去除内边距 */
    margin: 0; /* 去除外边距 */
}

.sidebar-nav li a, .sidebar-recent-posts li a {
    display: block; /* 块级显示 */
    padding: 10px 15px; /* 内边距 */
    text-decoration: none; /* 去除下划线 */
    color: #333; /* 链接文字颜色 */
    transition: background-color 0.2s; /* 过渡效果 */
}

.sidebar-nav li a:hover, .sidebar-recent-posts li a:hover {
    background-color: #eee; /* 鼠标悬停背景色 */
}
/*分割线样式*/
.sidebar-divider {
    height: 1px;
    background-color: #ddd;
    margin: 10px 0;
}

/*文章开始*/
/* 文章标题 */
.article-title {
    font-size: 2.5em; /* 大标题 */
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #333; /* 深色标题 */
}

/* 文章元信息 */
.article-meta {
    display: flex;
    align-items: center; /* 垂直居中 */
    color: #666; /* 浅色文字 */
    margin-bottom: 1em;
}

.article-meta span {
    margin-right: 1em; /* 各项间距 */
}

.article-meta a {
    color: #007bff; /* 链接颜色 */
    text-decoration: none; /* 去除下划线 */
}
.article-meta a:hover{
    text-decoration: underline;
}

/* 文章标签 */
.article-tags {
    margin-bottom: 1em;
}

.article-tags a {
    display: inline-block; /* 行内块元素 */
    padding: 5px 10px;
    margin-right: 5px;
    background-color: #f0f0f0; /* 浅色背景 */
    color: #333;
    border-radius: 5px; /* 圆角 */
    text-decoration: none;
}
.article-tags a:hover{
    background-color: #ddd;
}

/* 文章正文 */
.article-content {
    line-height: 1.8; /* 行高 */
    font-size: 1.1em;
    color: #444; /* 正文颜色 */
    margin-bottom: 2em;
}
.article-content p{
    margin-bottom: 1em;
}

/* 点评区域 */
.comments {
    margin-bottom: 2em;
}

.comments h3 {
    font-size: 1.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid #ddd; /* 下划线 */
    padding-bottom: 0.5em;
}

/* 相关文章 */
.related-articles {
    margin-bottom: 2em;
}

.related-articles h3 {
    font-size: 1.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5em;
}

.related-articles ul {
    list-style: none; /* 去除列表符号 */
    padding: 0;
}

.related-articles li {
    margin-bottom: 0.5em;
}

.related-articles a {
    color: #007bff;
    text-decoration: none;
}
.related-articles a:hover{
    text-decoration: underline;
}
/* 媒体查询：针对手机屏幕 */
@media (max-width: 768px) {
    .left-content {
        width: 100%;
    }
    .sidebar {
        width: 100%;
        margin-left: 0;
    }
}
.article-content img{
    max-width:100%;
}