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

:root {
    --primary: #fc5531;
    --primary-dark: #e64522;
    --secondary: #4d4d4d;
    --light-bg: #f8f9fa;
    --dark-bg: #2d2d2d;
    --border: #eaeaea;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
}

body {
    background-color: #ffffff;
    color: var(--text);
    line-height: 1.6;
}

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

/* 顶部导航栏 */
.navbar {
    background-color: #f0f0f0;
    border-bottom: 2px solid #cccccc;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    margin-right: 8px;
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 15px 8px 40px;
    border: 2px solid #cccccc;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #666666;
    outline: none;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    margin-left: 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a i {
    margin-right: 5px;
}

.write-btn {
    background-color: #666666;
    color: white !important;
    padding: 6px 15px;
    border: 2px solid #666666;
    transition: background-color 0.3s;
}

.write-btn:hover {
    background-color: #333333;
    border-color: #333333;
}

/* 主体内容 */
.main-content {
    display: flex;
    margin: 20px 0;
    gap: 20px;
}

/* 左侧内容区 */
.content-area {
    flex: 1;
    background: white;
    border: 1px solid #cccccc;
    overflow: hidden;
}

.blog-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--border);
}

.blog-title {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-meta {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 14px;
}

.blog-meta .author {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.blog-meta .author-img {
    width: 36px;
    height: 36px;
    border: 1px solid #cccccc;
    margin-right: 10px;
    background-image: url('../../../logo.png');
    background-size: cover;
    background-position: center;
}

.blog-meta .date {
    margin-right: 20px;
}

.blog-meta .stats {
    display: flex;
    margin-left: auto;
}

.blog-meta .stats span {
    margin-left: 15px;
    display: flex;
    align-items: center;
}

.blog-meta .stats i {
    margin-right: 5px;
}

.blog-content {
    padding: 30px;
}

.blog-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.blog-content h2 {
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.blog-content pre {
    background: #f6f8fa;
    padding: 15px;
    border: 1px solid #e0e0e0;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eaeaea;
    padding: 8px 15px;
    border: 1px solid #cccccc;
    border-bottom: none;
    margin-top: 20px;
    font-size: 14px;
}

.code-header .language {
    font-weight: 600;
}

.code-header .copy-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 13px;
}

.code-header .copy-btn:hover {
    color: var(--primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 30px;
    border-top: 1px solid var(--border);
}

.tag {
    background: #f0f0f0;
    color: var(--text-light);
    padding: 4px 8px;
    border: 1px solid #cccccc;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.tag:hover {
    background: #e0e0e0;
}

/* 右侧边栏 */
.sidebar {
    width: 300px;
}

.sidebar-card {
    background: white;
    border: 1px solid #cccccc;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 8px;
    color: var(--primary);
}

.author-info {
    padding: 20px;
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border: 2px solid #cccccc;
    margin: 0 auto 15px;
    background-image: url('../../../logo.png');
    background-size: cover;
    background-position: center;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.author-title {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.author-desc {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 15px;
    font-style: italic;
}

.author-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
}

.follow-btn {
    background-color: #666666;
    color: white;
    border: 2px solid #666666;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 20px;
}

.follow-btn:hover {
    background-color: #333333;
    border-color: #333333;
}

.popular-posts {
    padding: 0;
}

.post-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background-color 0.2s;
}

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

.post-item:hover {
    background-color: #f8f8f8;
}

.post-index {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-lighter);
    min-width: 30px;
    padding-top: 2px;
}

.post-content {
    flex: 1;
}

.post-title {
    font-size: 15px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.post-meta {
    font-size: 12px;
    color: var(--text-light);
}

.categories {
    padding: 0 20px 20px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

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

.category-count {
    background: #f0f0f0;
    color: var(--text-light);
    padding: 2px 6px;
    border: 1px solid #cccccc;
    font-size: 12px;
}

/* 首页文章列表样式 */
.article-list {
    background: white;
    border: 1px solid #cccccc;
    overflow: hidden;
}

.article-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background-color 0.2s;
}

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

.article-item:hover {
    background-color: #f8f8f8;
}

.article-thumbnail {
    width: 120px;
    height: 80px;
    background: #e0e0e0;
    border: 1px solid #cccccc;
    margin-right: 20px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-info {
    flex: 1;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.article-meta {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-lighter);
}

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

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

/* 底部区域 */
.footer {
    background: var(--dark-bg);
    color: #aaa;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-column {
    width: 23%;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-title {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-links a {
    display: block;
    color: #aaa;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    margin-top: 20px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .footer-column {
        width: 48%;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        margin: 10px 0;
    }
    
    .blog-meta {
        flex-wrap: wrap;
    }
    
    .blog-meta .stats {
        margin-top: 10px;
        margin-left: 0;
        width: 100%;
    }
    
    .footer-column {
        width: 100%;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* 分页导航样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 8px;
}

.page-btn, .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    text-decoration: none;
    color: #333;
    background: #f0f0f0;
    border: 1px solid #cccccc;
    font-size: 14px;
    min-width: 32px;
    height: 28px;
}

.page-btn:hover, .page-num:hover {
    color: #000;
    background: #e0e0e0;
    border-color: #999;
}

.page-num.active {
    color: #fff;
    background: #666666;
    border-color: #666666;
    font-weight: bold;
}

.page-dots {
    color: #999;
    padding: 0 8px;
    font-size: 14px;
}

.prev-btn, .next-btn {
    font-weight: normal;
    padding: 6px 12px;
}

.prev-btn i, .next-btn i {
    font-size: 12px;
}

/* 分页响应式 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        margin: 30px 0;
    }
    
    .page-btn, .page-num {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
        height: 32px;
    }
    
    .prev-btn, .next-btn {
        padding: 6px 12px;
    }
}

/* Markdown 内容样式 */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin: 24px 0 16px 0;
    font-weight: 600;
    line-height: 1.25;
    color: #333;
}

.blog-content h1 {
    font-size: 2em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 10px;
}

.blog-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 8px;
}

.blog-content h3 {
    font-size: 1.25em;
}

.blog-content h4 {
    font-size: 1em;
}

.blog-content h5 {
    font-size: 0.875em;
}

.blog-content h6 {
    font-size: 0.85em;
    color: #6a737d;
}

.blog-content p {
    margin: 16px 0;
    line-height: 1.6;
}

.blog-content code {
    background: #f6f8fa;
    border-radius: 3px;
    font-size: 85%;
    margin: 0;
    padding: 0.2em 0.4em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.blog-content pre {
    background: #f6f8fa;
    border-radius: 6px;
    font-size: 85%;
    line-height: 1.45;
    overflow: auto;
    padding: 16px;
    margin: 16px 0;
}

.blog-content pre code {
    background: transparent;
    border: 0;
    display: inline;
    line-height: inherit;
    margin: 0;
    max-width: auto;
    overflow: visible;
    padding: 0;
    word-wrap: normal;
}

.blog-content blockquote {
    border-left: 4px solid #dfe2e5;
    color: #6a737d;
    margin: 16px 0;
    padding: 0 16px;
}

.blog-content blockquote p {
    margin: 8px 0;
}

.blog-content ul,
.blog-content ol {
    margin: 16px 0;
    padding-left: 2em;
}

.blog-content li {
    margin: 4px 0;
    line-height: 1.6;
}

.blog-content table {
    border-collapse: collapse;
    border-spacing: 0;
    display: block;
    margin: 16px 0;
    overflow: auto;
    width: 100%;
}

.blog-content table th,
.blog-content table td {
    border: 1px solid #dfe2e5;
    padding: 6px 13px;
    text-align: left;
}

.blog-content table th {
    background: #f6f8fa;
    font-weight: 600;
}

.blog-content table tr:nth-child(2n) {
    background: #f6f8fa;
}

.blog-content hr {
    background: #e1e4e8;
    border: 0;
    height: 1px;
    margin: 24px 0;
    padding: 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

.blog-content a {
    color: #0366d6;
    text-decoration: none;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content strong {
    font-weight: 600;
}

.blog-content em {
    font-style: italic;
}

.blog-content del {
    text-decoration: line-through;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .blog-content pre {
        padding: 12px;
        font-size: 14px;
    }
    
    .blog-content table {
        font-size: 14px;
    }
    
    .blog-content table th,
    .blog-content table td {
        padding: 4px 8px;
    }
}