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

/* 面包屑导航 */
.breadcrumb {
background: var(--card-bg);
padding: 15px 20px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
margin: 30px 0;
display: flex;
flex-wrap: wrap;
align-items: center;
word-break: break-word;
}

.breadcrumb a {
color: var(--primary-color);
position: relative;
margin-right: 25px;
word-break: break-word;
}

.breadcrumb a:not(:last-child)::after {
content: '>';
position: absolute;
right: -15px;
color: #999;
}

.breadcrumb span {
color: #999;
word-break: break-word;
}

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

/* 文章详情区域 */
.article-detail {
background: var(--card-bg);
padding: 30px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* 文章头部信息 */
.article-header {
display: grid;
grid-template-columns: 100px 1fr;
gap: 20px;
margin-bottom: 25px;
align-items: center;
}

.article-thumbnail {
width: 100px;
height: 100px;
border-radius: 5px;
overflow: hidden;
background-size: cover;
background-position: center;
}

.article-title {
font-size: 28px;
font-weight: bold;
line-height: 1.3;
word-wrap: break-word;
word-break: break-word;
overflow-wrap: break-word;
}

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

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

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

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

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

/* 导读信息 */
.article-intro {
background: #f8f8f8;
padding: 20px;
border-radius: 8px;
margin-bottom: 25px;
border-left: 4px solid var(--primary-color);
}

.article-intro h3 {
color: var(--primary-color);
margin-bottom: 10px;
font-size: 18px;
}

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

/* 文章内容 */
.article-content {
line-height: 1.8;
margin-bottom: 40px;
}

.article-content h2 {
font-size: 24px;
margin: 25px 0 15px;
color: var(--primary-color);
}

.article-content h3 {
font-size: 20px;
margin: 20px 0 12px;
}

.article-content p {
margin-bottom: 15px;
text-align: justify;
}

.article-content blockquote {
border-left: 4px solid var(--primary-color);
padding-left: 20px;
margin: 20px 0;
font-style: italic;
color: #666;
}

.article-content code {
background: #f5f5f5;
padding: 2px 6px;
border-radius: 3px;
font-family: 'Courier New', monospace;
}

.article-content pre {
background: #f8f8f8;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
margin: 20px 0;
}

.article-content img {
max-width: 100%;
height: auto;
border-radius: 5px;
margin: 15px 0;
}

/* 文章导航 */
.article-navigation {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-top: 40px;
}

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

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

.nav-label {
font-size: 14px;
color: #999;
margin-bottom: 5px;
}

.nav-title {
font-size: 16px;
line-height: 1.4;
word-wrap: break-word;
word-break: break-word;
}

/* 侧边栏 */
.sidebar {
display: flex;
flex-direction: column;
gap: 30px;
}

.sidebar-widget {
background: var(--card-bg);
padding: 25px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
margin-bottom: 20px;
color: var(--primary-color);
font-size: 20px;
padding-bottom: 10px;
border-bottom: 2px solid rgba(217, 179, 0, 0.2);
word-break: break-word;
}

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

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

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

.sidebar-list li:hover {
background: rgba(217, 179, 0, 0.05);
padding-left: 10px;
border-radius: 5px;
}

.sidebar-list a {
display: block;
line-height: 1.5;
word-wrap: break-word;
word-break: break-word;
overflow-wrap: break-word;
}

/* 底部样式 */
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;
word-break: break-word;
}

.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;
word-break: break-word;
}

/* 响应式设计 */
@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;
}

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

.article-header {
grid-template-columns: 80px 1fr;
}

.article-thumbnail {
width: 80px;
height: 80px;
}

.article-title {
font-size: 24px;
}

.copyright {
display: none;
}
}

@media screen and (max-width: 768px) {
.article-header {
grid-template-columns: 1fr;
gap: 15px;
}

.article-thumbnail {
width: 100%;
height: 200px;
}

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

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

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

@media screen and (max-width: 500px) {
.article-thumbnail {
height: 150px;
}

.article-title {
font-size: 22px;
}
}