/* 基础样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Microsoft YaHei', sans-serif;
}

body {
background-color: #f5f5f5;
color: #333;
line-height: 1.6;
}

a {
text-decoration: none;
color: #FF0000;
transition: color 0.3s;
}

a:hover {
color: #cc0000;
}

.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}

/* 导航栏样式 */
header {
background-color: #FF0000;
padding: 15px 0;
position: sticky;
top: 0;
z-index: 1000;
}

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

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

.logo a {
color: white;
}

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

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

.nav-menu a {
color: white;
padding: 5px 10px;
border-radius: 3px;
}

.nav-menu a:hover {
background-color: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
display: none;
color: white;
font-size: 24px;
cursor: pointer;
}

/* 面包屑导航 */
.breadcrumb {
padding: 15px 0;
font-size: 14px;
color: #666;
}

.breadcrumb a {
color: #666;
}

.breadcrumb a:hover {
color: #FF0000;
}

.breadcrumb span {
margin: 0 5px;
}

/* 主内容区布局 */
.main-content {
display: flex;
gap: 30px;
margin: 20px 0 40px;
}

.content-left {
flex: 1;
}

.content-right {
width: 300px;
flex-shrink: 0;
}

/* 标签云样式 */
.tag-cloud {
background: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
margin-bottom: 30px;
}

.tag-cloud h2 {
color: #FF0000;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #FF0000;
position: relative;
font-size: 18px;
font-weight: normal;
}

.tag-cloud h2::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 40px;
height: 2px;
background-color: #cc0000;
}

.tags {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 10px;
}

.tag {
padding: 5px 10px;
background: #f5f5f5;
border-radius: 3px;
text-align: center;
color: #666;
transition: background 0.3s, color 0.3s;
}

.tag:hover {
background: #FF0000;
color: white;
}

/* 文章列表样式 */
.article-list {
background: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
margin-bottom: 30px;
}

.article-list h2 {
color: #FF0000;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #FF0000;
position: relative;
font-size: 18px;
font-weight: normal;
}

.article-list h2::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 40px;
height: 2px;
background-color: #cc0000;
}

.article-item {
display: flex;
padding: 15px 0;
border-bottom: 1px solid #eee;
}

.article-item:last-child {
border-bottom: none;
}

.article-thumb {
width: 180px;
height: 120px;
flex-shrink: 0;
margin-right: 20px;
border-radius: 5px;
overflow: hidden;
}

.article-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s;
}

.article-item:hover .article-thumb img {
transform: scale(1.05);
}

.article-info {
flex: 1;
}

.article-info h3 {
margin-bottom: 10px;
font-weight: normal;
font-size: 18px;
}

.article-info h3 a {
color: #333;
}

.article-info h3 a:hover {
color: #FF0000;
}

.article-desc {
color: #666;
margin-bottom: 10px;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

.article-meta {
display: flex;
color: #888;
font-size: 14px;
}

.article-meta span {
display: flex;
align-items: center;
margin-right: 15px;
}

.author::before {
content: '作者';
margin-right: 5px;
}

.date::before {
content: '发布时间';
margin-right: 5px;
}

.views::before {
content: '阅读';
margin-right: 5px;
}

/* 分页样式 */
.pagination {
display: flex;
justify-content: center;
margin-top: 30px;
}

.page-item {
margin: 0 5px;
}

.page-link {
display: block;
padding: 8px 15px;
background: #f5f5f5;
color: #666;
border-radius: 3px;
transition: background 0.3s, color 0.3s;
}

.page-link:hover, .page-link.active {
background: #FF0000;
color: white;
}

/* 侧边栏样式 */
.sidebar-widget {
background: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
margin-bottom: 30px;
}

.sidebar-widget h2 {
color: #FF0000;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #FF0000;
position: relative;
font-size: 18px;
font-weight: normal;
}

.sidebar-widget h2::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 40px;
height: 2px;
background-color: #cc0000;
}

.sidebar-list {
list-style: none;
}

.sidebar-list li {
padding: 10px 0;
border-bottom: 1px solid #eee;
}

.sidebar-list li:last-child {
border-bottom: none;
}

.sidebar-list a {
color: #666;
transition: color 0.3s;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.sidebar-list a:hover {
color: #FF0000;
}

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

footer a {
color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
/* 平板样式 */
.tags {
grid-template-columns: repeat(4, 1fr);
}

.nav-menu {
position: fixed;
top: 70px;
left: -100%;
background: #FF0000;
width: 100%;
flex-direction: column;
padding: 20px;
transition: left 0.3s;
}

.nav-menu.active {
left: 0;
}

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

.menu-toggle {
display: block;
}

.copyright {
display: none;
}
}

@media (max-width: 900px) {
.main-content {
flex-direction: column;
}

.content-right {
width: 100%;
}
}

@media (max-width: 768px) {
/* 平板和手机共用样式 */
.tags {
grid-template-columns: repeat(3, 1fr);
}

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

.article-thumb {
width: 100%;
margin-right: 0;
margin-bottom: 15px;
}

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

.article-meta span {
margin-bottom: 5px;
}
}

@media (max-width: 500px) {
/* 手机样式 */
.tags {
grid-template-columns: repeat(2, 1fr);
}

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

.article-meta span {
margin-bottom: 5px;
}
}