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

:root {
--primary-color: #4B0091;
--secondary-color: #6a1b9a;
--light-color: #f5f5f5;
--text-color: #333;
--text-light: #777;
--border-color: #e0e0e0;
}

body {
background-color: #f9f9f9;
color: var(--text-color);
line-height: 1.6;
}

a {
text-decoration: none;
color: inherit;
transition: all 0.3s ease;
}

ul {
list-style: none;
}

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

/* 导航栏样式 - 与内容区域同宽 */
header {
background-color: var(--primary-color);
color: white;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

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

.nav-menu {
display: flex;
}

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

.nav-menu a {
padding: 5px 0;
position: relative;
}

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

.nav-menu a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background-color: white;
transition: width 0.3s ease;
}

.nav-menu a:hover::after {
width: 100%;
}

.hamburger {
display: none;
cursor: pointer;
font-size: 24px;
}

/* 主要内容区域 */
main {
padding: 40px 0;
}

section {
margin-bottom: 40px;
}

/* 面包屑导航 */
.breadcrumb {
padding: 15px 0;
margin-bottom: 30px;
border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
color: var(--primary-color);
}

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

.breadcrumb span {
margin: 0 8px;
color: var(--text-light);
}

/* 布局容器 */
.content-wrapper {
display: flex;
gap: 30px;
}

.left-column {
flex: 1;
}

.right-column {
width: 300px;
}

/* 分类标签列表 */
.category-tags {
margin-bottom: 40px;
}

.section-title {
font-size: 20px;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid var(--primary-color);
color: var(--primary-color);
}

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

.tag-item {
background: white;
border-radius: 4px;
text-align: center;
padding: 12px 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
cursor: pointer;
}

.tag-item:hover {
background: var(--primary-color);
color: white;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 文章列表 */
.article-list {
margin-bottom: 40px;
}

.article-item {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
display: flex;
}

.article-item:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.article-thumb {
width: 200px;
height: 150px;
background-size: cover;
background-position: center;
flex-shrink: 0;
}

.article-content {
padding: 20px;
flex: 1;
}

.article-title {
font-size: 18px;
margin-bottom: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.article-title a:hover {
color: var(--primary-color);
}

.article-meta {
display: flex;
font-size: 14px;
color: var(--text-light);
margin-bottom: 15px;
gap: 15px;
}

.article-meta span {
display: flex;
align-items: center;
}

.article-meta .author::before {
content: "👤";
margin-right: 5px;
}

.article-meta .date::before {
content: "📅";
margin-right: 5px;
}

.article-meta .views::before {
content: "👁️";
margin-right: 5px;
}

.article-excerpt {
color: var(--text-light);
font-size: 14px;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

/* 翻页按钮 */
.pagination {
display: flex;
justify-content: center;
gap: 10px;
margin-top: 40px;
}

.page-btn {
padding: 8px 15px;
background: white;
border: 1px solid var(--border-color);
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}

.page-btn:hover {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

.page-btn.active {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

/* 侧边栏 */
.sidebar-section {
background: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
margin-bottom: 30px;
}

.sidebar-title {
font-size: 18px;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border-color);
color: var(--primary-color);
}

.sidebar-list {
display: flex;
flex-direction: column;
gap: 12px;
}

.sidebar-item {
padding-bottom: 12px;
border-bottom: 1px dashed var(--border-color);
}

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

.sidebar-item a {
display: block;
transition: all 0.3s ease;
white-space: normal;
word-wrap: break-word;
overflow: visible;
text-overflow: ellipsis;
}

.sidebar-item a:hover {
color: var(--primary-color);
padding-left: 5px;
}

/* 底部样式 */
footer {
background-color: var(--primary-color);
color: white;
text-align: center;
padding: 20px 0;
margin-top: 40px;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
/* 平板和手机导航 */
.hamburger {
display: block;
}

.nav-menu {
position: fixed;
top: 70px;
left: -100%;
width: 100%;
flex-direction: column;
background-color: var(--primary-color);
text-align: center;
transition: 0.3s;
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
z-index: 999;
}

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

.nav-menu li {
margin: 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu a {
padding: 15px;
display: block;
}

.nav-menu a::after {
display: none;
}

/* 平板设备 */
.content-wrapper {
flex-direction: column;
}

.right-column {
width: 100%;
}

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

.article-meta {
flex-wrap: wrap;
gap: 10px;
}

.copyright {
display: none;
}
}

@media (max-width: 768px) {
/* 平板和手机设备 */
.tags-list {
grid-template-columns: repeat(2, 1fr);
}

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

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

.article-meta {
flex-direction: column;
gap: 5px;
}
}

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

.pagination {
flex-wrap: wrap;
}
}