.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(187, 134, 252, 0.3);
    box-shadow: 0 16px 50px rgba(187, 134, 252, 0.18);
}

.post-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.12) 0%, rgba(3, 218, 198, 0.08) 100%);
    overflow: hidden;
}

.post-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: radial-gradient(circle at top, rgba(187, 134, 252, 0.18) 0%, rgba(18, 18, 18, 0.65) 70%);
}

.post-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.post-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(187, 134, 252, 0.14);
    border: 1px solid rgba(187, 134, 252, 0.16);
    color: #f3eaff;
    font-size: 0.82rem;
    font-weight: 600;
}

.post-time {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.82rem;
}

.post-title {
    font-size: 1.25rem;
    line-height: 1.35;
}

.post-description {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 5.1em;
}

.post-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(187, 134, 252, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-author-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-author-avatar-placeholder {
    color: #fff;
    font-weight: 700;
}

.post-author-name {
    font-weight: 600;
    color: #fff;
}

.post-author-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
}

.post-engagement {
    display: flex;
    gap: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    white-space: nowrap;
}

.post-actions {
    padding-top: 0.1rem;
}

.post-delete-btn {
    background: transparent;
    color: #ff7d7d;
    border: 1px solid rgba(255, 125, 125, 0.35);
    border-radius: 12px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.post-delete-btn:hover {
    background: rgba(255, 125, 125, 0.1);
    border-color: rgba(255, 125, 125, 0.55);
    transform: translateY(-1px);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.4rem;
    border-radius: 14px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    background: linear-gradient(135deg, #bb86fc 0%, #6c63ff 100%);
    box-shadow: 0 8px 24px rgba(187, 134, 252, 0.28);
}

@media (max-width: 768px) {
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-engagement {
        width: 100%;
        justify-content: space-between;
    }
}
