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

:root {
--primary-color: #d32f2f;
--primary-dark: #b71c1c;
--primary-light: #ff6659;
--text-color: #333;
--text-light: #777;
--background: #f9f9f9;
--card-bg: #ffffff;
--border-color: #e0e0e0;
}

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

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

a:hover {
color: var(--primary-dark);
}

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

/* 导航栏样式 */
header {
background-color: var(--primary-color);
color: white;
padding: 15px 0;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 10px 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;
}

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

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

.nav-menu a {
color: white;
font-weight: 500;
}

.nav-menu a:hover {
color: rgba(255, 255, 255, 0.8);
}

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

/* 内容区块通用样式 */
.section {
padding: 50px 0;
}

.section-title {
text-align: center;
margin-bottom: 30px;
color: var(--primary-dark);
position: relative;
padding-bottom: 15px;
}

.section-title::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 3px;
background-color: var(--primary-color);
}

.card {
background-color: var(--card-bg);
border-radius: 5px;
overflow: hidden;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
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.1);
}

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

.article-card {
padding: 20px;
height: 100%;
display: flex;
flex-direction: column;
}

.article-title {
font-size: 1.2rem;
margin-bottom: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.article-meta {
color: var(--text-light);
font-size: 0.85rem;
margin-bottom: 10px;
display: flex;
align-items: center;
}

.article-meta span {
margin-right: 15px;
display: inline-flex;
align-items: center;
}

.article-meta span::before {
margin-right: 5px;
}

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

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

.article-description {
color: var(--text-light);
flex-grow: 1;
}

/* 推荐文章图片列表 */
.featured-articles {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}

.featured-card {
height: 250px;
position: relative;
background-size: cover;
background-position: center;
}

.featured-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
padding: 20px;
color: white;
}

.featured-title {
color: white;
margin-bottom: 10px;
font-size: 1.1rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.featured-description {
font-size: 0.9rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

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

.popular-card {
padding: 20px;
display: grid;
grid-template-columns: 1fr auto;
grid-template-rows: auto auto auto;
grid-template-areas: 
"title title"
"meta meta"
"desc desc";
}

.popular-title {
grid-area: title;
font-size: 1.2rem;
margin-bottom: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.popular-meta {
grid-area: meta;
color: var(--text-light);
font-size: 0.85rem;
margin-bottom: 10px;
display: flex;
}

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

.popular-date::before {
content: '📅';
margin-right: 5px;
}

.popular-views {
display: inline-flex;
align-items: center;
}

.popular-views::before {
content: '👁️';
margin-right: 5px;
}

.popular-description {
grid-area: desc;
color: var(--text-light);
}

/* 文字介绍部分 */
.intro-section {
background-color: var(--card-bg);
padding: 30px;
border-radius: 5px;
text-align: center;
}

.intro-content {
max-width: 800px;
margin: 0 auto;
line-height: 1.8;
}

/* 友情链接部分 */
.links-section {
background-color: var(--card-bg);
padding: 30px;
border-radius: 5px;
}

.links-grid {
display: flex;
flex-wrap: wrap;
gap: 15px;
}

.link-item {
padding: 8px 15px;
background-color: rgba(211, 47, 47, 0.1);
border-radius: 3px;
transition: background-color 0.3s ease;
}

.link-item:hover {
background-color: rgba(211, 47, 47, 0.2);
}

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

footer a {
color: white;
}

footer a:hover {
color: #ffff00;
}

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

.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: 20px 0;
}

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

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

/* 在移动端完全隐藏友情链接部分（包括标题） */
.intro-section,
.friend-links-section,
.copyright{
display: none;
}
}

@media (max-width: 768px) {
.latest-articles,
.popular-articles {
grid-template-columns: 1fr;
}

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

.popular-date {
margin-bottom: 5px;
}
}

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