/* 基础样式和变量定义 */
:root {
--primary-color: #D9B300;
--primary-dark: #B59400;
--primary-light: #FFD700;
--text-color: #333;
--bg-color: #f5f5f5;
--card-bg: #fff;
--shadow-color: rgba(217, 179, 0, 0.3);
}

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

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

a {
text-decoration: none;
color: inherit;
transition: all 0.3s ease;
}

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

section {
margin-bottom: 60px;
}

/* 导航栏样式 */
header {
background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 1000;
margin-bottom: 40px;
}

.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
}

.logo {
font-size: 24px;
font-weight: bold;
color: white;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
position: relative;
padding: 5px 10px;
border-radius: 5px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(5px);
transform-style: preserve-3d;
transition: all 0.4s ease;
}

.logo:hover {
transform: translateY(-5px) rotateX(10deg);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.logo::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 100%;
height: 5px;
background: linear-gradient(to right, transparent, var(--primary-light), transparent);
border-radius: 0 0 5px 5px;
opacity: 0;
transition: opacity 0.3s ease;
}

.logo:hover::after {
opacity: 1;
}

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

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

.nav-link {
color: white;
font-weight: 500;
padding: 8px 15px;
border-radius: 5px;
position: relative;
overflow: hidden;
z-index: 1;
transition: all 0.3s ease;
}

.nav-link::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s ease;
z-index: -1;
}

.nav-link:hover::before {
left: 100%;
}

.nav-link:hover {
color: var(--primary-color);
background-color: white;
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

/* 文章卡片通用样式 */
.articles-grid {
display: grid;
gap: 30px;
margin-top: 40px;
}

.article-card {
background: var(--card-bg);
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
transition: all 0.4s ease;
position: relative;
transform-style: preserve-3d;
}

.article-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, transparent 0%, var(--primary-color) 100%);
opacity: 0;
transition: opacity 0.4s ease;
z-index: -1;
}

.article-card:hover {
transform: translateY(-10px) rotateX(5deg);
box-shadow: 0 15px 30px var(--shadow-color);
}

.article-card:hover::before {
opacity: 0.1;
}

.article-title {
font-size: 20px;
margin-bottom: 10px;
line-height: 1.4;
word-wrap: break-word;
}

.article-title a {
display: inline-block;
position: relative;
}

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

.article-title a:hover::after {
width: 100%;
}

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

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

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

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

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

.article-author::before {
content: "✍️";
}

/* 第一排：最新文章 */
.latest-articles .articles-grid {
grid-template-columns: repeat(2, 1fr);
}

.latest-article {
padding: 25px;
}

.article-description {
color: #666;
line-height: 1.6;
}

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

.featured-article {
height: 250px;
position: relative;
overflow: hidden;
}

.featured-article::after {
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-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
transition: transform 0.5s ease;
}

.featured-content {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 20px;
color: white;
z-index: 2;
transform: translateY(10px);
transition: transform 0.4s ease;
}

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

.featured-article:hover .featured-content {
transform: translateY(0);
}

.featured-title {
font-size: 18px;
margin-bottom: 10px;
line-height: 1.4;
}

.featured-description {
display: none;
}

/* 第三排：热门文章 */
.popular-articles .articles-grid {
grid-template-columns: repeat(2, 1fr);
}

.popular-article {
padding: 25px;
display: flex;
flex-direction: column;
}

.popular-meta {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}

.popular-description {
color: #666;
line-height: 1.5;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}

/* 第四排：文字介绍 */
.intro-section {
background: var(--card-bg);
padding: 40px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
position: relative;
overflow: hidden;
}

.intro-section::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: conic-gradient(transparent, var(--primary-color), transparent 30%);
animation: rotate 10s linear infinite;
z-index: 0;
}

.intro-section::after {
content: '';
position: absolute;
inset: 5px;
background: var(--card-bg);
border-radius: 8px;
z-index: 1;
}

.intro-content {
position: relative;
z-index: 2;
}

.intro-title {
font-size: 28px;
margin-bottom: 20px;
color: var(--primary-color);
}

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

/* 第五排：友情链接 */
.links-section {
background: var(--card-bg);
padding: 30px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.links-title {
font-size: 20px;
margin-bottom: 20px;
color: var(--primary-color);
}

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

.link-item {
padding: 8px 15px;
background: rgba(217, 179, 0, 0.1);
border-radius: 5px;
transition: all 0.3s ease;
border: 1px solid transparent;
}

.link-item:hover {
background: rgba(217, 179, 0, 0.2);
transform: translateY(-3px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
border-color: var(--primary-color);
}

/* 底部样式 */
footer {
background: linear-gradient(145deg, var(--primary-dark), #8C7500);
color: white;
padding: 40px 0;
margin-top: 60px;
}

.footer-content {
text-align: center;
}

.site-name {
font-size: 24px;
margin-bottom: 15px;
display: inline-block;
position: relative;
padding: 5px 15px;
border-radius: 5px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(5px);
transition: all 0.3s ease;
}

.site-name:hover {
transform: scale(1.05);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
background: rgba(255, 255, 255, 0.2);
}

.copyright {
font-size: 14px;
opacity: 0.8;
}

/* 动画 */
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

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

.nav-menu {
position: fixed;
top: 70px;
right: -100%;
flex-direction: column;
background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
width: 80%;
max-width: 300px;
text-align: center;
transition: 0.3s;
box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
border-radius: 0 0 0 10px;
padding: 20px 0;
z-index: 999;
}

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

.nav-item {
margin: 15px 0;
}

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

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

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

.popular-meta {
align-items: flex-start;
flex-direction: column;
}

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

.intro-section {
display: none;
}

.links-section {
display: none;
}

.copyright {
display: none;
}
}

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

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