:root {
--primary-color: #FFD306;
--primary-dark: #E6BE00;
--primary-light: #FFE55C;
--text-color: #333333;
--bg-color: #FFFDF0;
--card-bg: #FFFFFF;
--shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
--shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
}

* {
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;
overflow-x: hidden;
}

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

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

.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
height: 70px;
max-width: 1200px;
margin: 0 auto;
padding: 0 10px;
}

.logo {
font-size: 1.8rem;
font-weight: bold;
color: var(--text-color);
position: relative;
overflow: hidden;
padding: 5px 10px;
border-radius: 5px;
}

.logo::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
transition: left 0.7s ease;
}

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

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

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

.nav-link {
padding: 10px 15px;
border-radius: 5px;
font-weight: 500;
position: relative;
overflow: hidden;
z-index: 1;
color: var(--text-color);
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
transform: translateZ(0);
backface-visibility: hidden;
}

.nav-link::before,
.nav-link::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 5px;
z-index: -1;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-link::before {
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
transform: scale(0);
opacity: 0;
}

.nav-link::after {
border: 2px solid var(--text-color);
transform: scale(1.1);
opacity: 0;
}

.nav-link:hover {
color: white;
transform: translateY(-3px) scale(1.05);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.nav-link:hover::before {
transform: scale(1);
opacity: 1;
}

.nav-link:hover::after {
transform: scale(1);
opacity: 1;
}

.nav-link:hover {
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-item:hover {
transform: translateY(-2px);
}

.hamburger {
display: none;
cursor: pointer;
background: none;
border: none;
width: 30px;
height: 24px;
position: relative;
}

.hamburger span {
display: block;
position: absolute;
height: 3px;
width: 100%;
background: var(--text-color);
border-radius: 3px;
transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
transform: rotate(45deg);
top: 50%;
}

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

.hamburger.active span:nth-child(3) {
transform: rotate(-45deg);
bottom: 50%;
}

/* 主要内容区域 */
.container {
max-width: 1200px;
margin: 40px auto;
padding: 0 20px;
}

/* 面包屑导航 */
.breadcrumb {
margin-bottom: 30px;
padding: 15px;
background-color: var(--card-bg);
border-radius: 10px;
box-shadow: var(--shadow);
word-wrap: break-word;
overflow-wrap: break-word;
}

.breadcrumb ul {
display: flex;
flex-wrap: wrap;
list-style: none;
}

.breadcrumb li {
margin-right: 10px;
display: flex;
align-items: center;
word-break: break-all;
}

.breadcrumb li:not(:last-child)::after {
content: ">";
margin-left: 10px;
color: #999;
}

.breadcrumb a {
color: var(--text-color);
transition: color 0.3s ease;
word-break: break-word;
}

.breadcrumb a:hover {
color: var(--primary-dark);
}

/* 主体布局 */
.main-content {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 30px;
}

/* 左侧内容 */
.left-content {
display: flex;
flex-direction: column;
gap: 30px;
}

/* 标签区域 */
.tag-section {
background-color: var(--card-bg);
border-radius: 10px;
padding: 20px;
box-shadow: var(--shadow);
}

.section-title {
font-size: 1.5rem;
margin-bottom: 20px;
position: relative;
padding-bottom: 10px;
display: inline-block;
}

.section-title::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 50%;
height: 3px;
background: var(--primary-color);
border-radius: 3px;
}

.tag-list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 15px;
}

.tag-item {
background-color: var(--primary-light);
padding: 10px 5px;
border-radius: 5px;
text-align: center;
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
word-break: break-word;
overflow-wrap: break-word;
}

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

/* 文章列表 */
.article-list-section {
background-color: var(--card-bg);
border-radius: 10px;
padding: 20px;
box-shadow: var(--shadow);
}

.article-item {
display: flex;
padding: 20px 0;
border-bottom: 1px solid #f0f0f0;
transition: all 0.3s ease;
}

.article-item:last-child {
border-bottom: none;
}

.article-item:hover {
transform: translateY(-5px);
}

.article-thumbnail {
width: 150px;
height: 100px;
border-radius: 5px;
overflow: hidden;
margin-right: 20px;
flex-shrink: 0;
}

.article-thumbnail img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s ease;
}

.article-item:hover .article-thumbnail img {
transform: scale(1.1);
}

.article-info {
flex: 1;
min-width: 0; /* 防止flex元素溢出 */
}

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

.article-title a {
color: var(--text-color);
transition: color 0.3s ease;
}

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

.article-meta {
display: flex;
margin-bottom: 10px;
font-size: 0.9rem;
color: #666;
flex-wrap: wrap;
}

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

.author::before {
content: "👤";
margin-right: 5px;
}

.date::before {
content: "📅";
margin-right: 5px;
}

.views::before {
content: "👁️";
margin-right: 5px;
}

.article-description {
color: #555;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
overflow-wrap: break-word;
}

/* 分页 */
.pagination {
display: flex;
justify-content: center;
margin-top: 30px;
}

.pagination-list {
display: flex;
list-style: none;
flex-wrap: wrap;
justify-content: center;
}

.pagination-item {
margin: 5px;
}

.pagination-link {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 5px;
background-color: var(--card-bg);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
word-break: keep-all;
}

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

.pagination-link.active {
background-color: var(--primary-color);
font-weight: bold;
}

/* 右侧内容 */
.right-content {
display: flex;
flex-direction: column;
gap: 30px;
}

.sidebar-section {
background-color: var(--card-bg);
border-radius: 10px;
padding: 20px;
box-shadow: var(--shadow);
}

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

.sidebar-item {
padding: 10px 0;
border-bottom: 1px solid #f0f0f0;
transition: all 0.3s ease;
word-break: break-word;
overflow-wrap: break-word;
}

.sidebar-item:last-child {
border-bottom: none;
}

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

.sidebar-item a {
color: var(--text-color);
transition: color 0.3s ease;
display: block;
word-wrap: break-word;
}

.sidebar-item a:hover {
color: var(--primary-dark);
}

/* 底部样式 */
footer {
background: var(--primary-color);
padding: 30px 0;
text-align: center;
box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
margin-top: 60px;
}

.footer-content {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}

.copyright {
font-size: 0.95rem;
color: var(--text-color);
}

.site-name {
font-weight: bold;
position: relative;
display: inline-block;
padding: 0 5px;
}

.site-name::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 100%;
height: 2px;
background: var(--text-color);
transform: scaleX(0);
transition: transform 0.3s ease;
}

.site-name:hover::after {
transform: scaleX(1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
.logo {
font-size: 1rem;
}

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

.nav-menu {
position: fixed;
top: 70px;
right: -100%;
width: 80%;
height: calc(100vh - 70px);
background: var(--primary-color);
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding-top: 40px;
transition: right 0.5s ease;
box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

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

.nav-item {
margin: 15px 0;
width: 80%;
text-align: center;
}

.hamburger {
display: block;
}

.copyright {
display: none;
}
}

@media (max-width: 768px) {
.container {
padding: 0 15px;
}

.main-content {
grid-template-columns: 1fr;
}

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

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

.article-thumbnail {
width: 100%;
height: 200px;
margin-right: 0;
margin-bottom: 15px;
}

.article-meta {
flex-wrap: wrap;
}

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

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

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

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

.breadcrumb li {
margin-bottom: 5px;
}
}