.masonry-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    max-width: 300px;
}

.grid-item {
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--block-bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    break-inside: avoid;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
}

.item-content {
    padding: 15px;
}

.item-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.item-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    font-size: 12px;
}

.username {
    font-size: 13px;
    color: #666;
}

.save-btn {
    background-color: var(--accent-color);
    color: var(--alt-text-color);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: var(--accent-hover-color);
}

@media (max-width: 768px) {
    .column {
        max-width: 100%;
    }

    .masonry-grid {
        flex-direction: column;
    }
}