/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部 ===== */
header {
    background: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
    color: #fff;
    padding: 50px 0 40px;
    text-align: center;
}

header .site-title {
    font-size: 2.2em;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

header .site-desc {
    font-size: 1.1em;
    opacity: 0.85;
}

/* ===== 导航 ===== */
nav {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav a {
    color: #555;
    text-decoration: none;
    margin-right: 24px;
    font-size: 0.95em;
    transition: color 0.2s;
}

nav a:hover,
nav a.active {
    color: #2e86c1;
    font-weight: 600;
}

/* ===== 文章列表 ===== */
main {
    padding: 30px 0 60px;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-date {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 6px;
}

.post-card h2 {
    font-size: 1.3em;
    margin-bottom: 10px;
    line-height: 1.5;
}

.post-card h2 a {
    color: #1a5276;
    text-decoration: none;
}

.post-card h2 a:hover {
    color: #2e86c1;
}

.post-card p {
    color: #666;
    font-size: 0.92em;
    line-height: 1.9;
}

.post-tags {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.tag {
    background: #eaf2f8;
    color: #2e86c1;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* ===== 关于 ===== */
.about-section {
    margin-top: 50px;
    padding: 28px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.about-section h2 {
    color: #1a5276;
    margin-bottom: 16px;
    font-size: 1.2em;
}

.about-section p {
    color: #555;
    margin-bottom: 10px;
}

/* ===== 文章详情页 ===== */
.article-header {
    text-align: center;
    padding: 50px 0 30px;
    background: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
    color: #fff;
}

.article-header h1 {
    font-size: 1.8em;
    line-height: 1.5;
    margin-bottom: 12px;
}

.article-meta {
    font-size: 0.9em;
    opacity: 0.8;
}

.article-content {
    background: #fff;
    padding: 36px 40px;
    border-radius: 8px;
    margin-top: -15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: relative;
    z-index: 1;
}

.article-content h2 {
    color: #1a5276;
    margin: 30px 0 14px;
    font-size: 1.3em;
    padding-bottom: 8px;
    border-bottom: 2px solid #eaf2f8;
}

.article-content h3 {
    color: #2e86c1;
    margin: 24px 0 10px;
    font-size: 1.1em;
}

.article-content p {
    margin-bottom: 14px;
    color: #444;
}

.article-content ul,
.article-content ol {
    margin: 12px 0 12px 24px;
    color: #444;
}

.article-content li {
    margin-bottom: 6px;
}

.article-content pre {
    background: #f4f6f8;
    padding: 16px 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 0.9em;
    line-height: 1.6;
}

.article-content code {
    font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
    background: #f0f3f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content blockquote {
    border-left: 4px solid #2e86c1;
    padding: 12px 20px;
    margin: 16px 0;
    background: #f4f8fc;
    color: #555;
}

.article-content .tip {
    background: #fef9e7;
    border-left: 4px solid #f39c12;
    padding: 12px 20px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
}

.article-content .tip::before {
    content: "💡 提示：";
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #2e86c1;
    text-decoration: none;
    font-size: 0.92em;
}

.back-link:hover {
    text-decoration: underline;
}

/* ===== 页脚 ===== */
footer {
    background: #2c3e50;
    color: #aaa;
    text-align: center;
    padding: 24px 0;
    font-size: 0.85em;
}

footer .beian {
    margin-top: 8px;
    font-size: 0.9em;
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    header {
        padding: 30px 0 25px;
    }

    header .site-title {
        font-size: 1.6em;
    }

    .article-content {
        padding: 24px 20px;
    }

    .post-card {
        padding: 18px 20px;
    }
}
