/* 基础样式与颜色变量 */
:root {
--primary-color: #1b4332;
--secondary-color: #2d6a4f;
--accent-color: #40916c;
--light-color: #d8f3dc;
--text-color: #f8f9fa;
--background-color: #081c15;
--card-bg: #1b4332;
--hover-effect: brightness(115%);
--shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
--gray-bg: #2d3a35;
}

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

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

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

a:hover {
color: #fff;
}

/* 导航栏样式 */
.navbar {
background-color: var(--primary-color);
padding: 1rem 5%;
box-shadow: var(--shadow);
position: relative;
}

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

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

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

.nav-item {
margin-left: 1.5rem;
}

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

/* 面包屑导航 */
.breadcrumb {
max-width: 1200px;
margin: 1.5rem auto 0;
padding: 0 1rem;
font-size: 0.9rem;
}

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

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

/* 主要内容区域 */
.container {
max-width: 1200px;
margin: 1.5rem auto;
padding: 0 1rem;
display: grid;
grid-template-columns: 3fr 1fr;
gap: 1.5rem;
}

.section {
margin-bottom: 2rem;
}

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

/* 卡片通用样式 */
.card {
background-color: var(--card-bg);
border-radius: 8px;
overflow: hidden;
transition: transform 0.3s, box-shadow 0.3s;
box-shadow: var(--shadow);
padding: 1.5rem;
}

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

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

.article-title {
font-size: 1.8rem;
font-weight: bold;
margin-bottom: 0.8rem;
line-height: 1.3;
}

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

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

.date::before {
content: "📅";
margin-right: 0.3rem;
}

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

.author::before {
content: "👤";
margin-right: 0.3rem;
}

/* 导读区域 */
.article-guide {
background-color: var(--gray-bg);
padding: 1.2rem;
border-left: 4px solid var(--accent-color);
margin-bottom: 1.5rem;
border-radius: 4px;
}

.article-guide p {
margin: 0;
font-style: italic;
color: #b7e4c7;
}

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

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

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

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

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

.nav-prev, .nav-next {
padding: 1rem;
background-color: var(--secondary-color);
border-radius: 8px;
transition: background-color 0.3s;
}

.nav-prev:hover, .nav-next:hover {
background-color: var(--accent-color);
}

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

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

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

.sidebar-item {
padding: 0.8rem 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.sidebar-item a {
display: block;
transition: padding-left 0.3s;
}

.sidebar-item a:hover {
padding-left: 5px;
color: #fff;
}

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

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

.nav-menu {
position: absolute;
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.2);
padding: 1rem 0;
z-index: 999;
}

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

.nav-item {
margin: 1.5rem 0;
}

.copyright {
display: none;
}
}

@media (max-width: 900px) {
.container {
grid-template-columns: 1fr;
}
}

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

.article-thumb {
margin: 0 auto;
}

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

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

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