:root {
--primary-color: #5B5B5B;
--secondary-color: #7A7A7A;
--background-color: #F5F5F5;
--text-color: #333333;
--light-gray: #E0E0E0;
--hover-color: #4A4A4A;
--card-shadow: 0 4px 8px rgba(0,0,0,0.1);
--transition: all 0.3s ease;
--intro-bg: #F0F0F0;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: var(--text-color);
background-color: var(--background-color);
overflow-x: hidden;
}

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

/* 导航栏样式 */
header {
background-color: var(--primary-color);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
font-size: 1.5rem;
font-weight: bold;
}

.logo a {
color: white;
text-decoration: none;
}

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

.nav-menu li {
margin-left: 1.5rem;
position: relative;
}

.nav-menu a {
color: white;
text-decoration: none;
transition: var(--transition);
padding: 0.5rem 0;
position: relative;
}

.nav-menu a::before {
content: '';
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: white;
visibility: hidden;
transform: scaleX(0);
transition: all 0.3s ease-in-out;
}

.nav-menu a:hover::before {
visibility: visible;
transform: scaleX(1);
}

.nav-menu a:hover {
color: var(--light-gray);
}

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

/* 面包屑导航 */
.breadcrumb {
padding: 1rem 0;
margin-bottom: 1.5rem;
display: flex;
flex-wrap: wrap;
align-items: center;
}

.breadcrumb a {
color: var(--primary-color);
text-decoration: none;
transition: var(--transition);
white-space: nowrap;
}

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

.breadcrumb span {
color: var(--secondary-color);
margin: 0 0.5rem;
white-space: nowrap;
}

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

/* 文章详情区域 */
.article-detail {
background: white;
padding: 1.5rem;
border-radius: 8px;
box-shadow: var(--card-shadow);
width: 100%;
overflow: hidden;
}

/* 文章头部区域 */
.article-header {
display: flex;
margin-bottom: 1.5rem;
align-items: flex-start;
gap: 1.5rem;
}

.article-thumbnail {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 4px;
flex-shrink: 0;
}

.article-title-meta {
flex: 1;
min-width: 0;
}

.article-title {
font-size: 1.8rem;
font-weight: bold;
margin-bottom: 1rem;
line-height: 1.3;
word-wrap: break-word;
overflow-wrap: break-word;
}

.article-meta {
display: flex;
color: var(--secondary-color);
font-size: 0.9rem;
flex-wrap: wrap;
gap: 1rem;
}

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

/* 使用Emoji图标 */
.date::before {
content: "📅 ";
margin-right: 0.3rem;
}

.views::before {
content: "👁️ ";
margin-right: 0.3rem;
}

/* 导读信息 */
.article-intro {
background-color: var(--intro-bg);
padding: 1.2rem;
border-radius: 6px;
margin-bottom: 1.5rem;
font-style: italic;
line-height: 1.6;
word-wrap: break-word;
overflow-wrap: break-word;
}

/* 文章内容 */
.article-content {
line-height: 1.7;
margin-bottom: 2rem;
word-wrap: break-word;
overflow-wrap: break-word;
}

.article-content h2 {
font-size: 1.5rem;
margin: 1.5rem 0 1rem;
color: var(--primary-color);
}

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

.article-content blockquote {
border-left: 4px solid var(--primary-color);
padding-left: 1rem;
margin: 1.5rem 0;
color: var(--secondary-color);
font-style: italic;
}

.article-content code {
background-color: var(--intro-bg);
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
}

.article-content pre {
background-color: var(--intro-bg);
padding: 1rem;
border-radius: 6px;
overflow-x: auto;
margin: 1.5rem 0;
}

.article-content img {
max-width: 100%;
height: auto;
border-radius: 6px;
margin: 1rem 0;
}

/* 文章导航 */
.article-navigation {
display: flex;
justify-content: space-between;
border-top: 1px solid var(--light-gray);
padding-top: 1.5rem;
}

.nav-item {
flex: 1;
padding: 0 1rem;
}

.nav-item:first-child {
padding-left: 0;
text-align: left;
}

.nav-item:last-child {
padding-right: 0;
text-align: right;
}

.nav-item a {
color: var(--primary-color);
text-decoration: none;
transition: var(--transition);
display: block;
word-wrap: break-word;
overflow-wrap: break-word;
}

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

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

/* 侧边栏样式 */
.sidebar {
display: flex;
flex-direction: column;
gap: 2rem;
}

.sidebar-section {
background: white;
padding: 1.5rem;
border-radius: 8px;
box-shadow: var(--card-shadow);
width: 100%;
overflow: hidden;
}

.sidebar-title {
font-size: 1.2rem;
color: var(--primary-color);
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--light-gray);
word-wrap: break-word;
}

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

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

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

.sidebar-list a {
color: var(--text-color);
text-decoration: none;
transition: var(--transition);
display: block;
line-height: 1.5;
word-wrap: break-word;
overflow-wrap: break-word;
}

.sidebar-list a:hover {
color: var(--primary-color);
padding-left: 0.3rem;
}

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

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

/* 响应式设计 */
@media (max-width: 1024px) {
.hamburger {
display: block;
}

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

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

.nav-menu li {
margin: 1.5rem 0;
}

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

.copyright {
display: none;
}
}

@media (max-width: 768px) {
.main-content {
grid-template-columns: 1fr;
}

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

.article-thumbnail {
width: 100%;
height: auto;
max-height: 300px;
}

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

.article-navigation {
flex-direction: column;
gap: 1rem;
}

.nav-item {
padding: 0;
text-align: left;
}

.nav-item:last-child {
text-align: left;
}
}

@media (max-width: 500px) {
.article-title {
font-size: 1.4rem;
}
}