:root {
--primary-color: #600000;
--text-color: #333;
--light-bg: #f9f9f9;
--border-color: #ddd;
--shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

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

a:hover {
color: #900000;
}

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

/* 导航栏样式 */
header {
background-color: var(--primary-color);
padding: 15px 0;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: var(--shadow);
}

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

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

.logo a {
color: white;
}

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

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

.nav-menu a {
color: white;
font-size: 1rem;
position: relative;
padding: 5px 0;
}

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

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

.nav-toggle {
display: none;
background: none;
border: none;
color: white;
font-size: 1.5rem;
cursor: pointer;
}

/* 文章卡片通用样式 */
.card {
background: white;
border-radius: 5px;
overflow: hidden;
box-shadow: var(--shadow);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

/* 最新文章区域 */
.latest-articles {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 25px;
margin-bottom: 40px;
}

.latest-article {
padding: 20px;
}

.latest-article h3 {
margin-bottom: 10px;
font-size: 1.2rem;
font-weight: normal;
}

.latest-article h3 a {
color: var(--text-color);
}

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

.article-meta {
color: #777;
font-size: 0.85rem;
margin-bottom: 10px;
display: flex;
align-items: center;
}

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

.article-excerpt {
color: #555;
font-size: 0.95rem;
}

/* 推荐文章区域 */
.featured-articles {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
margin-bottom: 40px;
}

.featured-article {
height: 250px;
position: relative;
background-size: cover;
background-position: center;
border-radius: 5px;
overflow: hidden;
}

.featured-article::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
opacity: 0.8;
transition: opacity 0.3s ease;
}

.featured-article:hover::before {
opacity: 0.9;
}

.featured-content {
position: absolute;
bottom: 0;
left: 0;
padding: 20px;
width: 100%;
color: white;
}

.featured-content h3 {
margin-bottom: 10px;
font-size: 1.1rem;
font-weight: normal;
}

.featured-content h3 a {
color: white;
}

.featured-content p {
font-size: 0.85rem;
opacity: 0.9;
}

/* 热门文章区域 */
.popular-articles {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 25px;
margin-bottom: 40px;
}

.popular-article {
padding: 20px;
}

.popular-article h3 {
margin-bottom: 10px;
font-size: 1.2rem;
font-weight: normal;
}

.popular-article h3 a {
color: var(--text-color);
}

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

.popular-meta {
display: flex;
color: #777;
font-size: 0.85rem;
margin-bottom: 10px;
}

.popular-meta div {
display: flex;
align-items: center;
margin-right: 15px;
}

.popular-meta div:first-child::before {
content: "📅";
margin-right: 5px;
}

.popular-meta div:last-child::before {
content: "👁️";
margin-right: 5px;
}

.popular-excerpt {
color: #555;
font-size: 0.95rem;
}

/* 文字介绍区域 */
.intro-section {
background: var(--light-bg);
padding: 30px;
border-radius: 5px;
margin-bottom: 40px;
}

.intro-section h2 {
color: var(--primary-color);
margin-bottom: 15px;
}

.intro-section p {
margin-bottom: 15px;
line-height: 1.8;
}

/* 友情链接区域 */
.links-section {
background: var(--light-bg);
padding: 30px;
border-radius: 5px;
margin-bottom: 40px;
}

.links-section h2 {
color: var(--primary-color);
margin-bottom: 15px;
}

.links-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 15px;
}

.links-grid a {
padding: 8px 12px;
background: white;
border-radius: 3px;
font-size: 0.9rem;
text-align: center;
border: 1px solid var(--border-color);
transition: all 0.3s ease;
}

.links-grid a:hover {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

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

footer a {
color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
.featured-articles {
grid-template-columns: repeat(2, 1fr);
}

.links-grid {
grid-template-columns: repeat(2, 1fr);
}

.intro-section,
.links-section,
.copyright {
display: none;
}
}

@media (max-width: 768px) {
.nav-menu {
position: fixed;
top: 60px;
left: -100%;
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: 20px 0;
}

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

.nav-menu li {
margin: 15px 0;
}

.nav-toggle {
display: block;
}

.latest-articles,
.popular-articles {
grid-template-columns: 1fr;
}
}

@media (max-width: 500px) {
.featured-articles {
grid-template-columns: 1fr;
}

.popular-meta {
flex-direction: column;
}

.popular-meta div {
margin-bottom: 5px;
}
}

/* 辅助类 */
.text-ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.multi-line-ellipsis {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}