/* 基础样式和变量 */
: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: 40px;
}

.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);
}

/* 面包屑导航 */
.breadcrumb {
background: linear-gradient(145deg, #ffffff, #f5f5f5);
border-radius: 10px;
padding: 15px 20px;
margin-bottom: 30px;
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
display: flex;
flex-wrap: wrap;
}

.breadcrumb a {
color: var(--gold-dark);
margin-right: 5px;
}

.breadcrumb span {
margin: 0 8px;
color: #888;
}

.breadcrumb .current {
color: var(--text-dark);
}

/* 主内容布局 */
.content-wrapper {
display: flex;
gap: 30px;
}

.main-content {
flex: 1;
}

.sidebar {
width: 300px;
}

/* 标签列表 */
.tag-list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 15px;
margin-bottom: 40px;
}

.tag-item {
background: linear-gradient(145deg, #ffffff, #f5f5f5);
border-radius: 5px;
padding: 12px 10px;
text-align: center;
box-shadow: 0 3px 10px rgba(0,0,0,0.05);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}

.tag-item::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(45deg, var(--gold-primary), var(--gold-dark));
opacity: 0;
transition: opacity 0.3s ease;
z-index: 0;
}

.tag-item:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px var(--shadow-light);
}

.tag-item:hover::before {
opacity: 0.1;
}

.tag-item a {
position: relative;
z-index: 1;
}

/* 文章列表 */
.article-list {
display: grid;
grid-template-columns: 1fr;
gap: 25px;
margin-bottom: 40px;
}

.list-article {
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;
position: relative;
}

.list-article::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;
}

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

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

.article-thumb {
width: 200px;
height: 150px;
background-size: cover;
background-position: center;
flex-shrink: 0;
}

.article-info {
padding: 20px;
flex: 1;
}

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

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

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

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

.author::before {
content: "👤";
}

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

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

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

/* 翻页按钮 */
.pagination {
display: flex;
justify-content: center;
gap: 10px;
margin-top: 30px;
}

.page-btn {
padding: 10px 15px;
background: linear-gradient(145deg, #ffffff, #f5f5f5);
border-radius: 5px;
box-shadow: 0 3px 10px rgba(0,0,0,0.05);
transition: all 0.3s ease;
border: none;
cursor: pointer;
font-size: 1rem;
}

.page-btn:hover {
background: linear-gradient(145deg, var(--gold-light), #ffffff);
box-shadow: 0 5px 15px var(--shadow-light);
transform: translateY(-3px);
}

.page-btn.active {
background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
color: var(--text-light);
}

/* 侧边栏 */
.sidebar-section {
background: linear-gradient(145deg, #ffffff, #f5f5f5);
border-radius: 10px;
padding: 25px;
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
margin-bottom: 30px;
}

.sidebar-title {
font-size: 1.3rem;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid var(--gold-primary);
color: var(--text-dark);
}

.sidebar-list {
list-style: none;
}

.sidebar-list li {
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px dashed #eee;
transition: all 0.3s ease;
}

.sidebar-list li:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}

.sidebar-list a {
display: block;
transition: all 0.3s ease;
line-height: 1.5;
}

.sidebar-list li:hover {
transform: translateX(5px);
}

.sidebar-list a:hover {
color: var(--gold-dark);
}

/* 底部 */
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;
}

.tag-list {
grid-template-columns: repeat(4, 1fr);
}

.content-wrapper {
flex-direction: column;
}

.sidebar {
width: 100%;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30px;
}

.copyright {
display: none;
}
}

@media (max-width: 768px) {
.tag-list {
grid-template-columns: repeat(2, 1fr);
}

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

.list-article {
flex-direction: column;
}

.article-thumb {
width: 100%;
height: 180px;
}

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

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

.sidebar {
grid-template-columns: 1fr;
}
}

@media (max-width: 500px) {
.tag-list {
grid-template-columns: repeat(2, 1fr);
}

.article-list {
grid-template-columns: 1fr;
}

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

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