/* 基础样式和变量 */
:root {
--gold-primary: #FFD700;
--gold-secondary: #FFA500;
--gold-dark: #B8860B;
--gold-light: #FFF8DC;
--text-dark: #333333;
--text-light: #FFFFFF;
--bg-light: #FFFEFA;
--shadow-light: rgba(255, 215, 0, 0.3);
--shadow-dark: rgba(184, 134, 11, 0.5);
}

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

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

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

/* 导航栏样式 */
header {
background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
box-shadow: 0 5px 15px var(--shadow-dark);
position: sticky;
top: 0;
z-index: 1000;
margin-bottom: 40px;
}

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

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

.logo {
font-size: 1.8rem;
font-weight: bold;
color: var(--text-dark);
text-shadow: 1px 1px 3px var(--shadow-light);
position: relative;
overflow: hidden;
}

.logo a::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
transition: left 0.8s;
}

.logo a:hover::before {
left: 100%;
}

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

.nav-links li {
margin-left: 25px;
position: relative;
}

.nav-links a {
color: var(--text-dark);
font-weight: 500;
padding: 5px 10px;
border-radius: 5px;
position: relative;
overflow: hidden;
z-index: 1;
}

.nav-links a::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(45deg, var(--gold-dark), var(--gold-light));
transform: scaleX(0);
transform-origin: right;
transition: transform 0.5s ease;
z-index: -1;
border-radius: 5px;
}

.nav-links a:hover::before {
transform: scaleX(1);
transform-origin: left;
}

.nav-links a:hover {
color: var(--text-light);
text-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* 汉堡菜单 */
.hamburger {
display: none;
cursor: pointer;
background: transparent;
border: none;
width: 30px;
height: 24px;
position: relative;
}

.hamburger span {
display: block;
position: absolute;
height: 3px;
width: 100%;
background: var(--text-dark);
border-radius: 3px;
opacity: 1;
left: 0;
transform: rotate(0deg);
transition: .25s ease-in-out;
}

.hamburger span:nth-child(1) {
top: 0px;
}

.hamburger span:nth-child(2) {
top: 10px;
}

.hamburger span:nth-child(3) {
top: 20px;
}

.hamburger.active span:nth-child(1) {
top: 10px;
transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
opacity: 0;
left: -60px;
}

.hamburger.active span:nth-child(3) {
top: 10px;
transform: rotate(-135deg);
}

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

section {
margin-bottom: 60px;
}

.section-title {
font-size: 1.8rem;
margin-bottom: 25px;
padding-bottom: 10px;
border-bottom: 2px solid var(--gold-primary);
color: var(--text-dark);
position: relative;
}

.section-title::after {
content: "";
position: absolute;
bottom: -2px;
left: 0;
width: 80px;
height: 2px;
background: var(--gold-dark);
}

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

.article-card {
background: linear-gradient(145deg, #ffffff, #f5f5f5);
border-radius: 10px;
padding: 25px;
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
transition: all 0.4s ease;
position: relative;
overflow: hidden;
}

.article-card::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 5px;
height: 100%;
background: linear-gradient(to bottom, var(--gold-primary), var(--gold-dark));
transition: width 0.4s ease;
z-index: 0;
}

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

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

.article-title {
font-size: 1.3rem;
margin-bottom: 15px;
color: var(--text-dark);
line-height: 1.4;
position: relative; /* 确保内容在伪元素上方 */
z-index: 1;
}

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

.article-description {
color: #666;
margin-bottom: 15px;
line-height: 1.6;
}

.article-meta {
display: flex;
align-items: center;
color: #888;
font-size: 0.9rem;
}

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

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

.time::before {
content: "🕒";
}

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

.featured-card {
height: 250px;
border-radius: 10px;
overflow: hidden;
position: relative;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
transition: all 0.5s ease;
}

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

.featured-bg {
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
transition: transform 0.8s ease;
}

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

.featured-card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 30px var(--shadow-dark);
}

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

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

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

.featured-description {
font-size: 0.9rem;
opacity: 0;
transition: opacity 0.5s ease;
max-height: 0;
overflow: hidden;
}

.featured-card:hover .featured-description {
opacity: 1;
max-height: 100px;
}

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

.popular-card {
display: flex;
background: linear-gradient(145deg, #ffffff, #f5f5f5);
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
transition: all 0.4s ease;
}

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

.popular-content {
padding: 20px;
flex: 1;
}

.popular-title {
font-size: 1.2rem;
margin-bottom: 10px;
line-height: 1.4;
}

.popular-meta {
display: flex;
margin-bottom: 10px;
color: #888;
font-size: 0.9rem;
}

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

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

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

.popular-description {
color: #666;
font-size: 0.9rem;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

/* 文字介绍 */
.intro-section {
background: linear-gradient(135deg, var(--gold-light), #ffffff);
padding: 40px;
border-radius: 15px;
box-shadow: 0 10px 30px var(--shadow-light);
position: relative;
overflow: hidden;
}

.intro-section::before {
content: "";
position: absolute;
top: -50%;
right: -50%;
width: 100%;
height: 200%;
background: linear-gradient(45deg, transparent, rgba(255,215,0,0.1), transparent);
transform: rotate(45deg);
animation: shine 6s infinite linear;
}

@keyframes shine {
0% {
transform: translateX(-100%) rotate(45deg);
}
100% {
transform: translateX(100%) rotate(45deg);
}
}

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

.intro-title {
font-size: 1.8rem;
margin-bottom: 20px;
color: var(--gold-dark);
}

.intro-text {
font-size: 1.1rem;
line-height: 1.8;
color: #555;
}

/* 友情链接 */
.links-section {
background: linear-gradient(135deg, var(--gold-light), #ffffff);
padding: 30px;
border-radius: 15px;
box-shadow: 0 10px 30px var(--shadow-light);
}

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

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

.link-item:hover {
background: rgba(255,215,0,0.4);
border-color: var(--gold-primary);
transform: translateY(-3px);
}

/* 底部 */
footer {
background: linear-gradient(135deg, var(--gold-dark), var(--gold-secondary));
color: var(--text-light);
padding: 30px 0;
text-align: center;
margin-top: 60px;
}

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

.site-name {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 10px;
text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.copyright {
font-size: 0.9rem;
opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
.nav-links {
position: fixed;
top: 70px;
left: 0;
width: 100%;
background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
flex-direction: column;
align-items: center;
padding: 20px 0;
clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
transition: all 0.5s ease;
box-shadow: 0 10px 20px var(--shadow-dark);
}

.nav-links.active {
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.nav-links li {
margin: 10px 0;
}

.hamburger {
display: block;
}

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

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

.intro-section {
display: none;
}

.links-section {
display: none;
}

.copyright {
display: none;
}
}

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

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

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

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