/* ========== Post List ========== */
.post-list {
    padding: 1rem 0;
}

.post-empty {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.6));
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Post Card */
.post-card {
    background: var(--color-surface, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .post-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    }

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

    .post-card-link:hover {
        text-decoration: none;
        color: inherit;
    }

.post-card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 比? */
    overflow: hidden;
    background: var(--color-surface-soft, #f1f5f9);
}

    .post-card-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.25rem;
}

.post-card-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background: var(--cat-color, var(--color-primary, #4f46e5));
    color: #fff;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    color: var(--color-text, #0f172a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.7));
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.55));
}

.post-card-date::before {
    content: "?? ";
}

.post-card-author::before {
    content: "?? ";
}

/* Loading */
.post-loading {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.6));
}

/* ========== Load More (Infinite Scroll) ========== */
.load-more-area {
    padding: 2rem 0;
    text-align: center;
}

.load-more-trigger {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.6));
}

.load-more-text::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border, #e2e8f0);
    border-top-color: var(--color-primary, #4f46e5);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.load-more-end {
    padding: 1rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.5));
    font-size: 0.9rem;
}

.load-more-error {
    padding: 1rem;
    color: var(--color-danger, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.btn-retry {
    padding: 0.5rem 1rem;
    background: var(--color-primary, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

    .btn-retry:hover {
        background: var(--color-primary-hover, #4338ca);
    }

/* ========== Editor.js Styles ========== */
.ce-checklist__item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.ce-checklist__box {
    margin-right: 0.5rem;
    font-weight: bold;
    color: var(--color-primary, #4f46e5);
}

.ce-checklist__item--checked .ce-checklist__text {
    text-decoration: line-through;
    color: #94a3b8;
}

.ce-quote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-left: 4px solid #4f46e5;
    font-style: italic;
}

.ce-quote__caption {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
    font-style: normal;
}

.ce-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.ce-warning__title {
    margin: 0 0 0.5rem 0;
    color: #92400e;
    font-weight: 700;
}

.ce-warning__message {
    color: #b45309;
}

.ce-delimiter {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 2rem auto;
    width: 60%;
}

.ce-image figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 991.98px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
}
/* ========== Article Detail Page ========== */
.post-article {
    margin-bottom: 4rem;
}

/* 1. ʭϤ */
.post-hero-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    aspect-ratio: 16/9;
    background: #f1f5f9;
}

    .post-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* 2. DP Meta */
.post-header {
    margin-bottom: 2rem;
}

.post-category-badge {
    display: inline-block;
    background: var(--cat-color, #4f46e5);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

    .post-category-badge:hover {
        opacity: 0.9;
        color: #fff;
    }

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: #64748b;
    font-size: 0.95rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #0f172a;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.6;
}

.meta-separator {
    color: #cbd5e1;
}

.post-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 3. yz */
.post-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #334155;
    background: #f8fafc;
    padding: 1.5rem;
    border-left: 4px solid #6c8ec1;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2.5rem;
    font-style: italic;
}

/* 4.  */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1e293b;
}

    .post-content p {
        margin-bottom: 1.5rem;
    }

    .post-content img {
        max-width: 100%;
        border-radius: 8px;
        height: auto;
        margin: 1.5rem 0;
    }

    .post-content h2 {
        font-size: 1.8rem;
        font-weight: 700;
        margin: 2.5rem 0 1rem;
        color: #0f172a;
    }

    .post-content h3 {
        font-size: 1.5rem;
        font-weight: 600;
        margin: 2rem 0 1rem;
        color: #0f172a;
    }

    .post-content ul, .post-content ol {
        margin-bottom: 1.5rem;
        padding-left: 2rem;
    }

    .post-content blockquote {
        border-left: 4px solid #cbd5e1;
        padding-left: 1rem;
        margin: 1.5rem 0;
        color: #64748b;
        font-style: italic;
    }

/* 峹 */
.related-posts {
    border-top: 1px solid #e2e8f0;
    padding-top: 3rem;
    margin-top: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

@media (max-width: 768px) {
    .post-title {
        font-size: 1.8rem;
    }

    .post-hero-image {
        border-radius: 0;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
    }
}

/* Overrides for Post Card Icons */
.post-card-date::before, .post-card-author::before {
    content: none !important;
}

.post-card-date,
.post-card-author {
    display: flex;
    align-items: center;
    align-items: flex-start;
    gap: 4px;
}

.post-card-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    object-fit: contain;
}

/* ========== Post List Card (Horizontal) ========== */
.post-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-l-card {
    background: var(--color-surface, #fff);
    border-radius: 12px;
    height: 200px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--color-border, #f1f5f9);
}

    .post-l-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    }

.post-l-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.post-l-card-image {
    position: relative;
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--color-surface-soft, #f1f5f9);
}

    .post-l-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

.post-l-card:hover .post-l-card-image img {
    transform: scale(1.05);
}

.post-l-card-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-l-card-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background: var(--cat-color, var(--color-primary, #4f46e5));
    color: #fff;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.post-l-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
    color: var(--color-text, #0f172a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-l-card-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.7));
    line-height: 1.6;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.post-l-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted, rgba(15, 23, 42, 0.55));
    margin-top: auto;
}

.post-l-card-date,
.post-l-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-l-card-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    object-fit: contain;
}

@media (max-width: 768px) {
    .post-l-card {
        height: 120px;
        overflow: hidden;
    }

    .post-l-card-content {
        padding: 1rem;
    }

    .post-l-card-image {
        width: 120px;
        min-width: 120px;
        height: 120px;
    }

    .post-l-card-title {
        font-size: 1.1rem;
        -webkit-line-clamp: 2;
    }

    .post-l-card-desc {
        display: none;
    }

    .post-l-card-meta {
        justify-content: space-between;
    }

        .post-l-card-meta .post-l-card-author {
            display: none;
        }
}

/* Post Actions (Like Button) */
.post-actions {
    gap: 15px;
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.btn-like {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--color-border, #e2e8f0);
    background: var(--color-surface, #fff);
    color: var(--color-text, #334155);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .btn-like:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-color: var(--color-primary, #4f46e5);
        color: var(--color-primary, #4f46e5);
    }

    .btn-like.liked {
        background: var(--color-primary, #4f46e5);
        color: #fff;
        border-color: var(--color-primary, #4f46e5);
        cursor: default;
    }

    .btn-like .like-icon {
        font-size: 1.4rem;
    }

/* Post Top Bar (Category & Popularity) */
.post-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-popularity-large {
    display: flex;
    align-items: center;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #ff4500; /* Orange Red for heat/fire */
}

.popularity-icon {
    width: 24px;
    height: 24px;
    margin-right: 6px;
    object-fit: contain;
}

.popularity-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

/* Share Button (Blue Style) */
.btn-share {
    background-color: #007bff; /* Blue */
    color: white;
}

    .btn-share:hover {
        background-color: #0056b3;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
        color: white;
    }

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    .share-modal-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

.share-modal {
    background-color: white;
    border-radius: 16px;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.share-modal-overlay.active .share-modal {
    transform: translateY(0);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

    .share-modal-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
    }

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

    .share-option:hover {
        background-color: #f5f5f5;
    }

    .share-option span {
        font-size: 0.875rem;
        color: #333;
    }

/* Unified Button Styles (Overrides) */
.btn-like, .btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
}

/* Like Button Specifics */
.btn-like {
    background-color: #f0f2f5;
    color: #65676b;
}

    .btn-like:hover {
        background-color: #e4e6eb;
    }

    .btn-like.liked {
        background-color: #fff0f0;
        color: #ff4500;
        border-color: #ff4500;
    }

/* Share Button Specifics */
.btn-share {
    background-color: #007bff;
    color: white;
}

    .btn-share:hover {
        background-color: #0056b3;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }

    .btn-share svg, .btn-like img {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

/* Refined Share Button Style (Light Blue bg, Dark Border) */
.btn-share {
    background-color: #e7f5ff !important;
    color: #007bff !important;
    border: 1px solid #007bff !important;
}

    .btn-share:hover {
        background-color: #d0ebff !important;
        border-color: #0056b3 !important;
        color: #0056b3 !important;
    }

/* View Stat in Post Actions */
.action-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #f8f9fa;
    color: #6c757d;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
}

    .action-stat svg {
        width: 20px;
        height: 20px;
    }

.view-stat {
    background-color: #f1f3f4;
    border: 1px solid #e0e0e0;
}
