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

body {
background-color: #f9f9f9;
color: #333;
line-height: 1.6;
}

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

/* 通用容器 */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}

/* 导航栏样式 - 已修改悬停效果 */
header {
background-color: #FF5151;
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;
}

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

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

/* 新的导航悬停效果 */
.nav-menu a {
padding: 8px 12px;
border-radius: 4px;
position: relative;
z-index: 1;
transition: all 0.3s ease;
}

.nav-menu a::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
transform: scaleX(0);
transform-origin: right;
transition: transform 0.3s ease;
z-index: -1;
}

.nav-menu a:hover::before {
transform: scaleX(1);
transform-origin: left;
}

.nav-menu a:hover {
color: #fff;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 添加小箭头指示器 */
.nav-menu a::after {
content: '';
position: absolute;
bottom: -5px;
left: 50%;
width: 0;
height: 2px;
background: white;
transition: all 0.3s ease;
transform: translateX(-50%);
}

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

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

/* 板块通用样式 */
.section {
padding: 40px 0;
border-bottom: 1px solid #eee;
}

.section-title {
font-size: 1.8rem;
margin-bottom: 30px;
color: #FF5151;
text-align: center;
position: relative;
padding-bottom: 10px;
}

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

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

.latest-article {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.latest-article-content {
padding: 20px;
}

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

.latest-article p {
color: #666;
margin-bottom: 15px;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

.article-meta {
color: #888;
font-size: 0.9rem;
display: flex;
align-items: center;
}

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

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

.featured-article {
height: 250px;
border-radius: 8px;
overflow: hidden;
position: relative;
background-size: cover;
background-position: center;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}

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

.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), transparent);
}

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

.featured-content h3 {
font-size: 1.1rem;
margin-bottom: 10px;
font-weight: normal;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.featured-content p {
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: 30px;
}

.popular-article {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.popular-article-content {
padding: 20px;
}

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

.popular-article p {
color: #666;
margin-bottom: 15px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

.popular-meta {
display: flex;
justify-content: space-between;
color: #888;
font-size: 0.9rem;
}

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

.view-count::before {
content: '👀';
margin-right: 5px;
}

/* 文字介绍板块 */
.intro-section {
background: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
text-align: center;
}

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

/* 友情链接板块 */
.links-section {
background: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

.friend-link {
padding: 8px 15px;
background: #f5f5f5;
border-radius: 4px;
transition: background 0.3s ease, color 0.3s ease;
}

.friend-link:hover {
background: #FF5151;
color: white;
}

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

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

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

.nav-menu {
display: none;
flex-direction: column;
position: absolute;
top: 100%;
left: 0;
width: 100%;
background-color: #FF5151;
padding: 20px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.nav-menu.active {
display: flex;
}

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

.hamburger {
display: block;
}

/* 移动视图下隐藏友情链接板块（包括标题） */
.intro-section,
.friend-links-section,
.copyright {
display: none;
}

/* 移动端导航悬停效果调整 */
.nav-menu a::after {
display: none;
}

.intro-section,
.links-section {
padding: 20px;
}
}

@media (max-width: 768px) {
/* 平板和小屏手机共用样式 */
.section {
padding: 30px 0;
}

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

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

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

.view-count {
margin-top: 5px;
}
}