/* 学习专用 - 个人博客样式 */

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

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    background: #f7f8fa;
    color: #333;
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #3a7bd5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

main.container {
    flex: 1;
    padding-top: 40px;
    padding-bottom: 60px;
}

/* 顶部导航 */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.site-name:hover {
    color: #3a7bd5;
    text-decoration: none;
}

.site-nav a {
    margin-left: 24px;
    color: #555;
    font-size: 15px;
}

.site-nav a:hover,
.site-nav a.active {
    color: #3a7bd5;
    text-decoration: none;
}

/* 首页标语 */
.hero {
    text-align: center;
    padding: 40px 0 30px;
}

.hero h1 {
    font-size: 30px;
    margin-bottom: 10px;
}

.hero p {
    color: #777;
}

/* 文章列表 */
.article-list {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    transition: background 0.2s;
}

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

.article-item:hover {
    background: #f5f9ff;
    text-decoration: none;
}

.article-item h2 {
    font-size: 17px;
    font-weight: 600;
}

.article-item .date {
    color: #999;
    font-size: 14px;
    white-space: nowrap;
    margin-left: 20px;
}

.empty {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* 通用卡片 */
.card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 40px;
}

.card h1 {
    font-size: 26px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.card .content p {
    margin-bottom: 16px;
}

.card .content h3 {
    margin: 24px 0 12px;
    font-size: 19px;
}

.card .content ul,
.card .content ol {
    margin: 0 0 16px 2em;
}

/* 文章详情 */
.article-detail .meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.article-detail .content {
    font-size: 16px;
}

.article-detail .back {
    margin-top: 30px;
}

/* 404 页面 */
.page-404 {
    text-align: center;
    padding: 80px 0;
}

.page-404 h1 {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 16px;
}

/* 底部 */
.site-footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 24px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.site-footer p {
    margin: 4px 0;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .card {
        padding: 24px 20px;
    }

    .hero h1 {
        font-size: 24px;
    }

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

    .article-item .date {
        margin-left: 0;
        margin-top: 4px;
    }
}
