* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* 导航栏样式 */
.navbar {
    background-color: #2c3e50;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    height: 32px;
    width: 32px;
    border-radius: 4px;
}

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

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #3498db;
}

/* 文章列表样式 */
.articles-section {
    padding: 2rem 0;
}

.articles-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.article-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-excerpt {
    color: #555;
    line-height: 1.6;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 博客页面样式 */
.blog-content {
    padding: 2rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.blog-content h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.blog-content h2 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.blog-content h3 {
    color: #2c3e50;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.blog-content ul, .blog-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 6px;
    overflow: auto;
    margin: 1.5rem 0;
    font-family: 'Courier New', Consolas, monospace;
    line-height: 1.5;
}

.blog-content code {
    font-family: 'Courier New', Consolas, monospace;
}

.blog-content pre code {
    background: none;
    padding: 0;
    border: none;
    overflow: auto;
}

/* 代码块语法高亮 */
.language-wxml { color: #f92672; }
.language-javascript { color: #a6e22e; }

/* 关于页面样式 */
.about-content {
    padding: 2rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.about-content h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
}

.skills-section ul,
.projects-section ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.skills-section h3,
.projects-section h3 {
    margin-top: 1rem;
    color: #2c3e50;
}

/* 文章元信息样式 */
.article-meta {
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* 图片样式 */
figure {
    margin: 1.5rem 0;
    text-align: center;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

figcaption {
    margin-top: 0.5rem;
    font-style: italic;
    color: #7f8c8d;
}

/* 备案信息样式 */
.beian {
    margin-top: 10px;
    text-align: center;
}

.beian a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

.beian a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-section {
        flex-direction: column;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}
/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

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

.footer-container p {
    margin-bottom: 0.5rem;
}

.beian {
    margin-top: 0.5rem;
}

.beian a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.3s ease;
}

.beian a:hover {
    opacity: 0.8;
}

.beian img {
    height: 20px;
    vertical-align: middle;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.show {
    display: flex;
}