:root {
--primary-color: #0080FF;
--secondary-color: #f8f9fa;
--text-color: #333;
--light-text: #666;
--border-color: #e0e0e0;
--shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

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

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

a:hover {
color: #0059b3;
}

/* 导航栏样式 */
.navbar {
background-color: white;
box-shadow: var(--shadow);
position: sticky;
top: 0;
z-index: 1000;
}

.nav-container {
max-width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
height: 70px;
}

.logo {
font-size: 24px;
font-weight: bold;
color: var(--primary-color);
}

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

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

.nav-link {
color: var(--text-color);
font-weight: 500;
padding: 10px 0;
position: relative;
}

.nav-link:hover {
color: var(--primary-color);
}

.nav-link::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background-color: var(--primary-color);
transition: width 0.3s ease;
}

.nav-link:hover::after {
width: 100%;
}

.hamburger {
display: none;
cursor: pointer;
font-size: 24px;
}

/* 主要内容区域 */
.container {
max-width: 1200px;
margin: 30px auto;
padding: 0 20px;
}

.section {
margin-bottom: 60px;
}

.section-title {
font-size: 24px;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid var(--primary-color);
display: inline-block;
}

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

.article-card {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: var(--shadow);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-content {
padding: 20px;
}

.article-title {
font-size: 18px;
margin-bottom: 10px;
white-space: normal;
word-wrap: break-word;
overflow: visible;
text-overflow: ellipsis;
}

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

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

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

.author::before {
content: "👤";
}

.date::before {
content: "📅";
}

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

.article-desc {
color: var(--light-text);
font-size: 14px;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

/* 推荐文章图片列表 */
.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;
transition: transform 0.3s ease;
}

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

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

.featured-title {
font-size: 16px;
margin-bottom: 10px;
white-space: normal;
word-wrap: break-word;
overflow: visible;
text-overflow: ellipsis;
}

.featured-desc {
display: none;
}

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

.popular-card {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: var(--shadow);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.popular-content {
padding: 20px;
}

.popular-title {
font-size: 16px;
margin-bottom: 10px;
white-space: normal;
word-wrap: break-word;
overflow: visible;
text-overflow: ellipsis;
}

.popular-meta {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
font-size: 13px;
color: var(--light-text);
}

.popular-desc {
color: var(--light-text);
font-size: 14px;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

/* 文字介绍部分 */
.intro-section {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: var(--shadow);
}

.intro-text {
line-height: 1.8;
color: var(--text-color);
}

/* 友情链接部分 */
.links-section {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: var(--shadow);
}

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

.link-item {
padding: 8px 15px;
background: var(--secondary-color);
border-radius: 4px;
transition: background 0.3s ease;
}

.link-item:hover {
background: #e9ecef;
}

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

footer a{
    color: white;
}

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

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

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

.nav-item {
margin: 0;
border-bottom: 1px solid #f0f0f0;
}

.nav-link {
display: block;
padding: 15px;
}

.latest-articles,
.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) {
.featured-articles {
grid-template-columns: 1fr;
}

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

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