* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Arial', sans-serif;
}

body {
background-color: #f9f9f9;
color: #333;
line-height: 1.6;
overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
background-color: #4D0000;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
display: flex;
justify-content: space-between;
align-items: center;
}

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

.nav-menu {
display: flex;
list-style: none;
}

.nav-item {
margin-left: 1.5rem;
}

.nav-link {
color: white;
text-decoration: none;
transition: color 0.3s;
}

.nav-link:hover {
color: #ffcccb;
}

.hamburger {
display: none;
cursor: pointer;
color: white;
font-size: 1.5rem;
}

/* 面包屑导航 */
.breadcrumb {
max-width: 1200px;
margin: 1rem auto;
padding: 0 1rem;
}

.breadcrumb a {
color: #4D0000;
text-decoration: none;
}

.breadcrumb a:hover {
text-decoration: underline;
}

/* 主内容区域 */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
display: flex;
flex-wrap: wrap;
gap: 1.5rem;
}

/* 左侧内容区域 */
.left-column {
flex: 1;
min-width: 0; /* 防止flex元素溢出 */
}

/* 右侧内容区域 */
.right-column {
width: 300px;
}

/* 通用板块样式 */
.section {
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
padding: 1.5rem;
margin-bottom: 1.5rem;
overflow: hidden;
}

.section-title {
color: #4D0000;
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #4D0000;
font-size: 1.5rem;
}

/* 标签云样式 */
.tag-cloud {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 0.8rem;
}

.tag {
display: block;
text-align: center;
padding: 0.5rem;
background-color: #f5f5f5;
color: #4D0000;
text-decoration: none;
border-radius: 4px;
transition: all 0.3s;
font-size: 0.9rem;
white-space: normal; 
word-wrap: break-word;
}

.tag:hover {
background-color: #4D0000;
color: white;
}

/* 文章列表样式 */
.article-list {
display: flex;
flex-direction: column;
gap: 1.5rem;
}

.article-item {
display: flex;
border: 1px solid #eee;
border-radius: 6px;
overflow: hidden;
transition: transform 0.3s, box-shadow 0.3s;
}

.article-item:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(77, 0, 0, 0.1);
}

.article-thumb {
width: 200px;
min-width: 200px;
height: 150px;
object-fit: cover;
}

.article-content {
padding: 1rem;
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.article-title {
color: #4D0000;
text-decoration: none;
font-size: 1.2rem;
margin-bottom: 0.5rem;
display: block;
white-space: normal; 
}

.article-title:hover {
text-decoration: underline;
}

.article-meta {
color: #666;
font-size: 0.9rem;
display: flex;
gap: 1rem;
margin-bottom: 0.5rem;
}

.article-description {
color: #444;
line-height: 1.5;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}

/* 侧边栏文章列表样式 */
.sidebar-list {
list-style: none;
}

.sidebar-item {
margin-bottom: 0.8rem;
padding-bottom: 0.8rem;
border-bottom: 1px solid #eee;
}

.sidebar-item:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}

.sidebar-link {
color: #333;
text-decoration: none;
transition: color 0.3s;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.sidebar-link:hover {
color: #4D0000;
}

/* 分页样式 */
.pagination {
display: flex;
justify-content: center;
margin-top: 2rem;
gap: 0.5rem;
flex-wrap: wrap;
}

.page-link {
display: inline-block;
padding: 0.5rem 1rem;
border: 1px solid #ddd;
color: #4D0000;
text-decoration: none;
border-radius: 4px;
transition: all 0.3s;
}

.page-link:hover, .page-link.active {
background-color: #4D0000;
color: white;
border-color: #4D0000;
}

/* Emoji图标样式 */
.icon-author::before {
content: "👤 ";
}

.icon-date::before {
content: "📅 ";
}

.icon-views::before {
content: "👀 ";
}

/* 底部样式 */
footer {
background-color: #4D0000;
color: white;
text-align: center;
padding: 1.5rem;
margin-top: 2rem;
}

footer a {
color: white;
text-decoration: none;
}

footer a:hover {
color: #ffcccb;
}

/* 媒体查询 - 平板设备 */
@media (max-width: 1024px) {
.nav-menu {
display: none;
flex-direction: column;
width: 100%;
position: absolute;
top: 100%;
left: 0;
background-color: #4D0000;
padding: 1rem 0;
}

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

.nav-item {
margin: 0.5rem 0;
text-align: center;
}

.hamburger {
display: block;
}

.copyright {
display: none;
}

.tag-cloud {
grid-template-columns: repeat(4, 1fr);
}

.right-column {
width: 250px;
}

.article-thumb {
width: 160px;
min-width: 160px;
}
}

/* 媒体查询 - 小屏平板和大型手机 */
@media (max-width: 768px) {
.container {
flex-direction: column;
}

.right-column {
width: 100%;
}

.tag-cloud {
grid-template-columns: repeat(4, 1fr);
}

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

.article-thumb {
width: 100%;
height: 200px;
}

.article-meta {
flex-wrap: wrap;
}
}

/* 媒体查询 - 手机设备 */
@media (max-width: 500px) {
.tag-cloud {
grid-template-columns: repeat(2, 1fr);
}

.article-meta {
flex-direction: column;
gap: 0.3rem;
}

.article-thumb {
height: 180px;
}

.nav-container {
padding: 0 1rem;
}

.breadcrumb, .container {
padding: 0 0.5rem;
}

.section {
padding: 1rem;
}
}