:root {
--primary-color: #7E3D76;
--secondary-color: #f8f5f9;
--text-color: #333;
--light-text: #777;
--hover-color: #9a5292;
--shadow: 0 4px 8px rgba(126, 61, 118, 0.2);
--transition: all 0.3s ease;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Helvetica Neue', Arial, sans-serif;
}

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

/* 导航栏样式 */
.navbar {
background-color: var(--primary-color);
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: center;
}

.nav-container {
width: 100%;
max-width: 1200px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 1.5rem;
}

.logo {
color: white;
font-size: 1.5rem;
font-weight: bold;
text-decoration: none;
transition: var(--transition);
}

.logo:hover {
transform: scale(1.05);
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

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

.nav-item {
margin-left: 2rem;
position: relative;
}

.nav-link {
color: white;
text-decoration: none;
font-weight: 500;
transition: var(--transition);
padding: 0.5rem 0;
position: relative;
}

/* PC端导航栏悬停特效 */
.nav-link::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background-color: white;
transition: var(--transition);
border-radius: 2px;
}

.nav-link:hover::before {
width: 100%;
box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.nav-link:hover {
color: #f0d4ec;
transform: translateY(-2px);
}

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

/* 内容容器 */
.container {
max-width: 1200px;
margin: 2rem auto;
padding: 0 1.5rem;
}

.section {
margin-bottom: 3rem;
background: white;
border-radius: 8px;
padding: 1.5rem;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.section-title {
color: var(--primary-color);
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid var(--secondary-color);
font-size: 1.5rem;
}

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

.article-card {
background: white;
border-radius: 8px;
overflow: hidden;
transition: var(--transition);
}

.article-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
}

.article-content {
padding: 1rem;
}

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

.article-title a {
color: var(--text-color);
text-decoration: none;
transition: var(--transition);
}

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

.article-excerpt {
color: var(--light-text);
margin-bottom: 0.75rem;
font-size: 0.9rem;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
height: 4.5em;
}

.article-meta {
color: var(--light-text);
font-size: 0.8rem;
display: flex;
align-items: center;
}

.article-meta::before {
content: "📅";
margin-right: 0.25rem;
}

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

.featured-card {
position: relative;
height: 250px;
border-radius: 8px;
overflow: hidden;
transition: var(--transition);
}

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

.featured-image {
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
transition: var(--transition);
}

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

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

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

.featured-title a {
color: white;
text-decoration: none;
}

.featured-excerpt {
font-size: 0.8rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
height: 2.4em;
}

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

.popular-card {
display: flex;
flex-direction: column;
background: white;
border-radius: 8px;
overflow: hidden;
transition: var(--transition);
}

.popular-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
}

.popular-content {
padding: 1rem;
flex-grow: 1;
}

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

.popular-title a {
color: var(--text-color);
text-decoration: none;
transition: var(--transition);
}

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

.popular-excerpt {
color: var(--light-text);
margin-bottom: 0.75rem;
font-size: 0.85rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
height: 2.8em;
}

.popular-meta {
display: flex;
justify-content: space-between;
color: var(--light-text);
font-size: 0.8rem;
}

.popular-date::before {
content: "📅";
margin-right: 0.25rem;
}

.popular-views::before {
content: "👁️";
margin-right: 0.25rem;
}

/* 文字介绍部分 */
.intro {
line-height: 1.8;
padding: 1.5rem;
background: var(--secondary-color);
border-radius: 8px;
}

/* 友情链接 */
.friend-links {
display: flex;
flex-wrap: wrap;
gap: 15px;
}

.friend-links a {
padding: 8px 15px;
background-color: var(--light-gray);
border-radius: 3px;
font-size: 0.9rem;
transition: background-color 0.3s ease, color 0.3s ease;
}

.friend-links a:hover {
background-color: var(--primary-color);
color: white;
}

/* 页脚 */
footer {
background-color: var(--primary-color);
color: white;
text-align: center;
padding: 1.5rem;
margin-top: 3rem;
}

footer a {
color: white;
text-decoration: none;
}

/* 响应式设计 */
@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: 0.3s;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
padding: 1rem 0;
}

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

.nav-item {
margin: 1.5rem 0;
}

/* 移动端导航链接效果 */
.nav-link::before {
display: none;
}

.nav-link:hover {
transform: none;
}

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

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

/* 友情链接 - 已完全隐藏 */
.intro,
.friend-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;
}

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