/* 基础样式与颜色变量 */
:root {
--primary-color: #e6d4f7;
--secondary-color: #d0b8ea;
--accent-color: #8a4fbd;
--text-color: #333;
--light-text: #666;
--background: #f9f5ff;
--card-bg: #ffffff;
--shadow: 0 4px 8px rgba(138, 79, 189, 0.1);
--hover-shadow: 0 8px 16px rgba(138, 79, 189, 0.2);
--intro-bg: #f0f0f0;
}

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

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

/* 导航栏样式 */
nav {
background-color: var(--primary-color);
box-shadow: var(--shadow);
position: relative;
}

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

.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--accent-color);
text-decoration: none;
}

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

.nav-links li {
margin-left: 2rem;
}

.nav-links a {
color: var(--text-color);
text-decoration: none;
transition: color 0.3s;
}

.nav-links a:hover {
color: var(--accent-color);
}

.hamburger {
display: none;
flex-direction: column;
cursor: pointer;
}

.hamburger span {
height: 3px;
width: 25px;
background: var(--accent-color);
margin-bottom: 4px;
border-radius: 5px;
transition: all 0.3s;
}

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

section {
margin-bottom: 3rem;
}

.section-title {
color: var(--accent-color);
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid var(--secondary-color);
}

/* 面包屑导航 */
.breadcrumb {
padding: 1rem 0;
margin-bottom: 2rem;
font-size: 0.9rem;
}

.breadcrumb a {
color: var(--accent-color);
text-decoration: none;
}

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

.breadcrumb span {
color: var(--light-text);
}

/* 主要内容区域 - 两列布局 */
.main-content {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 2rem;
}

/* 文章详情区域 */
.article-detail {
background: var(--card-bg);
border-radius: 8px;
padding: 2rem;
box-shadow: var(--shadow);
}

/* 文章头部信息 */
.article-header {
display: grid;
grid-template-columns: 100px 1fr;
gap: 1.5rem;
margin-bottom: 1.5rem;
align-items: center;
}

.article-thumbnail {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 8px;
}

.article-title {
font-size: 1.8rem;
font-weight: bold;
color: var(--accent-color);
margin-bottom: 0.8rem;
}

.article-meta {
display: flex;
flex-wrap: wrap;
color: var(--light-text);
font-size: 0.9rem;
}

.article-date, .article-views {
margin-right: 1.5rem;
display: flex;
align-items: center;
}

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

.article-views::before {
content: "👀";
margin-right: 5px;
}

/* 导读区域 */
.article-intro {
background: var(--intro-bg);
padding: 1.2rem;
border-radius: 6px;
margin-bottom: 2rem;
font-style: italic;
line-height: 1.7;
}

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

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

.article-content p {
margin-bottom: 1.2rem;
}

.article-content h2 {
color: var(--accent-color);
margin: 1.8rem 0 1rem;
font-size: 1.4rem;
}

.article-content h3 {
color: var(--accent-color);
margin: 1.5rem 0 0.8rem;
font-size: 1.2rem;
}

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

/* 文章导航 */
.article-navigation {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
}

.nav-previous, .nav-next {
padding: 1rem;
background: var(--primary-color);
border-radius: 6px;
transition: all 0.3s;
}

.nav-previous:hover, .nav-next:hover {
background: var(--secondary-color);
}

.nav-label {
font-size: 0.9rem;
color: var(--light-text);
margin-bottom: 0.5rem;
}

.nav-title {
font-weight: 500;
color: var(--accent-color);
}

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

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

/* 侧边栏 */
.sidebar {
position: sticky;
top: 2rem;
}

.sidebar-section {
background: var(--card-bg);
border-radius: 8px;
padding: 1.5rem;
box-shadow: var(--shadow);
margin-bottom: 2rem;
}

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

.sidebar-list li {
padding: 0.8rem 0;
border-bottom: 1px solid var(--primary-color);
}

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

.sidebar-list a {
color: var(--text-color);
text-decoration: none;
transition: color 0.3s;
display: block;
}

.sidebar-list a:hover {
color: var(--accent-color);
}

/* 页脚样式 */
footer {
background-color: var(--primary-color);
text-align: center;
padding: 1.5rem;
margin-top: 2rem;
color: var(--light-text);
}

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

.sidebar {
position: static;
margin-top: 2rem;
}

/* 平板和手机导航折叠 */
.hamburger {
display: flex;
}

.nav-links {
position: absolute;
top: 100%;
left: 0;
width: 100%;
background: var(--primary-color);
flex-direction: column;
padding: 1rem 0;
box-shadow: var(--shadow);
transform: translateY(-10px);
opacity: 0;
visibility: hidden;
transition: all 0.3s;
z-index: 100;
}

.nav-links.active {
transform: translateY(0);
opacity: 1;
visibility: visible;
}

.nav-links li {
margin: 0;
padding: 0.8rem 5%;
width: 100%;
text-align: center;
}

.copyright {
display: none;
}
}

@media (max-width: 768px) {
.article-header {
grid-template-columns: 1fr;
text-align: center;
}

.article-thumbnail {
margin: 0 auto;
}

.article-meta {
justify-content: center;
}

.article-navigation {
grid-template-columns: 1fr;
}

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

@media (max-width: 480px) {
/* 手机特定样式 */
.container {
padding: 0 0.5rem;
}

.article-detail {
padding: 1.5rem;
}

.article-title {
font-size: 1.5rem;
}

.article-meta {
flex-direction: column;
align-items: center;
}

.article-date, .article-views {
margin-bottom: 0.5rem;
}

.sidebar-section {
padding: 1rem;
}
}