/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
--primary-color: #9F35FF;
--primary-dark: #8A2EE6;
--primary-light: #B45FFF;
--text-color: #333;
--light-bg: #f8f9fa;
--white: #ffffff;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}

body {
background-color: var(--light-bg);
color: var(--text-color);
line-height: 1.6;
}

a {
text-decoration: none;
color: inherit;
}

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

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

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

.logo {
font-size: 24px;
font-weight: 600;
color: var(--white);
display: flex;
align-items: center;
}

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

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

.nav-menu a {
color: var(--white);
font-weight: 500;
transition: var(--transition);
position: relative;
}

.nav-menu a::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: -5px;
left: 0;
background-color: var(--white);
transition: var(--transition);
}

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

.hamburger {
display: none;
cursor: pointer;
background: none;
border: none;
color: var(--white);
font-size: 24px;
}

/* 主要内容区域 */
main {
padding: 40px 0;
}

section {
margin-bottom: 60px;
}

.section-title {
font-size: 28px;
margin-bottom: 30px;
padding-bottom: 10px;
border-bottom: 2px solid var(--primary-color);
color: var(--primary-dark);
}

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

.article-card {
background: var(--white);
border-radius: 10px;
overflow: hidden;
box-shadow: var(--shadow);
transition: var(--transition);
padding: 20px;
height: 100%;
display: flex;
flex-direction: column;
}

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

.article-title {
font-size: 20px;
margin-bottom: 10px;
color: var(--primary-dark);
transition: var(--transition);
}

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

.article-meta {
display: flex;
align-items: center;
margin-bottom: 15px;
font-size: 14px;
color: #666;
}

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

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

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

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

.article-excerpt {
color: #555;
flex-grow: 1;
}

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

.featured-card {
background-color: var(--primary-light);
border-radius: 10px;
overflow: hidden;
box-shadow: var(--shadow);
transition: var(--transition);
height: 250px;
position: relative;
display: flex;
align-items: flex-end;
padding: 20px;
background-size: cover;
background-position: center;
}

.featured-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
z-index: 1;
}

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

.featured-content {
position: relative;
z-index: 2;
color: var(--white);
}

.featured-title {
font-size: 18px;
margin-bottom: 8px;
}

.featured-excerpt {
font-size: 14px;
opacity: 0.9;
}

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

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

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

.popular-meta {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
font-size: 14px;
color: #666;
}

.popular-excerpt {
color: #555;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

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

.intro-text {
line-height: 1.8;
font-size: 16px;
}

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

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

.links-list a {
padding: 8px 15px;
background-color: var(--light-bg);
border-radius: 5px;
transition: var(--transition);
}

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

/* 底部样式 */
footer {
background-color: var(--primary-color);
color: var(--white);
padding: 30px 0;
text-align: center;
}

.footer-content {
display: flex;
flex-direction: column;
align-items: center;
}

/* 媒体查询 - 平板设备 */
@media (max-width: 1024px) {
.latest-articles,
.popular-articles {
grid-template-columns: 1fr;
}

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

.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 27px rgba(0, 0, 0, 0.05);
padding: 20px 0;
}

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

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

.hamburger {
display: block;
}

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

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

.popular-meta {
flex-direction: column;
gap: 5px;
}

.featured-card {
height: 200px;
}
}

/* 媒体查询 - 小屏设备 */
@media (max-width: 500px) {
.featured-articles {
grid-template-columns: 1fr;
}

.container {
padding: 0 15px;
}
}