.blog-detail {
    padding: 2rem 0;
}

.blog-header {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}

.blog-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #2d3748;
    font-weight: 600;
}

.blog-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.publish-date {
    color: #718096;
    font-size: 0.9rem;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag {
    background: #f7fafc;
    color: #4a5568;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid #e2e8f0;
}

.blog-cover {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.blog-cover img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
}

.blog-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4a5568;
}

.blog-content h2 {
    margin: 2.5rem 0 1rem;
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eaeaea;
}

.blog-content h3 {
    margin: 2rem 0 1rem;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.blog-content h4 {
    margin: 1.5rem 0 0.8rem;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content code {
    background: #f7fafc;
    color: #2d3748;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
}

.blog-content pre {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
}

.blog-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.9rem;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border: 1px solid #e2e8f0;
}

.blog-content th {
    background: #f7fafc;
    color: #2d3748;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.blog-content td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.blog-content tr:last-child td {
    border-bottom: none;
}

.related-posts {
    padding: 3rem 0 0;
    margin-top: 3rem;
    border-top: 1px solid #eaeaea;
}

.related-posts .section-title {
    margin-bottom: 2rem;
    text-align: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.post-card {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #cdcdcd
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-image::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.post-card:hover .post-image::after {
    opacity: 1;
}

.post-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-light);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-date {
    display: flex;
    align-items: center;
}

.post-date::before {
    content: "📅";
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }

    .blog-meta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .blog-content {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: smaller;
        word-break: break-all;
    }

    table th, table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 1.75rem;
    }

    .blog-content {
        padding: 0 0.5rem;
        width: 100%;
    }

    .blog-content pre {
        padding: 1rem;
        margin: 1rem -0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}
