/* 基础样式和变量定义 */
:root {
--primary-color: #00FFFF;
--secondary-color: #00CCCC;
--text-color: #333333;
--light-color: #f5f5f5;
--dark-color: #222222;
--border-radius: 4px;
--box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: var(--text-color);
background-color: var(--light-color);
overflow-x: hidden;
}

a {
text-decoration: none;
color: var(--dark-color);
transition: var(--transition);
}

a:hover {
color: var(--primary-color);
}

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

/* 导航栏样式 - 添加内边距 */
.navbar {
background-color: var(--primary-color);
box-shadow: var(--box-shadow);
position: sticky;
top: 0;
z-index: 1000;
padding: 0 15px; /* 添加左右内边距 */
}

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

.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--dark-color);
}

.logo:hover{
color: white;
}

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

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

.nav-link {
color: var(--dark-color);
font-weight: 500;
}

.nav-link:hover {
color: white;
}

.hamburger {
display: none;
cursor: pointer;
background: none;
border: none;
font-size: 1.5rem;
color: var(--dark-color);
}

/* 主要内容区域 */
.section {
padding: 50px 0;
}

.section-title {
text-align: center;
margin-bottom: 40px;
color: var(--dark-color);
font-size: 1.8rem;
position: relative;
}

.section-title::after {
content: '';
display: block;
width: 50px;
height: 3px;
background-color: var(--primary-color);
margin: 10px auto;
}

/* 最新文章列表 - 移除作者信息 */
.latest-articles {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30px;
width: 100%;
max-width: 100%;
overflow: hidden;
}

.article-card {
background: white;
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
transition: var(--transition);
width: 100%;
max-width: 100%;
overflow: hidden;
}

.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;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
max-width: 100%;
}

.article-meta {
display: flex;
font-size: 0.85rem;
color: #666;
margin-bottom: 15px;
flex-wrap: wrap;
width: 100%;
max-width: 100%;
}

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

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

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

.article-excerpt {
color: #555;
line-height: 1.6;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
width: 100%;
max-width: 100%;
}

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

.featured-card {
height: 250px;
border-radius: var(--border-radius);
overflow: hidden;
position: relative;
background-size: cover;
background-position: center;
transition: var(--transition);
width: 100%;
max-width: 100%;
}

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

.featured-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
padding: 20px;
color: white;
width: 100%;
max-width: 100%;
overflow: hidden;
}

.featured-title {
font-size: 1.1rem;
margin-bottom: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
max-width: 100%;
}

.featured-excerpt {
display: none;
}

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

.popular-card {
background: white;
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
transition: var(--transition);
width: 100%;
max-width: 100%;
overflow: hidden;
}

.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;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
max-width: 100%;
}

.popular-meta {
display: flex;
font-size: 0.85rem;
color: #666;
margin-bottom: 15px;
flex-wrap: wrap;
width: 100%;
max-width: 100%;
}

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

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

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

.popular-excerpt {
color: #555;
line-height: 1.6;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
width: 100%;
max-width: 100%;
}

/* 文字介绍区域 */
.intro-section {
background: white;
border-radius: var(--border-radius);
padding: 40px;
box-shadow: var(--box-shadow);
text-align: center;
width: 100%;
max-width: 100%;
overflow: hidden;
}

.intro-text {
font-size: 1.1rem;
line-height: 1.8;
max-width: 1100px;
margin: 0 auto;
width: 100%;
max-width: 100%;
}

/* 友情链接区域 */
.links-section {
background: white;
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--box-shadow);
width: 100%;
max-width: 100%;
overflow: hidden;
}

.links-container {
display: flex;
flex-wrap: wrap;
gap: 15px;
width: 100%;
max-width: 100%;
}

.link-item {
padding: 8px 15px;
background: var(--light-color);
border-radius: var(--border-radius);
transition: var(--transition);
width: auto;
max-width: 100%;
}

.link-item:hover {
color: white;
background: var(--primary-color);
}

/* 底部样式 */
.footer {
background-color: var(--dark-color);
color: white;
text-align: center;
padding: 30px 0;
margin-top: 50px;
width: 100%;
max-width: 100%;
}

.footer a {
color: white;
}

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

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

.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-section,
.links-section,
.copyright {
display: none;
}
}

@media (max-width: 768px) {
.popular-meta {
flex-direction: column;
}

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

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

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

.article-meta span,
.popular-meta span {
margin-bottom: 5px;
margin-right: 0;
}
}