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

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

/* 导航栏样式 */
.navbar {
background-color: #6a0dad;
padding: 15px 5%;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 10px rgba(106, 13, 173, 0.3);
width: 100%;
}

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

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

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

.nav-item {
margin-left: 25px;
}

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

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

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

/* 主要内容区域 */
.container {
max-width: 1200px;
margin: 30px auto;
padding: 0 20px;
width: 100%;
}

/* 面包屑导航 */
.breadcrumb {
background-color: white;
padding: 15px 20px;
border-radius: 8px;
box-shadow: 0 3px 10px rgba(106, 13, 173, 0.1);
margin-bottom: 25px;
width: 100%;
}

.breadcrumb a {
color: #6a0dad;
text-decoration: none;
}

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

.breadcrumb span {
color: #888;
}

/* 主内容布局 */
.main-content {
display: grid;
grid-template-columns: 3fr 1fr;
gap: 30px;
width: 100%;
}

/* 文章详情区域 */
.article-detail {
background-color: white;
padding: 25px;
border-radius: 8px;
box-shadow: 0 3px 10px rgba(106, 13, 173, 0.1);
width: 100%;
}

/* 文章头部信息 */
.article-header {
display: flex;
margin-bottom: 20px;
align-items: flex-start;
}

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

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

.article-title-container {
flex: 1;
}

.article-title {
font-size: 1.8rem;
font-weight: bold;
color: #6a0dad;
margin-bottom: 10px;
line-height: 1.3;
}

.article-meta {
display: flex;
color: #888;
font-size: 0.9rem;
gap: 20px;
}

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

.article-views::before {
content: "👁️ ";
}

/* 导读信息 */
.article-intro {
background-color: #f5f5f5;
padding: 15px;
border-left: 4px solid #6a0dad;
margin-bottom: 25px;
font-style: italic;
border-radius: 4px;
}

/* 文章内容 */
.article-content {
margin-bottom: 30px;
line-height: 1.8;
}

.article-content img {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
}

.article-content p {
margin-bottom: 15px;
}

.article-content h2 {
color: #6a0dad;
margin: 25px 0 15px;
font-weight: normal;
border-bottom: 1px solid #d8bfd8;
padding-bottom: 8px;
}

.article-content h3 {
color: #6a0dad;
margin: 20px 0 12px;
font-weight: normal;
}

/* 文章导航 */
.article-navigation {
display: flex;
justify-content: space-between;
border-top: 1px solid #eee;
padding-top: 20px;
}

.nav-previous, .nav-next {
flex: 1;
}

.nav-next {
text-align: right;
}

.nav-label {
font-size: 0.9rem;
color: #888;
margin-bottom: 5px;
}

.nav-title {
color: #6a0dad;
font-weight: 500;
}

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

/* 侧边栏 */
.sidebar {
display: flex;
flex-direction: column;
gap: 30px;
width: 100%;
}

.sidebar-section {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 3px 10px rgba(106, 13, 173, 0.1);
width: 100%;
}

.sidebar-title {
color: #6a0dad;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #d8bfd8;
font-weight: normal;
font-size: 1.2rem;
}

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

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

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

.sidebar-item a {
color: #333;
text-decoration: none;
transition: color 0.3s;
display: block;
}

.sidebar-item a:hover {
color: #6a0dad;
}

/* 页脚样式 */
footer {
background-color: #6a0dad;
color: white;
text-align: center;
padding: 20px;
margin-top: 50px;
width: 100%;
}

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

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

.sidebar {
flex-direction: row;
flex-wrap: wrap;
}

.sidebar-section {
flex: 1;
min-width: 300px;
}
}

@media (max-width: 768px) {
/* 导航栏响应式 */
.nav-menu {
position: fixed;
left: -100%;
top: 70px;
flex-direction: column;
background-color: #6a0dad;
width: 100%;
text-align: center;
transition: 0.3s;
box-shadow: 0 10px 15px rgba(106, 13, 173, 0.2);
padding: 20px 0;
}

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

.nav-item {
margin: 15px 0;
}

.hamburger {
display: block;
}
/* 文章头部信息在手机视图下垂直排列 */
.article-header {
flex-direction: column;
}

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

/* 文章元数据在手机视图下纵列显示 */
.article-meta {
flex-direction: column;
gap: 8px;
}

/* 文章导航在手机视图下垂直排列 */
.article-navigation {
flex-direction: column;
gap: 15px;
}

.nav-next {
text-align: left;
}

/* 侧边栏在平板下变为单列 */
.sidebar {
flex-direction: column;
}

.sidebar-section {
min-width: auto;
}

.copyright {
display: none;
}
}

@media (max-width: 500px) {
/* 调整文章标题字体大小 */
.article-title {
font-size: 1.5rem;
}

/* 调整文章详情内边距 */
.article-detail {
padding: 20px 15px;
}
}