/* 博客首页样式 */
.blog-home {
    width: 100%;
    padding: 2rem;
    background: #1a1a1a;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #242424 0%, #1a1a1a 100%);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 3rem;
    color: #f0f0f0;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

header p {
    color: #a0aec0;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 文章列表布局 */
.posts {
    padding: 0 1rem;
}

.posts h2 {
    font-size: 2rem;
    color: #f0f0f0;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.posts h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #63b3ed;
    border-radius: 2px;
}

/* 博客文章列表样式优化 */
#postList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.post-item {
    background: #242424;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 320px;
    overflow: hidden;
    cursor: pointer;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: #444;
}

.post-item h3 {
    margin: 0 0 1rem;
    line-height: 1.4;
}

.post-item h3 a {
    color: #f0f0f0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.post-item h3 a:hover {
    color: #63b3ed;
}

.post-item p {
    color: #a0aec0;
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-item .post-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #718096;
}
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.post-description {
    color: #a0aec0;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    border-color: #63b3ed;
}

.post-item h3 a {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: block;
    transition: color 0.2s ease;
}

.post-item h3 a:hover {
    color: #63b3ed;
}

.post-meta {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
    }

    .blog-home {
        background: #1a1a1a;
    }

    header {
        background: linear-gradient(135deg, #242424 0%, #1a1a1a 100%);
    }

    header h1 {
        color: #f0f0f0;
    }

    header p {
        color: #a0aec0;
    }

    .posts h2 {
        color: #f0f0f0;
    }

    .post-item {
        background: #242424;
        border-color: #333;
    }

    .post-item h3 a {
        color: #f0f0f0;
    }

    .post-item h3 a:hover {
        color: #63b3ed;
    }

    .post-meta {
        color: #a0aec0;
    }

    .post-excerpt {
        color: #e0e0e0;
    }
}