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

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

a {
text-decoration: none;
color: #0066cc;
transition: color 0.3s ease;
}

a:hover {
color: #00FFFF;
}

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

/* 导航栏样式 */
header {
background-color: #fff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 1000;
}

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

.logo {
font-size: 1.5rem;
font-weight: bold;
color: #00FFFF;
}

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

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

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

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

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

.section-title::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 50px;
height: 3px;
background-color: #00FFFF;
}

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

.article-card {
background: #fff;
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;
}

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

.article-content {
padding: 20px;
}

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

.article-excerpt {
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-card {
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, box-shadow 0.3s ease;
}

.featured-card:hover {
transform: scale(1.03);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

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

.featured-excerpt {
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-card {
background: #fff;
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-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.popular-content {
padding: 20px;
}

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

.popular-excerpt {
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: #fff;
border-radius: 8px;
padding: 30px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.intro-content {
line-height: 1.8;
color: #555;
}

/* 友情链接样式 */
.links-section {
background: #fff;
border-radius: 8px;
padding: 30px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

.link-item {
padding: 8px 12px;
background: #f5f5f5;
border-radius: 4px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: background 0.3s ease;
}

.link-item:hover {
background: #00FFFF;
color: #fff;
}

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

footer a {
color: #fff;
}

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

.nav-menu {
position: fixed;
top: 70px;
right: -100%;
background: #fff;
width: 80%;
height: calc(100vh - 70px);
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding-top: 40px;
transition: right 0.3s ease;
box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
}

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

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

/* 平板样式 */
.featured-articles {
grid-template-columns: repeat(2, 1fr);
}

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

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

@media (max-width: 768px) {
/* 内容区域响应式 */
.latest-articles,
.popular-articles {
grid-template-columns: 1fr;
}

.featured-articles {
grid-template-columns: 1fr;
}

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

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

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

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