/* 基础样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
}

a {
text-decoration: none;
color: inherit;
transition: all 0.3s ease;
}

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

/* 导航栏样式 */
.navbar {
background-color: #02DF82;
padding: 15px 0;
position: sticky;
top: 0;
z-index: 1000;
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;
color: white;
}

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

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

.nav-link {
color: white;
padding: 5px 10px;
border-radius: 3px;
}

.nav-link:hover {
background-color: rgba(255, 255, 255, 0.2);
}

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

/* 内容区域样式 */
.section {
margin: 40px 0;
padding: 30px;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
font-size: 1.5rem;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #02DF82;
color: #333;
}

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

.article-card {
padding: 20px;
border-radius: 6px;
background-color: #f9f9f9;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-title {
font-size: 1.2rem;
margin-bottom: 10px;
/* 修改为允许换行 */
white-space: normal;
overflow: visible;
word-wrap: break-word;
}

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

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

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

.article-desc {
color: #555;
line-height: 1.5;
}

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

.featured-card {
height: 250px;
border-radius: 6px;
position: relative;
overflow: hidden;
background-size: cover;
background-position: center;
transition: transform 0.3s ease;
}

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

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

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

.featured-desc {
display: none;
}

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

.popular-card {
display: flex;
padding: 15px;
border-radius: 6px;
background-color: #f9f9f9;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.popular-content {
flex: 1;
}

.popular-title {
font-size: 1.1rem;
margin-bottom: 10px;
/* 修改为允许换行 */
white-space: normal;
overflow: visible;
word-wrap: break-word;
}

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

.popular-meta span {
margin-right: 15px;
}

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

.popular-desc {
color: #555;
font-size: 0.9rem;
line-height: 1.4;
}

/* 文字介绍样式 */
.intro-text {
line-height: 1.7;
color: #555;
font-size: 1rem;
}

/* 友情链接样式 */
.links-container {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

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

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

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

/* 图标样式 */
.date-icon::before {
content: "📅";
}

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

.author-icon::before {
content: "✍️";
}

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

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

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

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

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

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

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

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

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

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

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