/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 页头样式 */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-size: 16px;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #3498db;
}

/* 主内容区域 */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* 介绍区域 */
.intro-section {
    margin-bottom: 50px;
}

.author-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 4px solid #f0f0f0;
}

.author-card h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.author-card p {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 文章列表 */
.posts-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.posts-list {
    display: grid;
    gap: 25px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.post-date {
    color: #999;
}

.post-category {
    color: #3498db;
    font-weight: 500;
}

.post-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.post-title a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #3498db;
}

.post-excerpt {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: #2980b9;
}

/* 关于区域 */
.about-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.about-content {
    color: #666;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 12px;
}

.about-content strong {
    color: #2c3e50;
}

/* 文章详情页 */
.post-detail {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-header .post-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.post-header .post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.post-content {
    line-height: 1.8;
    color: #555;
}

.post-content h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.post-content h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 25px 0 15px;
}

.post-content p {
    margin-bottom: 15px;
}

.post-content ol,
.post-content ul {
    margin: 15px 0 15px 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 14px;
    color: #e83e8c;
}

.code-block {
    background: #2d2d2d;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    background: transparent;
    color: #f8f8f2;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

.post-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.back-home {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.back-home:hover {
    background: #2980b9;
}

/* 页脚样式 */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    font-size: 14px;
}

.footer-row {
    margin: 0 0;
}

.footer-row a {
    color: #ecf0f1;
    text-decoration: none;
}

.footer-row a:hover {
    color: #3498db;
}

.ipc-icon {
    width: 12px;
    height: 12px;
    vertical-align: middle;
    margin-right: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .main-nav {
        gap: 20px;
    }

    .author-card {
        padding: 30px 20px;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .post-card,
    .post-detail {
        padding: 20px;
    }

    .post-header .post-title {
        font-size: 24px;
    }

    .post-content h2 {
        font-size: 20px;
    }
}
