/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #E8FFC4;
color: #333;
}

a {
text-decoration: none;
color: #333;
}

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

section {
margin-bottom: 40px;
}

h2 {
font-size: 1.8rem;
margin-bottom: 20px;
text-align: center;
}

/* 导航栏样式 */
.navbar {
background-color: #d4f2a2;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 100;
}

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

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

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

.nav-item {
margin-left: 20px;
}

.nav-link {
padding: 5px 10px;
transition: all 0.3s ease;
}

.nav-link:hover {
background-color: #c2e87c;
border-radius: 4px;
}

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

/* 第一排：最新文章列表 */
.latest-articles {
margin-top: 40px;
}

.articles-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30px;
}

.article-card {
background-color: #f5ffeb;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-title {
font-size: 1.2rem;
margin-bottom: 10px;
line-height: 1.4;
word-wrap: break-word;
}

.article-meta {
color: #666;
font-size: 0.9rem;
margin-bottom: 10px;
}

.article-meta::before {
content: "📅 ";
}

.article-excerpt {
color: #555;
}

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

.featured-card {
background-size: cover;
background-position: center;
height: 250px;
border-radius: 8px;
position: relative;
overflow: hidden;
display: flex;
align-items: flex-end;
transition: transform 0.3s ease;
}

.featured-card:hover {
transform: scale(1.03);
}

.featured-content {
background: rgba(0, 0, 0, 0.6);
color: white;
padding: 15px;
width: 100%;
transition: all 0.3s ease;
}

.featured-card:hover .featured-content {
background: rgba(0, 0, 0, 0.8);
}

.featured-title {
font-size: 1.1rem;
margin-bottom: 8px;
line-height: 1.3;
}

.featured-excerpt {
font-size: 0.9rem;
opacity: 0.9;
}

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

.popular-card {
background-color: #f5ffeb;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.popular-title {
font-size: 1.2rem;
margin-bottom: 10px;
line-height: 1.4;
word-wrap: break-word;
}

.popular-meta {
display: flex;
justify-content: space-between;
color: #666;
font-size: 0.9rem;
margin-bottom: 10px;
}

.popular-meta .date::before {
content: "📅 ";
}

.popular-meta .views::before {
content: "👁️ ";
}

.popular-excerpt {
color: #555;
}

/* 第四排：文字介绍 */
.intro-section {
background-color: #f5ffeb;
border-radius: 8px;
padding: 30px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
line-height: 1.8;
}

/* 第五排：友情链接 */
.links-section {
background-color: #f5ffeb;
border-radius: 8px;
padding: 30px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.link-item {
background-color: #e8ffc4;
padding: 8px 15px;
border-radius: 4px;
font-size: 0.9rem;
transition: background-color 0.3s ease;
}

.link-item:hover {
background-color: #d4f2a2;
}

/* 底部 */
footer {
background-color: #d4f2a2;
text-align: center;
padding: 20px 0;
margin-top: 40px;
}

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

.nav-menu {
position: fixed;
left: -100%;
top: 70px;
flex-direction: column;
background-color: #d4f2a2;
width: 100%;
text-align: center;
transition: 0.3s;
box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
padding: 20px 0;
}

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

.nav-item {
margin: 10px 0;
}

/* 平板设备 */
.articles-grid,
.popular-articles {
grid-template-columns: 1fr;
}

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

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

@media (max-width: 768px) {
/* 手机设备热门文章元数据纵列显示 */
.popular-meta {
flex-direction: column;
}

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

@media (max-width: 500px) {
/* 手机设备 */
.featured-articles {
grid-template-columns: 1fr;
}
}